summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog497
-rw-r--r--gcc/testsuite/c-c++-common/asan/null-deref-1.c2
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c1
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/pr60469.c15
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/div-by-zero-1.c10
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/div-by-zero-2.c10
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/div-by-zero-3.c6
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/load-bool-enum.c4
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-1.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-10.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-11.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-2.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-3.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-4.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-5.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-6.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-7.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-8.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-9.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-add-2.c28
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-int128.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-mul-2.c8
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-mul-4.c64
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-negate-1.c18
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-sub-2.c20
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr59333.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr59667.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr60613-2.c4
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr60636.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/shift-1.c12
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/shift-2.c10
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/vla-1.c30
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-36-1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-58.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-59.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-vect.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist83.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic156.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn25.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/atomic-2.C14
-rw-r--r--gcc/testsuite/g++.dg/ext/attrib49.C20
-rw-r--r--gcc/testsuite/g++.dg/ext/vla14.C23
-rw-r--r--gcc/testsuite/g++.dg/ext/vla15.C20
-rw-r--r--gcc/testsuite/g++.dg/init/aggr4.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-31.C16
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-1.C50
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-2.C15
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-3.C81
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-4.C85
-rw-r--r--gcc/testsuite/g++.dg/lto/pr60567_0.C23
-rw-r--r--gcc/testsuite/g++.dg/opt/pr60849.C13
-rw-r--r--gcc/testsuite/g++.dg/pr49718.C3
-rw-r--r--gcc/testsuite/g++.dg/template/crash119.C8
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60609.C252
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60659.C58
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60746.C23
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60750.C21
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60854.C13
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/forwprop-switch.C24
-rw-r--r--gcc/testsuite/g++.dg/vect/pr60836.cc39
-rw-r--r--gcc/testsuite/g++.dg/warn/Weff1.C5
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnvdtor-2.C30
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnvdtor-3.C75
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnvdtor-4.C75
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnvdtor.C1
-rw-r--r--gcc/testsuite/g++.dg/warn/nonnull2.C10
-rw-r--r--gcc/testsuite/g++.dg/warn/warn_format_signedness.C11
-rw-r--r--gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C21
-rw-r--r--gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C10
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/overload21.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/init5.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb121.C2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr28865.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr60556.c8
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr60655-1.c31
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr60655-2.c30
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-6.c5
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-6a.c44
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-7.c4
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-7a.c44
-rw-r--r--gcc/testsuite/gcc.dg/format/warn-signedness.c11
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr55022.c27
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr59817-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr59817-2.c15
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr60740.c16
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr60785.c27
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr55113_0.c1
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr59626_0.c15
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr59626_1.c4
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60720_0.c15
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60720_1.c1
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60820_0.c13
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60820_1.c11
-rw-r--r--gcc/testsuite/gcc.dg/pr60797.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr60844.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56965-1.c32
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56965-2.c34
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60733.c36
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60766.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/update-loopch.c7
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-13.c4
-rw-r--r--gcc/testsuite/gcc.dg/uninit-B-O0.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-I-O0.c4
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr19430-O0.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60505.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60656.c47
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60841.c183
-rw-r--r--gcc/testsuite/gcc.target/arm/pr60650-2.c37
-rw-r--r--gcc/testsuite/gcc.target/arm/pr60657.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/pr60663.c11
-rw-r--r--gcc/testsuite/gcc.target/avr/dev-specific-rmw.c13
-rw-r--r--gcc/testsuite/gcc.target/epiphany/btst-1.c11
-rw-r--r--gcc/testsuite/gcc.target/epiphany/mode-switch.c12
-rw-r--r--gcc/testsuite/gcc.target/epiphany/t1068-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpand-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi-1.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi-2.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-3.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-9.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/isa-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssetype-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssetype-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssetype-5.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/vec-may_alias.c25
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-store16-1.c30
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-store16-2.c22
-rw-r--r--gcc/testsuite/gcc.target/powerpc/atomic_load_store-p8.c22
-rw-r--r--gcc/testsuite/gcc.target/s390/htm-builtins-compile-1.c16
-rw-r--r--gcc/testsuite/gcc.target/s390/htm-nofloat-1.c54
-rw-r--r--gcc/testsuite/gcc.target/s390/htm-nofloat-2.c55
-rw-r--r--gcc/testsuite/gcc.target/s390/htm-nofloat-compile-1.c12
-rw-r--r--gcc/testsuite/gcc.target/s390/s390.exp10
-rw-r--r--gcc/testsuite/gcc.target/sh/memset.c13
-rw-r--r--gcc/testsuite/gfortran.dg/associate_15.f9040
-rw-r--r--gcc/testsuite/gfortran.dg/class_nameclash.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_25.f9055
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr59817.f14
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_17.f9051
-rw-r--r--gcc/testsuite/gfortran.dg/warn_conversion_4.f906
-rw-r--r--gcc/testsuite/gnat.dg/test_raise_from_pure.adb2
-rw-r--r--gcc/testsuite/gnat.dg/vect11.adb33
-rw-r--r--gcc/testsuite/gnat.dg/vect11.ads11
-rw-r--r--gcc/testsuite/gnat.dg/vect12.adb27
-rw-r--r--gcc/testsuite/gnat.dg/vect12.ads10
-rw-r--r--gcc/testsuite/gnat.dg/vect13.adb27
-rw-r--r--gcc/testsuite/gnat.dg/vect13.ads10
-rw-r--r--gcc/testsuite/gnat.dg/vect14.adb25
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp1
-rw-r--r--gcc/testsuite/lib/target-supports.exp31
161 files changed, 3209 insertions, 284 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9270bd67c85..d27064c78ad 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,500 @@
+2014-04-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/60847
+ Forward port from 4.8 branch
+ 2013-07-19 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * gcc.target/i386/bmi-1.c: Extend with new instrinsics.
+ Fix scan patterns.
+ * gcc.target/i386/bmi-2.c: Ditto.
+
+2014-04-17 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60849
+ * g++.dg/opt/pr60849.C: New testcase.
+
+2014-04-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60836
+ * g++.dg/vect/pr60836.cc: New testcase.
+
+2014-04-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60841
+ * gcc.dg/vect/pr60841.c: New testcase.
+
+2014-04-16 Jan Hubicka <hubicka@ucw.cz>
+
+ * g++.dg/ipa/devirt-31.C: New testcase.
+
+2014-04-16 Jan Hubicka <hubicka@ucw.cz>
+
+ PR lto/60820
+ * gcc.dg/lto/pr60820_0.c: New testcase.
+ * gcc.dg/lto/pr60820_1.c: New testcase.
+
+2014-04-16 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/60854
+ * g++.dg/torture/pr60854.C: New testcase.
+
+2014-04-16 Catherine Moore <clm@codesourcery.com>
+
+ * gcc.target/mips/umips-store16-2.c: New test.
+
+2014-04-16 Marc Glisse <marc.glisse@inria.fr>
+
+ * g++.dg/cpp0x/initlist-vect.C: New file.
+
+2014-04-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/uninit-B-O0.c: Remove XFAIL.
+ * gcc.dg/uninit-I-O0.c: Likewise.
+ * gcc.dg/uninit-pr19430-O0.c: Remove some XFAILs.
+
+2014-04-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/60844
+ * gcc.dg/pr60844.c: New test.
+
+2014-04-15 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/56965
+ * gcc.dg/torture/pr56965-1.c: New testcase.
+ * gcc.dg/torture/pr56965-2.c: Likewise.
+
+2014-04-15 Teresa Johnson <tejohnson@google.com>
+
+ * gcc.dg/tree-prof/update-loopch.c: Update expected output.
+
+2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/vect14.adb: New test.
+
+2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/vect12.ad[sb]: New test.
+ * gnat.dg/vect13.ad[sb]: Likewise.
+
+2014-04-15 Max Ostapenko <m.ostapenko@partner.samsung.com>
+
+ * c-c++-common/asan/null-deref-1.c: Change regexp to pass test
+ under qemu-arm.
+ * c-c++-common/ubsan/div-by-zero-1.c: Likewise.
+ * c-c++-common/ubsan/div-by-zero-2.c: Likewise.
+ * c-c++-common/ubsan/div-by-zero-3.c: Likewise.
+ * c-c++-common/ubsan/load-bool-enum.c (foo): Likewise.
+ * c-c++-common/ubsan/null-1.c: Likewise.
+ * c-c++-common/ubsan/null-10.c: Likewise.
+ * c-c++-common/ubsan/null-11.c: Likewise.
+ * c-c++-common/ubsan/null-2.c: Likewise.
+ * c-c++-common/ubsan/null-3.c: Likewise.
+ * c-c++-common/ubsan/null-4.c: Likewise.
+ * c-c++-common/ubsan/null-5.c: Likewise.
+ * c-c++-common/ubsan/null-6.c: Likewise.
+ * c-c++-common/ubsan/null-7.c: Likewise.
+ * c-c++-common/ubsan/null-8.c: Likewise.
+ * c-c++-common/ubsan/null-9.c: Likewise.
+ * c-c++-common/ubsan/overflow-add-2.c: Likewise.
+ * c-c++-common/ubsan/overflow-int128.c: Likewise.
+ * c-c++-common/ubsan/overflow-mul-2.c: Likewise.
+ * c-c++-common/ubsan/overflow-mul-4.c: Likewise.
+ * c-c++-common/ubsan/overflow-negate-1.c: Likewise.
+ * c-c++-common/ubsan/overflow-sub-2.c: Likewise.
+ * c-c++-common/ubsan/pr59333.c: Likewise.
+ * c-c++-common/ubsan/pr59667.c: Likewise.
+ * c-c++-common/ubsan/pr60613-2.c: Likewise.
+ * c-c++-common/ubsan/pr60636.c: Likewise.
+ * c-c++-common/ubsan/shift-1.c: Likewise.
+ * c-c++-common/ubsan/shift-2.c: Likewise.
+ * c-c++-common/ubsan/vla-1.c: Likewise.
+
+2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/vect11.ad[sb]: New test.
+
+2014-04-14 Richard Biener <rguenther@suse.de>
+
+ * g++.dg/tree-ssa/forwprop-switch.C: New testcase.
+
+2014-04-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/lto/pr55113_0.c: Skip on i?86-*-solaris2.1[0-1]*.
+
+2014-04-14 Richard Biener <rguenther@suse.de>
+ Marc Glisse <marc.glisse@inria.fr>
+
+ PR c/60819
+ * gcc.target/i386/vec-may_alias.c: New testcase.
+
+2014-04-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * lib/target-supports.exp
+ (check_effective_target_vect_widen_mult_si_to_di_pattern):
+ Initialize et_vect_widen_mult_si_to_di_pattern_saved.
+ Fix formatting.
+
+2014-04-14 Richard Biener <rguenther@suse.de>
+
+ PR lto/60720
+ * gcc.dg/lto/pr60720_0.c: New testcase.
+ * gcc.dg/lto/pr60720_1.c: Likewise.
+
+2014-04-14 Christian Bruel <christian.bruel@st.com>
+
+ * gcc.target/sh/memset.c: New test.
+
+2014-04-14 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/55022
+ * gcc.dg/graphite/pr55022.c: New testcase.
+
+2014-04-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59817
+ PR tree-optimization/60453
+ * gfortran.dg/graphite/pr59817.f: New testcase.
+ * gcc.dg/graphite/pr59817-1.c: Likewise.
+ * gcc.dg/graphite/pr59817-2.c: Likewise.
+
+2014-04-14 Jason Merrill <jason@redhat.com>
+
+ Revert:
+ * lib/gcc-dg.exp (dg-build-dso): New.
+ (gcc-dg-test-1): Handle dg-do-what "dso".
+
+2014-04-13 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/60717
+ * gfortran.dg/unlimited_polymorphic_17.f90: New test.
+
+ PR fortran/58085
+ * gfortran.dg/associate_15.f90: New test.
+
+2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR middle-end/60467
+ * c-c++-common/cilk-plus/CK/invalid_spawns.c: Add new invalid
+ case to check.
+
+2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR middle-end/60469
+ * c-c++-common/cilk-plus/CK/pr60469.c: New test.
+
+2014-04-12 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/umips-store16-1.c: New test.
+
+2014-04-11 Tobias Burnus <burnus@net-b.de>
+
+ PR c/60194
+ * * g++.dg/warn/warn_format_signedness.C: New.
+ * gcc.dg/format/warn-signedness.c: New.
+
+2014-04-11 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/58880
+ PR fortran/60495
+ * gfortran.dg/finalize_25.f90: New.
+
+2014-04-11 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.target/epiphany/t1068-2.c: New file.
+
+2014-04-11 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.target/epiphany/btst-1.c: New test.
+
+2014-04-11 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ PR rtl-optimization/60651
+ * gcc.target/epiphany/mode-switch.c: New test.
+
+2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58600
+ * g++.dg/cpp0x/gen-attrs-58.C: New.
+ * g++.dg/cpp0x/gen-attrs-59.C: Likewise.
+
+2014-04-11 Steve Ellcey <sellcey@mips.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/60556
+ * gcc.c-torture/compile/pr60556.c: New test.
+
+2014-04-11 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60797
+ * gcc.dg/pr60797.c: New testcase.
+
+2014-04-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.target/s390/htm-nofloat-1.c: Rename to ...
+ * gcc.target/s390/htm-nofloat-compile-1.c: ... this one.
+ * gcc.target/s390/htm-nofloat-2.c: Add check for htm target and
+ rename to ...
+ * gcc.target/s390/htm-nofloat-1.c: ... this one.
+ * gcc.target/s390/s390.exp: Make sure the assembler supports htm
+ instructions as well.
+
+2014-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/60663
+ * gcc.target/arm/pr60663.c: New test.
+
+2014-04-10 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/dso/dlclose1.C: Disable for 4.9.
+
+2014-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR lto/60567
+ * g++.dg/lto/pr60567_0.C: New test.
+
+2014-04-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * gfortran.dg/class_nameclash.f90: New test.
+
+2014-04-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52844
+ * g++.dg/cpp0x/variadic156.C: New.
+
+2014-04-10 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.target/s390/htm-builtins-compile-1.c: Replace long long with
+ long.
+
+2014-04-10 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ PR debug/60655
+ * gcc.c-torture/compile/pr60655-2.c: Copy from pr60655-1.c without
+ -fdata-sections.
+
+2014-04-09 Steve Ellcey <sellcey@mips.com>
+
+ * gcc.dg/tree-ssa/ssa-ifcombine-13.c: Remove mips*-*-* from option
+ and scan lists.
+
+2014-04-09 Cong Hou <congh@google.com>
+
+ PR testsuite/60773
+ * lib/target-supports.exp:
+ (check_effective_target_vect_widen_si_to_di_pattern): New.
+ * gcc.dg/vect/pr60656.c: Require vect_long effective target.
+ Use scan-tree-dump-times for vect_widen_mult_si_to_di_pattern
+ targets only.
+ (foo): Fix up formatting.
+ (main): Call check_vect.
+
+2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/59115
+ * g++.dg/template/crash119.C: New.
+
+2014-04-08 Pat Haugen <pthaugen@us.ibm.com>
+
+ * gcc.target/powerpc/atomic_load_store-p8.c: New.
+
+2014-04-08 Jason Merrill <jason@redhat.com>
+
+ * lib/gcc-dg.exp (dg-build-dso): Reset dg-do-what-default to
+ compile.
+
+2014-04-08 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ PR rtl-optimization/60776
+ * gcc.dg/builtin-bswap-6.c: Use -mbranch-cost=0 for s390.
+ * gcc.dg/builtin-bswap-7.c: Likewise.
+ * gcc.dg/builtin-bswap-6a.c: New testcase.
+ * gcc.dg/builtin-bswap-7a.c: New testcase.
+
+ Revert
+ 2014-04-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.dg/builtin-bswap-6.c: Adjust return value to disable GCC
+ optimization.
+ * gcc.dg/builtin-bswap-7.c: Likewise.
+
+2014-04-08 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60785
+ * gcc.dg/graphite/pr60785.c: New testcase.
+
+2014-04-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR target/60602
+ * gcc.c-torture/compile/pr28865.c: XFAIL on sparc*-*-solaris2.9*
+ with as at -O0.
+
+2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.dg/warn/Wnvdtor-2.C: Add more cases.
+ * g++.dg/warn/Wnvdtor-3.C: Likewise.
+ * g++.dg/warn/Wnvdtor-4.C: Likewise.
+
+2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/test_raise_from_pure.adb: UnXFAIL for ARM.
+
+2014-04-07 Charles Baylis <charles.baylis@linaro.org>
+
+ PR target/60609
+ * g++.dg/torture/pr60609.C: New test.
+
+2014-04-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60766
+ * gcc.dg/torture/pr60766.c: New testcase.
+
+2014-04-07 Jason Merrill <jason@redhat.com>
+
+ * lib/gcc-dg.exp (dg-build-dso): New.
+ (gcc-dg-test-1): Handle dg-do-what "dso".
+ * lib/target-supports.exp (add_options_for_dlopen): New.
+ (check_effective_target_dlopen): Use it.
+
+2014-04-07 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ * gcc.target/arm/pr60657.c: Fix missing curly brace.
+
+2014-04-07 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60750
+ * g++.dg/torture/pr60750.C: New testcase.
+ * gcc.dg/tree-ssa/20040517-1.c: Adjust.
+
+2014-04-06 Andreas Schwab <schwab@linux-m68k.org>
+
+ * gcc.c-torture/compile/pr60655-1.c: Use __SIZE_TYPE__ for size_t.
+
+2014-04-06 John David Anglin <danglin@gcc.gnu.org>
+
+ PR testsuite/60671
+ g++.dg/pr49718.C: Adjust scan-assembler-times for hppa*-*-hpux*.
+
+2014-04-06 John David Anglin <danglin@gcc.gnu.org>
+
+ PR testsuite/60672
+ * g++.dg/cpp1y/auto-fn25.C: Require lto.
+
+ * gcc.dg/atomic/stdatomic-flag.c: xfail on hppa*-*-hpux*.
+
+2014-04-05 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ * gfortran.dg/warn_conversion_4.f90: Adjust test.
+
+2014-05-04 Pitchumani Sivanupandi <Pitchumani.S@atmel.com>
+
+ * gcc.target/avr/dev-specific-rmw.c: New test.
+
+2014-04-04 Cong Hou <congh@google.com>
+
+ PR tree-optimization/60656
+ * gcc.dg/vect/pr60656.c: New test.
+
+2014-04-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.dg/builtin-bswap-6.c: Adjust return value to disable GCC
+ optimization.
+ * gcc.dg/builtin-bswap-7.c: Likewise.
+
+2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58207
+ * g++.dg/cpp0x/constexpr-ice15.C: New.
+
+2014-04-04 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/59626
+ testcase by Richard Biener
+ * gcc.dg/lto/pr59626_0.c: New testcase.
+ * gcc.dg/lto/pr59626_1.c: New testcase.
+
+2014-04-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ PR debug/60655
+ * gcc.c-torture/compile/pr60655-1.c: New test.
+
+2014-04-04 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/60640
+ * g++.dg/ipa/pr60640-1.C: New test.
+ * g++.dg/ipa/pr60640-2.C: Likewise.
+ * g++.dg/ipa/pr60640-3.C: Likewise.
+ * g++.dg/ipa/pr60640-4.C: Likewise.
+
+2014-04-04 Jeff Law <law@redhat.com>
+
+ PR target/60657
+ * gcc.target/arm/pr60657.c: New test.
+
+2014-04-04 Richard Biener <rguenther@suse.de>
+
+ PR ipa/60746
+ * g++.dg/torture/pr60746.C: New testcase.
+
+2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * g++.old-deja/g++.robertl/eb121.C: Adjust.
+ * g++.old-deja/g++.jason/overload21.C: Likewise.
+ * g++.old-deja/g++.law/init5.C: Likewise.
+
+2014-04-03 Cong Hou <congh@google.com>
+
+ PR tree-optimization/60505
+ * gcc.dg/vect/pr60505.c: New test.
+
+2014-04-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60740
+ * gcc.dg/graphite/pr60740.c: New testcase.
+
+2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.dg/warn/Wnvdtor.C: Add non-polymorphic case.
+ * g++.dg/warn/Wnvdtor-2.C: New.
+ * g++.dg/warn/Wnvdtor-3.C: New.
+ * g++.dg/warn/Wnvdtor-4.C: New.
+ * g++.dg/warn/Weff1.C: Delete.
+ * g++.old-deja/g++.benjamin/15309-1.C: Delete.
+ * g++.old-deja/g++.benjamin/15309-2.C: Delete.
+
+2014-04-02 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/60659
+ * testsuite/g++.dg/torture/pr60659.C: New testcase.
+
+2014-04-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/60733
+ * gcc.dg/torture/pr60733.c: New test.
+
+2014-04-02 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/60650
+ * gcc.target/arm/pr60650-2.c: New.
+
+2014-04-02 Joseph Myers <joseph@codesourcery.cmo>
+
+ * gcc.target/i386/avx2-vpand-3.c,
+ gcc.target/i386/avx256-unaligned-load-2.c: Use -mno-prefer-avx128.
+
+2014-04-02 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.target/i386/funcspec-2.c, gcc.target/i386/funcspec-3.c,
+ gcc.target/i386/funcspec-9.c, gcc.target/i386/isa-1.c,
+ gcc.target/i386/memcpy-strategy-1.c,
+ gcc.target/i386/memcpy-strategy-2.c,
+ gcc.target/i386/memcpy-vector_loop-1.c,
+ gcc.target/i386/memcpy-vector_loop-2.c,
+ gcc.target/i386/memset-vector_loop-1.c,
+ gcc.target/i386/memset-vector_loop-2.c,
+ gcc.target/i386/sse2-init-v2di-2.c, gcc.target/i386/ssetype-1.c,
+ gcc.target/i386/ssetype-2.c, gcc.target/i386/ssetype-5.c: Skip for
+ -march= options different from those in dg-options.
+
2014-04-02 Joseph Myers <joseph@codesourcery.com>
* gcc.target/i386/387-3.c, gcc.target/i386/387-4.c,
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 6aea9d295f3..87c34c4f68b 100644
--- a/gcc/testsuite/c-c++-common/asan/null-deref-1.c
+++ b/gcc/testsuite/c-c++-common/asan/null-deref-1.c
@@ -18,5 +18,5 @@ int main()
/* { dg-output "ERROR: AddressSanitizer:? SEGV on unknown address\[^\n\r]*" } */
/* { dg-output "0x\[0-9a-f\]+ \[^\n\r]*pc 0x\[0-9a-f\]+\[^\n\r]*(\n|\r\n|\r)" } */
-/* { dg-output " #0 0x\[0-9a-f\]+ (in \[^\n\r]*NullDeref\[^\n\r]* (\[^\n\r]*null-deref-1.c:10|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]* #0 0x\[0-9a-f\]+ (in \[^\n\r]*NullDeref\[^\n\r]* (\[^\n\r]*null-deref-1.c:10|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
/* { dg-output " #1 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*null-deref-1.c:15|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c
index ba9e6193627..5b43be76010 100644
--- a/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c
@@ -8,6 +8,7 @@ int main (void)
{
int x;
+ _Cilk_spawn foo; /* { dg-error "only function calls can be spawned" } */
_Cilk_spawn x; /* { dg-error "only function calls can be spawned" } */
return x;
}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60469.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60469.c
new file mode 100644
index 00000000000..ca0cf7f68bc
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60469.c
@@ -0,0 +1,15 @@
+/* PR middle-end/60469 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+void foo() {}
+
+#define ALEN 1024
+
+int main(int argc, char* argv[])
+{
+ int b[ALEN];
+ b[:] = 100;
+ _Cilk_spawn foo();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-1.c b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-1.c
index ec391e40be2..479ced038fb 100644
--- a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-1.c
+++ b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-1.c
@@ -17,8 +17,8 @@ main (void)
return 0;
}
-/* { dg-output "division by zero(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*division by zero(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*division by zero(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*division by zero(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*division by zero" } */
+/* { dg-output "division by zero\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-2.c b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-2.c
index c8820fa9466..d1eb95f4362 100644
--- a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-2.c
+++ b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-2.c
@@ -16,8 +16,8 @@ main (void)
return 0;
}
-/* { dg-output "division by zero(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*division by zero(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*division by zero(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*division by zero(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*division by zero" } */
+/* { dg-output "division by zero\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-3.c b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-3.c
index 399071ee7aa..266423aa49f 100644
--- a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-3.c
+++ b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-3.c
@@ -16,6 +16,6 @@ main (void)
return 0;
}
-/* { dg-output "division of -2147483648 by -1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*division of -2147483648 by -1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*division of -2147483648 by -1 cannot be represented in type 'int'" } */
+/* { dg-output "division of -2147483648 by -1 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division of -2147483648 by -1 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division of -2147483648 by -1 cannot be represented in type 'int'\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/load-bool-enum.c b/gcc/testsuite/c-c++-common/ubsan/load-bool-enum.c
index 96f7984f86a..4ffd6325bc1 100644
--- a/gcc/testsuite/c-c++-common/ubsan/load-bool-enum.c
+++ b/gcc/testsuite/c-c++-common/ubsan/load-bool-enum.c
@@ -10,8 +10,8 @@ bool b;
__attribute__((noinline, noclone)) enum A
foo (bool *p)
{
- *p = b; /* { dg-output "load-bool-enum.c:13:\[^\n\r]*runtime error: load of value 4, which is not a valid value for type '(_B|b)ool'(\n|\r\n|\r)*" } */
- return a; /* { dg-output "\[^\n\r]*load-bool-enum.c:14:\[^\n\r]*runtime error: load of value 9, which is not a valid value for type 'A'(\n|\r\n|\r)*" { target c++ } } */
+ *p = b; /* { dg-output "load-bool-enum.c:13:\[^\n\r]*runtime error: \[^\n\r]*load of value 4, which is not a valid value for type '(_B|b)ool'\[^\n\r]*(\n|\r\n|\r)*" } */
+ return a; /* { dg-output "\[^\n\r]*load-bool-enum.c:14:\[^\n\r]*runtime error: \[^\n\r]*load of value 9, which is not a valid value for type 'A'\[^\n\r]*(\n|\r\n|\r)*" { target c++ } } */
}
int
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-1.c b/gcc/testsuite/c-c++-common/ubsan/null-1.c
index 08d547f3aae..17f6d19c88b 100644
--- a/gcc/testsuite/c-c++-common/ubsan/null-1.c
+++ b/gcc/testsuite/c-c++-common/ubsan/null-1.c
@@ -9,4 +9,4 @@ main (void)
return *p;
}
-/* { dg-output "load of null pointer of type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "load of null pointer of type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-10.c b/gcc/testsuite/c-c++-common/ubsan/null-10.c
index c3d61a01d5b..8dacf6c06cf 100644
--- a/gcc/testsuite/c-c++-common/ubsan/null-10.c
+++ b/gcc/testsuite/c-c++-common/ubsan/null-10.c
@@ -10,4 +10,4 @@ main (void)
return 0;
}
-/* { dg-output "load of null pointer of type 'short int'(\n|\r\n|\r)" } */
+/* { dg-output "load of null pointer of type 'short int'\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-11.c b/gcc/testsuite/c-c++-common/ubsan/null-11.c
index 6645f2acfcb..6aefaab0034 100644
--- a/gcc/testsuite/c-c++-common/ubsan/null-11.c
+++ b/gcc/testsuite/c-c++-common/ubsan/null-11.c
@@ -13,4 +13,4 @@ main (void)
return (*s)->i;
}
-/* { dg-output "load of null pointer of type 'struct S \\*'(\n|\r\n|\r)" } */
+/* { dg-output "load of null pointer of type 'struct S \\*'\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-2.c b/gcc/testsuite/c-c++-common/ubsan/null-2.c
index cb3907fa5cc..df4901faed8 100644
--- a/gcc/testsuite/c-c++-common/ubsan/null-2.c
+++ b/gcc/testsuite/c-c++-common/ubsan/null-2.c
@@ -9,4 +9,4 @@ main (void)
return ***ppp;
}
-/* { dg-output "load of null pointer of type 'int \\*\\*'(\n|\r\n|\r)" } */
+/* { dg-output "load of null pointer of type 'int \\*\\*'\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-3.c b/gcc/testsuite/c-c++-common/ubsan/null-3.c
index f58562c63b8..b1eb3dbc736 100644
--- a/gcc/testsuite/c-c++-common/ubsan/null-3.c
+++ b/gcc/testsuite/c-c++-common/ubsan/null-3.c
@@ -15,4 +15,4 @@ main (void)
return foo (*p);
}
-/* { dg-output "load of null pointer of type 'int \\*'(\n|\r\n|\r)" } */
+/* { dg-output "load of null pointer of type 'int \\*'\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-4.c b/gcc/testsuite/c-c++-common/ubsan/null-4.c
index 18506afb3c3..7c0aa2c70aa 100644
--- a/gcc/testsuite/c-c++-common/ubsan/null-4.c
+++ b/gcc/testsuite/c-c++-common/ubsan/null-4.c
@@ -11,4 +11,4 @@ main (void)
return 0;
}
-/* { dg-output "load of null pointer of type 'complex double'(\n|\r\n|\r)" } */
+/* { dg-output "load of null pointer of type 'complex double'\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-5.c b/gcc/testsuite/c-c++-common/ubsan/null-5.c
index c3c45b7c47e..f7f6b86d317 100644
--- a/gcc/testsuite/c-c++-common/ubsan/null-5.c
+++ b/gcc/testsuite/c-c++-common/ubsan/null-5.c
@@ -13,4 +13,4 @@ main (void)
return 0;
}
-/* { dg-output "load of null pointer of type 'volatile const complex float'(\n|\r\n|\r)" } */
+/* { dg-output "load of null pointer of type 'volatile const complex float'\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-6.c b/gcc/testsuite/c-c++-common/ubsan/null-6.c
index 63fade5a6e1..6f8ba6bf45d 100644
--- a/gcc/testsuite/c-c++-common/ubsan/null-6.c
+++ b/gcc/testsuite/c-c++-common/ubsan/null-6.c
@@ -10,4 +10,4 @@ main (void)
return 0;
}
-/* { dg-output "store to null pointer of type 'long unsigned int'(\n|\r\n|\r)" } */
+/* { dg-output "store to null pointer of type 'long unsigned int'\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-7.c b/gcc/testsuite/c-c++-common/ubsan/null-7.c
index bf30a0b9b39..92881d73184 100644
--- a/gcc/testsuite/c-c++-common/ubsan/null-7.c
+++ b/gcc/testsuite/c-c++-common/ubsan/null-7.c
@@ -14,4 +14,4 @@ main (void)
return *gao ();
}
-/* { dg-output "load of null pointer of type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "load of null pointer of type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-8.c b/gcc/testsuite/c-c++-common/ubsan/null-8.c
index 170377ee4d4..246824197b7 100644
--- a/gcc/testsuite/c-c++-common/ubsan/null-8.c
+++ b/gcc/testsuite/c-c++-common/ubsan/null-8.c
@@ -13,4 +13,4 @@ main (void)
return s->i;
}
-/* { dg-output "member access within null pointer of type 'struct S'(\n|\r\n|\r)" } */
+/* { dg-output "member access within null pointer of type 'struct S'\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-9.c b/gcc/testsuite/c-c++-common/ubsan/null-9.c
index ab43d22a325..88d441c3816 100644
--- a/gcc/testsuite/c-c++-common/ubsan/null-9.c
+++ b/gcc/testsuite/c-c++-common/ubsan/null-9.c
@@ -13,4 +13,4 @@ main (void)
return u->i;
}
-/* { dg-output "member access within null pointer of type 'union U'(\n|\r\n|\r)" } */
+/* { dg-output "member access within null pointer of type 'union U'\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-add-2.c b/gcc/testsuite/c-c++-common/ubsan/overflow-add-2.c
index 85499d86c26..61097fa0e0d 100644
--- a/gcc/testsuite/c-c++-common/ubsan/overflow-add-2.c
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-add-2.c
@@ -44,17 +44,17 @@ main (void)
return 0;
}
-/* { dg-output "signed integer overflow: 2147483647 \\+ 1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: 1 \\+ 2147483647 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: 2147483647 \\+ 1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: 2147483547 \\+ 1024 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -1 \\+ -2147483648 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -2147483648 \\+ -1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -2147483548 \\+ -1024 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: \[^\n\r]* \\+ 1 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: 1 \\+ \[^\n\r]* cannot be represented in type 'long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: \[^\n\r]* \\+ 1 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: \[^\n\r]* \\+ 1024 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -1 \\+ -\[^\n\r]* cannot be represented in type 'long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1024 cannot be represented in type 'long int'" } */
+/* { dg-output "signed integer overflow: 2147483647 \\+ 1 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 1 \\+ 2147483647 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 2147483647 \\+ 1 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 2147483547 \\+ 1024 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -1 \\+ -2147483648 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -2147483648 \\+ -1 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -2147483548 \\+ -1024 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: \[^\n\r]* \\+ 1 cannot be represented in type 'long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 1 \\+ \[^\n\r]* cannot be represented in type 'long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: \[^\n\r]* \\+ 1 cannot be represented in type 'long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: \[^\n\r]* \\+ 1024 cannot be represented in type 'long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1 cannot be represented in type 'long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -1 \\+ -\[^\n\r]* cannot be represented in type 'long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1024 cannot be represented in type 'long int'\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-int128.c b/gcc/testsuite/c-c++-common/ubsan/overflow-int128.c
index 9a850243d3b..125d6bf5232 100644
--- a/gcc/testsuite/c-c++-common/ubsan/overflow-int128.c
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-int128.c
@@ -44,4 +44,4 @@ main (void)
/* { dg-output "\[^\n\r]*signed integer overflow: 0x80000000000000000000000000000000 \\+ -1 cannot be represented in type '__int128'(\n|\r\n|\r)" } */
/* { dg-output "\[^\n\r]*signed integer overflow: 0x80000000000000000000000000000064 \\+ -1024 cannot be represented in type '__int128'(\n|\r\n|\r)" } */
/* { dg-output "\[^\n\r]*signed integer overflow: 0x7fffffffffffffffffffffffffffffff \\* 2 cannot be represented in type '__int128'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*negation of 0x80000000000000000000000000000000 cannot be represented in type '__int128'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of 0x80000000000000000000000000000000 cannot be represented in type '__int128'; cast to an unsigned type to negate this value to itself\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-mul-2.c b/gcc/testsuite/c-c++-common/ubsan/overflow-mul-2.c
index ece25a354b8..54b382a4180 100644
--- a/gcc/testsuite/c-c++-common/ubsan/overflow-mul-2.c
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-mul-2.c
@@ -20,7 +20,7 @@ main (void)
return 0;
}
-/* { dg-output "signed integer overflow: 2147483647 \\* 2 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: 2 \\* 2147483647 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: \[^\n\r]* \\* 2 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: 2 \\* \[^\n\r]* cannot be represented in type 'long int'" } */
+/* { dg-output "signed integer overflow: 2147483647 \\* 2 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 2 \\* 2147483647 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: \[^\n\r]* \\* 2 cannot be represented in type 'long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 2 \\* \[^\n\r]* cannot be represented in type 'long int'\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-mul-4.c b/gcc/testsuite/c-c++-common/ubsan/overflow-mul-4.c
index 82e114001b4..834eda67306 100644
--- a/gcc/testsuite/c-c++-common/ubsan/overflow-mul-4.c
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-mul-4.c
@@ -52,35 +52,35 @@ main ()
return 0;
}
-/* { dg-output "overflow-mul-4.c:20:\[^\n\r]*signed integer overflow: 1537228672809129302 \\* 6 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:21:\[^\n\r]*signed integer overflow: -1537228672809129302 \\* -6 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:22:\[^\n\r]*signed integer overflow: 1537228672809129302 \\* -6 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:23:\[^\n\r]*signed integer overflow: -1537228672809129302 \\* 6 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:24:\[^\n\r]*signed integer overflow: 2166572392 \\* 4257126175 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:25:\[^\n\r]*signed integer overflow: -2166572392 \\* -4257126175 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:26:\[^\n\r]*signed integer overflow: 2166572392 \\* -4257126175 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:27:\[^\n\r]*signed integer overflow: -2166572392 \\* 4257126175 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:28:\[^\n\r]*signed integer overflow: 1537228672809129301 \\* 7 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:29:\[^\n\r]*signed integer overflow: -1537228672809129301 \\* -7 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:30:\[^\n\r]*signed integer overflow: 1537228672809129301 \\* -7 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:31:\[^\n\r]*signed integer overflow: -1537228672809129301 \\* 7 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:32:\[^\n\r]*signed integer overflow: 2166572391 \\* 4257126176 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:33:\[^\n\r]*signed integer overflow: -2166572391 \\* -4257126176 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:34:\[^\n\r]*signed integer overflow: 2166572391 \\* -4257126176 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:35:\[^\n\r]*signed integer overflow: -2166572391 \\* 4257126176 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:36:\[^\n\r]*signed integer overflow: 6 \\* 1537228672809129302 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:37:\[^\n\r]*signed integer overflow: -6 \\* -1537228672809129302 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:38:\[^\n\r]*signed integer overflow: -6 \\* 1537228672809129302 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:39:\[^\n\r]*signed integer overflow: 6 \\* -1537228672809129302 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:40:\[^\n\r]*signed integer overflow: 4257126175 \\* 2166572392 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:41:\[^\n\r]*signed integer overflow: -4257126175 \\* -2166572392 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:42:\[^\n\r]*signed integer overflow: -4257126175 \\* 2166572392 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:43:\[^\n\r]*signed integer overflow: 4257126175 \\* -2166572392 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:44:\[^\n\r]*signed integer overflow: 7 \\* 1537228672809129301 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:45:\[^\n\r]*signed integer overflow: -7 \\* -1537228672809129301 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:46:\[^\n\r]*signed integer overflow: -7 \\* 1537228672809129301 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:47:\[^\n\r]*signed integer overflow: 7 \\* -1537228672809129301 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:48:\[^\n\r]*signed integer overflow: 4257126176 \\* 2166572391 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:49:\[^\n\r]*signed integer overflow: -4257126176 \\* -2166572391 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:50:\[^\n\r]*signed integer overflow: -4257126176 \\* 2166572391 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*overflow-mul-4.c:51:\[^\n\r]*signed integer overflow: 4257126176 \\* -2166572391 cannot be represented in type 'long long int'" } */
+/* { dg-output "overflow-mul-4.c:20:\[^\n\r]*signed integer overflow: 1537228672809129302 \\* 6 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:21:\[^\n\r]*signed integer overflow: -1537228672809129302 \\* -6 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:22:\[^\n\r]*signed integer overflow: 1537228672809129302 \\* -6 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:23:\[^\n\r]*signed integer overflow: -1537228672809129302 \\* 6 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:24:\[^\n\r]*signed integer overflow: 2166572392 \\* 4257126175 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:25:\[^\n\r]*signed integer overflow: -2166572392 \\* -4257126175 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:26:\[^\n\r]*signed integer overflow: 2166572392 \\* -4257126175 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:27:\[^\n\r]*signed integer overflow: -2166572392 \\* 4257126175 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:28:\[^\n\r]*signed integer overflow: 1537228672809129301 \\* 7 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:29:\[^\n\r]*signed integer overflow: -1537228672809129301 \\* -7 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:30:\[^\n\r]*signed integer overflow: 1537228672809129301 \\* -7 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:31:\[^\n\r]*signed integer overflow: -1537228672809129301 \\* 7 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:32:\[^\n\r]*signed integer overflow: 2166572391 \\* 4257126176 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:33:\[^\n\r]*signed integer overflow: -2166572391 \\* -4257126176 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:34:\[^\n\r]*signed integer overflow: 2166572391 \\* -4257126176 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:35:\[^\n\r]*signed integer overflow: -2166572391 \\* 4257126176 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:36:\[^\n\r]*signed integer overflow: 6 \\* 1537228672809129302 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:37:\[^\n\r]*signed integer overflow: -6 \\* -1537228672809129302 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:38:\[^\n\r]*signed integer overflow: -6 \\* 1537228672809129302 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:39:\[^\n\r]*signed integer overflow: 6 \\* -1537228672809129302 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:40:\[^\n\r]*signed integer overflow: 4257126175 \\* 2166572392 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:41:\[^\n\r]*signed integer overflow: -4257126175 \\* -2166572392 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:42:\[^\n\r]*signed integer overflow: -4257126175 \\* 2166572392 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:43:\[^\n\r]*signed integer overflow: 4257126175 \\* -2166572392 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:44:\[^\n\r]*signed integer overflow: 7 \\* 1537228672809129301 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:45:\[^\n\r]*signed integer overflow: -7 \\* -1537228672809129301 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:46:\[^\n\r]*signed integer overflow: -7 \\* 1537228672809129301 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:47:\[^\n\r]*signed integer overflow: 7 \\* -1537228672809129301 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:48:\[^\n\r]*signed integer overflow: 4257126176 \\* 2166572391 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:49:\[^\n\r]*signed integer overflow: -4257126176 \\* -2166572391 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:50:\[^\n\r]*signed integer overflow: -4257126176 \\* 2166572391 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:51:\[^\n\r]*signed integer overflow: 4257126176 \\* -2166572391 cannot be represented in type 'long long int'\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-negate-1.c b/gcc/testsuite/c-c++-common/ubsan/overflow-negate-1.c
index 85f81d8b547..35fa482c61b 100644
--- a/gcc/testsuite/c-c++-common/ubsan/overflow-negate-1.c
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-negate-1.c
@@ -27,12 +27,12 @@ main (void)
return 0;
}
-/* { dg-output "negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*negation of -\[^\n\r]* cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*negation of -\[^\n\r]* cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*negation of -\[^\n\r]* cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*negation of -9223372036854775808 cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*negation of -9223372036854775808 cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*negation of -9223372036854775808 cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself" } */
+/* { dg-output "negation of -2147483648 cannot be represented in type 'int'\[^\n\r]*; cast to an unsigned type to negate this value to itself\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -2147483648 cannot be represented in type 'int'\[^\n\r]*; cast to an unsigned type to negate this value to itself\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -2147483648 cannot be represented in type 'int'\[^\n\r]*; cast to an unsigned type to negate this value to itself\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -\[^\n\r]* cannot be represented in type 'long int'\[^\n\r]*; cast to an unsigned type to negate this value to itself\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -\[^\n\r]* cannot be represented in type 'long int'\[^\n\r]*; cast to an unsigned type to negate this value to itself\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -\[^\n\r]* cannot be represented in type 'long int'\[^\n\r]*; cast to an unsigned type to negate this value to itself\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -9223372036854775808 cannot be represented in type 'long long int'\[^\n\r]*; cast to an unsigned type to negate this value to itself\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -9223372036854775808 cannot be represented in type 'long long int'\[^\n\r]*; cast to an unsigned type to negate this value to itself\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -9223372036854775808 cannot be represented in type 'long long int'\[^\n\r]*; cast to an unsigned type to negate this value to itself\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-sub-2.c b/gcc/testsuite/c-c++-common/ubsan/overflow-sub-2.c
index 6476b65d2a0..daf6a54666a 100644
--- a/gcc/testsuite/c-c++-common/ubsan/overflow-sub-2.c
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-sub-2.c
@@ -42,13 +42,13 @@ main (void)
return 0;
}
-/* { dg-output "signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -2147483648 \\+ -1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -2147483548 \\+ -1024 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -2147483648 \\+ -1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -2147482648 \\+ -1048576 cannot be represented in type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* - 1 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1024 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1048576 cannot be represented in type 'long int'" } */
+/* { dg-output "signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -2147483648 \\+ -1 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -2147483548 \\+ -1024 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -2147483648 \\+ -1 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -2147482648 \\+ -1048576 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* - 1 cannot be represented in type 'long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1 cannot be represented in type 'long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1024 cannot be represented in type 'long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1 cannot be represented in type 'long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1048576 cannot be represented in type 'long int'\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr59333.c b/gcc/testsuite/c-c++-common/ubsan/pr59333.c
index b68775702be..35504750979 100644
--- a/gcc/testsuite/c-c++-common/ubsan/pr59333.c
+++ b/gcc/testsuite/c-c++-common/ubsan/pr59333.c
@@ -15,4 +15,4 @@ main (void)
return 0;
}
-/* { dg-output "signed integer overflow: 2 \\+ 9223372036854775807 cannot be represented in type 'long long int'" } */
+/* { dg-output "signed integer overflow: 2 \\+ 9223372036854775807 cannot be represented in type 'long long int'\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr59667.c b/gcc/testsuite/c-c++-common/ubsan/pr59667.c
index 7fad7029907..c76c9de9802 100644
--- a/gcc/testsuite/c-c++-common/ubsan/pr59667.c
+++ b/gcc/testsuite/c-c++-common/ubsan/pr59667.c
@@ -11,4 +11,4 @@ main (void)
return 0;
}
-/* { dg-output "store to null pointer of type 'float'(\n|\r\n|\r)" } */
+/* { dg-output "store to null pointer of type 'float'\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr60613-2.c b/gcc/testsuite/c-c++-common/ubsan/pr60613-2.c
index 92c2de81eb8..af6917e6b75 100644
--- a/gcc/testsuite/c-c++-common/ubsan/pr60613-2.c
+++ b/gcc/testsuite/c-c++-common/ubsan/pr60613-2.c
@@ -32,5 +32,5 @@ main ()
return 0;
}
-/* { dg-output "signed integer overflow: 8 \\- -9223372036854775801 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*signed integer overflow: 8 \\- -9223372036854775802 cannot be represented in type 'long long int'" } */
+/* { dg-output "signed integer overflow: 8 \\- -9223372036854775801 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 8 \\- -9223372036854775802 cannot be represented in type 'long long int'\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr60636.c b/gcc/testsuite/c-c++-common/ubsan/pr60636.c
index 41643413755..d6749ab678d 100644
--- a/gcc/testsuite/c-c++-common/ubsan/pr60636.c
+++ b/gcc/testsuite/c-c++-common/ubsan/pr60636.c
@@ -12,4 +12,4 @@ main ()
return 0;
}
-/* { dg-output "negation of -9223372036854775808 cannot be represented in type 'long long int'" } */
+/* { dg-output "negation of -9223372036854775808 cannot be represented in type 'long long int'\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/shift-1.c b/gcc/testsuite/c-c++-common/ubsan/shift-1.c
index d2538802aab..d5c70baa815 100644
--- a/gcc/testsuite/c-c++-common/ubsan/shift-1.c
+++ b/gcc/testsuite/c-c++-common/ubsan/shift-1.c
@@ -23,9 +23,9 @@ main (void)
return 0;
}
-/* { dg-output "shift exponent 152 is too large for \[^\n\r]*-bit type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*shift exponent 153 is too large for \[^\n\r]*-bit type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*shift exponent 154 is too large for \[^\n\r]*-bit type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*shift exponent 524 is too large for \[^\n\r]*-bit type 'long long unsigned int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*shift exponent 370 is too large for \[^\n\r]*-bit type 'int'(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*shift exponent 402 is too large for \[^\n\r]*-bit type 'long int'" } */
+/* { dg-output "shift exponent 152 is too large for \[^\n\r]*-bit type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent 153 is too large for \[^\n\r]*-bit type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent 154 is too large for \[^\n\r]*-bit type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent 524 is too large for \[^\n\r]*-bit type 'long long unsigned int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent 370 is too large for \[^\n\r]*-bit type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent 402 is too large for \[^\n\r]*-bit type 'long int'\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/shift-2.c b/gcc/testsuite/c-c++-common/ubsan/shift-2.c
index aaaeb6fcc09..426ec093706 100644
--- a/gcc/testsuite/c-c++-common/ubsan/shift-2.c
+++ b/gcc/testsuite/c-c++-common/ubsan/shift-2.c
@@ -16,8 +16,8 @@ main (void)
return 0;
}
-/* { dg-output "shift exponent -3 is negative(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*shift exponent -4 is negative(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*shift exponent -5 is negative(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*shift exponent -6 is negative(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*shift exponent -11 is negative" } */
+/* { dg-output "shift exponent -3 is negative\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent -4 is negative\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent -5 is negative\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent -6 is negative\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent -11 is negative\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/vla-1.c b/gcc/testsuite/c-c++-common/ubsan/vla-1.c
index 0fecfa2a3d5..14122032410 100644
--- a/gcc/testsuite/c-c++-common/ubsan/vla-1.c
+++ b/gcc/testsuite/c-c++-common/ubsan/vla-1.c
@@ -102,18 +102,18 @@ main (void)
return 0;
}
-/* { dg-output "variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -5(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -3(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value 0(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value 0(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -6(\n|\r\n|\r)" } */
-/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -4" } */
+/* { dg-output "variable length array bound evaluates to non-positive value -1\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -5\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -3\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value 0\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value 0\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -6\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -4\[^\n\r]*" } */
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C
new file mode 100644
index 00000000000..576fd415085
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C
@@ -0,0 +1,12 @@
+// PR c++/58207
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ virtual bool foo ();
+};
+
+struct B : public A
+{
+ constexpr B () : A (&::n) {} // { dg-error "declared" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36-1.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36-1.C
index 2aae9cae00b..131af368a21 100644
--- a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36-1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36-1.C
@@ -6,6 +6,6 @@ typedef int (*F [[gnu::warn_unused_result]]) (int);
typedef int (*F2 [[gnu::warn_unused_result]]) (int);
-typedef int (S::*F3 [[gnu::warn_unused_result]]) (int); // { dg-warning "only applies to function types" }
+typedef int (S::*F3 [[gnu::warn_unused_result]]) (int);
typedef int [[gnu::warn_unused_result]] (*F5) (int); // { dg-warning "ignored" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-58.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-58.C
new file mode 100644
index 00000000000..f760f560828
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-58.C
@@ -0,0 +1,5 @@
+// PR c++/58600
+// { dg-do compile { target c++11 } }
+
+namespace N { int i; }
+using namespace N alignas(int); // { dg-warning "ignored" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-59.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-59.C
new file mode 100644
index 00000000000..c7839fefed9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-59.C
@@ -0,0 +1,5 @@
+// PR c++/58600
+// { dg-do compile { target c++11 } }
+
+namespace N {}
+using namespace N alignas(X); // { dg-error "declared" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-vect.C b/gcc/testsuite/g++.dg/cpp0x/initlist-vect.C
new file mode 100644
index 00000000000..80a2fbb63fa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-vect.C
@@ -0,0 +1,6 @@
+// { dg-do compile { target c++11 } }
+
+typedef float X __attribute__ ((vector_size (4 * sizeof (float))));
+
+X x;
+X x2{x};
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist83.C b/gcc/testsuite/g++.dg/cpp0x/initlist83.C
new file mode 100644
index 00000000000..4a5eeb6d08f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist83.C
@@ -0,0 +1,7 @@
+// DR 1467, c++/51747
+// { dg-do compile { target c++11 } }
+
+struct X { };
+
+X x;
+X x2{x};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic156.C b/gcc/testsuite/g++.dg/cpp0x/variadic156.C
new file mode 100644
index 00000000000..7d3c97d6890
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic156.C
@@ -0,0 +1,6 @@
+// PR c++/52844
+// { dg-do compile { target c++11 } }
+
+template < class > struct V { };
+template < int...Is > void f ( V < Is...>) { } // { dg-error "mismatch|type" }
+auto g ( ) -> decltype ( f ( V < long > ( ) ) ) ; // { dg-error "matching" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn25.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn25.C
index 628a685f722..24680f16d05 100644
--- a/gcc/testsuite/g++.dg/cpp1y/auto-fn25.C
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn25.C
@@ -1,6 +1,7 @@
// PR c++/60574
-// { dg-options "-flto" }
// { dg-do compile { target c++1y } }
+// { dg-require-effective-target lto }
+// { dg-options "-flto" }
struct A
{
diff --git a/gcc/testsuite/g++.dg/ext/atomic-2.C b/gcc/testsuite/g++.dg/ext/atomic-2.C
new file mode 100644
index 00000000000..ac363eb16da
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/atomic-2.C
@@ -0,0 +1,14 @@
+// PR c++/57926
+
+long Mutex[1];
+
+int AcquireLogMutex(void)
+{
+ return __atomic_exchange_n(Mutex, 1, __ATOMIC_SEQ_CST);
+}
+
+void ReleaseLogMutex(void)
+{
+ long i = 0;
+ __atomic_store(Mutex, &i, __ATOMIC_SEQ_CST);
+}
diff --git a/gcc/testsuite/g++.dg/ext/attrib49.C b/gcc/testsuite/g++.dg/ext/attrib49.C
new file mode 100644
index 00000000000..99c6154f1a5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attrib49.C
@@ -0,0 +1,20 @@
+// PR c++/60765
+// { dg-options "-Wall -Wunused-parameter" }
+
+struct foo
+{
+} x;
+
+void (foo::*g) (int *) __attribute__ ((nonnull (2)));
+
+void
+fun1 (void (foo::*f) (int *) __attribute__ ((nonnull (2))))
+{
+ (x.*f) ((int *) 0); // { dg-warning "null argument" }
+}
+
+void
+fun2 (void (foo::*f) () __attribute__ ((nonnull, unused))) // { dg-bogus "unused" }
+{
+ (x.*g) ((int *) 0); // { dg-warning "null argument" }
+}
diff --git a/gcc/testsuite/g++.dg/ext/vla14.C b/gcc/testsuite/g++.dg/ext/vla14.C
new file mode 100644
index 00000000000..278cb63b938
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vla14.C
@@ -0,0 +1,23 @@
+// PR c++/21113
+// { dg-options "" }
+
+void
+f (int n)
+{
+ goto label; // { dg-error "from here" }
+ int a[n]; // { dg-error "crosses initialization" }
+label: // { dg-error "jump to label" }
+ ;
+}
+
+void
+g (int n)
+{
+ switch (1)
+ {
+ case 1:
+ int (*a)[n]; // { dg-error "crosses initialization" }
+ default: // { dg-error "jump to case label" }
+ ;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/ext/vla15.C b/gcc/testsuite/g++.dg/ext/vla15.C
new file mode 100644
index 00000000000..feeb49ff280
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vla15.C
@@ -0,0 +1,20 @@
+// PR c++/44613
+// { dg-do run }
+// { dg-options "" }
+
+void *volatile p;
+
+int
+main (void)
+{
+ int n = 0;
+ lab:;
+ int x[n % 1000 + 1];
+ x[0] = 1;
+ x[n % 1000] = 2;
+ p = x;
+ n++;
+ if (n < 1000000)
+ goto lab;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/init/aggr4.C b/gcc/testsuite/g++.dg/init/aggr4.C
index 7120e68cd7e..b0eae2ef3d0 100644
--- a/gcc/testsuite/g++.dg/init/aggr4.C
+++ b/gcc/testsuite/g++.dg/init/aggr4.C
@@ -4,4 +4,4 @@ struct A
};
A a1 = { 1 }; // ok
-A a2 = { a1 }; // { dg-error "cannot convert" }
+A a2 = { a1 }; // { dg-error "cannot convert" "" { target { ! c++11 } } }
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-31.C b/gcc/testsuite/g++.dg/ipa/devirt-31.C
new file mode 100644
index 00000000000..49ad33e3e6b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-31.C
@@ -0,0 +1,16 @@
+// { dg-options "-O3 -fdump-tree-ssa" }
+inline void t()
+{
+ struct A {virtual void q() {}};
+ static struct A *a;
+ if (!a)
+ a = new(A);
+ a->q();
+};
+void
+m()
+{
+ t();
+}
+// { dg-final { scan-tree-dump-not "OBJ_TYPE_REF" "ssa" } }
+// { dg-final { cleanup-tree-dump "ssa" } }
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-1.C b/gcc/testsuite/g++.dg/ipa/pr60640-1.C
new file mode 100644
index 00000000000..7a0b91893f8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-1.C
@@ -0,0 +1,50 @@
+// { dg-do compile }
+// { dg-options "-O3" }
+
+class ASN1Object
+{
+public:
+ virtual ~ASN1Object ();
+};
+class A
+{
+ virtual unsigned m_fn1 () const;
+};
+class B
+{
+public:
+ ASN1Object Element;
+ virtual unsigned m_fn1 (bool) const;
+};
+template <class BASE> class C : public BASE
+{
+};
+
+class D : ASN1Object, public B
+{
+};
+class G : public D
+{
+ unsigned m_fn1 (bool) const {}
+};
+class F : A
+{
+public:
+ F (A);
+ unsigned m_fn1 () const
+ {
+ int a;
+ a = m_fn2 ().m_fn1 (0);
+ return a;
+ }
+ const B &m_fn2 () const { return m_groupParameters; }
+ C<G> m_groupParameters;
+};
+template <class D> void BenchMarkKeyAgreement (int *, int *, int)
+{
+ A f;
+ D d (f);
+}
+
+void BenchmarkAll2 () { BenchMarkKeyAgreement<F>(0, 0, 0); }
+
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-2.C b/gcc/testsuite/g++.dg/ipa/pr60640-2.C
new file mode 100644
index 00000000000..c6e614cc004
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-2.C
@@ -0,0 +1,15 @@
+// { dg-do compile }
+// { dg-options "-O3" }
+
+struct B { virtual unsigned f () const; };
+struct C { virtual void f (); };
+struct F { virtual unsigned f (bool) const; ~F (); };
+struct J : C, F {};
+struct G : J { unsigned f (bool) const { return 0; } };
+struct H : B
+{
+ H (int);
+ unsigned f () const { return ((const F &) h).f (0); }
+ G h;
+};
+H h (0);
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-3.C b/gcc/testsuite/g++.dg/ipa/pr60640-3.C
new file mode 100644
index 00000000000..21b1f58a040
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-3.C
@@ -0,0 +1,81 @@
+// { dg-do run }
+// { dg-options "-O3" }
+
+struct Distraction
+{
+ char fc[8];
+ virtual Distraction * return_self ()
+ { return this; }
+};
+
+namespace {
+
+struct A;
+static A * __attribute__ ((noinline, noclone)) get_an_A ();
+
+static int go;
+
+struct A
+{
+ int fi;
+
+ A () : fi(777) {}
+ A (int pi) : fi (pi) {}
+ virtual A * foo (int p) = 0;
+};
+
+struct B;
+static B * __attribute__ ((noinline, noclone)) get_a_B ();
+
+struct B : public Distraction, A
+{
+ B () : Distraction(), A() { }
+ B (int pi) : Distraction (), A (pi) {}
+ virtual B * foo (int p)
+ {
+ int o = fi;
+ for (int i = 0; i < p; i++)
+ o += i + i * i;
+ go = o;
+
+ return get_a_B ();
+ }
+};
+
+
+struct B gb1 (1111), gb2 (2);
+static B * __attribute__ ((noinline, noclone))
+get_a_B ()
+{
+ return &gb1;
+}
+
+static A * __attribute__ ((noinline, noclone))
+get_an_A ()
+{
+ return &gb2;
+}
+
+}
+
+static int __attribute__ ((noinline, noclone))
+get_a_number ()
+{
+ return 5;
+}
+
+extern "C" void abort (void);
+
+int main (int argc, char *argv[])
+{
+ for (int i = 0; i < get_a_number (); i++)
+ {
+ struct A *p = get_an_A ();
+ struct A *r = p->foo (4);
+ if (r->fi != 1111)
+ abort ();
+ if (go != 22)
+ abort ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-4.C b/gcc/testsuite/g++.dg/ipa/pr60640-4.C
new file mode 100644
index 00000000000..eb9eb627f85
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-4.C
@@ -0,0 +1,85 @@
+// { dg-do run }
+// { dg-options "-O3 -fdump-ipa-cp" }
+
+struct Distraction
+{
+ char fc[8];
+ virtual Distraction * return_self ()
+ { return this; }
+};
+
+namespace {
+
+struct A;
+static A * __attribute__ ((noinline, noclone)) get_an_A ();
+
+static int go;
+
+struct A
+{
+ int fi;
+
+ A () : fi(777) {}
+ A (int pi) : fi (pi) {}
+ virtual void foo (int p) = 0;
+};
+
+struct B : public Distraction, A
+{
+ B () : Distraction(), A() { }
+ B (int pi) : Distraction (), A (pi) {}
+ virtual void foo (int p)
+ {
+ int o = fi;
+ for (int i = 0; i < p; i++)
+ o += i + i * i;
+ go = o;
+ }
+};
+
+
+struct B gb (2);
+static A * __attribute__ ((noinline, noclone))
+get_an_A ()
+{
+ return &gb;
+}
+
+}
+
+static int __attribute__ ((noinline, noclone))
+get_a_number ()
+{
+ return 5;
+}
+
+extern "C" void abort (void);
+
+static void __attribute__ ((noinline, noclone))
+bar ()
+{
+ for (int i = 0; i < get_a_number (); i++)
+ {
+ struct A *p = get_an_A ();
+ p->foo (4);
+ if (go != 22)
+ abort ();
+ }
+}
+
+int main (int argc, char *argv[])
+{
+ for (int i = 0; i < get_a_number (); i++)
+ {
+ struct A *p = get_an_A ();
+ p->foo (4);
+ if (go != 22)
+ abort ();
+ }
+
+ bar ();
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump-times "Thunk fixed offset" 2 "cp"} } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/g++.dg/lto/pr60567_0.C b/gcc/testsuite/g++.dg/lto/pr60567_0.C
new file mode 100644
index 00000000000..966a3c3bc74
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr60567_0.C
@@ -0,0 +1,23 @@
+// PR lto/60567
+// { dg-lto-do link }
+// { dg-lto-options { { -flto -fno-use-linker-plugin } } }
+// { dg-extra-ld-options "-r -nostdlib" }
+
+#pragma implementation
+struct S {};
+
+#pragma interface
+struct T
+{
+ virtual void foo (const S &) = 0;
+};
+
+struct U
+{
+ virtual void bar (const S &) = 0;
+};
+
+struct V : public T, public U
+{
+ virtual void bar (const S &) {}
+};
diff --git a/gcc/testsuite/g++.dg/opt/pr60849.C b/gcc/testsuite/g++.dg/opt/pr60849.C
new file mode 100644
index 00000000000..52d8826b0c8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr60849.C
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// { dg-options "-O2" }
+
+int g;
+
+extern "C" int isnan ();
+
+void foo(float a) {
+ int (*xx)(...);
+ xx = isnan;
+ if (xx(a))
+ g++;
+}
diff --git a/gcc/testsuite/g++.dg/pr49718.C b/gcc/testsuite/g++.dg/pr49718.C
index d7f2710a994..b1cc5deb7ac 100644
--- a/gcc/testsuite/g++.dg/pr49718.C
+++ b/gcc/testsuite/g++.dg/pr49718.C
@@ -2,7 +2,8 @@
/* { dg-options "-O2 -finstrument-functions" } */
/* { dg-additional-options "-mno-explicit-relocs" { target alpha*-*-* } } */
/* { dg-additional-options "-mno-relax-pic-calls" { target mips*-*-* } } */
-/* { dg-final { scan-assembler-times "__cyg_profile_func_enter" 1} } */
+/* { dg-final { scan-assembler-times "__cyg_profile_func_enter" 1 { target { ! { hppa*-*-hpux* } } } } } */
+/* { dg-final { scan-assembler-times "__cyg_profile_func_enter,%r" 1 { target hppa*-*-hpux* } } } */
#define NOINSTR __attribute__((no_instrument_function))
diff --git a/gcc/testsuite/g++.dg/template/crash119.C b/gcc/testsuite/g++.dg/template/crash119.C
new file mode 100644
index 00000000000..95d80a8ffc5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash119.C
@@ -0,0 +1,8 @@
+// PR c++/59115
+
+template<typename T, float, int, typename U> void foo(T, U) {} // { dg-error "valid type" }
+
+void bar()
+{
+ foo(0, 0); // { dg-error "matching" }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60609.C b/gcc/testsuite/g++.dg/torture/pr60609.C
new file mode 100644
index 00000000000..9ddec0b601d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60609.C
@@ -0,0 +1,252 @@
+/* { dg-do assemble } */
+
+class exception
+{
+};
+class bad_alloc:exception
+{
+};
+class logic_error:exception
+{
+};
+class domain_error:logic_error
+{
+};
+class invalid_argument:logic_error
+{
+};
+class length_error:logic_error
+{
+};
+class overflow_error:exception
+{
+};
+typedef int mpz_t[];
+template < class > class __gmp_expr;
+template <> class __gmp_expr < mpz_t >
+{
+ ~__gmp_expr ();
+};
+
+class PIP_Solution_Node;
+class internal_exception
+{
+ ~internal_exception ();
+};
+class not_an_integer:internal_exception
+{
+};
+class not_a_variable:internal_exception
+{
+};
+class not_an_optimization_mode:internal_exception
+{
+};
+class not_a_bounded_integer_type_width:internal_exception
+{
+};
+class not_a_bounded_integer_type_representation:internal_exception
+{
+};
+class not_a_bounded_integer_type_overflow:internal_exception
+{
+};
+class not_a_complexity_class:internal_exception
+{
+};
+class not_a_control_parameter_name:internal_exception
+{
+};
+class not_a_control_parameter_value:internal_exception
+{
+};
+class not_a_pip_problem_control_parameter_name:internal_exception
+{
+};
+class not_a_pip_problem_control_parameter_value:internal_exception
+{
+};
+class not_a_relation:internal_exception
+{
+};
+class ppl_handle_mismatch:internal_exception
+{
+};
+class timeout_exception
+{
+ ~timeout_exception ();
+};
+class deterministic_timeout_exception:timeout_exception
+{
+};
+void __assert_fail (const char *, const char *, int, int *)
+__attribute__ ((__noreturn__));
+void PL_get_pointer (void *);
+int Prolog_is_address ();
+inline int
+Prolog_get_address (void **p1)
+{
+ Prolog_is_address ()? static_cast <
+ void >(0) : __assert_fail ("Prolog_is_address", "./swi_cfli.hh", 0, 0);
+ PL_get_pointer (p1);
+ return 0;
+}
+
+class non_linear:internal_exception
+{
+};
+class not_unsigned_integer:internal_exception
+{
+};
+class not_universe_or_empty:internal_exception
+{
+};
+class not_a_nil_terminated_list:internal_exception
+{
+};
+class PPL_integer_out_of_range
+{
+ __gmp_expr < mpz_t > n;
+};
+void handle_exception ();
+template < typename T > T * term_to_handle (int, const char *)
+{
+ if (Prolog_is_address ())
+ {
+ void *p;
+ Prolog_get_address (&p);
+ return static_cast < T * >(0);
+ }
+ throw;
+}
+
+void
+ppl_new_MIP_Problem_from_MIP_Problem ()
+try
+{
+ term_to_handle < int >(0, "ppl_new_MIP_Problem_from_MIP_Problem/2");
+}
+
+catch (exception &)
+{
+}
+
+int
+ppl_PIP_Tree_Node_parametric_values ()
+{
+ try
+ {
+ PIP_Solution_Node *a = term_to_handle < PIP_Solution_Node > (0, 0);
+ (void)a;
+ return 1;
+ }
+ catch (internal_exception &)
+ {
+ }
+ catch (not_unsigned_integer &)
+ {
+ handle_exception ();
+ }
+ catch (non_linear &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_variable &)
+ {
+ handle_exception ();
+ }
+ catch (not_an_integer &)
+ {
+ handle_exception ();
+ }
+ catch (ppl_handle_mismatch &)
+ {
+ handle_exception ();
+ }
+ catch (not_an_optimization_mode &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_complexity_class &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_bounded_integer_type_width &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_bounded_integer_type_representation &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_bounded_integer_type_overflow &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_control_parameter_name &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_control_parameter_value &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_pip_problem_control_parameter_name &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_pip_problem_control_parameter_value &)
+ {
+ handle_exception ();
+ }
+ catch (not_universe_or_empty &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_relation &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_nil_terminated_list &)
+ {
+ handle_exception ();
+ }
+ catch (PPL_integer_out_of_range &)
+ {
+ handle_exception ();
+ }
+ catch (int &)
+ {
+ } catch (timeout_exception &)
+ {
+ handle_exception ();
+ } catch (deterministic_timeout_exception &)
+ {
+ handle_exception ();
+ } catch (overflow_error &)
+ {
+ handle_exception ();
+ } catch (domain_error &)
+ {
+ handle_exception ();
+ } catch (length_error &)
+ {
+ handle_exception ();
+ } catch (invalid_argument &)
+ {
+ handle_exception ();
+ } catch (logic_error &)
+ {
+ handle_exception ();
+ } catch (bad_alloc &)
+ {
+ handle_exception ();
+ } catch (exception &)
+ {
+ handle_exception ();
+ } catch ( ...)
+ {
+ handle_exception ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60659.C b/gcc/testsuite/g++.dg/torture/pr60659.C
new file mode 100644
index 00000000000..f0158a5220a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60659.C
@@ -0,0 +1,58 @@
+// { dg-do compile }
+template <typename _InputIterator> void __distance (_InputIterator);
+template <typename _InputIterator>
+void distance (_InputIterator, _InputIterator p2)
+{
+ __distance (p2);
+}
+
+namespace boost
+{
+template <class Iterator> struct A
+{
+ typedef typename Iterator::difference_type type;
+};
+template <class T> typename T::const_iterator end (T &);
+template <class T> typename T::const_iterator begin (T &);
+template <class T> struct D : A<typename T::const_iterator>
+{
+};
+template <class T> typename D<T>::type distance (const T &p1)
+{
+ distance (boost::begin (p1), boost::end (p1));
+ return 0;
+}
+template <class IteratorT> class B
+{
+public:
+ typedef B type;
+ typedef IteratorT const_iterator;
+};
+}
+
+typedef int storage_t[];
+struct F;
+template <template <typename> class> struct G
+{
+ G (const G &p1) { p1.m_fn1 ().m_fn1 (0); }
+ const F &m_fn1 () const
+ {
+ const void *a;
+ a = &data_m;
+ return *static_cast<const F *>(a);
+ }
+ storage_t *data_m;
+};
+
+struct F
+{
+ virtual F *m_fn1 (void *) const;
+};
+template <typename> struct H;
+struct C : G<H>
+{
+ typedef int difference_type;
+};
+boost::B<C> AllTransVideos ();
+int b = boost::distance (AllTransVideos ());
+
diff --git a/gcc/testsuite/g++.dg/torture/pr60746.C b/gcc/testsuite/g++.dg/torture/pr60746.C
new file mode 100644
index 00000000000..7ce6ebe6bc0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60746.C
@@ -0,0 +1,23 @@
+// { dg-do compile }
+
+class One
+{
+public:
+ virtual unsigned long getSize () const;
+};
+
+class Two
+{
+ virtual int run ();
+};
+
+int
+Two::run ()
+{
+ One list_arry[5][2];
+ int orig = 0;
+ if (list_arry[3][orig].getSize () > 0
+ || list_arry[4][orig].getSize () > 0)
+ {
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60750.C b/gcc/testsuite/g++.dg/torture/pr60750.C
new file mode 100644
index 00000000000..a344bd764a3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60750.C
@@ -0,0 +1,21 @@
+// { dg-do run }
+// { dg-options "-std=c++11" }
+
+#include <string>
+#include <stdexcept>
+
+const std::string err_prefix = "Problem: ";
+void thrower (std::string msg)
+{
+ throw std::runtime_error(err_prefix + std::move(msg));
+}
+
+int main(int argc, char **argv)
+{
+ try {
+ std::string base = "hello";
+ thrower(std::move(base));
+ } catch (const std::runtime_error &e) {
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60854.C b/gcc/testsuite/g++.dg/torture/pr60854.C
new file mode 100644
index 00000000000..fa4b2e71ab7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60854.C
@@ -0,0 +1,13 @@
+template <typename T>
+class MyClass
+{
+public:
+ __attribute__ ((__always_inline__)) inline MyClass () { ; }
+};
+
+extern template class MyClass<double>;
+
+void Func()
+{
+ MyClass<double> x;
+}
diff --git a/gcc/testsuite/g++.dg/tree-ssa/forwprop-switch.C b/gcc/testsuite/g++.dg/tree-ssa/forwprop-switch.C
new file mode 100644
index 00000000000..c3f12ac45ae
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/forwprop-switch.C
@@ -0,0 +1,24 @@
+// { dg-do compile }
+// { dg-options "-O -fdump-tree-cddce1" }
+
+enum Scale { E1, E2, E3, E4, E5, E6, E7, E8 };
+
+int Test(Scale s)
+{
+ switch(s)
+ {
+ case E1: return 12;
+ case E2: return 17;
+ case E3: return 22;
+ case E4: return 42;
+ default: break;
+ }
+ return 0;
+}
+
+// tree forwprop should have eliminated the (int) s cast for the
+// switch value and directly switch on the 's' parameter
+
+// { dg-final { scan-tree-dump-not "\\\(int\\\)" "cddce1" } }
+// { dg-final { scan-tree-dump "switch \\\(s_.\\\(D\\\)\\\)" "cddce1" } }
+// { dg-final { cleanup-tree-dump "cddce1" } }
diff --git a/gcc/testsuite/g++.dg/vect/pr60836.cc b/gcc/testsuite/g++.dg/vect/pr60836.cc
new file mode 100644
index 00000000000..83bb1837531
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr60836.cc
@@ -0,0 +1,39 @@
+// { dg-do compile }
+
+int a, b;
+typedef double (*NormFunc) (const int &);
+int &
+max (int &p1, int &p2)
+{
+ if (p1 < p2)
+ return p2;
+ return p1;
+}
+
+struct A
+{
+ int operator () (int p1, int p2)
+ {
+ return max (p1, p2);
+ }
+};
+template < class, class > double
+norm_ (const int &)
+{
+ char c, d;
+ A e;
+ for (; a; a++)
+ {
+ b = e (b, d);
+ b = e (b, c);
+ }
+}
+
+void
+norm ()
+{
+ static NormFunc f = norm_ < int, A >;
+ f = 0;
+}
+
+// { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/g++.dg/warn/Weff1.C b/gcc/testsuite/g++.dg/warn/Weff1.C
deleted file mode 100644
index a00dc29bf5f..00000000000
--- a/gcc/testsuite/g++.dg/warn/Weff1.C
+++ /dev/null
@@ -1,5 +0,0 @@
-// { dg-options "-Weffc++" }
-
-struct S {};
-/* Base classes should have virtual destructors. */
-struct T : public S {}; // { dg-warning "" }
diff --git a/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C b/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C
index d40de3d7c1a..9f2e4bea43b 100644
--- a/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C
+++ b/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C
@@ -6,18 +6,18 @@
// destructor, in which case it would be possible but unsafe to delete
// an instance of a derived class through a pointer to the base class.
-struct A // { dg-bogus "non-virtual destructor" }
+struct A
{
protected:
- ~A();
+ ~A(); // inaccessible - no warning
public:
virtual void f() = 0;
};
-struct B // { dg-bogus "non-virtual destructor" }
+struct B
{
private:
- ~B();
+ ~B(); // inaccessible - no warning
public:
virtual void f() = 0;
};
@@ -52,3 +52,25 @@ private:
public:
virtual void f() = 0;
};
+
+struct H {};
+
+struct I1 : H
+{};
+struct I2 : private H
+{};
+
+struct J1 : H
+{ virtual ~J1 ();};
+struct J2 : private H
+{ virtual ~J2 ();};
+
+struct K // { dg-warning "accessible non-virtual destructor" }
+{
+ virtual void k ();
+};
+
+struct L1 : K // { dg-warning "accessible non-virtual destructor" }
+{virtual ~L1 ();};
+struct L2 : private K
+{virtual ~L2 ();};
diff --git a/gcc/testsuite/g++.dg/warn/Wnvdtor-3.C b/gcc/testsuite/g++.dg/warn/Wnvdtor-3.C
new file mode 100644
index 00000000000..e83134b062b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wnvdtor-3.C
@@ -0,0 +1,75 @@
+// { dg-do compile }
+// { dg-options "-Weffc++" }
+
+// Warn when a class has virtual functions and accessible non-virtual
+// destructor, in which case it would be possible but unsafe to delete
+// an instance of a derived class through a pointer to the base class.
+
+struct A
+{
+protected:
+ ~A(); // inaccessible - no warning
+public:
+ virtual void f() = 0;
+};
+
+struct B
+{
+private:
+ ~B(); // inaccessible - no warning
+public:
+ virtual void f() = 0;
+};
+
+struct C // { dg-warning "non-virtual destructor" }
+{
+ virtual void f() = 0;
+};
+
+struct D // { dg-warning "non-virtual destructor" }
+{
+ ~D();
+ virtual void f() = 0;
+};
+
+struct E;
+
+struct F // { dg-warning "non-virtual destructor" }
+{
+protected:
+ friend class E;
+ ~F();
+public:
+ virtual void f() = 0;
+};
+
+struct G // { dg-warning "non-virtual destructor" }
+{
+private:
+ friend class E;
+ ~G();
+public:
+ virtual void f() = 0;
+};
+
+struct H {};
+
+struct I1 : H
+{};
+struct I2 : private H
+{};
+
+struct J1 : H // { dg-warning "accessible non-virtual destructor" }
+{ virtual ~J1 ();};
+struct J2 : private H
+{ virtual ~J2 ();};
+
+struct K // { dg-warning "accessible non-virtual destructor" }
+{
+ virtual void k ();
+};
+
+struct L1 : K // { dg-warning "accessible non-virtual destructor" }
+{virtual ~L1 ();};
+struct L2 : private K
+{virtual ~L2 ();};
diff --git a/gcc/testsuite/g++.dg/warn/Wnvdtor-4.C b/gcc/testsuite/g++.dg/warn/Wnvdtor-4.C
new file mode 100644
index 00000000000..dd6d9d7689e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wnvdtor-4.C
@@ -0,0 +1,75 @@
+// { dg-do compile }
+// { dg-options "-Weffc++ -Wno-non-virtual-dtor" }
+
+// Warn when a class has virtual functions and accessible non-virtual
+// destructor, in which case it would be possible but unsafe to delete
+// an instance of a derived class through a pointer to the base class.
+
+struct A
+{
+protected:
+ ~A();
+public:
+ virtual void f() = 0;
+};
+
+struct B
+{
+private:
+ ~B();
+public:
+ virtual void f() = 0;
+};
+
+struct C
+{
+ virtual void f() = 0;
+};
+
+struct D
+{
+ ~D();
+ virtual void f() = 0;
+};
+
+struct E;
+
+struct F
+{
+protected:
+ friend class E;
+ ~F();
+public:
+ virtual void f() = 0;
+};
+
+struct G
+{
+private:
+ friend class E;
+ ~G();
+public:
+ virtual void f() = 0;
+};
+
+struct H {};
+
+struct I1 : H
+{};
+struct I2 : private H
+{};
+
+struct J1 : H
+{ virtual ~J1 ();};
+struct J2 : private H
+{ virtual ~J2 ();};
+
+struct K
+{
+ virtual void k ();
+};
+
+struct L1 : K
+{virtual ~L1 ();};
+struct L2 : private K
+{virtual ~L2 ();};
diff --git a/gcc/testsuite/g++.dg/warn/Wnvdtor.C b/gcc/testsuite/g++.dg/warn/Wnvdtor.C
index b04fdcbe6b1..f03cff5b31c 100644
--- a/gcc/testsuite/g++.dg/warn/Wnvdtor.C
+++ b/gcc/testsuite/g++.dg/warn/Wnvdtor.C
@@ -8,3 +8,4 @@ extern "Java"
virtual void bar( void);
};
}
+
diff --git a/gcc/testsuite/g++.dg/warn/nonnull2.C b/gcc/testsuite/g++.dg/warn/nonnull2.C
new file mode 100644
index 00000000000..10515a47405
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/nonnull2.C
@@ -0,0 +1,10 @@
+// PR c++/60764
+// { dg-options "-Wall" }
+
+struct foo
+{
+ foo () __attribute__ ((nonnull (1)));
+};
+
+const foo &x = foo (); // { dg-bogus "null argument" }
+foo y = foo (); // { dg-bogus "null argument" }
diff --git a/gcc/testsuite/g++.dg/warn/warn_format_signedness.C b/gcc/testsuite/g++.dg/warn/warn_format_signedness.C
new file mode 100644
index 00000000000..473d522c8a6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/warn_format_signedness.C
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-Wformat -Wformat-signedness" } */
+
+/* PR c/60194 */
+
+void foo(unsigned u, int i, unsigned char uc, signed char sc) {
+ __builtin_printf("%d\n", u); /* { dg-warning "expects argument of type 'int', but argument 2 has type 'unsigned int'" } */
+ __builtin_printf("%u\n", i); /* { dg-warning "expects argument of type 'unsigned int', but argument 2 has type 'int'" } */
+ __builtin_printf("%c\n", sc);
+ __builtin_printf("%c\n", uc);
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C
deleted file mode 100644
index aa5530fff7f..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C
+++ /dev/null
@@ -1,21 +0,0 @@
-// { dg-do assemble }
-// { dg-options "-Wnon-virtual-dtor -Weffc++" }
-// 981203 bkoz
-// g++/15309
-
-class bahamian {
-public:
- bahamian ();
- ~bahamian ();
-};
-
-class miami : public bahamian // { dg-warning "" } // WARNING -
-{
-public:
- miami ();
- ~miami ();
-};
-
-
-
-
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C
deleted file mode 100644
index 28317973127..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C
+++ /dev/null
@@ -1,10 +0,0 @@
-// { dg-do assemble }
-// { dg-options "-Wnon-virtual-dtor -Weffc++" }
-// 981203 bkoz
-// g++/15309
-
-class bermuda { // { dg-warning "" } // WARNING -
-public:
- virtual int func1(int);
- ~bermuda();
-};
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
index 72397930367..125aee0dbfc 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
@@ -1,6 +1,6 @@
// { dg-do assemble }
struct X {
- void f (int = 4, char = 'r'); // { dg-error "previous specification" }
+ void f (int = 4, char = 'r'); // { dg-message "previous specification" }
void g (int = 4, char = 'r'); // { dg-message "previous specification" }
};
diff --git a/gcc/testsuite/g++.old-deja/g++.law/init5.C b/gcc/testsuite/g++.old-deja/g++.law/init5.C
index c1d647b1b05..7ed89e21924 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/init5.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/init5.C
@@ -11,8 +11,8 @@ extern int fred( int);
class X {
public :
- void f( int = fred( 0) ) ; // { dg-error "" } previous spec
+ void f( int = fred( 0) ) ; // { dg-message "previous spec" }
} ;
-void X::f( int x = fred( 0) ) {// { dg-error "" } .*
+void X::f( int x = fred( 0) ) { // { dg-error "default argument" }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
index e01d7478838..036c8d5152a 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
@@ -3,7 +3,7 @@ class A {
private:
int i1_;
public:
- void f(int const i1 = 1); // { dg-error "previous specification" }
+ void f(int const i1 = 1); // { dg-message "previous specification" }
};
void
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr28865.c b/gcc/testsuite/gcc.c-torture/compile/pr28865.c
index aa6ae078aca..4ad0f5c4306 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr28865.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr28865.c
@@ -1,3 +1,5 @@
+/* { dg-xfail-if "PR target/60602" { sparc*-*-solaris2.9* && { ! gas } } { "-O0" } } */
+
struct var_len
{
int field1;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr60556.c b/gcc/testsuite/gcc.c-torture/compile/pr60556.c
new file mode 100644
index 00000000000..c775432f8bb
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr60556.c
@@ -0,0 +1,8 @@
+/* PR middle-end/60556 */
+
+int g (int);
+
+unsigned long long f (void)
+{
+ return (unsigned long long)(long)&g;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c b/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
new file mode 100644
index 00000000000..6f84f6e4ea0
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
@@ -0,0 +1,31 @@
+/* { dg-options "-fdata-sections" } */
+
+typedef unsigned char unit;
+typedef unit *unitptr;
+extern short global_precision;
+typedef __SIZE_TYPE__ size_t;
+extern void *memcpy (void *dest, const void *src, size_t n);
+
+short mp_compare(const unit* r1, const unit* r2)
+{
+ register short precision;
+ precision = global_precision;
+ (r1) = ((r1)+(precision)-1);
+ (r2) = ((r2)+(precision)-1);
+ do
+ { if (*r1 < *r2)
+ return(-1);
+ if (*((r1)--) > *((r2)--))
+ return(1);
+ } while (--precision);
+}
+
+static unit modulus[((1280+(2*8))/8)];
+static unit d_data[((1280+(2*8))/8)*2];
+
+int upton_modmult (unitptr prod, unitptr multiplicand, unitptr multiplier)
+{
+ unitptr d = d_data;
+ while (mp_compare(d,modulus) > 0)
+ memcpy((void*)(prod), (const void*)(d), (global_precision));
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr60655-2.c b/gcc/testsuite/gcc.c-torture/compile/pr60655-2.c
new file mode 100644
index 00000000000..f33db643f72
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr60655-2.c
@@ -0,0 +1,30 @@
+
+typedef unsigned char unit;
+typedef unit *unitptr;
+extern short global_precision;
+typedef __SIZE_TYPE__ size_t;
+extern void *memcpy (void *dest, const void *src, size_t n);
+
+short mp_compare(const unit* r1, const unit* r2)
+{
+ register short precision;
+ precision = global_precision;
+ (r1) = ((r1)+(precision)-1);
+ (r2) = ((r2)+(precision)-1);
+ do
+ { if (*r1 < *r2)
+ return(-1);
+ if (*((r1)--) > *((r2)--))
+ return(1);
+ } while (--precision);
+}
+
+static unit modulus[((1280+(2*8))/8)];
+static unit d_data[((1280+(2*8))/8)*2];
+
+int upton_modmult (unitptr prod, unitptr multiplicand, unitptr multiplier)
+{
+ unitptr d = d_data;
+ while (mp_compare(d,modulus) > 0)
+ memcpy((void*)(prod), (const void*)(d), (global_precision));
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c
index 32f9e9bb631..c1a63f1b3aa 100644
--- a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c
@@ -1,5 +1,5 @@
/* Test atomic_flag routines for existence and execution. */
-/* { dg-do run } */
+/* { dg-do run { xfail hppa*-*-hpux* } } */
/* { dg-options "-std=c11 -pedantic-errors" } */
#include <stdatomic.h>
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-6.c b/gcc/testsuite/gcc.dg/builtin-bswap-6.c
index 024ebf1edf6..efda8706e63 100644
--- a/gcc/testsuite/gcc.dg/builtin-bswap-6.c
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-6.c
@@ -1,7 +1,10 @@
/* { dg-do compile { target arm*-*-* alpha*-*-* i?86-*-* powerpc*-*-* rs6000-*-* x86_64-*-* s390*-*-* } } */
/* { dg-require-effective-target stdint_types } */
/* { dg-options "-O -fdump-rtl-combine" } */
-/* { dg-options "-O -fdump-rtl-combine -march=z900" { target s390-*-* } } */
+
+/* The branch cost setting prevents the return value from being
+ calculated with arithmetic instead of doing a compare. */
+/* { dg-additional-options "-march=z900 -mbranch-cost=0" { target s390*-*-* } } */
#include <stdint.h>
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-6a.c b/gcc/testsuite/gcc.dg/builtin-bswap-6a.c
new file mode 100644
index 00000000000..f93bcde1027
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-6a.c
@@ -0,0 +1,44 @@
+/* { dg-do compile { target arm*-*-* alpha*-*-* i?86-*-* powerpc*-*-* rs6000-*-* x86_64-*-* s390*-*-* } } */
+/* { dg-require-effective-target stdint_types } */
+/* { dg-options "-O2 -fdump-rtl-combine" } */
+/* { dg-additional-options "-march=z900" { target s390-*-* } } */
+
+/* The test is similiar to builtin-bswap-6.c but returns 1/2 instead
+ of 0/1 to prevent GCC from calculating the return value with
+ arithmetic instead of a comparison. This requires the optimization
+ level to be bumped up to -O2 at least for x86_64. */
+
+#include <stdint.h>
+
+#define BS(X) __builtin_bswap32(X)
+
+int foo1 (uint32_t a)
+{
+ if (BS (a) == 0xA0000)
+ return 1;
+ return 2;
+}
+
+int foo2 (uint32_t a)
+{
+ if (BS (a) != 0xA0000)
+ return 1;
+ return 2;
+}
+
+int foo3 (uint32_t a, uint32_t b)
+{
+ if (BS (a) == BS (b))
+ return 1;
+ return 2;
+}
+
+int foo4 (uint32_t a, uint32_t b)
+{
+ if (BS (a) != BS (b))
+ return 1;
+ return 2;
+}
+
+/* { dg-final { scan-rtl-dump-not "bswapsi" "combine" } } */
+/* { dg-final { cleanup-rtl-dump "combine" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-7.c b/gcc/testsuite/gcc.dg/builtin-bswap-7.c
index 399b825ac43..035c7368ad0 100644
--- a/gcc/testsuite/gcc.dg/builtin-bswap-7.c
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-7.c
@@ -3,6 +3,10 @@
/* { dg-require-effective-target lp64 } */
/* { dg-options "-O -fdump-rtl-combine" } */
+/* The branch cost setting prevents the return value from being
+ calculated with arithmetic instead of doing a compare. */
+/* { dg-additional-options "-mbranch-cost=0" { target s390x-*-* } } */
+
#include <stdint.h>
#define BS(X) __builtin_bswap64(X)
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-7a.c b/gcc/testsuite/gcc.dg/builtin-bswap-7a.c
new file mode 100644
index 00000000000..d77bd478366
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-7a.c
@@ -0,0 +1,44 @@
+/* { dg-do compile { target arm*-*-* alpha*-*-* ia64*-*-* x86_64-*-* s390x-*-* powerpc*-*-* rs6000-*-* } } */
+/* { dg-require-effective-target stdint_types } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O2 -fdump-rtl-combine" } */
+
+/* The test is similiar to builtin-bswap-7.c but returns 1/2 instead
+ of 0/1 to prevent GCC from calculating the return value with
+ arithmetic instead of a comparison. This requires the optimization
+ level to be bumped up to -O2 at least for x86_64. */
+
+#include <stdint.h>
+
+#define BS(X) __builtin_bswap64(X)
+
+int foo1 (uint64_t a)
+{
+ if (BS (a) == 0xA00000000)
+ return 1;
+ return 2;
+}
+
+int foo2 (uint64_t a)
+{
+ if (BS (a) != 0xA00000000)
+ return 1;
+ return 2;
+}
+
+int foo3 (uint64_t a, uint64_t b)
+{
+ if (BS (a) == BS (b))
+ return 1;
+ return 2;
+}
+
+int foo4 (uint64_t a, uint64_t b)
+{
+ if (BS (a) != BS (b))
+ return 1;
+ return 2;
+}
+
+/* { dg-final { scan-rtl-dump-not "bswapdi" "combine" } } */
+/* { dg-final { cleanup-rtl-dump "combine" } } */
diff --git a/gcc/testsuite/gcc.dg/format/warn-signedness.c b/gcc/testsuite/gcc.dg/format/warn-signedness.c
new file mode 100644
index 00000000000..473d522c8a6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/format/warn-signedness.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-Wformat -Wformat-signedness" } */
+
+/* PR c/60194 */
+
+void foo(unsigned u, int i, unsigned char uc, signed char sc) {
+ __builtin_printf("%d\n", u); /* { dg-warning "expects argument of type 'int', but argument 2 has type 'unsigned int'" } */
+ __builtin_printf("%u\n", i); /* { dg-warning "expects argument of type 'unsigned int', but argument 2 has type 'int'" } */
+ __builtin_printf("%c\n", sc);
+ __builtin_printf("%c\n", uc);
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr55022.c b/gcc/testsuite/gcc.dg/graphite/pr55022.c
new file mode 100644
index 00000000000..c631c0e23e6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr55022.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fgraphite-identity" } */
+
+extern void abort (void);
+
+void __attribute__((noinline,noclone))
+f(int *limit, int minLen, int maxLen)
+{
+ int i;
+
+ for (i = minLen; i <= maxLen; i++) {
+ limit[i] = i;
+ }
+}
+
+int main()
+{
+ int limit[256], i;
+ f (limit, 0, 255);
+ for (i = 0; i < 256; ++i)
+ {
+ if (limit[i] != i)
+ abort ();
+ __asm__ volatile ("" : : : "memory");
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr59817-1.c b/gcc/testsuite/gcc.dg/graphite/pr59817-1.c
new file mode 100644
index 00000000000..175fa16fd71
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr59817-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -floop-interchange" } */
+
+int kd;
+
+void
+n2(void)
+{
+ static int so;
+ static short int i5;
+ int wj;
+ int *il;
+ int *nk = &so;
+ for (wj = 0; wj < 2; ++wj)
+ *nk = ((i5 += *il) || kd );
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr59817-2.c b/gcc/testsuite/gcc.dg/graphite/pr59817-2.c
new file mode 100644
index 00000000000..13950076814
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr59817-2.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -floop-interchange" } */
+
+void
+xl(void)
+{
+ static int j3;
+ for (j3 = 0; j3 < 1; ++j3) {
+ static int f2;
+ static int w7;
+ short int b5;
+ int ok;
+ f2 = (b5 += ok) ? (w7 = 0): (w7 ? 0 : (f2 = ok));
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr60740.c b/gcc/testsuite/gcc.dg/graphite/pr60740.c
new file mode 100644
index 00000000000..5b7c1802236
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr60740.c
@@ -0,0 +1,16 @@
+/* { dg-options "-O2 -floop-interchange" } */
+
+int **db6 = 0;
+
+void
+k26(void)
+{
+ static int geb = 0;
+ int *a22 = &geb;
+ int **l30 = &a22;
+ int *c4b;
+ int ndf;
+ for (ndf = 0; ndf <= 1; ++ndf)
+ *c4b = (db6 == l30) && (*a22)--;
+}
+
diff --git a/gcc/testsuite/gcc.dg/graphite/pr60785.c b/gcc/testsuite/gcc.dg/graphite/pr60785.c
new file mode 100644
index 00000000000..87c1c685b0a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr60785.c
@@ -0,0 +1,27 @@
+/* { dg-options "-O2 -floop-interchange" } */
+
+static int
+aqc(void)
+{
+ return 1;
+}
+
+void
+gkd(void)
+{
+ int wu0;
+ static int b1y;
+ static int gw2;
+ static int *ydw = &gw2;
+ static int **m3l = &ydw;
+ **m3l = 0;
+ for (b1y = 0; b1y < 1; ++b1y)
+ {
+ int *cpj = &gw2;
+ if (*ydw |= aqc())
+ {
+ *cpj = 0;
+ *ydw = wu0;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr55113_0.c b/gcc/testsuite/gcc.dg/lto/pr55113_0.c
index 0477fe41bc8..8c309761bce 100644
--- a/gcc/testsuite/gcc.dg/lto/pr55113_0.c
+++ b/gcc/testsuite/gcc.dg/lto/pr55113_0.c
@@ -2,6 +2,7 @@
/* { dg-lto-do link } */
/* { dg-lto-options { { -flto -fshort-double -O0 } } }*/
/* { dg-skip-if "PR60410" { x86_64-*-* || { i?86-*-* && lp64 } } } */
+/* { dg-skip-if "PR60410" { i?86-*-solaris2.1[0-9]* } } */
int
main(void)
diff --git a/gcc/testsuite/gcc.dg/lto/pr59626_0.c b/gcc/testsuite/gcc.dg/lto/pr59626_0.c
new file mode 100644
index 00000000000..752982fb506
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr59626_0.c
@@ -0,0 +1,15 @@
+/* { dg-lto-do run } */
+
+int __atoi (const char *) __asm__("atoi");
+extern inline __attribute__((always_inline,gnu_inline))
+int atoi (const char *x)
+{
+ return __atoi (x);
+}
+
+int bar (int (*)(const char *));
+
+int main()
+{
+ return bar (atoi);
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr59626_1.c b/gcc/testsuite/gcc.dg/lto/pr59626_1.c
new file mode 100644
index 00000000000..9b3fa1d2e36
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr59626_1.c
@@ -0,0 +1,4 @@
+int bar (int (*fn)(const char *))
+{
+ return fn ("0");
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr60720_0.c b/gcc/testsuite/gcc.dg/lto/pr60720_0.c
new file mode 100644
index 00000000000..79cef5dad1a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60720_0.c
@@ -0,0 +1,15 @@
+/* { dg-lto-do run } */
+/* { dg-extra-ld-options { -w } } */
+
+/* ??? lto.exp does not allow to scan for
+ :1:12: warning: type of 'x' does not match original declaration
+ extern int x[];
+ ^
+ :1:5: note: previously declared here
+ int x;
+ ^ */
+
+extern int x[];
+int *foo[] = { &x[0] };
+
+int main() { return *foo[0]; }
diff --git a/gcc/testsuite/gcc.dg/lto/pr60720_1.c b/gcc/testsuite/gcc.dg/lto/pr60720_1.c
new file mode 100644
index 00000000000..6d1a0d47b7f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60720_1.c
@@ -0,0 +1 @@
+int x;
diff --git a/gcc/testsuite/gcc.dg/lto/pr60820_0.c b/gcc/testsuite/gcc.dg/lto/pr60820_0.c
new file mode 100644
index 00000000000..349cf6a02f1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60820_0.c
@@ -0,0 +1,13 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-flto -r -nostdlib -O2}} } */
+#include <stdio.h>
+struct in6_addr {int bah;};
+extern const struct in6_addr in6addr_any;
+static const struct in6_addr local_in6addr_any = {1};
+#pragma weak in6addr_any = local_in6addr_any
+
+__attribute__ ((used))
+void foo2()
+{
+ fprintf (stderr, "v1: %p, v2: %p\n", &local_in6addr_any, &in6addr_any);
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr60820_1.c b/gcc/testsuite/gcc.dg/lto/pr60820_1.c
new file mode 100644
index 00000000000..16009e424f8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60820_1.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+struct in6_addr {int bah;};
+extern const struct in6_addr in6addr_any;
+static const struct in6_addr local_in6addr_any = {1};
+#pragma weak in6addr_any = local_in6addr_any
+
+__attribute__ ((used))
+void foo()
+{
+ fprintf (stderr, "v1: %p, v2: %p\n", &local_in6addr_any, &in6addr_any);
+}
diff --git a/gcc/testsuite/gcc.dg/pr60797.c b/gcc/testsuite/gcc.dg/pr60797.c
new file mode 100644
index 00000000000..45090bae502
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60797.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { alias } } */
+
+extern int foo __attribute__((alias("bar"))); /* { dg-error "supported" } */
+int main()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr60844.c b/gcc/testsuite/gcc.dg/pr60844.c
new file mode 100644
index 00000000000..16ed243d74c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60844.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/60844 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+/* { dg-additional-options "-mtune=atom" { target { i?86-*-* x86_64-*-* } } } */
+
+void
+foo (int *x, int y, int z)
+{
+ int b, c = x[0], d = x[1];
+ for (b = 0; b < 1; b++)
+ {
+ int e = (y ? 1 : 0) | (d ? 2 : 0) | (z ? 1 : 0);
+ e |= (c ? 2 : 0) | ((1 >> b) ? 1 : 0);
+ x[2 + b] = e;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56965-1.c b/gcc/testsuite/gcc.dg/torture/pr56965-1.c
new file mode 100644
index 00000000000..2512db3965d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56965-1.c
@@ -0,0 +1,32 @@
+/* { dg-do run } */
+/* { dg-options "-fschedule-insns" { target scheduling } } */
+
+extern void abort (void);
+
+struct S {
+ int i;
+ int j;
+};
+
+struct U {
+ struct S s;
+} __attribute__((may_alias));
+
+int __attribute__((noinline,noclone))
+foo (struct U *p, struct U *q)
+{
+ int i;
+ q->s.j = 1;
+ i = p->s.i;
+ return i;
+}
+
+int main()
+{
+ int a[3];
+ int *p = a;
+ p[1] = 0;
+ if (foo ((struct U *)(p + 1), (struct U *)p) != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56965-2.c b/gcc/testsuite/gcc.dg/torture/pr56965-2.c
new file mode 100644
index 00000000000..04f55914e9c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56965-2.c
@@ -0,0 +1,34 @@
+extern void abort (void);
+
+struct S { int i; int j; };
+struct X { struct S s; int k; };
+struct Y { int k; struct S s; };
+union U { struct X x; struct Y y; } __attribute__((may_alias));
+
+int __attribute__((noinline))
+foo (union U *p, union U *q)
+{
+ p->x.s.j = 1;
+ q->y.s.i = 0;
+ return p->x.s.j;
+}
+
+struct R { int i; int j; } __attribute__((may_alias));
+
+int __attribute__((noinline))
+bar (struct R *p, struct R *q)
+{
+ p->i = 1;
+ q->j = 0;
+ return p->i;
+}
+
+int main()
+{
+ int a[3];
+ if (foo ((union U *)&a[0], (union U *)&a[0]) != 0)
+ abort ();
+ if (bar ((struct R *)&a[1], (struct R *)&a[0]) != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr60733.c b/gcc/testsuite/gcc.dg/torture/pr60733.c
new file mode 100644
index 00000000000..49cc59ea33a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr60733.c
@@ -0,0 +1,36 @@
+/* { dg-do run } */
+
+int a, d, e, f, g, h, i, j, k;
+unsigned short b;
+
+short
+fn1 (int p1, int p2)
+{
+ return p1 * p2;
+}
+
+int
+main ()
+{
+ for (; a; a--)
+ {
+ int l = 0;
+ if (f >= 0)
+ {
+ for (; h;)
+ e = 0;
+ for (; l != -6; l--)
+ {
+ j = fn1 (b--, d);
+ for (g = 0; g; g = 1)
+ ;
+ k = e ? 2 : 0;
+ }
+ i = 0;
+ for (;;)
+ ;
+ }
+ }
+ d = 0;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr60766.c b/gcc/testsuite/gcc.dg/torture/pr60766.c
new file mode 100644
index 00000000000..6f16e3b7408
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr60766.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+
+int m = 9;
+
+int main()
+{
+ int n, x;
+
+ n = m;
+ for (x = 0; x <= n; x++)
+ if (n == x + (x + 1) + (x + 2))
+ return 0;
+
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c b/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c
index 5297098fc91..85a4b2a840c 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c
@@ -15,8 +15,9 @@ main ()
is once reached directly from entry point of function, rest via loopback
edge. */
/* { dg-final-use { scan-ipa-dump "loop depth 1, count 33334" "profile"} } */
-/* { dg-final-use { scan-tree-dump "loop depth 1, count 33332" "optimized"} } */
-/* { dg-final-use { scan-tree-dump-times "Removing basic block \[^\r\n\]*\[\\r\\n\]+\[^\r\n\]*\[\\r\\n\]+Invalid sum of\[^\r\n\]*\[\\r\\n\]+Invalid sum of" 1 "optimized"} } */
-/* { dg-final-use { scan-tree-dump-times "Invalid sum of" 2 "optimized"} } */
+/* { dg-final-use { scan-tree-dump "loop depth 1, count 33333" "optimized"} } */
+/* { dg-final-use { scan-tree-dump-not "loop depth 1, count 33332" "optimized"} } */
+/* { dg-final-use { scan-tree-dump "Removing basic block" "optimized"} } */
+/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
/* { dg-final-use { cleanup-ipa-dump "profile" } } */
/* { dg-final-use { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c
index 99b27ce02f1..b49cf648c7d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c
@@ -16,6 +16,7 @@ void bar (void)
/* We used to treat malloc functions like pure and const functions, but
malloc functions may clobber global memory. Only the function result
does not alias any other pointer.
- Hence, we must have a VDEF for a before and after the call to foo(). */
-/* { dg-final { scan-tree-dump-times "VDEF" 2 "alias"} } */
+ Hence, we must have a VDEF for a before and after the call to foo().
+ And one after the call to abort(). */
+/* { dg-final { scan-tree-dump-times "VDEF" 3 "alias"} } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-13.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-13.c
index 19f892eaa85..43b92c11569 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-13.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-13.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized" } */
-/* { dg-additional-options "-mbranch-cost=2" { target { i?86-*-* x86_64-*-* mips*-*-* s390*-*-* avr*-*-* } } } */
+/* { dg-additional-options "-mbranch-cost=2" { target { i?86-*-* x86_64-*-* s390*-*-* avr*-*-* } } } */
_Bool f1(_Bool a, _Bool b)
{
@@ -17,5 +17,5 @@ _Bool f1(_Bool a, _Bool b)
/* For LOGICAL_OP_NON_SHORT_CIRCUIT, this should be optimized
into return a & b;, with no ifs. */
-/* { dg-final { scan-tree-dump-not "if" "optimized" { target { i?86-*-* x86_64-*-* mips*-*-* s390*-*-* avr*-*-* } } } } */
+/* { dg-final { scan-tree-dump-not "if" "optimized" { target { i?86-*-* x86_64-*-* s390*-*-* avr*-*-* } } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/uninit-B-O0.c b/gcc/testsuite/gcc.dg/uninit-B-O0.c
index e2883a38ea8..5557ace6f8d 100644
--- a/gcc/testsuite/gcc.dg/uninit-B-O0.c
+++ b/gcc/testsuite/gcc.dg/uninit-B-O0.c
@@ -9,7 +9,7 @@ void
baz (void)
{
int i;
- if (i) /* { dg-warning "uninit" "uninit i warning" { xfail *-*-* } } */
+ if (i) /* { dg-warning "'i' is used uninitialized in this function" } */
bar (i);
foo (&i);
}
diff --git a/gcc/testsuite/gcc.dg/uninit-I-O0.c b/gcc/testsuite/gcc.dg/uninit-I-O0.c
index 655f5489279..761f65b485b 100644
--- a/gcc/testsuite/gcc.dg/uninit-I-O0.c
+++ b/gcc/testsuite/gcc.dg/uninit-I-O0.c
@@ -3,6 +3,6 @@
int sys_msgctl (void)
{
- struct { int mode; } setbuf; /* { dg-warning "'setbuf\.mode' is used" {} { xfail *-*-* } } */
- return setbuf.mode;
+ struct { int mode; } setbuf;
+ return setbuf.mode; /* { dg-warning "'setbuf\.mode' is used uninitialized in this function" } */
}
diff --git a/gcc/testsuite/gcc.dg/uninit-pr19430-O0.c b/gcc/testsuite/gcc.dg/uninit-pr19430-O0.c
index 4ce258653d6..63f0b2b44f3 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr19430-O0.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr19430-O0.c
@@ -16,10 +16,9 @@ foo (int i)
return j;
}
-
int foo2( void ) {
- int rc; /* { dg-warning "'rc' is used uninitialized in this function" "uninitialized" { xfail *-*-* } 21 } */
- return rc;
+ int rc;
+ return rc; /* { dg-warning "'rc' is used uninitialized in this function" } */
*&rc = 0;
}
@@ -29,7 +28,7 @@ void frob(int *pi);
int main(void)
{
int i;
- printf("i = %d\n", i); /* { dg-warning "'i' is used uninitialized in this function" "uninitialized" { xfail *-*-* } 32 } */
+ printf("i = %d\n", i); /* { dg-warning "'i' is used uninitialized in this function" } */
frob(&i);
return 0;
@@ -38,6 +37,6 @@ int main(void)
void foo3(int*);
void bar3(void) {
int x;
- if(x) /* { dg-warning "'x' is used uninitialized in this function" "uninitialized" { xfail *-*-* } 41 } */
+ if(x) /* { dg-warning "'x' is used uninitialized in this function" } */
foo3(&x);
}
diff --git a/gcc/testsuite/gcc.dg/vect/pr60505.c b/gcc/testsuite/gcc.dg/vect/pr60505.c
new file mode 100644
index 00000000000..694051320ce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60505.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-Wall -Werror" } */
+
+void foo(char *in, char *out, int num)
+{
+ int i;
+ char ovec[16] = {0};
+
+ for(i = 0; i < num ; ++i)
+ out[i] = (ovec[i] = in[i]);
+ out[num] = ovec[num/2];
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr60656.c b/gcc/testsuite/gcc.dg/vect/pr60656.c
new file mode 100644
index 00000000000..4950275fb87
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60656.c
@@ -0,0 +1,47 @@
+/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_long } */
+
+#include "tree-vect.h"
+
+__attribute__ ((noinline)) long
+foo ()
+{
+ int v[] = {5000, 5001, 5002, 5003};
+ long s = 0;
+ int i;
+
+ for(i = 0; i < 4; ++i)
+ {
+ long P = v[i];
+ s += P * P * P;
+ }
+ return s;
+}
+
+long
+bar ()
+{
+ int v[] = {5000, 5001, 5002, 5003};
+ long s = 0;
+ int i;
+
+ for(i = 0; i < 4; ++i)
+ {
+ long P = v[i];
+ s += P * P * P;
+ __asm__ volatile ("");
+ }
+ return s;
+}
+
+int main()
+{
+ check_vect ();
+
+ if (foo () != bar ())
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_si_to_di_pattern } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr60841.c b/gcc/testsuite/gcc.dg/vect/pr60841.c
new file mode 100644
index 00000000000..44b5d019169
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60841.c
@@ -0,0 +1,183 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-ffast-math" } */
+
+/* This testcase shouldn't consume much memory or produce a 1GB vectorizer
+ dump file due to SLP tree explosion. */
+
+struct S { int f1, f2, f3, f4; } a;
+struct T { short f3, f2, f1, f4; };
+int b, c, d, e, f, g;
+unsigned long z;
+
+void
+foo (struct T *p, struct T *q, int x, int w)
+{
+ for (; x; x++)
+ {
+ struct S h;
+ int i;
+ struct T j;
+ struct T *r;
+ h = a;
+ g = 0;
+ r = p + 2 * (c + 4) + 1;
+ j = *r;
+ r = p;
+ f = r->f1 - 1;
+ b = +1.0 + f * f;
+ i = (r->f2 + j.f2) / 2;
+ f = r->f3 - 1;
+ b += 1.0 - i * f * f;
+ f = r->f4 - 1;
+ if (b)
+ b += -1.0 - i * f;
+ if (b / w)
+ {
+ h.f1 += 8.0 * r->f1;
+ h.f2 += 8.0 * r->f2;
+ h.f3 += 8.0 * r->f3;
+ h.f4 += 8.0 * r->f4;
+ g = 1;
+ }
+ r++;
+ f = r->f1;
+ i = (r->f2 + j.f2) / 2;
+ f = r->f3 - 1;
+ b += 1.0 - i * f * f;
+ i = (r->f4);
+ if (b * 65535UL / w)
+ {
+ h.f1 += 10.0 * r->f1;
+ h.f2 += 10.0 * r->f2;
+ h.f3 += 10.0 * r->f3;
+ h.f4 += 10.0 * r->f4;
+ g += 10.0;
+ }
+ r++;
+ f = r->f1;
+ z = 5UL * i;
+ f = r->f2;
+ i = (r->f3 + j.f3) / 2;
+ b = -i * f * f;
+ i = (r->f4 + j.f4) / 2;
+ if (b * 65535UL / 25.0f)
+ {
+ h.f1 += 8.0 * r->f1;
+ h.f2 += 8.0 * r->f2;
+ h.f3 += 8.0 * r->f3;
+ h.f4 += 8.0 * r->f4;
+ g += 8.0;
+ }
+ r++;
+ f = r->f1 - j.f1;
+ b = 1 * 2.0 * i * f * f;
+ f = r->f2;
+ b += 4.0 * f;
+ i = r->f3 / 2;
+ f = r->f4 - 1;
+ if (b * 1)
+ {
+ h.f1 += 8.0 * r->f1;
+ h.f2 += 8.0 * r->f2;
+ h.f3 += 8.0 * r->f3;
+ h.f4 += 8.0 * r->f4;
+ g += 8.0;
+ }
+ b = 4.0 * 1 * f;
+ if (b * 65535UL / 25.0f)
+ {
+ h.f1 += 20.0 * r->f1;
+ h.f2 += 20.0 * r->f2;
+ h.f3 += 20.0 * r->f3;
+ h.f4 += 20.0 * r->f4;
+ g += 20.0;
+ }
+ b = 5 * (0.0 - i);
+ if (b < 0)
+ {
+ h.f1 += 8.0 * r->f1;
+ h.f2 += 8.0 * r->f2;
+ h.f3 += 8.0 * r->f3;
+ h.f4 += 8.0 * r->f4;
+ g += 8.0;
+ }
+ r = p + 2 * (c + 4);
+ i = (r->f1 + j.f1);
+ b = 1 * 2.0 * i * 1;
+ f = r->f2 - 1;
+ i = (r->f3 + j.f3) / 2;
+ b = 5 * (0.0 - i) * f * f;
+ i = (r->f4 + j.f4) / 2;
+ if (b * 65535UL / 25.0f)
+ {
+ h.f1 += 10.0 * r->f1;
+ h.f2 += 10.0 * r->f2;
+ h.f3 += 10.0 * r->f3;
+ h.f4 += 10.0 * r->f4;
+ g += 10.0;
+ }
+ r++;
+ f = r->f1;
+ b = 5UL * i * f;
+ i = (r->f2 + j.f2) / 2;
+ f = r->f3 - 1;
+ b = 5 * (0.0 - i) * f * f;
+ f = r->f4 - 1;
+ if (b * 65535UL / 25.0f)
+ {
+ h.f1 += 40.0 * r->f1;
+ h.f2 += 40.0 * r->f2;
+ h.f3 += 40.0 * r->f3;
+ h.f4 += 40.0 * r->f4;
+ g += 40.0;
+ }
+ r++;
+ i = (r->f1 + j.f1);
+ b = 5 * i * f;
+ f = r->f2;
+ b = 4.0 * f * f;
+ f = r->f3;
+ i = (r->f4 + j.f4) / 2;
+ b = 5 * (0.0 - i) * f * f;
+ if (b * 25.0f)
+ {
+ h.f1 += 8.0 * r->f1;
+ h.f2 += 8.0 * r->f2;
+ h.f3 += 8.0 * r->f3;
+ h.f4 += 8.0 * r->f4;
+ g += 8.0;
+ }
+ r = p + 4 * (c + 4);
+ i = r->f1 / 2;
+ b = 5 * (1.0 + i);
+ i = r->f2 + j.f2;
+ f = r->f3 - 1;
+ b = 5 * (0.0 - i) * f * f;
+ i = (r->f4 + j.f4) / 2;
+ if (b * 65535UL / 25.0f)
+ {
+ h.f1 += 5.0 * r->f1;
+ h.f2 += 5.0 * r->f2;
+ h.f3 += 5.0 * r->f3;
+ h.f4 += 5.0 * r->f4;
+ g += 5.0;
+ }
+ b = 5 * (1.0 + i);
+ if (b < 0)
+ {
+ h.f1 += 5.0 * r->f1;
+ h.f2 += 5.0 * r->f2;
+ h.f3 += 5.0 * r->f3;
+ h.f4 += 5.0 * r->f4;
+ g += 5.0;
+ }
+ q->f1 = (h.f1 + g / 2 - 1) / g;
+ q->f2 = (h.f2 + g / 2 - 1) / g;
+ q->f3 = (h.f3 + g / 2 - 1) / g;
+ q->f4 = (h.f4 + g / 2 - 1) / g;
+ p++;
+ q++;
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/arm/pr60650-2.c b/gcc/testsuite/gcc.target/arm/pr60650-2.c
new file mode 100644
index 00000000000..19467607b6e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr60650-2.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -march=armv7-a" } */
+
+int a, h, j;
+long long d, e, i;
+int f;
+fn1 (void *p1, int p2)
+{
+ switch (p2)
+ case 8:
+{
+ register b = *(long long *) p1, c asm ("r2");
+ asm ("%0": "=r" (a), "=r" (c):"r" (b), "r" (0));
+ *(long long *) p1 = c;
+ }
+}
+
+fn2 ()
+{
+ int k;
+ k = f;
+ while (1)
+ {
+ fn1 (&i, sizeof i);
+ e = d + k;
+ switch (d)
+ case 0:
+ (
+ {
+ register l asm ("r4");
+ register m asm ("r0");
+ asm (" .err .endif\n\t": "=r" (h), "=r" (j):"r" (m),
+ "r"
+ (l));;
+ });
+ }
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr60657.c b/gcc/testsuite/gcc.target/arm/pr60657.c
new file mode 100644
index 00000000000..66355c39a94
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr60657.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=armv7-a" } */
+
+
+void foo (void);
+
+void
+bar (int x, int y)
+{
+ y = 9999;
+ if (x & (1 << y))
+ foo ();
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr60663.c b/gcc/testsuite/gcc.target/arm/pr60663.c
new file mode 100644
index 00000000000..b79b830e1a9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr60663.c
@@ -0,0 +1,11 @@
+/* PR rtl-optimization/60663 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=armv7-a" } */
+
+int
+foo (void)
+{
+ unsigned i, j;
+ asm ("%0 %1" : "=r" (i), "=r" (j));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/avr/dev-specific-rmw.c b/gcc/testsuite/gcc.target/avr/dev-specific-rmw.c
new file mode 100644
index 00000000000..0a8393e4966
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/dev-specific-rmw.c
@@ -0,0 +1,13 @@
+/* Verify that rmw instructions supported */
+/* { dg-do assemble } */
+
+int main()
+{
+ #ifdef __AVR_ISA_RMW__
+ __asm("xch Z, r12");
+ __asm("las Z, r12");
+ __asm("lac Z, r12");
+ __asm("lat Z, r12");
+ #endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/epiphany/btst-1.c b/gcc/testsuite/gcc.target/epiphany/btst-1.c
new file mode 100644
index 00000000000..b5667cce74c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/epiphany/btst-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-common" } */
+/* { dg-final { scan-assembler-not "movt" } } */
+/* { dg-final { scan-assembler-not "and" } } */
+/* { dg-final { scan-assembler "lsl" } } */
+
+int
+tst (int i)
+{
+ return (i & (1<<21)) ? 6 : 9;
+}
diff --git a/gcc/testsuite/gcc.target/epiphany/mode-switch.c b/gcc/testsuite/gcc.target/epiphany/mode-switch.c
new file mode 100644
index 00000000000..d7f80a962fd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/epiphany/mode-switch.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "#-917506" } } */
+/* PR 60651 */
+
+int a;
+int c;
+
+void __attribute__((interrupt))
+misc_handler (void) {
+ a*= c;
+}
diff --git a/gcc/testsuite/gcc.target/epiphany/t1068-2.c b/gcc/testsuite/gcc.target/epiphany/t1068-2.c
new file mode 100644
index 00000000000..3baefcb909a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/epiphany/t1068-2.c
@@ -0,0 +1,53 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-common" } */
+/* ??? we should be able to get down to 4 movt, but first we'll have to
+ teach mov2add about flag handling. Maybe add the code that was removed in
+ r144425 from regmove to postreload; epiphany needs tweaks to the addsi3
+ expander to generate a CC reg clobber in the pass. */
+/* { dg-final { scan-assembler-times "movt" 6 } } */
+
+typedef unsigned int uint32_t;
+typedef unsigned int uint16_t;
+
+struct dma_desc {
+ uint32_t config;
+ uint32_t inner_stride;
+ uint32_t count;
+ uint32_t outer_stride;
+ void *src_addr;
+ void *dst_addr;
+};
+typedef struct dma_desc e_dma_desc_t;
+
+e_dma_desc_t dma;
+int a;
+int id[8];
+#define NULL ((void *)0)
+
+static inline void _ez_dma_set(register e_dma_desc_t *dma,
+ uint32_t config,
+ e_dma_desc_t *next,
+ uint16_t inner_src, uint16_t inner_dst,
+ uint16_t inner_count, uint16_t outer_count,
+ uint16_t outer_src, uint16_t outer_dst,
+ void *src, void*dst) {
+ //register e_dma_desc_t *dmap = dma;
+
+ dma->config = config | (((uint32_t)next)<<16);
+ dma->inner_stride = (inner_dst << 16) | inner_src;
+ dma->count = (inner_count << 16) | outer_count;
+ dma->outer_stride = (outer_dst << 16) | outer_src;
+ dma->src_addr = src;
+ dma->dst_addr = dst;
+}
+
+void __attribute__((section(".text.ds1")))
+dmas_inline1(void) {
+ register e_dma_desc_t *dmap = &dma;
+
+ _ez_dma_set(dmap, 3, NULL,
+ 1, 2,
+ 12, 13,
+ 5, 1,
+ id, &a);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c
index 67ca4a7cda1..8c08bf5ced5 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
index 933f265eed5..30b42aa38c2 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-load" } */
+/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-load -mno-prefer-avx128" } */
void
avx_test (char **cp, char **ep)
diff --git a/gcc/testsuite/gcc.target/i386/bmi-1.c b/gcc/testsuite/gcc.target/i386/bmi-1.c
index a05cb275adc..c66a9d83b29 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-1.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-1.c
@@ -2,10 +2,10 @@
/* { dg-options "-O2 -mbmi " } */
/* { dg-final { scan-assembler "andn\[^\\n]*eax" } } */
/* { dg-final { scan-assembler-times "bextr\[ \\t]+\[^\\n]*eax" 2 } } */
-/* { dg-final { scan-assembler "blsi\[^\\n]*eax" } } */
-/* { dg-final { scan-assembler "blsmsk\[^\\n]*eax" } } */
-/* { dg-final { scan-assembler "blsr\[^\\n]*eax" } } */
-/* { dg-final { scan-assembler "tzcntl\[^\\n]*eax" } } */
+/* { dg-final { scan-assembler-times "blsi\[^\\n]*eax" 2 } } */
+/* { dg-final { scan-assembler-times "blsmsk\[^\\n]*eax" 2 } } */
+/* { dg-final { scan-assembler-times "blsr\[^\\n]*eax" 2 } } */
+/* { dg-final { scan-assembler-times "tzcntl\[^\\n]*eax" 2 } } */
#include <x86intrin.h>
@@ -36,19 +36,43 @@ func_blsi32 (unsigned int X)
}
unsigned int
+func_blsi32_2 (unsigned int X)
+{
+ return _blsi_u32(X);
+}
+
+unsigned int
func_blsmsk32 (unsigned int X)
{
return __blsmsk_u32(X);
}
unsigned int
+func_blsmsk32_2 (unsigned int X)
+{
+ return _blsmsk_u32(X);
+}
+
+unsigned int
func_blsr32 (unsigned int X)
{
return __blsr_u32(X);
}
unsigned int
+func_blsr32_2 (unsigned int X)
+{
+ return _blsr_u32(X);
+}
+
+unsigned int
func_tzcnt32 (unsigned int X)
{
return __tzcnt_u32(X);
}
+
+unsigned int
+func_tzcnt32_2 (unsigned int X)
+{
+ return _tzcnt_u32(X);
+}
diff --git a/gcc/testsuite/gcc.target/i386/bmi-2.c b/gcc/testsuite/gcc.target/i386/bmi-2.c
index 68d06a20540..6eea66aa0f6 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-2.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-2.c
@@ -2,10 +2,10 @@
/* { dg-options "-O2 -mbmi " } */
/* { dg-final { scan-assembler "andn\[^\\n]*rax" } } */
/* { dg-final { scan-assembler-times "bextr\[ \\t]+\[^\\n]*rax" 2 } } */
-/* { dg-final { scan-assembler "blsi\[^\\n]*rax" } } */
-/* { dg-final { scan-assembler "blsmsk\[^\\n]*rax" } } */
-/* { dg-final { scan-assembler "blsr\[^\\n]*rax" } } */
-/* { dg-final { scan-assembler "tzcntq\[^\\n]*rax" } } */
+/* { dg-final { scan-assembler-times "blsi\[^\\n]*rax" 2 } } */
+/* { dg-final { scan-assembler-times "blsmsk\[^\\n]*rax" 2 } } */
+/* { dg-final { scan-assembler-times "blsr\[^\\n]*rax" 2 } } */
+/* { dg-final { scan-assembler-times "tzcntq\[^\\n]*rax" 2 } } */
#include <x86intrin.h>
@@ -36,19 +36,43 @@ func_blsi64 (unsigned long long X)
}
unsigned long long
+func_blsi64_2 (unsigned long long X)
+{
+ return _blsi_u64 (X);
+}
+
+unsigned long long
func_blsmsk64 (unsigned long long X)
{
return __blsmsk_u64 (X);
}
unsigned long long
+func_blsmsk64_2 (unsigned long long X)
+{
+ return _blsmsk_u64 (X);
+}
+
+unsigned long long
func_blsr64 (unsigned long long X)
{
return __blsr_u64 (X);
}
unsigned long long
+func_blsr64_2 (unsigned long long X)
+{
+ return _blsr_u64 (X);
+}
+
+unsigned long long
func_tzcnt64 (unsigned long long X)
{
return __tzcnt_u64 (X);
}
+
+unsigned long long
+func_tzcnt64_2 (unsigned long long X)
+{
+ return _tzcnt_u64 (X);
+}
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-2.c b/gcc/testsuite/gcc.target/i386/funcspec-2.c
index 88c14b29b28..e535586f9b7 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-2.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-2.c
@@ -1,5 +1,6 @@
/* Test whether using target specific options, we can generate FMA4 code. */
/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -march=k8" } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-3.c b/gcc/testsuite/gcc.target/i386/funcspec-3.c
index f3f4db76a84..bac79865d99 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-3.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-3.c
@@ -2,6 +2,7 @@
setting the architecture. */
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -march=k8 -mno-sse3" } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-9.c b/gcc/testsuite/gcc.target/i386/funcspec-9.c
index 78714e12417..14b7abd2601 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-9.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-9.c
@@ -1,5 +1,6 @@
/* Test whether using target specific options, we can generate FMA4 code. */
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -march=k8 -mfpmath=sse -msse2" } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/i386/isa-1.c b/gcc/testsuite/gcc.target/i386/isa-1.c
index d98c14ffb19..3a4406fc0e4 100644
--- a/gcc/testsuite/gcc.target/i386/isa-1.c
+++ b/gcc/testsuite/gcc.target/i386/isa-1.c
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=x86-64" } } */
/* { dg-options "-march=x86-64 -msse4" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c b/gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c
index a2b66d966d0..3117771d431 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
/* { dg-options "-O2 -march=atom -mmemcpy-strategy=vector_loop:-1:align" } */
/* { dg-final { scan-assembler-times "movdqa" 8 { target { ! { ia32 } } } } } */
/* { dg-final { scan-assembler-times "movdqa" 4 { target { ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c b/gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c
index c2f49f0cc5f..303edca950a 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
/* { dg-options "-O2 -march=atom -mmemcpy-strategy=vector_loop:3000:align,libcall:-1:align" } */
/* { dg-final { scan-assembler-times "movdqa" 8 { target { ! { ia32 } } } } } */
/* { dg-final { scan-assembler-times "movdqa" 4 { target { ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c b/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c
index c61c067951b..1ea682a1065 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
/* { dg-options "-O2 -march=atom -minline-all-stringops -mstringop-strategy=vector_loop" } */
/* { dg-final { scan-assembler-times "movdqa" 8 { target { ! { ia32 } } } } } */
/* { dg-final { scan-assembler-times "movdqa" 4 { target { ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c b/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c
index 8a646d509a1..3befef95d82 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
/* { dg-options "-O2 -march=atom -minline-all-stringops -mstringop-strategy=vector_loop" } */
/* { dg-final { scan-assembler-times "movdqa" 4} } */
diff --git a/gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c b/gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c
index ad0d130371b..f7e45165c44 100644
--- a/gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c
+++ b/gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
/* { dg-options "-O2 -march=atom -minline-all-stringops -mstringop-strategy=vector_loop" } */
/* { dg-final { scan-assembler-times "movdqa" 4 } } */
diff --git a/gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c b/gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c
index f2ceb442c7b..92e61000425 100644
--- a/gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c
+++ b/gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
/* { dg-options "-O2 -march=atom -minline-all-stringops -mstringop-strategy=vector_loop" } */
/* { dg-final { scan-assembler-times "movdqa" 4} } */
diff --git a/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c b/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c
index a2313a4b190..6a50573a55e 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=core2" } } */
/* { dg-options "-O2 -msse4 -march=core2 -dp" } */
#include <emmintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssetype-1.c b/gcc/testsuite/gcc.target/i386/ssetype-1.c
index ef89059b8d8..a8252295587 100644
--- a/gcc/testsuite/gcc.target/i386/ssetype-1.c
+++ b/gcc/testsuite/gcc.target/i386/ssetype-1.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* This test checks for absolute memory operands. */
/* { dg-require-effective-target nonpic } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -msse2 -march=k8" } */
/* { dg-final { scan-assembler "andpd\[^\\n\]*magic" } } */
/* { dg-final { scan-assembler "andnpd\[^\\n\]*magic" } } */
diff --git a/gcc/testsuite/gcc.target/i386/ssetype-2.c b/gcc/testsuite/gcc.target/i386/ssetype-2.c
index b68a63923fb..37953ca64d0 100644
--- a/gcc/testsuite/gcc.target/i386/ssetype-2.c
+++ b/gcc/testsuite/gcc.target/i386/ssetype-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -msse2 -march=k8" } */
/* { dg-final { scan-assembler "andpd" } } */
/* { dg-final { scan-assembler "andnpd" } } */
diff --git a/gcc/testsuite/gcc.target/i386/ssetype-5.c b/gcc/testsuite/gcc.target/i386/ssetype-5.c
index 75133e9fa68..4e22e59e556 100644
--- a/gcc/testsuite/gcc.target/i386/ssetype-5.c
+++ b/gcc/testsuite/gcc.target/i386/ssetype-5.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* This test checks for absolute memory operands. */
/* { dg-require-effective-target nonpic } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -msse2 -march=k8" } */
/* { dg-final { scan-assembler "pand\[^\\n\]*magic" } } */
/* { dg-final { scan-assembler "pandn\[^\\n\]*magic" } } */
diff --git a/gcc/testsuite/gcc.target/i386/vec-may_alias.c b/gcc/testsuite/gcc.target/i386/vec-may_alias.c
new file mode 100644
index 00000000000..e970497454f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/vec-may_alias.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -w -Wno-abi" } */
+
+typedef int v2si __attribute__ ((vector_size (8)));
+typedef short v4hi __attribute__ ((vector_size (8)));
+typedef short v4hia __attribute__ ((vector_size (8), may_alias));
+
+__attribute__ ((noinline, noclone))
+int f (v2si A, int N)
+{ return ((v4hia)A)[N]; }
+
+__attribute__ ((noinline, noclone))
+int g (v2si A, int N)
+{ return ((v4hi)A)[N]; }
+
+int main()
+{
+ v2si x = { 0, 0 }, y = { 1, 1 };
+ if (f (x, 0) || f (x, 1) || f (x, 2) || f (x, 3))
+ __builtin_abort ();
+ if (g (y, 0) != 1 || g (y, 1) || g (y, 2) != 1 || g (y, 3))
+ __builtin_abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/mips/umips-store16-1.c b/gcc/testsuite/gcc.target/mips/umips-store16-1.c
new file mode 100644
index 00000000000..6377e8569d6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-store16-1.c
@@ -0,0 +1,30 @@
+/* { dg-options "(-mmicromips)" } */
+/* { dg-do assemble } */
+
+register unsigned int global asm ("$16");
+
+extern void exit (int) __attribute__((noreturn));
+
+MICROMIPS void
+test_sb (unsigned char *ptr, void (*f) (void))
+{
+ ptr[0] = global;
+ f ();
+ exit (0);
+}
+
+MICROMIPS void
+test_sh (unsigned short *ptr, void (*f) (void))
+{
+ ptr[0] = global;
+ f ();
+ exit (0);
+}
+
+MICROMIPS void
+test_sw (unsigned int *ptr, void (*f) (void))
+{
+ ptr[0] = global;
+ f ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.target/mips/umips-store16-2.c b/gcc/testsuite/gcc.target/mips/umips-store16-2.c
new file mode 100644
index 00000000000..0748edb5692
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-store16-2.c
@@ -0,0 +1,22 @@
+/* { dg-options "(-mmicromips) -dp" } */
+
+MICROMIPS void
+f1 (unsigned char *ptr)
+{
+ *ptr = 0;
+}
+
+MICROMIPS void
+f2 (unsigned short *ptr)
+{
+ *ptr = 0;
+}
+
+MICROMIPS void
+f3 (unsigned int *ptr)
+{
+ *ptr = 0;
+}
+/* { dg-final { scan-assembler "\tsb\t\\\$0,0\\(\\\$\[0-9\]+\\)\[^\n\]*length = 2" } } */
+/* { dg-final { scan-assembler "\tsh\t\\\$0,0\\(\\\$\[0-9\]+\\)\[^\n\]*length = 2" } } */
+/* { dg-final { scan-assembler "\tsw\t\\\$0,0\\(\\\$\[0-9\]+\\)\[^\n\]*length = 2" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/atomic_load_store-p8.c b/gcc/testsuite/gcc.target/powerpc/atomic_load_store-p8.c
new file mode 100644
index 00000000000..8a5cbfaa36b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/atomic_load_store-p8.c
@@ -0,0 +1,22 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2" } */
+/* { dg-final { scan-assembler-times "lq" 1 } } */
+/* { dg-final { scan-assembler-times "stq" 1 } } */
+/* { dg-final { scan-assembler-not "bl __atomic" } } */
+/* { dg-final { scan-assembler-not "lqarx" } } */
+/* { dg-final { scan-assembler-not "stqcx" } } */
+
+__int128
+atomic_load_128_relaxed (__int128 *ptr)
+{
+ return __atomic_load_n (ptr, __ATOMIC_RELAXED);
+}
+
+void
+atomic_store_128_relaxed (__int128 *ptr, __int128 val)
+{
+ __atomic_store_n (ptr, val, __ATOMIC_RELAXED);
+}
+
diff --git a/gcc/testsuite/gcc.target/s390/htm-builtins-compile-1.c b/gcc/testsuite/gcc.target/s390/htm-builtins-compile-1.c
index c1b98e2bba4..982a7483dbe 100644
--- a/gcc/testsuite/gcc.target/s390/htm-builtins-compile-1.c
+++ b/gcc/testsuite/gcc.target/s390/htm-builtins-compile-1.c
@@ -27,8 +27,8 @@ foo (struct __htm_tdb* tdb, int reg, int *mem, uint64_t *mem64)
cc = __builtin_tbegin ((void *)0x12345678);
cc = __builtin_tbegin (tdb);
cc = __builtin_tbegin (&global_tdb);
- cc = __builtin_tbegin ((void *)(long long)(reg + 0x12345678));
- cc = __builtin_tbegin ((void *)(long long)(reg));
+ cc = __builtin_tbegin ((void *)(long)(reg + 0x12345678));
+ cc = __builtin_tbegin ((void *)(long)(reg));
__builtin_tbegin_nofloat ((void *)0);
__builtin_tbegin_nofloat ((void *)-99999);
@@ -36,8 +36,8 @@ foo (struct __htm_tdb* tdb, int reg, int *mem, uint64_t *mem64)
cc = __builtin_tbegin_nofloat ((void *)0x12345678);
cc = __builtin_tbegin_nofloat (tdb);
cc = __builtin_tbegin_nofloat (&global_tdb);
- cc = __builtin_tbegin_nofloat ((void *)(long long)(reg + 0x12345678));
- cc = __builtin_tbegin_nofloat ((void *)(long long)(reg));
+ cc = __builtin_tbegin_nofloat ((void *)(long)(reg + 0x12345678));
+ cc = __builtin_tbegin_nofloat ((void *)(long)(reg));
__builtin_tbegin_retry ((void *)0, 0);
cc = __builtin_tbegin_retry ((void *)0, 1);
@@ -50,9 +50,9 @@ foo (struct __htm_tdb* tdb, int reg, int *mem, uint64_t *mem64)
cc = __builtin_tbegin_retry (&global_tdb, 42);
cc = __builtin_tbegin_retry ((void *)0x12345678, global);
cc = __builtin_tbegin_retry (
- (void *)(long long) (reg + 0x12345678), global + 1);
+ (void *)(long) (reg + 0x12345678), global + 1);
cc = __builtin_tbegin_retry (
- (void *)(long long)(reg), global - 1);
+ (void *)(long)(reg), global - 1);
__builtin_tbegin_retry_nofloat ((void *)0, 0);
cc = __builtin_tbegin_retry_nofloat ((void *)0, 1);
@@ -65,9 +65,9 @@ foo (struct __htm_tdb* tdb, int reg, int *mem, uint64_t *mem64)
cc = __builtin_tbegin_retry_nofloat (&global_tdb, 42);
cc = __builtin_tbegin_retry_nofloat ((void *)0x12345678, global);
cc = __builtin_tbegin_retry_nofloat (
- (void *)(long long) (reg + 0x12345678), global + 1);
+ (void *)(long) (reg + 0x12345678), global + 1);
cc = __builtin_tbegin_retry_nofloat (
- (void *)(long long)(reg), global - 1);
+ (void *)(long)(reg), global - 1);
__builtin_tbeginc ();
diff --git a/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c b/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c
index df7e2bac874..6022efb97fe 100644
--- a/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c
+++ b/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c
@@ -1,12 +1,50 @@
-/* { dg-do compile } */
-/* { dg-options "-O3 -march=zEC12 -mzarch" } */
+/* { dg-do run } */
+/* { dg-require-effective-target htm } */
+/* { dg-options "-O3 -march=zEC12 -mzarch --save-temps" } */
-int
-foo ()
+/* __builtin_tbegin has to emit clobbers for all FPRs since the tbegin
+ instruction does not automatically preserves them. If the
+ transaction body is fully contained in a function the backend tries
+ after reload to get rid of the FPR save/restore operations
+ triggered by the clobbers. This testcase failed since the backend
+ was able to get rid of all FPR saves/restores and since these were
+ the only stack operations also of the entire stack space. So even
+ the save/restore of the stack pointer was omitted in the end.
+ However, since the frame layout has been fixed before, the prologue
+ still generated the stack pointer decrement making foo return with
+ a modified stack pointer. */
+
+void abort(void);
+
+void __attribute__((noinline))
+foo (int a)
+{
+ if (__builtin_tbegin (0) == 0)
+ __builtin_tend ();
+}
+
+#ifdef __s390x__
+#define GET_STACK_POINTER(SP) \
+ asm volatile ("stg %%r15, %0" : "=QRST" (SP));
+#else
+#define GET_STACK_POINTER(SP) \
+ asm volatile ("st %%r15, %0" : "=QR" (SP));
+#endif
+
+int main(void)
{
- __builtin_tbegin_nofloat (0);
- __builtin_tbegin_retry_nofloat (0, 42);
+ unsigned long new_sp, old_sp;
+
+ GET_STACK_POINTER (old_sp);
+ foo(42);
+ GET_STACK_POINTER (new_sp);
+
+ if (old_sp != new_sp)
+ abort ();
+
+ return 0;
}
+
/* Make sure no FPR saves/restores are emitted. */
-/* { dg-final { scan-assembler-not "std" } } */
-/* { dg-final { scan-assembler-not "ld" } } */
+/* { dg-final { scan-assembler-not "\tstd\t" } } */
+/* { dg-final { scan-assembler-not "\tld\t" } } */
diff --git a/gcc/testsuite/gcc.target/s390/htm-nofloat-2.c b/gcc/testsuite/gcc.target/s390/htm-nofloat-2.c
deleted file mode 100644
index 59621a4c19b..00000000000
--- a/gcc/testsuite/gcc.target/s390/htm-nofloat-2.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* { dg-do run } */
-/* { dg-options "-O3 -mhtm -Wa,-march=zEC12,-mzarch --save-temps" } */
-
-/* __builtin_tbegin has to emit clobbers for all FPRs since the tbegin
- instruction does not automatically preserves them. If the
- transaction body is fully contained in a function the backend tries
- after reload to get rid of the FPR save/restore operations
- triggered by the clobbers. This testcase failed since the backend
- was able to get rid of all FPR saves/restores and since these were
- the only stack operations also of the entire stack space. So even
- the save/restore of the stack pointer was omitted in the end.
- However, since the frame layout has been fixed before, the prologue
- still generated the stack pointer decrement making foo return with
- a modified stack pointer. */
-
-void abort(void);
-
-void __attribute__((noinline))
-foo (int a)
-{
- /* This is just to prevent the tbegin code from actually being
- executed. That way the test may even run on machines prior to
- zEC12. */
- if (a == 42)
- return;
-
- if (__builtin_tbegin (0) == 0)
- __builtin_tend ();
-}
-
-#ifdef __s390x__
-#define GET_STACK_POINTER(SP) \
- asm volatile ("stg %%r15, %0" : "=QRST" (SP));
-#else
-#define GET_STACK_POINTER(SP) \
- asm volatile ("st %%r15, %0" : "=QR" (SP));
-#endif
-
-int main(void)
-{
- unsigned long new_sp, old_sp;
-
- GET_STACK_POINTER (old_sp);
- foo(42);
- GET_STACK_POINTER (new_sp);
-
- if (old_sp != new_sp)
- abort ();
-
- return 0;
-}
-
-/* Make sure no FPR saves/restores are emitted. */
-/* { dg-final { scan-assembler-not "\tstd\t" } } */
-/* { dg-final { scan-assembler-not "\tld\t" } } */
diff --git a/gcc/testsuite/gcc.target/s390/htm-nofloat-compile-1.c b/gcc/testsuite/gcc.target/s390/htm-nofloat-compile-1.c
new file mode 100644
index 00000000000..df7e2bac874
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-nofloat-compile-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=zEC12 -mzarch" } */
+
+int
+foo ()
+{
+ __builtin_tbegin_nofloat (0);
+ __builtin_tbegin_retry_nofloat (0, 42);
+}
+/* Make sure no FPR saves/restores are emitted. */
+/* { dg-final { scan-assembler-not "std" } } */
+/* { dg-final { scan-assembler-not "ld" } } */
diff --git a/gcc/testsuite/gcc.target/s390/s390.exp b/gcc/testsuite/gcc.target/s390/s390.exp
index 1b6d94a2313..f2ba9298615 100644
--- a/gcc/testsuite/gcc.target/s390/s390.exp
+++ b/gcc/testsuite/gcc.target/s390/s390.exp
@@ -24,17 +24,17 @@ if ![istarget s390*-*-*] then {
# Load support procs.
load_lib gcc-dg.exp
-# Return 1 if htm (etnd - extract nesting depth) instructions can be
-# compiled.
+# Return 1 if htm (etnd - extract nesting depth) instructions are
+# understood by the assembler and can be executed.
proc check_effective_target_htm { } {
if { ![check_runtime s390_check_htm [subst {
int main (void)
{
- unsigned int nd = 77;
- asm (".insn rre,0xb2ec0000,%0,0" : "=d" (nd));
+ unsigned int nd;
+ asm ("etnd %0" : "=d" (nd));
return nd;
}
- }]] } { return 0 } else { return 1 }
+ }] "-march=zEC12 -mzarch" ] } { return 0 } else { return 1 }
}
# If a testcase doesn't have special options, use these.
diff --git a/gcc/testsuite/gcc.target/sh/memset.c b/gcc/testsuite/gcc.target/sh/memset.c
new file mode 100644
index 00000000000..4695db3aefa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/memset.c
@@ -0,0 +1,13 @@
+/* Check that the __builtin_memset function is inlined when
+ optimizing for speed. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "jmp" } } */
+
+void
+test00(char *dstb)
+{
+ __builtin_memset (dstb, 0, 15);
+}
+
diff --git a/gcc/testsuite/gfortran.dg/associate_15.f90 b/gcc/testsuite/gfortran.dg/associate_15.f90
new file mode 100644
index 00000000000..7e34eb518e0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associate_15.f90
@@ -0,0 +1,40 @@
+! { dg-do run }
+! Test the fix for PR58085, where the offset for 'x' was set to zero,
+! rather than -1.
+!
+! Contributed by Vladimir Fuka <vladimir.fuka@gmail.com>
+!
+module foo
+contains
+ function bar (arg) result (res)
+ integer arg, res(3)
+ res = [arg, arg+1, arg +2]
+ end function
+end module
+ use foo
+ real d(3,3)
+ integer a,b,c
+ character(48) line1, line2
+ associate (x=>shape(d))
+ a = x(1)
+ b = x(2)
+ write (line1, *) a, b
+ write (line2, *) x
+ if (trim (line1) .ne. trim (line2)) call abort
+ end associate
+ associate (x=>[1,2])
+ a = x(1)
+ b = x(2)
+ write (line1, *) a, b
+ write (line2, *) x
+ if (trim (line1) .ne. trim (line2)) call abort
+ end associate
+ associate (x=>bar(5)) ! make sure that we haven't broken function association
+ a = x(1)
+ b = x(2)
+ c = x(3)
+ write (line1, *) a, b, c
+ write (line2, *) x
+ if (trim (line1) .ne. trim (line2)) call abort
+ end associate
+end
diff --git a/gcc/testsuite/gfortran.dg/class_nameclash.f90 b/gcc/testsuite/gfortran.dg/class_nameclash.f90
new file mode 100644
index 00000000000..227d865962f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_nameclash.f90
@@ -0,0 +1,39 @@
+! { dg-do run }
+!
+! try to provoke class name clashes in gfc_build_class_symbol
+!
+module test_module
+
+ implicit none
+
+ type, public :: test_p
+ private
+ class (test_p), pointer :: next => null()
+ end type test_p
+
+ type, public :: test
+! Error in "call do_it (x)" below:
+! Type mismatch in argument 'x' at (1); passed CLASS(test_p) to CLASS(test)
+ class (test), pointer :: next => null()
+ end type test
+
+contains
+
+ subroutine do_it (x)
+ class (test_p), target :: x
+
+ x%next => x
+ return
+ end subroutine do_it
+
+end module test_module
+
+use test_module
+
+ implicit none
+ class (test_p), pointer :: x
+
+ allocate (x)
+ call do_it (x)
+ deallocate (x)
+end
diff --git a/gcc/testsuite/gfortran.dg/finalize_25.f90 b/gcc/testsuite/gfortran.dg/finalize_25.f90
new file mode 100644
index 00000000000..cdbec4caca0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_25.f90
@@ -0,0 +1,55 @@
+! { dg-do run }
+!
+! PR fortran/58880
+! PR fortran/60495
+!
+! Contributed by Andrew Benson and Janus Weil
+!
+
+module gn
+ implicit none
+ type sl
+ integer, allocatable, dimension(:) :: lv
+ contains
+ final :: sld
+ end type
+ type :: nde
+ type(sl) :: r
+ end type nde
+
+ integer :: cnt = 0
+
+contains
+
+ subroutine sld(s)
+ type(sl) :: s
+ cnt = cnt + 1
+ ! print *,'Finalize sl'
+ end subroutine
+ subroutine ndm(s)
+ type(nde), intent(inout) :: s
+ type(nde) :: i
+ i=s
+ end subroutine ndm
+end module
+
+program main
+ use gn
+ type :: nde2
+ type(sl) :: r
+ end type nde2
+ type(nde) :: x
+
+ cnt = 0
+ call ndm(x)
+ if (cnt /= 2) call abort()
+
+ cnt = 0
+ call ndm2()
+ if (cnt /= 3) call abort()
+contains
+ subroutine ndm2
+ type(nde2) :: s,i
+ i=s
+ end subroutine ndm2
+end program main
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr59817.f b/gcc/testsuite/gfortran.dg/graphite/pr59817.f
new file mode 100644
index 00000000000..a9ee8f19dd7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/pr59817.f
@@ -0,0 +1,14 @@
+! { dg-do compile }
+! { dg-options "-O2 -floop-interchange" }
+ SUBROUTINE PREPD(ICAST,ICAS,ICASX,ICAS1,ICAS2,NDET,NM,III,IMP,
+ * CASMIN)
+ LOGICAL CASMIN
+ DIMENSION ICAST(NDET,NM),IMP(NM)
+ IF(CASMIN) THEN
+ DO K=1,NDET
+ DO L=1,NM
+ IF(L.EQ.K-1) ICAST(K,L) = 1
+ END DO
+ END DO
+ END IF
+ END SUBROUTINE
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_17.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_17.f90
new file mode 100644
index 00000000000..0fcff74b910
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_17.f90
@@ -0,0 +1,51 @@
+! { dg-do run }
+! Tests fix for PR60717 in which offsets in recursive calls below
+! were not being set correctly.
+!
+! Reported on comp.lang.fortran by Thomas Schnurrenberger
+!
+module m
+ implicit none
+ real :: chksum0 = 0, chksum1 = 0, chksum2 = 0
+contains
+ recursive subroutine show_real(a)
+ real, intent(in) :: a(:)
+ if (size (a) > 0) then
+ chksum0 = a(1) + chksum0
+ call show_real (a(2:))
+ end if
+ return
+ end subroutine show_real
+ recursive subroutine show_generic1(a)
+ class(*), intent(in) :: a(:)
+ if (size (a) > 0) then
+ select type (a)
+ type is (real)
+ chksum1 = a(1) + chksum1
+ end select
+ call show_generic1 (a(2:)) ! recursive call outside SELECT TYPE
+ end if
+ return
+ end subroutine show_generic1
+ recursive subroutine show_generic2(a)
+ class(*), intent(in) :: a(:)
+ if (size (a) > 0) then
+ select type (a)
+ type is (real)
+ chksum2 = a(1) + chksum2
+ call show_generic2 (a(2:)) ! recursive call inside SELECT TYPE
+ end select
+ end if
+ return
+ end subroutine show_generic2
+end module m
+program test
+ use :: m
+ implicit none
+ real :: array(1:6) = (/ 0, 1, 2, 3, 4, 5 /)
+ call show_real (array)
+ call show_generic1 (array)
+ call show_generic2 (array)
+ if (chksum0 .ne. chksum1) call abort
+ if (chksum0 .ne. chksum2) call abort
+end program test
diff --git a/gcc/testsuite/gfortran.dg/warn_conversion_4.f90 b/gcc/testsuite/gfortran.dg/warn_conversion_4.f90
index f911741f534..3d1b12582b3 100644
--- a/gcc/testsuite/gfortran.dg/warn_conversion_4.f90
+++ b/gcc/testsuite/gfortran.dg/warn_conversion_4.f90
@@ -11,8 +11,8 @@ contains
subroutine test
integer :: x
x = int (abs (cmplx(2.3,0.1)))
- x = int (abs (cmplx(2.3_dp,0.1))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might loose precision, consider using the KIND argument" }
- x = int (abs (cmplx(2.3,0.1_dp))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might loose precision, consider using the KIND argument" }
- x = int (abs (cmplx(2.3_dp,0.1_dp))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might loose precision, consider using the KIND argument" }
+ x = int (abs (cmplx(2.3_dp,0.1))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might lose precision, consider using the KIND argument" }
+ x = int (abs (cmplx(2.3,0.1_dp))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might lose precision, consider using the KIND argument" }
+ x = int (abs (cmplx(2.3_dp,0.1_dp))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might lose precision, consider using the KIND argument" }
end subroutine test
end module fft_mod
diff --git a/gcc/testsuite/gnat.dg/test_raise_from_pure.adb b/gcc/testsuite/gnat.dg/test_raise_from_pure.adb
index 66db2232e77..8f928c58584 100644
--- a/gcc/testsuite/gnat.dg/test_raise_from_pure.adb
+++ b/gcc/testsuite/gnat.dg/test_raise_from_pure.adb
@@ -1,4 +1,4 @@
--- { dg-do run { xfail arm*-*-* } }
+-- { dg-do run }
-- { dg-options "-O2" }
-- This is an optimization test and its failure is only a missed optimization.
diff --git a/gcc/testsuite/gnat.dg/vect11.adb b/gcc/testsuite/gnat.dg/vect11.adb
new file mode 100644
index 00000000000..c8c8a0cb6eb
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect11.adb
@@ -0,0 +1,33 @@
+-- { dg-do compile { target i?86-*-* x86_64-*-* } }
+-- { dg-options "-O3 -msse2 -fdump-tree-optimized" }
+
+package body Vect11 is
+
+ function "+" (X, Y : Sarray) return Sarray is
+ R : Sarray;
+ begin
+ for I in Sarray'Range loop
+ R(I) := X(I) + Y(I);
+ end loop;
+ return R;
+ end;
+
+ procedure Add (X, Y : Sarray; R : out Sarray) is
+ begin
+ for I in Sarray'Range loop
+ R(I) := X(I) + Y(I);
+ end loop;
+ end;
+
+ procedure Add (X, Y : not null access Sarray; R : not null access Sarray) is
+ begin
+ for I in Sarray'Range loop
+ pragma Loop_Optimize (Ivdep);
+ R(I) := X(I) + Y(I);
+ end loop;
+ end;
+
+end Vect11;
+
+-- { dg-final { scan-tree-dump-not "goto" "optimized" } }
+-- { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gnat.dg/vect11.ads b/gcc/testsuite/gnat.dg/vect11.ads
new file mode 100644
index 00000000000..f3ceac111a1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect11.ads
@@ -0,0 +1,11 @@
+package Vect11 is
+
+ -- Constrained array types are vectorizable
+ type Sarray is array (1 .. 4) of Float;
+ for Sarray'Alignment use 16;
+
+ function "+" (X, Y : Sarray) return Sarray;
+ procedure Add (X, Y : Sarray; R : out Sarray);
+ procedure Add (X, Y : not null access Sarray; R : not null access Sarray);
+
+end Vect11;
diff --git a/gcc/testsuite/gnat.dg/vect12.adb b/gcc/testsuite/gnat.dg/vect12.adb
new file mode 100644
index 00000000000..f493c8bbb0f
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect12.adb
@@ -0,0 +1,27 @@
+-- { dg-do compile { target i?86-*-* x86_64-*-* } }
+-- { dg-options "-O3 -msse2 -fdump-tree-vect-details" }
+
+package body Vect12 is
+
+ function "+" (X, Y : Sarray) return Sarray is
+ R : Sarray;
+ begin
+ for I in Sarray'Range loop
+ pragma Loop_Optimize (No_Vector);
+ R(I) := X(I) + Y(I);
+ end loop;
+ return R;
+ end;
+
+ procedure Add (X, Y : Sarray; R : out Sarray) is
+ begin
+ for I in Sarray'Range loop
+ pragma Loop_Optimize (No_Vector);
+ R(I) := X(I) + Y(I);
+ end loop;
+ end;
+
+end Vect12;
+
+-- { dg-final { scan-tree-dump-not "vectorized 1 loops" "vect" } }
+-- { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/gnat.dg/vect12.ads b/gcc/testsuite/gnat.dg/vect12.ads
new file mode 100644
index 00000000000..a600d0fa5dc
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect12.ads
@@ -0,0 +1,10 @@
+package Vect12 is
+
+ -- Constrained array types are vectorizable
+ type Sarray is array (1 .. 4) of Float;
+ for Sarray'Alignment use 16;
+
+ function "+" (X, Y : Sarray) return Sarray;
+ procedure Add (X, Y : Sarray; R : out Sarray);
+
+end Vect12;
diff --git a/gcc/testsuite/gnat.dg/vect13.adb b/gcc/testsuite/gnat.dg/vect13.adb
new file mode 100644
index 00000000000..ca765d3b485
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect13.adb
@@ -0,0 +1,27 @@
+-- { dg-do compile { target i?86-*-* x86_64-*-* } }
+-- { dg-options "-O3 -msse2 -fdump-tree-vect-details" }
+
+package body Vect13 is
+
+ function "+" (X, Y : Sarray) return Sarray is
+ R : Sarray;
+ begin
+ for I in Sarray'Range loop
+ pragma Loop_Optimize (Vector);
+ R(I) := X(I) + Y(I);
+ end loop;
+ return R;
+ end;
+
+ procedure Add (X, Y : Sarray; R : out Sarray) is
+ begin
+ for I in Sarray'Range loop
+ pragma Loop_Optimize (Vector);
+ R(I) := X(I) + Y(I);
+ end loop;
+ end;
+
+end Vect13;
+
+-- { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } }
+-- { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/gnat.dg/vect13.ads b/gcc/testsuite/gnat.dg/vect13.ads
new file mode 100644
index 00000000000..7aeac5e527a
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect13.ads
@@ -0,0 +1,10 @@
+package Vect13 is
+
+ -- Constrained array types are vectorizable
+ type Sarray is array (1 .. 4) of Float;
+ for Sarray'Alignment use 16;
+
+ function "+" (X, Y : Sarray) return Sarray;
+ procedure Add (X, Y : Sarray; R : out Sarray);
+
+end Vect13;
diff --git a/gcc/testsuite/gnat.dg/vect14.adb b/gcc/testsuite/gnat.dg/vect14.adb
new file mode 100644
index 00000000000..adc6ff14b66
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect14.adb
@@ -0,0 +1,25 @@
+-- { dg-do compile { target i?86-*-* x86_64-*-* } }
+-- { dg-options "-fdump-tree-optimized" }
+
+with Interfaces;
+with Unchecked_Conversion;
+
+with GNAT.SSE.Vector_Types; use GNAT.SSE.Vector_Types;
+
+procedure Vect14 is
+
+ Msk1 : constant := 16#000FFAFFFFFFFB3F#;
+ Msk2 : constant := 16#000FFDFFFC90FFFD#;
+
+ type Unsigned_64_Array_Type is array (1 .. 2) of Interfaces.Unsigned_64;
+
+ function Convert is new Unchecked_Conversion (Unsigned_64_Array_Type, M128i);
+
+ Sse2_Param_Mask : constant M128i := Convert ((Msk1, Msk2));
+
+begin
+ null;
+end;
+
+-- { dg-final { scan-tree-dump-not "VIEW_CONVERT_EXPR" "optimized" } }
+-- { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index f9d52bcf63d..a758d4740fd 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -181,6 +181,7 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
lappend options "additional_flags=$extra_tool_flags"
}
+ verbose "$target_compile $prog $output_file $compile_type $options" 4
set comp_output [$target_compile "$prog" "$output_file" "$compile_type" $options]
# Look for an internal compiler error, which sometimes masks the fact
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 0d2ccd512bc..57b10d0a844 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -746,7 +746,14 @@ proc check_effective_target_mmap {} {
# Return 1 if the target supports dlopen, 0 otherwise.
proc check_effective_target_dlopen {} {
- return [check_function_available "dlopen"]
+ return [check_no_compiler_messages dlopen executable {
+ #include <dlfcn.h>
+ int main(void) { dlopen ("dummy.so", RTLD_NOW); }
+ } [add_options_for_dlopen ""]]
+}
+
+proc add_options_for_dlopen { flags } {
+ return "$flags -ldl"
}
# Return 1 if the target supports clone, 0 otherwise.
@@ -3732,6 +3739,28 @@ proc check_effective_target_vect_widen_mult_hi_to_si_pattern { } {
}
# Return 1 if the target plus current options supports a vector
+# widening multiplication of *int* args into *long* result, 0 otherwise.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_vect_widen_mult_si_to_di_pattern { } {
+ global et_vect_widen_mult_si_to_di_pattern
+
+ if [info exists et_vect_widen_mult_si_to_di_pattern_saved] {
+ verbose "check_effective_target_vect_widen_mult_si_to_di_pattern: using cached result" 2
+ } else {
+ set et_vect_widen_mult_si_to_di_pattern_saved 0
+ if {[istarget ia64-*-*]
+ || [istarget i?86-*-*]
+ || [istarget x86_64-*-*] } {
+ set et_vect_widen_mult_si_to_di_pattern_saved 1
+ }
+ }
+ verbose "check_effective_target_vect_widen_mult_si_to_di_pattern: returning $et_vect_widen_mult_si_to_di_pattern_saved" 2
+ return $et_vect_widen_mult_si_to_di_pattern_saved
+}
+
+# Return 1 if the target plus current options supports a vector
# widening shift, 0 otherwise.
#
# This won't change for different subtargets so cache the result.