diff options
author | Yvan Roux <yvan.roux@linaro.org> | 2016-04-12 13:39:01 +0200 |
---|---|---|
committer | Yvan Roux <yvan.roux@linaro.org> | 2016-04-14 08:32:53 +0200 |
commit | 8d7043e84c526ead366949c3c30ce74f964efe91 (patch) | |
tree | 78fe3a1a7554a848fc30717c71105e45359bf3ef /gcc/testsuite | |
parent | 55d3bceea8eef018564a026e615af58cca5d6273 (diff) | |
download | gcc-8d7043e84c526ead366949c3c30ce74f964efe91.tar.gz |
Merge branches/gcc-5-branch rev 234898.
Change-Id: I076a131171e689eede74dd1827406c6d3855fcbd
Diffstat (limited to 'gcc/testsuite')
112 files changed, 2730 insertions, 60 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8a3313b8ffe..e272d7be718 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,577 @@ +2016-04-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + Backport from mainline + 2016-04-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + PR target/70566 + * gcc.c-torture/execute/pr70566.c: New test. + +2016-04-11 Alan Modra <amodra@gmail.com> + + * gcc.target/powerpc/pr70117.c: New. + +2016-04-09 Dominique d'Humieres <dominiq@lps.ens.fr> + + PR fortran/70592 + * gfortran.dg/deferred_character_17.f90: New test. + +2016-04-09 John David Anglin <danglin@gcc.gnu.org> + + * gcc.dg/uninit-19.c: Fix warning line for hppa*64*-*-*. + + PR tree-optimization/68644 + * gcc.dg/tree-ssa/ivopts-lt-2.c: Skip on hppa*-*-*. + + PR rtl-optimization/64886 + * gcc.dg/pr64434.c: Skip on hppa*-*-hpux*. + +2016-04-09 Oleg Endo <olegendo@gcc.gnu.org> + + Backport from mainline + 2016-04-03 Oleg Endo <olegendo@gcc.gnu.org> + + PR target/70416 + PR target/67391 + * gcc.target/sh/torture/pr70416.c: New. + +2016-04-06 Eric Botcazou <ebotcazou@adacore.com> + + * gcc.c-torture/execute/20101011-1.c (__VISIUM__): Set DO_TEST to 0. + +2016-04-06 Richard Biener <rguenther@suse.de> + + Backport from mainline + 2016-03-11 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/70177 + * gcc.dg/pr70177.c: New test. + +2016-04-06 Richard Biener <rguenther@suse.de> + + Backport from mainline + 2016-02-24 Richard Biener <rguenther@suse.de> + Jakub Jelinek <jakub@redhat.com> + + PR middle-end/69760 + * gcc.dg/torture/pr69760.c: New testcase. + + 2016-03-01 Richard Biener <rguenther@suse.de> + + PR tree-optimization/69983 + * gcc.dg/graphite/isl-codegen-loop-dumping.c: Adjust. + +2016-04-06 Richard Biener <rguenther@suse.de> + + Backport from mainline + 2016-02-24 Richard Biener <rguenther@suse.de> + + PR middle-end/68963 + * gcc.dg/torture/pr68963.c: New testcase. + +2016-04-06 Richard Biener <rguenther@suse.de> + + Backport from mainline + 2016-03-01 Richard Biener <rguenther@suse.de> + + PR middle-end/70022 + * gcc.dg/pr70022.c: New testcase. + + 2016-03-07 Richard Biener <rguenther@suse.de> + + PR tree-optimization/70115 + * gcc.dg/torture/pr70115.c: New testcase. + +2016-04-06 Richard Biener <rguenther@suse.de> + + Backport from mainline + 2016-03-30 Richard Biener <rguenther@suse.de> + + PR middle-end/70450 + * gcc.dg/torture/pr70450.c: New testcase. + + 2016-03-22 Richard Biener <rguenther@suse.de> + + PR middle-end/70333 + * gcc.dg/torture/pr70333.c: New testcase. + + 2016-04-04 Richard Biener <rguenther@suse.de> + + PR rtl-optimization/70484 + * gcc.dg/torture/pr70484.c: New testcase. + + 2016-03-31 Richard Biener <rguenther@suse.de> + + PR c++/70430 + * g++.dg/ext/vector30.C: New testcase. + +2016-04-05 Dominique d'Humieres <dominiq@lps.ens.fr> + Jerry DeLisle <jvdelisle@gcc.gnu.org> + + * gfortran.dg/fmt_pf.f90: New test. + +2016-04-05 Jakub Jelinek <jakub@redhat.com> + + PR target/70525 + * gcc.target/i386/pr70525.c: New test. + +2016-04-04 Bill Schmidt <wschmidt@linux.vnet.ibm.com> + Jakub Jelinek <jakub@redhat.com> + + PR middle-end/70457 + * gcc.dg/torture/pr70457.c: New. + +2016-04-04 Andre Vehreschild <vehre@gmx.de> + + PR fortran/66911 + * gfortran.dg/deferred_character_16.f90: New test. + +2016-04-04 Andre Vehreschild <vehre@gcc.gnu.org> + + PR fortran/65795 + * gfortran.dg/coarray_allocate_6.f08: New test. + +2016-04-01 Ilya Enkovich <enkovich.gnu@gmail.com> + + Backport from mainline r234666. + 2016-04-01 Ilya Enkovich <enkovich.gnu@gmail.com> + + PR target/69890 + * gcc.dg/strlenopt.h (memmove): New. + * gcc.target/i386/chkp-strlen-1.c: Include "../../gcc.dg/strlenopt.h" + instead of "string.h". + * gcc.target/i386/chkp-strlen-2.c: Likewise. + * gcc.target/i386/chkp-strlen-3.c: Likewise. + * gcc.target/i386/chkp-strlen-4.c: Likewise. + * gcc.target/i386/chkp-strlen-5.c: Likewise. + * gcc.target/i386/chkp-stropt-1.c: Likewise. + * gcc.target/i386/chkp-stropt-10.c: Likewise. + * gcc.target/i386/chkp-stropt-11.c: Likewise. + * gcc.target/i386/chkp-stropt-12.c: Likewise. + * gcc.target/i386/chkp-stropt-13.c: Likewise. + * gcc.target/i386/chkp-stropt-14.c: Likewise. + * gcc.target/i386/chkp-stropt-15.c: Likewise. + * gcc.target/i386/chkp-stropt-16.c: Likewise. + * gcc.target/i386/chkp-stropt-2.c: Likewise. + * gcc.target/i386/chkp-stropt-3.c: Likewise. + * gcc.target/i386/chkp-stropt-4.c: Likewise. + * gcc.target/i386/chkp-stropt-5.c: Likewise. + * gcc.target/i386/chkp-stropt-6.c: Likewise. + * gcc.target/i386/chkp-stropt-7.c: Likewise. + * gcc.target/i386/chkp-stropt-8.c: Likewise. + * gcc.target/i386/chkp-stropt-9.c: Likewise. + +2016-01-04 Christophe Lyon <christophe.lyon@linaro.org> + + Backport from mainline + 2016-03-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + PR target/70004 + * gcc.target/aarch64/scalar_shift_1.c: (test_corners_sisd_di): + Delete. + (test_corners_sisd_si): Likewise. + (main): Remove checks of the above. + * gcc.target/aarch64/shift_wide_invalid_1.c: New test. + +2016-04-01 James Greenhalgh <james.greenhalgh@srm.com> + + Backport from mainline + 2016-01-26 Roger Ferrer Ibáñez <rofirrim@gmail.com> + + PR target/67896 + * gcc.target/aarch64/simd/pr67896.C: New. + +2016-03-31 Nathan Sidwell <nathan@acm.org> + + PR c++/70393 + * g++.dg/cpp0x/constexpr-virtual6.C: New. + +2016-03-31 Kirill Yukhin <kirill.yukhin@intel.com> + + PR target/70453 + * gcc.target/i386/pr70453.c: New test. + +2016-03-31 Andrey Belevantsev <abel@ispras.ru> + + Backport from mainline + 2016-03-21 Andrey Belevantsev <abel@ispras.ru> + + PR rtl-optimization/69102 + * gcc.c-torture/compile/pr69102.c: New test. + +2016-03-31 Andrey Belevantsev <abel@ispras.ru> + + Backport from mainline + 2016-03-15 Andrey Belevantsev <abel@ispras.ru> + + PR rtl-optimization/69032 + * gcc.dg/pr69032.c: New test. + +2016-03-31 Andrey Belevantsev <abel@ispras.ru> + + Backport from mainline + 2016-03-15 Andrey Belevantsev <abel@ispras.ru> + + PR target/64411 + * gcc.target/i386/pr64411.C: New test. + +2016-03-31 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/70460 + * gcc.c-torture/execute/pr70460.c: New test. + +2016-03-30 Jakub Jelinek <jakub@redhat.com> + + PR testsuite/70356 + * gcc.target/i386/avx-vextractf128-256-5.c: Move + dg-require-effective-target after dg-do. + +2016-03-30 Vladimir Makarov <vmakarov@redhat.com> + + Backported from the mainline + 2016-03-12 Vladimir Makarov <vmakarov@redhat.com> + + PR target/69614 + * gcc.target/arm/pr69614.c: New. + +2016-03-30 Jakub Jelinek <jakub@redhat.com> + + PR target/70421 + * gcc.dg/torture/pr70421.c: New test. + * gcc.target/i386/avx512f-pr70421.c: New test. + + Backported from mainline + 2016-03-29 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/70429 + * gcc.c-torture/execute/pr70429.c: New test. + + 2016-03-22 Jakub Jelinek <jakub@redhat.com> + + PR target/70329 + * gcc.target/i386/avx512bw-pr70329-1.c: New test. + * gcc.target/i386/avx512bw-pr70329-2.c: New test. + + 2016-03-21 Jakub Jelinek <jakub@redhat.com> + + PR target/70296 + * gcc.target/powerpc/altivec-36.c: New test. + + 2016-03-17 Jakub Jelinek <jakub@redhat.com> + + PR c++/70272 + * g++.dg/opt/flifetime-dse6.C: New test. + * g++.dg/tree-ssa/ehcleanup-1.C: Adjust unreachable count. + + 2016-03-15 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/70222 + * gcc.c-torture/execute/pr70222-1.c: New test. + * gcc.c-torture/execute/pr70222-2.c: New test. + + 2016-03-11 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/70169 + * gcc.dg/pr70169.c: New test. + + 2016-03-09 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/70152 + * gcc.dg/pr70152.c: New test. + + 2016-03-04 Jakub Jelinek <jakub@redhat.com> + + PR target/70062 + * gcc.target/i386/pr70062.c: New test. + + 2016-02-22 Jakub Jelinek <jakub@redhat.com> + + PR target/69888 + * gcc.target/i386/pr69888.c: New test. + + 2016-03-02 Jakub Jelinek <jakub@redhat.com> + + PR target/70028 + * gcc.target/i386/pr70028.c: New test. + + 2016-02-26 Jakub Jelinek <jakub@redhat.com> + + PR target/69969 + * gcc.target/powerpc/pr69969.c: New test. + + PR rtl-optimization/69891 + * gcc.target/i386/pr69891.c: New test. + + 2016-02-19 Jakub Jelinek <jakub@redhat.com> + + PR c++/69826 + * c-c++-common/cilk-plus/CK/pr69826-1.c: New test. + * c-c++-common/cilk-plus/CK/pr69826-2.c: New test. + + PR c++/67767 + * g++.dg/cpp0x/pr67767.C: New test. + + 2016-02-16 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/69802 + * gcc.dg/pr69802.c: New test. + + 2016-02-15 Jakub Jelinek <jakub@redhat.com> + + PR c++/69797 + * c-c++-common/pr69797.c: New test. + + 2016-02-22 Jakub Jelinek <jakub@redhat.com> + + PR target/69885 + * gcc.dg/pr69885.c: New test. + + 2016-02-12 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/69764 + PR rtl-optimization/69771 + * c-c++-common/pr69764.c: New test. + * gcc.dg/torture/pr69771.c: New test. + + PR ipa/68672 + * g++.dg/ipa/pr68672-1.C: New test. + * g++.dg/ipa/pr68672-2.C: New test. + * g++.dg/ipa/pr68672-3.C: New test. + +2016-03-30 Alan Modra <amodra@gmail.com> + + * gcc.dg/dfp/pr70052.c: New test. + +2016-02-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + PR target/69875 + * gcc.target/arm/atomic_loaddi_acquire.x: New file. + * gcc.target/arm/atomic_loaddi_relaxed.x: Likewise. + * gcc.target/arm/atomic_loaddi_seq_cst.x: Likewise. + * gcc.target/arm/atomic_loaddi_1.c: New test. + * gcc.target/arm/atomic_loaddi_2.c: Likewise. + * gcc.target/arm/atomic_loaddi_3.c: Likewise. + * gcc.target/arm/atomic_loaddi_4.c: Likewise. + * gcc.target/arm/atomic_loaddi_5.c: Likewise. + * gcc.target/arm/atomic_loaddi_6.c: Likewise. + * gcc.target/arm/atomic_loaddi_7.c: Likewise. + * gcc.target/arm/atomic_loaddi_8.c: Likewise. + * gcc.target/arm/atomic_loaddi_9.c: Likewise. + +2016-03-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + Backport from mainline + 2016-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + * lib/target-supports.exp: Remove v7ve entry from loop + creating effective target checks. + (check_effective_target_arm_arch_v7ve_ok): New procedure. + (add_options_for_arm_arch_v7ve): Likewise. + +2016-03-28 Andre Vehreschild <vehre@gcc.gnu.org> + + PR fortran/70397 + * gfortran.dg/unlimited_polymorphic_25.f90: New test. + * gfortran.dg/unlimited_polymorphic_26.f90: New test. + +2016-03-28 Kirill Yukhin <kirill.yukhin@intel.com> + + PR target/70406 + * gcc.target/i386/pr70406.c: New test. + +2016-03-27 Eric Botcazou <ebotcazou@adacore.com> + + * gnat.dg/specs/double_record_extension3.ads: New test. + +2016-03-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + Backport from mainline + 2016-01-06 Eric Botcazou <ebotcazou@adacore.com> + + * gcc.target/sparc/20151219-1.c: Skip in 64-bit mode. + +2016-03-22 Martin Liska <mliska@suse.cz> + + PR ipa/70306 + * gcc.dg/ipa/pr70306.c: New test. + +2016-03-22 Kirill Yukhin <kirill.yukhin@intel.com> + + PR target/70325 + * gcc.target/i386/pr70325.c: New test. + +2016-03-21 Uros Bizjak <ubizjak@gmail.com> + + PR target/70327 + * gcc.target/i386/pr70327.c: New test. + +2016-03-21 Tom de Vries <tom@codesourcery.com> + + backport from trunk: + PR ipa/70269 + 2016-03-18 Tom de Vries <tom@codesourcery.com> + + * gcc.dg/pr70269.c: New test. + +2016-03-21 Tom de Vries <tom@codesourcery.com> + + backport from trunk: + 2016-03-18 Tom de Vries <tom@codesourcery.com> + + * gcc.dg/pr70161-2.c: New test. + * gcc.dg/pr70161.c: New test. + +2016-03-21 Marek Polacek <polacek@redhat.com> + + Backported from mainline + 2016-03-15 Marek Polacek <polacek@redhat.com> + + PR c++/70209 + * g++.dg/ext/attribute-may-alias-4.C: New test. + +2016-03-21 Kirill Yukhin <kirill.yukhin@intel.com> + + PR target/70293 + * gcc.target/i386/pr70293.c: New test. + +2016-03-18 Andre Vieira <andre.simoesdiasvieira@arm.com> + + Backport from mainline + 2015-06-09 James Greenhalgh <james.greenhalgh@arm.com> + + * g++.dg/ext/pr57735.C: Do not override -mfloat-abi directives + passed by the testsuite driver. + +2016-03-18 Andre Vieira <andre.simoesdiasvieira@arm.com> + + Backport from mainline + 2015-07-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com> + + * gcc.target/arm/no-volatile-in-it.c: Skip if -mcpu is overriden. + +2016-03-17 Andre Vieira <Andre.SimoesDiasVieira@arm.com> + + Backport from mainline. + 2015-05-21 Sandra Loosemore <sandra@codesourcery.com> + + * gcc.target/arm/simd/simd.exp: Skip all tests if no arm_neon_ok + effective target support. If no arm_neon_hw support, do not attempt + to execute the tests; only compile them. + * gcc.target/arm/simd/vextf32_1.c: Remove explicit "dg-do run" + and "dg-require-effective-target arm_neon_ok". + * gcc.target/arm/simd/vextp16_1.c: Likewise. + * gcc.target/arm/simd/vextp64_1.c: Likewise. + * gcc.target/arm/simd/vextp8_1.c: Likewise. + * gcc.target/arm/simd/vextQf32_1.c: Likewise. + * gcc.target/arm/simd/vextQp16_1.c: Likewise. + * gcc.target/arm/simd/vextQp64_1.c: Likewise. + * gcc.target/arm/simd/vextQp8_1.c: Likewise. + * gcc.target/arm/simd/vextQs16_1.c: Likewise. + * gcc.target/arm/simd/vextQs32_1.c: Likewise. + * gcc.target/arm/simd/vextQs64_1.c: Likewise. + * gcc.target/arm/simd/vextQs8_1.c: Likewise. + * gcc.target/arm/simd/vextQu16_1.c: Likewise. + * gcc.target/arm/simd/vextQu32_1.c: Likewise. + * gcc.target/arm/simd/vextQu64_1.c: Likewise. + * gcc.target/arm/simd/vextQu8_1.c: Likewise. + * gcc.target/arm/simd/vexts16_1.c: Likewise. + * gcc.target/arm/simd/vexts32_1.c: Likewise. + * gcc.target/arm/simd/vexts64_1.c: Likewise. + * gcc.target/arm/simd/vexts8_1.c: Likewise. + * gcc.target/arm/simd/vextu16_1.c: Likewise. + * gcc.target/arm/simd/vextu32_1.c: Likewise. + * gcc.target/arm/simd/vextu64_1.c: Likewise. + * gcc.target/arm/simd/vextu8_1.c: Likewise. + * gcc.target/arm/simd/vrev16p8_1.c: Likewise. + * gcc.target/arm/simd/vrev16qp8_1.c: Likewise. + * gcc.target/arm/simd/vrev16qs8_1.c: Likewise. + * gcc.target/arm/simd/vrev16qu8_1.c: Likewise. + * gcc.target/arm/simd/vrev16s8_1.c: Likewise. + * gcc.target/arm/simd/vrev16u8_1.c: Likewise. + * gcc.target/arm/simd/vrev32p16_1.c: Likewise. + * gcc.target/arm/simd/vrev32p8_1.c: Likewise. + * gcc.target/arm/simd/vrev32qp16_1.c: Likewise. + * gcc.target/arm/simd/vrev32qp8_1.c: Likewise. + * gcc.target/arm/simd/vrev32qs16_1.c: Likewise. + * gcc.target/arm/simd/vrev32qs8_1.c: Likewise. + * gcc.target/arm/simd/vrev32qu16_1.c: Likewise. + * gcc.target/arm/simd/vrev32qu8_1.c: Likewise. + * gcc.target/arm/simd/vrev32s16_1.c: Likewise. + * gcc.target/arm/simd/vrev32s8_1.c: Likewise. + * gcc.target/arm/simd/vrev32u16_1.c: Likewise. + * gcc.target/arm/simd/vrev32u8_1.c: Likewise. + * gcc.target/arm/simd/vrev64f32_1.c: Likewise. + * gcc.target/arm/simd/vrev64p16_1.c: Likewise. + * gcc.target/arm/simd/vrev64p8_1.c: Likewise. + * gcc.target/arm/simd/vrev64qf32_1.c: Likewise. + * gcc.target/arm/simd/vrev64qp16_1.c: Likewise. + * gcc.target/arm/simd/vrev64qp8_1.c: Likewise. + * gcc.target/arm/simd/vrev64qs16_1.c: Likewise. + * gcc.target/arm/simd/vrev64qs32_1.c: Likewise. + * gcc.target/arm/simd/vrev64qs8_1.c: Likewise. + * gcc.target/arm/simd/vrev64qu16_1.c: Likewise. + * gcc.target/arm/simd/vrev64qu32_1.c: Likewise. + * gcc.target/arm/simd/vrev64qu8_1.c: Likewise. + * gcc.target/arm/simd/vrev64s16_1.c: Likewise. + * gcc.target/arm/simd/vrev64s32_1.c: Likewise. + * gcc.target/arm/simd/vrev64s8_1.c: Likewise. + * gcc.target/arm/simd/vrev64u16_1.c: Likewise. + * gcc.target/arm/simd/vrev64u32_1.c: Likewise. + * gcc.target/arm/simd/vrev64u8_1.c: Likewise. + * gcc.target/arm/simd/vtrnf32_1.c: Likewise. + * gcc.target/arm/simd/vtrnp16_1.c: Likewise. + * gcc.target/arm/simd/vtrnp8_1.c: Likewise. + * gcc.target/arm/simd/vtrnqf32_1.c: Likewise. + * gcc.target/arm/simd/vtrnqp16_1.c: Likewise. + * gcc.target/arm/simd/vtrnqp8_1.c: Likewise. + * gcc.target/arm/simd/vtrnqs16_1.c: Likewise. + * gcc.target/arm/simd/vtrnqs32_1.c: Likewise. + * gcc.target/arm/simd/vtrnqs8_1.c: Likewise. + * gcc.target/arm/simd/vtrnqu16_1.c: Likewise. + * gcc.target/arm/simd/vtrnqu32_1.c: Likewise. + * gcc.target/arm/simd/vtrnqu8_1.c: Likewise. + * gcc.target/arm/simd/vtrns16_1.c: Likewise. + * gcc.target/arm/simd/vtrns32_1.c: Likewise. + * gcc.target/arm/simd/vtrns8_1.c: Likewise. + * gcc.target/arm/simd/vtrnu16_1.c: Likewise. + * gcc.target/arm/simd/vtrnu32_1.c: Likewise. + * gcc.target/arm/simd/vtrnu8_1.c: Likewise. + * gcc.target/arm/simd/vuzpf32_1.c: Likewise. + * gcc.target/arm/simd/vuzpp16_1.c: Likewise. + * gcc.target/arm/simd/vuzpp8_1.c: Likewise. + * gcc.target/arm/simd/vuzpqf32_1.c: Likewise. + * gcc.target/arm/simd/vuzpqp16_1.c: Likewise. + * gcc.target/arm/simd/vuzpqp8_1.c: Likewise. + * gcc.target/arm/simd/vuzpqs16_1.c: Likewise. + * gcc.target/arm/simd/vuzpqs32_1.c: Likewise. + * gcc.target/arm/simd/vuzpqs8_1.c: Likewise. + * gcc.target/arm/simd/vuzpqu16_1.c: Likewise. + * gcc.target/arm/simd/vuzpqu32_1.c: Likewise. + * gcc.target/arm/simd/vuzpqu8_1.c: Likewise. + * gcc.target/arm/simd/vuzps16_1.c: Likewise. + * gcc.target/arm/simd/vuzps32_1.c: Likewise. + * gcc.target/arm/simd/vuzps8_1.c: Likewise. + * gcc.target/arm/simd/vuzpu16_1.c: Likewise. + * gcc.target/arm/simd/vuzpu32_1.c: Likewise. + * gcc.target/arm/simd/vuzpu8_1.c: Likewise. + * gcc.target/arm/simd/vzipf32_1.c: Likewise. + * gcc.target/arm/simd/vzipp16_1.c: Likewise. + * gcc.target/arm/simd/vzipp8_1.c: Likewise. + * gcc.target/arm/simd/vzipqf32_1.c: Likewise. + * gcc.target/arm/simd/vzipqp16_1.c: Likewise. + * gcc.target/arm/simd/vzipqp8_1.c: Likewise. + * gcc.target/arm/simd/vzipqs16_1.c: Likewise. + * gcc.target/arm/simd/vzipqs32_1.c: Likewise. + * gcc.target/arm/simd/vzipqs8_1.c: Likewise. + * gcc.target/arm/simd/vzipqu16_1.c: Likewise. + * gcc.target/arm/simd/vzipqu32_1.c: Likewise. + * gcc.target/arm/simd/vzipqu8_1.c: Likewise. + * gcc.target/arm/simd/vzips16_1.c: Likewise. + * gcc.target/arm/simd/vzips32_1.c: Likewise. + * gcc.target/arm/simd/vzips8_1.c: Likewise. + * gcc.target/arm/simd/vzipu16_1.c: Likewise. + * gcc.target/arm/simd/vzipu32_1.c: Likewise. + * gcc.target/arm/simd/vzipu8_1.c: Likewise. + 2016-03-15 Bernd Schmidt <bschmidt@redhat.com> Backport from mainline diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/pr69826-1.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr69826-1.c new file mode 100644 index 00000000000..bcf7727f0ae --- /dev/null +++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr69826-1.c @@ -0,0 +1,25 @@ +/* { dg-do run { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-options "-fcilkplus" } */ +/* { dg-additional-options "-std=gnu99" { target c } } */ +/* { dg-additional-options "-lcilkrts" { target { i?86-*-* x86_64-*-* } } } */ + +#define GRAINSIZE 2 + +int +main () +{ + int a[64]; + #pragma cilk grainsize=GRAINSIZE + _Cilk_for (int i = 0; i < 64; i++) + a[i] = 0; + #pragma cilk grainsize =GRAINSIZE + _Cilk_for (int i = 0; i < 64; i++) + a[i]++; + #pragma cilk grainsize = GRAINSIZE + _Cilk_for (int i = 0; i < 64; i++) + a[i]++; + for (int i = 0; i < 64; i++) + if (a[i] != 2) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/pr69826-2.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr69826-2.c new file mode 100644 index 00000000000..f4056c62e34 --- /dev/null +++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr69826-2.c @@ -0,0 +1,6 @@ +/* { dg-do run { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-options "-fcilkplus -save-temps" } */ +/* { dg-additional-options "-std=gnu99" { target c } } */ +/* { dg-additional-options "-lcilkrts" { target { i?86-*-* x86_64-*-* } } } */ + +#include "pr69826-1.c" diff --git a/gcc/testsuite/c-c++-common/pr69764.c b/gcc/testsuite/c-c++-common/pr69764.c new file mode 100644 index 00000000000..79623ec7373 --- /dev/null +++ b/gcc/testsuite/c-c++-common/pr69764.c @@ -0,0 +1,38 @@ +/* PR rtl-optimization/69764 */ +/* { dg-do compile { target int32plus } } */ + +unsigned char +fn1 (unsigned char a) +{ + return a >> ~6; /* { dg-warning "right shift count is negative" } */ +} + +unsigned short +fn2 (unsigned short a) +{ + return a >> ~6; /* { dg-warning "right shift count is negative" } */ +} + +unsigned int +fn3 (unsigned int a) +{ + return a >> ~6; /* { dg-warning "right shift count is negative" } */ +} + +unsigned char +fn4 (unsigned char a) +{ + return a >> 0xff03; /* { dg-warning "right shift count >= width of type" } */ +} + +unsigned short +fn5 (unsigned short a) +{ + return a >> 0xff03; /* { dg-warning "right shift count >= width of type" } */ +} + +unsigned int +fn6 (unsigned int a) +{ + return a >> 0xff03; /* { dg-warning "right shift count >= width of type" } */ +} diff --git a/gcc/testsuite/c-c++-common/pr69797.c b/gcc/testsuite/c-c++-common/pr69797.c new file mode 100644 index 00000000000..fe2d4304c34 --- /dev/null +++ b/gcc/testsuite/c-c++-common/pr69797.c @@ -0,0 +1,8 @@ +/* PR c++/69797 */ +/* { dg-do compile } */ + +void +foo () +{ + __atomic_fetch_add (); /* { dg-error "too few arguments to function" } */ +} diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-trivial1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-trivial1.C new file mode 100644 index 00000000000..f4b74a7eec9 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-trivial1.C @@ -0,0 +1,20 @@ +// PR c++/70139 +// { dg-options "-fno-elide-constructors" } +// { dg-do compile { target c++11 } } + +template<class T, class U> +struct A +{ + T a; + U b; + constexpr A () : a (), b () { } + constexpr A (const T &x, const U &y) : a (x), b (y) { } +}; +struct B +{ + constexpr B (const bool x) : c (x) {} + constexpr bool operator!= (const B x) const { return c != x.c; } + bool c; +}; +constexpr static A<B, B*> d[] = { { B (true), nullptr }, { B (false), nullptr } }; +static_assert (d[0].a != d[1].a, ""); diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual6.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual6.C new file mode 100644 index 00000000000..f5abf2cf9b9 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual6.C @@ -0,0 +1,49 @@ +// PR c++/70393 +// { dg-do run { target c++11 } } + +/* 'ab' has a static initializer, but we flubbed the initializer, + because of B being the primary base. */ + +struct A +{ + int a = 1; +}; + +struct B +{ + B *element = (B*)2; + + virtual int vfunc() = 0; + + int call_element() + { + return element->vfunc(); + } + + void set_element() + { + element = this; + } +}; + +struct AB : public A, public B +{ + int vfunc() + { + return 0; + } +}; + +static AB ab; + +int main() +{ + if (ab.a != 1) + return 1; + if (ab.element != (void*)2) + return 2; + + ab.set_element(); + return ab.call_element(); +} + diff --git a/gcc/testsuite/g++.dg/cpp0x/pr67767.C b/gcc/testsuite/g++.dg/cpp0x/pr67767.C new file mode 100644 index 00000000000..fd4ae2d3f35 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr67767.C @@ -0,0 +1,10 @@ +// PR c++/67767 +// { dg-do compile { target c++11 } } +// { dg-options "-Wsuggest-attribute=noreturn" } + +void foo [[gnu::cold, gnu::noreturn]] (); + +void foo () // { dg-bogus "function might be candidate for attribute" } +{ + throw 1; +} diff --git a/gcc/testsuite/g++.dg/ext/attribute-may-alias-4.C b/gcc/testsuite/g++.dg/ext/attribute-may-alias-4.C new file mode 100644 index 00000000000..a459d49e9ee --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/attribute-may-alias-4.C @@ -0,0 +1,17 @@ +// PR c++/70209 + +struct V { + typedef float F; + template <typename S> void m_fn1(S); +}; + +template <typename> struct A { + typedef V::F Ta __attribute__((__may_alias__)); + Ta *m_data; + void m_fn2(V &); +}; + +template <> +void A<int>::m_fn2(V &p) { + p.m_fn1(m_data); +} diff --git a/gcc/testsuite/g++.dg/ext/vector30.C b/gcc/testsuite/g++.dg/ext/vector30.C new file mode 100644 index 00000000000..68326e3db5b --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/vector30.C @@ -0,0 +1,15 @@ +// PR c++/70430 +// { dg-do run } +extern "C" void abort (void); +typedef int v4si __attribute__ ((vector_size (16))); +int main() +{ + v4si b = {1,0,-1,2}, c; + c = b && 1; + if (c[0] != -1 || c[1] != 0 || c[2] != -1 || c[3] != -1) + abort (); + c = b && 0; + if (c[0] != 0 || c[1] != 0 || c[2] != 0 || c[3] != 0) + abort (); + return 0; +} diff --git a/gcc/testsuite/g++.dg/ipa/pr68672-1.C b/gcc/testsuite/g++.dg/ipa/pr68672-1.C new file mode 100644 index 00000000000..fddabe17a43 --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/pr68672-1.C @@ -0,0 +1,20 @@ +// PR ipa/68672 +// { dg-do compile } +// { dg-options "-O -finline-small-functions -fpartial-inlining --param=partial-inlining-entry-probability=100" } + +void f2 (void *); +void *a; +struct C { virtual void m1 (); }; +struct D { C *m2 () { if (a) __builtin_abort (); } }; +D f1 (); +struct E { int e; ~E () { if (e) f2 (&e); } }; +E *b; +struct I { virtual void m3 (); }; + +void +I::m3 () +{ + if (a) + f1 ().m2 ()->m1 (); + b->~E (); +} diff --git a/gcc/testsuite/g++.dg/ipa/pr68672-2.C b/gcc/testsuite/g++.dg/ipa/pr68672-2.C new file mode 100644 index 00000000000..f23ae80c7a2 --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/pr68672-2.C @@ -0,0 +1,54 @@ +// PR ipa/68672 +// { dg-do compile } +// { dg-options "-O3 --param=partial-inlining-entry-probability=100 -g" } + +struct S { ~S () {} }; +S *a; +int *b; +void bar (); +void baz (); +void fn (int *); + +static int +foo () +{ + S *c = a; + if (c) + { + bar (); + if (a) + __builtin_abort (); + baz (); + } + int p = *b; + if (p) + { + fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); + fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); + fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); + fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); + } + c->~S (); + int q = 2 * p; + int r = 3 * q; + S *d = c; + return p; +} + +void +use1 () +{ + foo (); +} + +void +use2 () +{ + foo (); +} + +void +use3 () +{ + foo (); +} diff --git a/gcc/testsuite/g++.dg/ipa/pr68672-3.C b/gcc/testsuite/g++.dg/ipa/pr68672-3.C new file mode 100644 index 00000000000..971ddf6c6b7 --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/pr68672-3.C @@ -0,0 +1,57 @@ +// PR ipa/68672 +// { dg-do compile } +// { dg-options "-O3 --param=partial-inlining-entry-probability=100 -g" } + +struct S { ~S () {} }; +S *a, *e; +int *b; +void bar (); +void baz (); +void fn (int *); +void fn2 (S *); + +static int +foo () +{ + S *c = a; + if (c) + { + bar (); + if (a) + __builtin_abort (); + baz (); + } + int p = *b; + S *f = e; + if (p) + { + fn2 (f); + fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); + fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); + fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); + fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); + } + f->~S (); + int q = 2 * p; + int r = 3 * q; + S *d = c; + return p; +} + +void +use1 () +{ + foo (); +} + +void +use2 () +{ + foo (); +} + +void +use3 () +{ + foo (); +} diff --git a/gcc/testsuite/g++.dg/opt/flifetime-dse6.C b/gcc/testsuite/g++.dg/opt/flifetime-dse6.C new file mode 100644 index 00000000000..6c805586252 --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/flifetime-dse6.C @@ -0,0 +1,11 @@ +// PR c++/70272 +// { dg-options -O2 } +// { dg-do run } + +struct Empty { }; +struct A { A() : a(true) { } bool a; ~A() { if (!a) __builtin_abort(); } }; +struct B : Empty { B() : Empty() { } ~B() { } }; +struct C : A, B { C() : A(), B() { } ~C() { } }; +int main() { + C c; +} diff --git a/gcc/testsuite/g++.dg/tree-ssa/ehcleanup-1.C b/gcc/testsuite/g++.dg/tree-ssa/ehcleanup-1.C index a5dc2aa38d7..d6e4cf37205 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/ehcleanup-1.C +++ b/gcc/testsuite/g++.dg/tree-ssa/ehcleanup-1.C @@ -26,5 +26,5 @@ t (void) // { dg-final { scan-tree-dump-times "Empty EH handler" 2 "ehcleanup1" } } // // And as a result also contained control flow. -// { dg-final { scan-tree-dump-times "Removing unreachable" 6 "ehcleanup1" } } +// { dg-final { scan-tree-dump-times "Removing unreachable" 4 "ehcleanup1" } } // diff --git a/gcc/testsuite/gcc.c-torture/compile/pr69102.c b/gcc/testsuite/gcc.c-torture/compile/pr69102.c new file mode 100644 index 00000000000..b1328cad974 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr69102.c @@ -0,0 +1,21 @@ +/* { dg-options "-Og -fPIC -fschedule-insns2 -fselective-scheduling2 -fno-tree-fre --param=max-sched-extend-regions-iters=10" } */ +void bar (unsigned int); + +void +foo (void) +{ + char buf[1] = { 3 }; + const char *p = buf; + const char **q = &p; + unsigned int ch; + switch (**q) + { + case 1: ch = 5; break; + case 2: ch = 4; break; + case 3: ch = 3; break; + case 4: ch = 2; break; + case 5: ch = 1; break; + default: ch = 0; break; + } + bar (ch); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c index 34d03137e26..28b5540a884 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c @@ -18,6 +18,9 @@ #elif defined (__TMS320C6X__) /* On TI C6X division by zero does not trap. */ # define DO_TEST 0 +#elif defined (__VISIUM__) + /* On Visium division by zero does not trap. */ +# define DO_TEST 0 #elif defined (__mips__) && !defined(__linux__) /* MIPS divisions do trap by default, but libgloss targets do not intercept the trap and raise a SIGFPE. The same is probably diff --git a/gcc/testsuite/gcc.c-torture/execute/pr70222-1.c b/gcc/testsuite/gcc.c-torture/execute/pr70222-1.c new file mode 100644 index 00000000000..d79672e7fb4 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr70222-1.c @@ -0,0 +1,30 @@ +/* PR rtl-optimization/70222 */ + +int a = 1; +unsigned int b = 2; +int c = 0; +int d = 0; + +void +foo () +{ + int e = ((-(c >= c)) < b) > ((int) (-1ULL >> ((a / a) * 15))); + d = -e; +} + +__attribute__((noinline, noclone)) void +bar (int x) +{ + if (x != -1) + __builtin_abort (); +} + +int +main () +{ +#if __CHAR_BIT__ == 8 && __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ == 8 + foo (); + bar (d); +#endif + return 0; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr70222-2.c b/gcc/testsuite/gcc.c-torture/execute/pr70222-2.c new file mode 100644 index 00000000000..7611c986a9b --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr70222-2.c @@ -0,0 +1,20 @@ +/* PR rtl-optimization/70222 */ + +#if __CHAR_BIT__ == 8 && __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ == 8 +__attribute__((noinline, noclone)) unsigned int +foo (int x) +{ + unsigned long long y = -1ULL >> x; + return (unsigned int) y >> 31; +} +#endif + +int +main () +{ +#if __CHAR_BIT__ == 8 && __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ == 8 + if (foo (15) != 1 || foo (32) != 1 || foo (33) != 0) + __builtin_abort (); +#endif + return 0; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr70429.c b/gcc/testsuite/gcc.c-torture/execute/pr70429.c new file mode 100644 index 00000000000..6b08c8ead08 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr70429.c @@ -0,0 +1,17 @@ +/* PR rtl-optimization/70429 */ + +__attribute__((noinline, noclone)) int +foo (int a) +{ + return (int) (0x14ff6e2207db5d1fLL >> a) >> 4; +} + +int +main () +{ + if (sizeof (int) != 4 || sizeof (long long) != 8 || __CHAR_BIT__ != 8) + return 0; + if (foo (1) != 0x3edae8 || foo (2) != -132158092) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr70460.c b/gcc/testsuite/gcc.c-torture/execute/pr70460.c new file mode 100644 index 00000000000..bfecea0932e --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr70460.c @@ -0,0 +1,29 @@ +/* PR rtl-optimization/70460 */ + +int c; + +__attribute__((noinline, noclone)) void +foo (int x) +{ + static int b[] = { &&lab1 - &&lab0, &&lab2 - &&lab0 }; + void *a = &&lab0 + b[x]; + goto *a; +lab1: + c += 2; +lab2: + c++; +lab0: + ; +} + +int +main () +{ + foo (0); + if (c != 3) + __builtin_abort (); + foo (1); + if (c != 4) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/dfp/pr70052.c b/gcc/testsuite/gcc.dg/dfp/pr70052.c new file mode 100644 index 00000000000..53eb0757a81 --- /dev/null +++ b/gcc/testsuite/gcc.dg/dfp/pr70052.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-O1" } */ + +typedef struct +{ + _Decimal128 td0; + _Decimal128 td1; +} TDx2_t; + + +TDx2_t +D256_add_finite (void) +{ + _Decimal128 z, zz; + TDx2_t result = {0.DL, 0.DL}; + + if (zz == 0.DL) + { + result.td0 = z; + return result; + } + + return result; +} diff --git a/gcc/testsuite/gcc.dg/graphite/isl-codegen-loop-dumping.c b/gcc/testsuite/gcc.dg/graphite/isl-codegen-loop-dumping.c index cb5d802db8e..a3981989b97 100644 --- a/gcc/testsuite/gcc.dg/graphite/isl-codegen-loop-dumping.c +++ b/gcc/testsuite/gcc.dg/graphite/isl-codegen-loop-dumping.c @@ -12,4 +12,4 @@ main (int n, int *a) return 0; } -/* { dg-final { scan-tree-dump-times "ISL AST generated by ISL: \nfor \\(int c1 = 0; c1 < n - 1; c1 \\+= 1\\)\n for \\(int c3 = 0; c3 < n; c3 \\+= 1\\)\n S_4\\(c1, c3\\);" 1 "graphite"} } */ +/* { dg-final { scan-tree-dump-times "ISL AST generated by ISL: \nfor \\(int c1 = 0; c1 < n - 1; c1 \\+= 1\\) {\n S_10\\(c1\\);\n for \\(int c3 = 0; c3 < n; c3 \\+= 1\\)\n S_4\\(c1, c3\\);\n}" 1 "graphite"} } */ diff --git a/gcc/testsuite/gcc.dg/ipa/pr70306.c b/gcc/testsuite/gcc.dg/ipa/pr70306.c new file mode 100644 index 00000000000..be18208afd4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/pr70306.c @@ -0,0 +1,45 @@ +/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-do run } */ + +int ctor_counter = 1; +int dtor_counter; + +__attribute__((constructor)) +void A() +{ + ctor_counter++; +} + +__attribute__((destructor)) +void B() +{ + if (dtor_counter == 0) + __builtin_abort (); + + dtor_counter--; +} + +__attribute__((constructor)) +static void C() { + ctor_counter++; +} + +__attribute__((destructor)) +static void D() { + if (dtor_counter == 0) + __builtin_abort (); + + dtor_counter--; +} + +int main() +{ + if (ctor_counter != 3) + __builtin_abort (); + + dtor_counter = 2; + + return 0; +} + +/* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/pr64434.c b/gcc/testsuite/gcc.dg/pr64434.c index 550a63d2b13..699687136fd 100644 --- a/gcc/testsuite/gcc.dg/pr64434.c +++ b/gcc/testsuite/gcc.dg/pr64434.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-rtl-expand-details" } */ +/* { dg-skip-if "PR64886" { hppa*-*-hpux* } { "*" } { "" } } */ #define N 256 int a1[N], a2[N], a3[N], a4[N]; diff --git a/gcc/testsuite/gcc.dg/pr69032.c b/gcc/testsuite/gcc.dg/pr69032.c new file mode 100644 index 00000000000..e0925cd8c56 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr69032.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */ +/* { dg-options "-O2 -fsched-pressure -fsel-sched-pipelining -fselective-scheduling" } */ + +void foo (long long i) +{ + while (i != -1) + { + ++i; + __asm__ (""); + } +} diff --git a/gcc/testsuite/gcc.dg/pr69307.c b/gcc/testsuite/gcc.dg/pr69307.c new file mode 100644 index 00000000000..d9d343e973a --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr69307.c @@ -0,0 +1,34 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -fselective-scheduling2" } */ + +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; +typedef unsigned int uint32_t; +typedef unsigned long long int uint64_t; +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; +u64 __attribute__((noinline, noclone)) +foo(u8 u8_0, u16 u16_0, u32 u32_0, u64 u64_0, u8 u8_1, u16 u16_1, u32 u32_1, u64 u64_1, u8 u8_2, u16 u16_2, u32 u32_2, u64 u64_2, u8 u8_3, u16 u16_3, u32 u32_3, u64 u64_3) +{ + u8 *p8_2 = &u8_2; + u16 *p16_2 = &u16_2; + u8 *p8_3 = &u8_3; + u64 *p64_3 = &u64_3; + p8_2 = &u8_3; + *p8_3 -= *p64_3; + *p8_2 = (u64)*p8_2 % ((u64)*p8_2 | 3); + u8_2 = (u64)u8_2 / ((u64)*p16_2 | 1); + u16_0 = (u64)u16_0 % ((u64)*p8_2 | 3); + return u8_0 + u16_0 + u32_0 + u64_0 + u8_1 + u16_1 + u32_1 + u64_1 + u8_2 + u16_2 + u32_2 + u64_2 + u8_3 + u16_3 + u32_3 + u64_3; +} +int main() +{ + u64 x = 0; + x += foo(3llu, 6llu, 15llu, 28llu, 5llu, 11llu, 20llu, 44llu, 7llu, 10llu, 20llu, 55llu, 0llu, 9llu, 17llu, 48llu); + if (x != 0x1f3) + __builtin_abort(); + return 0; +} + diff --git a/gcc/testsuite/gcc.dg/pr69802.c b/gcc/testsuite/gcc.dg/pr69802.c new file mode 100644 index 00000000000..27ee02f36b5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr69802.c @@ -0,0 +1,23 @@ +/* PR tree-optimization/69802 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -Wall" } */ + +struct S { unsigned f : 1; }; +int a, d; + +int +foo (void) +{ + unsigned b = 0; + struct S c; + d = ((1 && b) < c.f) & c.f; /* { dg-warning "is used uninitialized" } */ + return a; +} + +int +bar (_Bool c) +{ + unsigned b = 0; + d = ((1 && b) < c) & c; + return a; +} diff --git a/gcc/testsuite/gcc.dg/pr69885.c b/gcc/testsuite/gcc.dg/pr69885.c new file mode 100644 index 00000000000..e3a218b8153 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr69885.c @@ -0,0 +1,13 @@ +/* PR target/69885 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-additional-options "-m68000" { target m68k*-*-* } } */ + +void bar (void); + +void +foo (long long x) +{ + if (x >> 1) + bar (); +} diff --git a/gcc/testsuite/gcc.dg/pr70022.c b/gcc/testsuite/gcc.dg/pr70022.c new file mode 100644 index 00000000000..30eb7ece250 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr70022.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-w -Wno-psabi" } */ + +typedef int v4si __attribute__ ((vector_size (16))); + +int +foo (v4si v) +{ + return v[~0UL]; +} diff --git a/gcc/testsuite/gcc.dg/pr70152.c b/gcc/testsuite/gcc.dg/pr70152.c new file mode 100644 index 00000000000..27a092d199a --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr70152.c @@ -0,0 +1,27 @@ +/* PR tree-optimization/70152 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int a; +int foo (void); +int setjmp (char *); +char buf[64]; + +static int +bar (int x) +{ + x = 0; + setjmp (buf); + for (;;) + { + switch (x) + case 5: + x = foo (); + } +} + +void +baz (void) +{ + bar (a); +} diff --git a/gcc/testsuite/gcc.dg/pr70161-2.c b/gcc/testsuite/gcc.dg/pr70161-2.c new file mode 100644 index 00000000000..d2cb22140c3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr70161-2.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-ipa-all-graph -fipa-pta" } */ + +void +foo (void) +{ +} diff --git a/gcc/testsuite/gcc.dg/pr70161.c b/gcc/testsuite/gcc.dg/pr70161.c new file mode 100644 index 00000000000..0b173c7ee9d --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr70161.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-ipa-all-graph" } */ + +void +foo (void) +{ +} diff --git a/gcc/testsuite/gcc.dg/pr70169.c b/gcc/testsuite/gcc.dg/pr70169.c new file mode 100644 index 00000000000..8d08f5c6472 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr70169.c @@ -0,0 +1,40 @@ +/* PR tree-optimization/70169 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fno-strict-aliasing -fno-tree-dce" } */ + +int printf (const char *, ...); + +void +foo () +{ + unsigned char *p = (unsigned char *) &printf; + for (;;) + (*p)++; +} + +void +bar (int x) +{ + unsigned char *p = (unsigned char *) &printf; + int i; + for (i = 0; i < x; i++) + (*p)++; +} + +void +baz (int x, int y) +{ + unsigned char *p = (unsigned char *) &&lab; + int i; + if (y) + { + for (i = 0; i < x; i++) + (*p)++; + } + else + { + lab: + asm volatile (""); + foo (); + } +} diff --git a/gcc/testsuite/gcc.dg/pr70177.c b/gcc/testsuite/gcc.dg/pr70177.c new file mode 100644 index 00000000000..1b2bec11e30 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr70177.c @@ -0,0 +1,15 @@ +/* PR tree-optimization/70177 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int b[128]; + +void +foo (int i, int j) +{ + int c, f, g, h; + for (g = 0; g < 64; g++) + for (h = g, f = 0; f <= i; f++, h++) + for (c = 0; c < j; c++) + b[h] = 0; +} diff --git a/gcc/testsuite/gcc.dg/pr70269.c b/gcc/testsuite/gcc.dg/pr70269.c new file mode 100644 index 00000000000..030cea1e605 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr70269.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-graph" } */ + +void +foo (void) +{ +} diff --git a/gcc/testsuite/gcc.dg/strlenopt.h b/gcc/testsuite/gcc.dg/strlenopt.h index ef47e5ac9ad..8f69940b027 100644 --- a/gcc/testsuite/gcc.dg/strlenopt.h +++ b/gcc/testsuite/gcc.dg/strlenopt.h @@ -10,6 +10,7 @@ void free (void *); char *strdup (const char *); size_t strlen (const char *); void *memcpy (void *__restrict, const void *__restrict, size_t); +void *memmove (void *, const void *, size_t); char *strcpy (char *__restrict, const char *__restrict); char *strcat (char *__restrict, const char *__restrict); char *strchr (const char *, int); @@ -31,6 +32,12 @@ memcpy (void *__restrict dest, const void *__restrict src, size_t len) return __builtin___memcpy_chk (dest, src, len, bos0 (dest)); } +extern inline __attribute__((gnu_inline, always_inline, artificial)) void * +memmove (void *dest, const void *src, size_t len) +{ + return __builtin___memmove_chk (dest, src, len, bos0 (dest)); +} + extern inline __attribute__((gnu_inline, always_inline, artificial)) char * strcpy (char *__restrict dest, const char *__restrict src) { diff --git a/gcc/testsuite/gcc.dg/torture/pr68963.c b/gcc/testsuite/gcc.dg/torture/pr68963.c new file mode 100644 index 00000000000..c83b543fa03 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr68963.c @@ -0,0 +1,41 @@ +/* { dg-do run } */ + +static const float a[3] = { 1, 2, 3 }; +int b = 3; + +__attribute__((noinline, noclone)) void +bar (int x) +{ + if (x != b++) + __builtin_abort (); +} + +void +foo (float *x, int y) +{ + int i; + for (i = 0; i < 2 * y; ++i) + { + if (i < y) + x[i] = a[i]; + else + { + bar (i); + x[i] = a[i - y]; + } + } +} + +int +main () +{ + float x[10]; + unsigned int i; + for (i = 0; i < 10; ++i) + x[i] = 1337; + foo (x, 3); + for (i = 0; i < 10; ++i) + if (x[i] != (i < 6 ? (i % 3) + 1 : 1337)) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr69760.c b/gcc/testsuite/gcc.dg/torture/pr69760.c new file mode 100644 index 00000000000..8f24608d232 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr69760.c @@ -0,0 +1,50 @@ +/* PR tree-optimization/69760 */ +/* { dg-do run { target { { *-*-linux* *-*-gnu* } && mmap } } } */ +/* { dg-options "-O2" } */ + +#include <unistd.h> +#include <sys/mman.h> + +__attribute__((noinline, noclone)) void +test_func (double *a, int L, int m, int n, int N) +{ + int i, k; + for (i = 0; i < N; i++) + { + k = i - m; + if (k >= 0 && k < n) + a[L * k] = 0.0; + } +} + +int +main () +{ + char *p; + int L, m, n, N; + long l; + L = 10000000; + n = 4; + N = 100 * n; + long pgsz = sysconf(_SC_PAGESIZE); + if (pgsz < sizeof (double) || pgsz > L * sizeof (double)) + return 0; + p = mmap ((void *) 0, L * n * sizeof (double), PROT_NONE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + if (p == MAP_FAILED) + return 0; + if (mprotect (p, pgsz, PROT_READ | PROT_WRITE)) + return 0; + l = (L * sizeof (double)) / pgsz * pgsz; + if (mprotect (p + l, pgsz, PROT_READ | PROT_WRITE)) + return 0; + l = (2 * L * sizeof (double)) / pgsz * pgsz; + if (mprotect (p + l, pgsz, PROT_READ | PROT_WRITE)) + return 0; + l = (3 * L * sizeof (double)) / pgsz * pgsz; + if (mprotect (p + l, pgsz, PROT_READ | PROT_WRITE)) + return 0; + for (m = 0; m < N; m += n) + test_func ((double *) p, L, m, n, N); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr69771.c b/gcc/testsuite/gcc.dg/torture/pr69771.c new file mode 100644 index 00000000000..4aa5962b480 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr69771.c @@ -0,0 +1,12 @@ +/* PR rtl-optimization/69771 */ +/* { dg-do compile } */ + +unsigned char a = 5, c; +unsigned short b = 0; +unsigned d = 0x76543210; + +void +foo (void) +{ + c = d >> ~(a || ~b); /* { dg-warning "shift count is negative" "" { xfail *-*-* } } */ +} diff --git a/gcc/testsuite/gcc.dg/torture/pr70115.c b/gcc/testsuite/gcc.dg/torture/pr70115.c new file mode 100644 index 00000000000..0044fe4c2b1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr70115.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ + +typedef int size_t; +char a; +int main() +{ + size_t b, c; + for (;;) + { + b = 0; + for (; c;) + ; + for (; b < sizeof(long); b++) + ; + for (; b < c; b++) + a++; + for (; c < b; c++) + ; + } +} diff --git a/gcc/testsuite/gcc.dg/torture/pr70333.c b/gcc/testsuite/gcc.dg/torture/pr70333.c new file mode 100644 index 00000000000..854e6d59e1a --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr70333.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-require-effective-target lp64 } */ + +unsigned long int +foo (signed char b, signed char e) +{ + return ((2ULL * b) * (e * 13)) * (32 << 24); +} + +int +main () +{ + if (__CHAR_BIT__ == 8 + && sizeof (int) == 4 + && sizeof (long long) == 8 + && foo (-60, 1) != 0xffffff3d00000000ULL) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr70421.c b/gcc/testsuite/gcc.dg/torture/pr70421.c new file mode 100644 index 00000000000..8f97acd42be --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr70421.c @@ -0,0 +1,22 @@ +/* PR target/70421 */ +/* { dg-do run } */ +/* { dg-additional-options "-Wno-psabi -w" } */ + +typedef unsigned V __attribute__ ((vector_size (64))); + +unsigned __attribute__ ((noinline, noclone)) +foo (unsigned x, V u, V v) +{ + v[1] ^= v[2]; + x ^= ((V) v)[u[0]]; + return x; +} + +int +main () +{ + unsigned x = foo (0x10, (V) { 1 }, (V) { 0x100, 0x1000, 0x10000 }); + if (x != 0x11010) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr70450.c b/gcc/testsuite/gcc.dg/torture/pr70450.c new file mode 100644 index 00000000000..ee5e24d0522 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr70450.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-require-effective-target lp64 } */ + +unsigned long int a = 2UL; +int b = 2; +unsigned long int c = 2UL; + +void foo () +{ + c = 2 * ((2 * a) * (2 * (-b))); +} + +int main () +{ + foo(); + if (c != 18446744073709551584UL) + __builtin_abort(); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr70457.c b/gcc/testsuite/gcc.dg/torture/pr70457.c new file mode 100644 index 00000000000..74daed4d36f --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr70457.c @@ -0,0 +1,29 @@ +/* { dg-do compile } */ + +/* This formerly ICEd when trying to expand pow as a built-in with + the wrong number of arguments. */ + +extern double pow (double, double) __attribute__ ((__nothrow__ , __leaf__)); + +typedef struct { + long long data; + int tag; +} Object; + +extern Object Make_Flonum (double); +extern Object P_Pow (Object, Object); + +Object General_Function (Object x, Object y, double (*fun)()) { + double d, ret; + + d = 1.0; + + if (y.tag >> 1) + ret = (*fun) (d); + else + ret = (*fun) (d, 0.0); + + return Make_Flonum (ret); +} + +Object P_Pow (Object x, Object y) { return General_Function (x, y, pow); } diff --git a/gcc/testsuite/gcc.dg/torture/pr70484.c b/gcc/testsuite/gcc.dg/torture/pr70484.c new file mode 100644 index 00000000000..7604c654fbe --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr70484.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ + +extern void abort (void); + +int __attribute__((noinline,noclone)) +f(int *pi, long *pl) +{ + *pi = 1; + *pl = 0; + return *(char *)pi; +} + +int main() +{ + union { long l; int i; } a; + if (f (&a.i, &a.l) != 0) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt-2.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt-2.c index 0f3f301d773..c809c9aa483 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-ivopts" } */ +/* { dg-skip-if "PR68644" { hppa*-*-* } { "*" } { "" } } */ void f1 (int *p, unsigned int i) diff --git a/gcc/testsuite/gcc.dg/uninit-19.c b/gcc/testsuite/gcc.dg/uninit-19.c index fc7aceaa70b..b6c44b01a92 100644 --- a/gcc/testsuite/gcc.dg/uninit-19.c +++ b/gcc/testsuite/gcc.dg/uninit-19.c @@ -22,5 +22,5 @@ fn2 () fn1 (l, &d, &e, &g, &i, &h, &k, n); /* 22. */
}
-/* { dg-warning "may be used uninitialized" "" { target nonpic } 13 } */
-/* { dg-warning "may be used uninitialized" "" { target { ! nonpic } } 22 } */
+/* { dg-warning "may be used uninitialized" "" { target { { nonpic } || { hppa*64*-*-* } } } 13 } */
+/* { dg-warning "may be used uninitialized" "" { target { ! { { nonpic } || { hppa*64*-*-* } } } } 22 } */
diff --git a/gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c b/gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c index 363f5541a28..7be1b12a75b 100644 --- a/gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c +++ b/gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c @@ -181,34 +181,6 @@ test_ashift_right_int_si (Int32x1 b, Int32x1 c) /* { dg-final { scan-assembler "asr\tw\[0-9\]+,\ w\[0-9\]+,\ 4" } } */ /* { dg-final { scan-assembler "asr\tw\[0-9\]+,\ w\[0-9\]+,\ w\[0-9\]+" } } */ -Int64x1 -test_corners_sisd_di (Int64x1 b) -{ - force_simd_di (b); - b = b >> 63; - b = b >> 0; - b += b >> 65; /* { dg-warning "right shift count >= width of type" } */ - force_simd_di (b); - - return b; -} -/* { dg-final { scan-assembler "sshr\td\[0-9\]+,\ d\[0-9\]+,\ 63" } } */ - -Int32x1 -test_corners_sisd_si (Int32x1 b) -{ - force_simd_si (b); - b = b >> 31; - b = b >> 0; - b += b >> 33; /* { dg-warning "right shift count >= width of type" } */ - force_simd_si (b); - - return b; -} -/* { dg-final { scan-assembler "sshr\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ 31" } } */ - - - #define CHECK(var,val) \ do \ { \ @@ -236,8 +208,6 @@ main () CHECK (x, 0xffffffff21524110ull); x = test_ashift_right_sisd_di (x, 8); CHECK (x, 0xffffffffffff2152ull); - x = test_corners_sisd_di (x); - CHECK (x, 0xfffffffffffffffeull); y = test_lshift_left_sisd_si (y, 4); CHECK (y, 0xadbeef00); @@ -252,8 +222,6 @@ main () CHECK (y, 0xffff5241); y = test_ashift_right_sisd_si (y, 4); CHECK (y, 0xffffff52); - y = test_corners_sisd_si (y); - CHECK (y, 0xfffffffe); return 0; } diff --git a/gcc/testsuite/gcc.target/aarch64/shift_wide_invalid_1.c b/gcc/testsuite/gcc.target/aarch64/shift_wide_invalid_1.c new file mode 100644 index 00000000000..6b71cb58092 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/shift_wide_invalid_1.c @@ -0,0 +1,36 @@ +/* { dg-do compile } */ +/* { dg-options "-O" } */ + +/* These contain undefined behavior but may trigger edge cases in the + vector shift patterns. We don't check for their generation, we only + care about not ICEing. */ + +typedef long long int Int64x1; +typedef int Int32x1; + +#define force_simd_di(v) asm volatile ("mov %d0, %1.d[0]" : "=w"(v) : "w"(v) :) +#define force_simd_si(v) asm volatile ("mov %s0, %1.s[0]" : "=w"(v) : "w"(v) :) + +Int64x1 +foo_di (Int64x1 b) +{ + force_simd_di (b); + b = b >> 63; + force_simd_di (b); + b = b >> 0; + b += b >> 65; /* { dg-warning "right shift count >= width of type" } */ + + return b; +} + +Int32x1 +foo_si (Int32x1 b) +{ + force_simd_si (b); + b = b >> 31; + force_simd_si (b); + b = b >> 0; + b += b >> 33; /* { dg-warning "right shift count >= width of type" } */ + + return b; +} diff --git a/gcc/testsuite/gcc.target/arm/atomic_loaddi_1.c b/gcc/testsuite/gcc.target/arm/atomic_loaddi_1.c new file mode 100644 index 00000000000..4f39971a336 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/atomic_loaddi_1.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -O" } */ +/* { dg-require-effective-target arm_arch_v7a_ok } */ +/* { dg-add-options arm_arch_v7a } */ + +#include "atomic_loaddi_acquire.x" + +/* { dg-final { scan-assembler-times "ldrexd\tr\[0-9\]+, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 1 } } */ +/* { dg-final { scan-assembler-times "dmb\tish" 1 } } */ diff --git a/gcc/testsuite/gcc.target/arm/atomic_loaddi_2.c b/gcc/testsuite/gcc.target/arm/atomic_loaddi_2.c new file mode 100644 index 00000000000..0b18f03e09d --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/atomic_loaddi_2.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -O" } */ +/* { dg-require-effective-target arm_arch_v7ve_ok } */ +/* { dg-add-options arm_arch_v7ve } */ + +#include "atomic_loaddi_acquire.x" + +/* { dg-final { scan-assembler-times "ldrd\tr\[0-9\]+, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 1 } } */ +/* { dg-final { scan-assembler-times "dmb\tish" 1 } } */ diff --git a/gcc/testsuite/gcc.target/arm/atomic_loaddi_3.c b/gcc/testsuite/gcc.target/arm/atomic_loaddi_3.c new file mode 100644 index 00000000000..080a9362abb --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/atomic_loaddi_3.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -O" } */ +/* { dg-require-effective-target arm_arch_v8a_ok } */ +/* { dg-add-options arm_arch_v8a } */ + +#include "atomic_loaddi_acquire.x" + +/* { dg-final { scan-assembler-times "ldaexd\tr\[0-9\]+, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 1 } } */ +/* { dg-final { scan-assembler-not "dmb\tish" } } */ diff --git a/gcc/testsuite/gcc.target/arm/atomic_loaddi_4.c b/gcc/testsuite/gcc.target/arm/atomic_loaddi_4.c new file mode 100644 index 00000000000..8f94ba61b4d --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/atomic_loaddi_4.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -O" } */ +/* { dg-require-effective-target arm_arch_v7a_ok } */ +/* { dg-add-options arm_arch_v7a } */ + +#include "atomic_loaddi_relaxed.x" + +/* { dg-final { scan-assembler-times "ldrexd\tr\[0-9\]+, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 1 } } */ +/* { dg-final { scan-assembler-not "dmb\tish" } } */ diff --git a/gcc/testsuite/gcc.target/arm/atomic_loaddi_5.c b/gcc/testsuite/gcc.target/arm/atomic_loaddi_5.c new file mode 100644 index 00000000000..72c4604b4a0 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/atomic_loaddi_5.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -O" } */ +/* { dg-require-effective-target arm_arch_v7ve_ok } */ +/* { dg-add-options arm_arch_v7ve } */ + +#include "atomic_loaddi_relaxed.x" + +/* { dg-final { scan-assembler-times "ldrd\tr\[0-9\]+, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 1 } } */ +/* { dg-final { scan-assembler-not "dmb\tish" } } */ diff --git a/gcc/testsuite/gcc.target/arm/atomic_loaddi_6.c b/gcc/testsuite/gcc.target/arm/atomic_loaddi_6.c new file mode 100644 index 00000000000..fd6fd015b5b --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/atomic_loaddi_6.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -O" } */ +/* { dg-require-effective-target arm_arch_v8a_ok } */ +/* { dg-add-options arm_arch_v8a } */ + +#include "atomic_loaddi_relaxed.x" + +/* { dg-final { scan-assembler-times "ldrd\tr\[0-9\]+, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 1 } } */ +/* { dg-final { scan-assembler-not "dmb\tish" } } */ diff --git a/gcc/testsuite/gcc.target/arm/atomic_loaddi_7.c b/gcc/testsuite/gcc.target/arm/atomic_loaddi_7.c new file mode 100644 index 00000000000..6743663f1e6 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/atomic_loaddi_7.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -O" } */ +/* { dg-require-effective-target arm_arch_v7a_ok } */ +/* { dg-add-options arm_arch_v7a } */ + +#include "atomic_loaddi_seq_cst.x" + +/* { dg-final { scan-assembler-times "ldrexd\tr\[0-9\]+, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 1 } } */ +/* { dg-final { scan-assembler-times "dmb\tish" 1 } } */ diff --git a/gcc/testsuite/gcc.target/arm/atomic_loaddi_8.c b/gcc/testsuite/gcc.target/arm/atomic_loaddi_8.c new file mode 100644 index 00000000000..f7bd3e5a2b5 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/atomic_loaddi_8.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -O" } */ +/* { dg-require-effective-target arm_arch_v7ve_ok } */ +/* { dg-add-options arm_arch_v7ve } */ + +#include "atomic_loaddi_seq_cst.x" + +/* { dg-final { scan-assembler-times "ldrd\tr\[0-9\]+, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 1 } } */ +/* { dg-final { scan-assembler-times "dmb\tish" 1 } } */ diff --git a/gcc/testsuite/gcc.target/arm/atomic_loaddi_9.c b/gcc/testsuite/gcc.target/arm/atomic_loaddi_9.c new file mode 100644 index 00000000000..68b293409ff --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/atomic_loaddi_9.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -O" } */ +/* { dg-require-effective-target arm_arch_v8a_ok } */ +/* { dg-add-options arm_arch_v8a } */ + +#include "atomic_loaddi_seq_cst.x" + +/* { dg-final { scan-assembler-times "ldaexd\tr\[0-9\]+, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 1 } } */ +/* { dg-final { scan-assembler-not "dmb\tish" } } */ diff --git a/gcc/testsuite/gcc.target/arm/atomic_loaddi_acquire.x b/gcc/testsuite/gcc.target/arm/atomic_loaddi_acquire.x new file mode 100644 index 00000000000..28997ef565b --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/atomic_loaddi_acquire.x @@ -0,0 +1,11 @@ +#include <stdatomic.h> + +atomic_ullong foo; +int glob; + +int +main (void) +{ + atomic_load_explicit (&foo, memory_order_acquire); + return glob; +} diff --git a/gcc/testsuite/gcc.target/arm/atomic_loaddi_relaxed.x b/gcc/testsuite/gcc.target/arm/atomic_loaddi_relaxed.x new file mode 100644 index 00000000000..701b3c42c09 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/atomic_loaddi_relaxed.x @@ -0,0 +1,11 @@ +#include <stdatomic.h> + +atomic_ullong foo; +int glob; + +int +main (void) +{ + atomic_load_explicit (&foo, memory_order_relaxed); + return glob; +} diff --git a/gcc/testsuite/gcc.target/arm/atomic_loaddi_seq_cst.x b/gcc/testsuite/gcc.target/arm/atomic_loaddi_seq_cst.x new file mode 100644 index 00000000000..32e78da67e8 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/atomic_loaddi_seq_cst.x @@ -0,0 +1,11 @@ +#include <stdatomic.h> + +atomic_ullong foo; +int glob; + +int +main (void) +{ + atomic_load_explicit (&foo, memory_order_seq_cst); + return glob; +} diff --git a/gcc/testsuite/gcc.target/i386/avx-vextractf128-256-5.c b/gcc/testsuite/gcc.target/i386/avx-vextractf128-256-5.c index 5359eb7f4b5..3a1db4b3bb4 100644 --- a/gcc/testsuite/gcc.target/i386/avx-vextractf128-256-5.c +++ b/gcc/testsuite/gcc.target/i386/avx-vextractf128-256-5.c @@ -1,5 +1,5 @@ -/* { dg-require-effective-target avx512f } */ /* { dg-do assemble { target { ! ia32 } } } */ +/* { dg-require-effective-target avx512f } */ /* { dg-options "-O2 -mavx512f" } */ #include <immintrin.h> diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr70329-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-pr70329-1.c new file mode 100644 index 00000000000..bb9a9551d0c --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512bw-pr70329-1.c @@ -0,0 +1,27 @@ +/* PR target/70329 */ +/* { dg-do run } */ +/* { dg-options "-O0 -mavx512bw" } */ +/* { dg-require-effective-target avx512bw } */ + +#define AVX512BW +#include "avx512f-helper.h" + +typedef unsigned char A __attribute__ ((vector_size (64))); +typedef unsigned int B __attribute__ ((vector_size (64))); + +unsigned __attribute__ ((noinline, noclone)) +foo (A a, A b, B c) +{ + a *= b; + c[1] += a[8]; + return c[1]; +} + +void +TEST (void) +{ + A a = (A) { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + unsigned x = foo (a, a, (B) { 1, 2 }); + if (x != 83) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr70329-2.c b/gcc/testsuite/gcc.target/i386/avx512bw-pr70329-2.c new file mode 100644 index 00000000000..731b9260794 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512bw-pr70329-2.c @@ -0,0 +1,33 @@ +/* PR target/70329 */ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -mavx512bw" } */ +/* { dg-require-effective-target avx512bw } */ + +#define AVX512BW +#include "avx512f-helper.h" + +__attribute__((noinline, noclone)) void +foo (unsigned char *src1, unsigned char *src2, unsigned char *dst) +{ + int i; + + for (i = 0; i < 64; i++) + dst[i] = (unsigned char) ((int) src1[i] * (int) src2[i]); +} + +void +TEST (void) +{ + unsigned char a[64], b[64], c[64]; + int i; + + for (i = 0; i < 64; i++) + { + a[i] = i; + b[i] = (i + 1); + } + foo (a, b, c); + for (i = 0; i < 64; i++) + if (c[i] != (unsigned char) (i * (i + 1))) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr70421.c b/gcc/testsuite/gcc.target/i386/avx512f-pr70421.c new file mode 100644 index 00000000000..60e1e2a8863 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512f-pr70421.c @@ -0,0 +1,15 @@ +/* PR target/70421 */ +/* { dg-do run } */ +/* { dg-require-effective-target avx512f } */ +/* { dg-options "-O2 -mavx512f" } */ + +#include "avx512f-check.h" + +#define main() do_main() +#include "../../gcc.dg/torture/pr70421.c" + +static void +avx512f_test (void) +{ + do_main (); +} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c index de6279f1dfa..38d53900627 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump "memcpy.chkp" "strlen" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" char *test (char *str1, char *str2) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c index 9f584efee0a..789ebc1f2d8 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c @@ -3,7 +3,8 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump-not "strlen" "strlen" } } */ -#include "string.h" +#define USE_GNU +#include "../../gcc.dg/strlenopt.h" char *test (char *str1, char *str2) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c index 311c9a042e0..276f4127975 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" size_t test (char *str1, char *str2) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c index 794c8a860da..6866b9869ec 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c @@ -3,7 +3,8 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen -D_GNU_SOURCE" } */ /* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */ -#include "string.h" +#define USE_GNU +#include "../../gcc.dg/strlenopt.h" char * test (char *str1, char *str2) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c index e44096cd429..bbafecc3063 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c @@ -3,7 +3,7 @@ /* { dg-final { scan-tree-dump-times "strlen" 2 "strlen" } } */ /* { dg-final { scan-tree-dump "memcpy" "strlen" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" size_t test (char *str1, char *str2) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c index 18aa2819cdf..d6148a87fd1 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ /* { dg-final { scan-tree-dump "memcpy_nochk" "chkpopt" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" void test (int *buf1, int *buf2, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c index 26e9f13a190..18cff739b01 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump-not "memset_nobnd" "chkpopt" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" void test (void *buf1, int c, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c index e84963f11f7..c53db6a17e4 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump-not "memmove_nobnd" "chkpopt" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" void test (void *buf1, void *buf2, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c index 898e7768b30..ee73e09d875 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c @@ -3,7 +3,8 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions -D_GNU_SOURCE" } */ /* { dg-final { scan-tree-dump-not "mempcpy_nobnd" "chkpopt" } } */ -#include "string.h" +#define USE_GNU +#include "../../gcc.dg/strlenopt.h" void test (void *buf1, void *buf2, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c index 3b926b11f83..279cae3e5bf 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memcpy_nobnd_nochk" "chkpopt" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" void test (int *buf1, int *buf2, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c index a8d000ba1fa..b810c682569 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memset_nobnd_nochk" "chkpopt" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" void test (int *buf1, int c, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c index 7c6065657c0..a9a79c1e330 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memmove_nobnd_nochk" "chkpopt" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" void test (int *buf1, int *buf2, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c index 891adb4f293..29ea674363a 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c @@ -3,7 +3,8 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions -D_GNU_SOURCE" } */ /* { dg-final { scan-tree-dump "mempcpy_nobnd_nochk" "chkpopt" } } */ -#include "string.h" +#define USE_GNU +#include "../../gcc.dg/strlenopt.h" void test (int *buf1, int *buf2, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c index cac0feaecbb..6a0c24ee887 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ /* { dg-final { scan-tree-dump "memset_nochk" "chkpopt" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" void test (int *buf1, int c, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c index 72ff3869f7b..310dec77456 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ /* { dg-final { scan-tree-dump "memmove_nochk" "chkpopt" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" void test (int *buf1, int *buf2, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c index 3faa58b0aea..34c61cc5b9c 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c @@ -3,7 +3,8 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -D_GNU_SOURCE" } */ /* { dg-final { scan-tree-dump "mempcpy_nochk" "chkpopt" } } */ -#include "string.h" +#define USE_GNU +#include "../../gcc.dg/strlenopt.h" void test (int *buf1, int *buf2, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c index 02ad9ccc496..39850d62be8 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memcpy_nobnd" "chkpopt" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" void test (int *buf1, int *buf2, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c index 6db5d83a0bc..06dcbfb9a25 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memset_nobnd" "chkpopt" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" void test (int *buf1, int c, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c index 761e6263d86..40ded068f8e 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memmove_nobnd" "chkpopt" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" void test (int *buf1, int *buf2, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c index 01bff6930a3..8fef8fdd85a 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c @@ -3,7 +3,8 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions -D_GNU_SOURCE" } */ /* { dg-final { scan-tree-dump "mempcpy_nobnd" "chkpopt" } } */ -#include "string.h" +#define USE_GNU +#include "../../gcc.dg/strlenopt.h" void test (int *buf1, int *buf2, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c index b79d09633dd..bf26874e5a8 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c @@ -2,7 +2,7 @@ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump-not "memcpy_nobnd" "chkpopt" } } */ -#include "string.h" +#include "../../gcc.dg/strlenopt.h" void test (void *buf1, void *buf2, size_t len) { diff --git a/gcc/testsuite/gcc.target/i386/pr64411.C b/gcc/testsuite/gcc.target/i386/pr64411.C new file mode 100644 index 00000000000..55858fb48eb --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr64411.C @@ -0,0 +1,27 @@ +/* { dg-do compile } */ +/* { dg-options "-Os -mcmodel=medium -fPIC -fschedule-insns -fselective-scheduling" } */ + +typedef __SIZE_TYPE__ size_t; + +extern "C" long strtol () + { return 0; } + +static struct { + void *sp[2]; +} info; + +union S813 +{ + void * c[5]; +} +s813; + +S813 a813[5]; +S813 check813 (S813, S813 *, S813); + +void checkx813 () +{ + __builtin_memset (&s813, '\0', sizeof (s813)); + __builtin_memset (&info, '\0', sizeof (info)); + check813 (s813, &a813[1], a813[2]); +} diff --git a/gcc/testsuite/gcc.target/i386/pr69888.c b/gcc/testsuite/gcc.target/i386/pr69888.c new file mode 100644 index 00000000000..498fe5acc2c --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr69888.c @@ -0,0 +1,10 @@ +/* PR target/69888 */ +/* { dg-do compile } */ +/* { dg-options "-minline-all-stringops -mmemset-strategy=no_stringop:-1:noalign" } */ +/* { dg-additional-options "-march=geode" { target ia32 } } */ + +void +foo (char *p) +{ + __builtin_memset (p, 0, 32); +} diff --git a/gcc/testsuite/gcc.target/i386/pr69891.c b/gcc/testsuite/gcc.target/i386/pr69891.c new file mode 100644 index 00000000000..2c5e86372e3 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr69891.c @@ -0,0 +1,30 @@ +/* PR rtl-optimization/69891 */ +/* { dg-do run } */ +/* { dg-options "-O -fno-tree-fre -mstringop-strategy=libcall -Wno-psabi" } */ +/* { dg-additional-options "-mno-sse" { target ia32 } } */ + +typedef unsigned short A; +typedef unsigned short B __attribute__ ((vector_size (32))); +typedef unsigned int C; +typedef unsigned int D __attribute__ ((vector_size (32))); +typedef unsigned long long E; +typedef unsigned long long F __attribute__ ((vector_size (32))); + +__attribute__((noinline, noclone)) unsigned +foo(D a, B b, D c, F d) +{ + b /= (B) {1, -c[0]} | 1; + c[0] |= 7; + a %= c | 1; + c ^= c; + return a[0] + b[15] + c[0] + d[3]; +} + +int +main () +{ + unsigned x = foo ((D) {}, (B) {}, (D) {}, (F) {}); + if (x != 0) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr70028.c b/gcc/testsuite/gcc.target/i386/pr70028.c new file mode 100644 index 00000000000..c071aad7403 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70028.c @@ -0,0 +1,19 @@ +/* PR target/70028 */ +/* { dg-do assemble { target avx512bw } } */ +/* { dg-require-effective-target int128 } */ +/* { dg-require-effective-target masm_intel } */ +/* { dg-options "-O2 -fno-forward-propagate -mavx512bw -masm=intel" } */ + +typedef unsigned short A; +typedef int B __attribute__ ((vector_size (32))); +typedef unsigned __int128 C; +typedef __int128 D __attribute__ ((vector_size (32))); + +C +foo (A a, int b, unsigned c, C d, A e, unsigned f, B g, D h) +{ + g[1] ^= (A) ~ a; + a ^= (unsigned) g[0]; + h %= (D) h | 1; + return a + b + c + d + e + g[0] + g[1] + h[1]; +} diff --git a/gcc/testsuite/gcc.target/i386/pr70062.c b/gcc/testsuite/gcc.target/i386/pr70062.c new file mode 100644 index 00000000000..e5cb854f2ee --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70062.c @@ -0,0 +1,11 @@ +/* PR target/70062 */ +/* { dg-options "-minline-all-stringops -minline-stringops-dynamically -mmemcpy-strategy=libcall:-1:noalign -Wno-psabi" } */ +/* { dg-additional-options "-mtune=k6-2" { target ia32 } } */ + +typedef int V __attribute__ ((vector_size (32))); + +V +foo (V x) +{ + return (V) { x[0] }; +} diff --git a/gcc/testsuite/gcc.target/i386/pr70293.c b/gcc/testsuite/gcc.target/i386/pr70293.c new file mode 100644 index 00000000000..4510166ead8 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70293.c @@ -0,0 +1,38 @@ +/* PR target/70293 */ +/* { dg-do compile } */ +/* { dg-require-effective-target lp64 } */ +/* { dg-options "-mtune=westmere -mavx512vl -O2" } */ + +typedef short __v8hi __attribute__((__vector_size__(16))); +typedef int __v8hu __attribute__((__vector_size__(16))); +typedef long __m128i __attribute__((__vector_size__(16))); +__m128i _mm_madd_epi16___B, _mm_mullo_epi16___A, + scaled_bilinear_scanline_sse2_8888_8_8888_OVER_xmm_b, + scaled_bilinear_scanline_sse2_8888_8_8888_OVER___trans_tmp_16, + scaled_bilinear_scanline_sse2_8888_8_8888_OVER___trans_tmp_13; +int _mm_srli_epi16___B, scaled_bilinear_scanline_sse2_8888_8_8888_OVER_m, + scaled_bilinear_scanline_sse2_8888_8_8888_OVER_dst, + scaled_bilinear_scanline_sse2_8888_8_8888_OVER_wt; +__m128i _mm_set_epi16(); +void _mm_cvtsi128_si32(); +void +scaled_bilinear_scanline_sse2_8888_8_8888_OVER(int p1) { + __m128i __trans_tmp_12, __trans_tmp_6, __trans_tmp_5, xmm_x = _mm_set_epi16(); + int mask; + __trans_tmp_5 = (__m128i){scaled_bilinear_scanline_sse2_8888_8_8888_OVER_wt}; + __trans_tmp_6 = (__m128i)(__v8hi){p1, p1, p1, p1, p1, p1, p1, p1}; + while (scaled_bilinear_scanline_sse2_8888_8_8888_OVER_dst) { + scaled_bilinear_scanline_sse2_8888_8_8888_OVER_m = mask++; + if (scaled_bilinear_scanline_sse2_8888_8_8888_OVER_m) { + __trans_tmp_12 = + (__m128i)((__v8hu)_mm_mullo_epi16___A * (__v8hu)__trans_tmp_6); + scaled_bilinear_scanline_sse2_8888_8_8888_OVER_xmm_b = __trans_tmp_12; + scaled_bilinear_scanline_sse2_8888_8_8888_OVER___trans_tmp_13 = + (__m128i)__builtin_ia32_psrlwi128((__v8hi)xmm_x, _mm_srli_epi16___B); + scaled_bilinear_scanline_sse2_8888_8_8888_OVER___trans_tmp_16 = + (__m128i)__builtin_ia32_pmaddwd128((__v8hi)__trans_tmp_5, + (__v8hi)_mm_madd_epi16___B); + _mm_cvtsi128_si32(); + } + } +} diff --git a/gcc/testsuite/gcc.target/i386/pr70325.c b/gcc/testsuite/gcc.target/i386/pr70325.c new file mode 100644 index 00000000000..e2b9342658c --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70325.c @@ -0,0 +1,12 @@ +/* PR target/70325 */ +/* { dg-do compile } */ +/* { dg-options "-mavx512vl -O2" } */ + +typedef char C __attribute((__vector_size__(32))); +typedef int I __attribute((__vector_size__(32))); + +void +f(int a,I b) +{ + __builtin_ia32_storedquqi256_mask((C*)f,(C)b,a); /* { dg-warning "implicit declaration of function" } */ +} diff --git a/gcc/testsuite/gcc.target/i386/pr70327.c b/gcc/testsuite/gcc.target/i386/pr70327.c new file mode 100644 index 00000000000..035bb68d458 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70327.c @@ -0,0 +1,12 @@ +/* PR target/70327 */ +/* { dg-do compile } */ +/* { dg-require-effective-target int128 } */ +/* { dg-options "-mavx512f" } */ + +typedef unsigned __int128 v4ti __attribute__ ((vector_size (64))); + +void +foo (v4ti v) +{ + foo(v); +} diff --git a/gcc/testsuite/gcc.target/i386/pr70406.c b/gcc/testsuite/gcc.target/i386/pr70406.c new file mode 100644 index 00000000000..b75a5af450e --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70406.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target ia32 } */ +/* { dg-options "-O -mtune=pentium2 -mavx512f" } */ + +typedef int v4si __attribute__ ((vector_size (16))); + +unsigned +foo (unsigned char i, unsigned x, v4si u, v4si v, v4si w) +{ + i &= (unsigned)~x; + v <<= w[x]; + return i + u[x] + v[i]; +} diff --git a/gcc/testsuite/gcc.target/i386/pr70453.c b/gcc/testsuite/gcc.target/i386/pr70453.c new file mode 100644 index 00000000000..2ff1fbb804d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70453.c @@ -0,0 +1,18 @@ +/* PR target/70453 */ +/* { dg-do assemble { target { lp64 } } } */ +/* { dg-require-effective-target avx512vbmi } */ +/* { dg-options "-Og -fschedule-insns -mavx512vbmi" } */ + + +typedef char v64u8 __attribute__ ((vector_size (64))); +typedef short v64u16 __attribute__ ((vector_size (64))); +typedef __int128 v64u128 __attribute__ ((vector_size (64))); + +int +foo(v64u8 v64u8_0, v64u16 v64u16_0, v64u128 v64u128_0) +{ + v64u128_0 /= (v64u128){ v64u8_0[28] } | 0x1424171b0c; + v64u8_0 %= (v64u8){ v64u16_0[25], v64u128_0[1]} ; + v64u128_0 %= (v64u128){ v64u16_0[8] }; + return v64u8_0[0] + v64u8_0[1] + v64u16_0[0] + v64u128_0[0]; +} diff --git a/gcc/testsuite/gcc.target/i386/pr70510.c b/gcc/testsuite/gcc.target/i386/pr70510.c new file mode 100644 index 00000000000..fdad97a16f4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70510.c @@ -0,0 +1,14 @@ +/* PR target/70510 */ +/* { dg-do assemble { target avx512bw } } */ +/* { dg-require-effective-target masm_intel } */ +/* { dg-options "-Og -mavx512bw -masm=intel" } */ + +typedef int V __attribute__ ((vector_size (64))); + +V +foo (V u, V v) +{ + v[0] |= v[u[0]]; + u /= ((V)v)[0]; + return u; +} diff --git a/gcc/testsuite/gcc.target/i386/pr70525.c b/gcc/testsuite/gcc.target/i386/pr70525.c new file mode 100644 index 00000000000..78ba752f94b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70525.c @@ -0,0 +1,32 @@ +/* PR target/70525 */ +/* { dg-do assemble { target avx512bw } } */ +/* { dg-options "-O2 -mavx512bw -mno-avx512vl" } */ + +typedef char v64qi __attribute__ ((vector_size (64))); +typedef short v32hi __attribute__ ((vector_size (64))); +typedef int v16si __attribute__ ((vector_size (64))); +typedef long long v8di __attribute__ ((vector_size (64))); + +v64qi +f1 (v64qi x, v64qi y) +{ + return x & ~y; +} + +v32hi +f2 (v32hi x, v32hi y) +{ + return x & ~y; +} + +v16si +f3 (v16si x, v16si y) +{ + return x & ~y; +} + +v8di +f4 (v8di x, v8di y) +{ + return x & ~y; +} diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-36.c b/gcc/testsuite/gcc.target/powerpc/altivec-36.c new file mode 100644 index 00000000000..ce9e6a36b5d --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/altivec-36.c @@ -0,0 +1,46 @@ +/* PR target/70296 */ +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-options "-maltivec -std=gnu11" } */ + +#define c(x) x +#define f(x) +#define i int +#define k +typedef int vector; +typedef vector int V; +vector int a; +vector b; +vector c(int) d; +vector c(e); +vector c; +vector f(int) int g; +vector f(int) h; +vector i j; +vector k int l; +vector k m; +#define int(x) x +vector int n; +vector int(int) o; +vector int(r); +#undef int + +void +foo () +{ + V *p; + p = &a; + p = &d; + p = &g; + p = &j; + p = &l; + p = &n; + p = &o; + int *q; + q = &b; + q = &e; + q = &c; + q = &h; + q = &m; + q = &r; +} diff --git a/gcc/testsuite/gcc.target/powerpc/pr69969.c b/gcc/testsuite/gcc.target/powerpc/pr69969.c new file mode 100644 index 00000000000..1ca2c7581ef --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr69969.c @@ -0,0 +1,7 @@ +/* PR target/69969 */ +/* { dg-do compile } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ +/* { dg-options "-mcpu=power8" } */ + +int bar (int x) { return x; } +__attribute__((__target__("no-vsx"))) int foo (int x) { return x; } /* { dg-bogus "-mallow-movmisalign requires -mvsx" } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr70117.c b/gcc/testsuite/gcc.target/powerpc/pr70117.c new file mode 100644 index 00000000000..f1fdedb6c59 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr70117.c @@ -0,0 +1,92 @@ +/* { dg-do run { target { powerpc*-*-linux* powerpc*-*-darwin* powerpc*-*-aix* rs6000-*-* } } } */ +/* { dg-options "-std=c99 -mlong-double-128 -O2" } */ + +#include <float.h> + +union gl_long_double_union +{ + struct { double hi; double lo; } dd; + long double ld; +}; + +/* This is gnulib's LDBL_MAX which, being 107 bits in precision, is + slightly larger than gcc's 106 bit precision LDBL_MAX. */ +volatile union gl_long_double_union gl_LDBL_MAX = + { { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL } }; + +volatile double min_denorm = 0x1p-1074; +volatile double ld_low = 0x1p-969; +volatile double dinf = 1.0/0.0; +volatile double dnan = 0.0/0.0; + +int +main (void) +{ + long double ld; + + ld = gl_LDBL_MAX.ld; + if (__builtin_isinfl (ld)) + __builtin_abort (); + ld = -gl_LDBL_MAX.ld; + if (__builtin_isinfl (ld)) + __builtin_abort (); + + ld = gl_LDBL_MAX.ld; + if (!__builtin_isfinite (ld)) + __builtin_abort (); + ld = -gl_LDBL_MAX.ld; + if (!__builtin_isfinite (ld)) + __builtin_abort (); + + ld = ld_low; + if (!__builtin_isnormal (ld)) + __builtin_abort (); + ld = -ld_low; + if (!__builtin_isnormal (ld)) + __builtin_abort (); + + ld = -min_denorm; + ld += ld_low; + if (__builtin_isnormal (ld)) + __builtin_abort (); + ld = min_denorm; + ld -= ld_low; + if (__builtin_isnormal (ld)) + __builtin_abort (); + + ld = 0.0; + if (__builtin_isnormal (ld)) + __builtin_abort (); + ld = -0.0; + if (__builtin_isnormal (ld)) + __builtin_abort (); + + ld = LDBL_MAX; + if (!__builtin_isnormal (ld)) + __builtin_abort (); + ld = -LDBL_MAX; + if (!__builtin_isnormal (ld)) + __builtin_abort (); + + ld = gl_LDBL_MAX.ld; + if (!__builtin_isnormal (ld)) + __builtin_abort (); + ld = -gl_LDBL_MAX.ld; + if (!__builtin_isnormal (ld)) + __builtin_abort (); + + ld = dinf; + if (__builtin_isnormal (ld)) + __builtin_abort (); + ld = -dinf; + if (__builtin_isnormal (ld)) + __builtin_abort (); + + ld = dnan; + if (__builtin_isnormal (ld)) + __builtin_abort (); + ld = -dnan; + if (__builtin_isnormal (ld)) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.target/sh/torture/pr70416.c b/gcc/testsuite/gcc.target/sh/torture/pr70416.c new file mode 100644 index 00000000000..b1123bee029 --- /dev/null +++ b/gcc/testsuite/gcc.target/sh/torture/pr70416.c @@ -0,0 +1,136 @@ +/* { dg-additional-options "-std=gnu99 -fpic" } */ +/* { dg-do compile } */ + +typedef unsigned long VALUE; +typedef unsigned long ID; + +typedef struct rb_callable_method_entry_struct +{ + ID called_id; + const VALUE owner; +} rb_callable_method_entry_t; + +typedef struct rb_iseq_struct rb_iseq_t; + +struct __jmp_buf_tag { int xx; }; +typedef struct __jmp_buf_tag jmp_buf[1]; + +struct rb_iseq_struct +{ + const struct iseq_catch_table *catch_table; +}; + +typedef struct rb_control_frame_struct +{ + const VALUE *pc; + VALUE *sp; + const rb_iseq_t *iseq; + VALUE flag; + VALUE *ep; +} rb_control_frame_t; + +typedef jmp_buf rb_jmpbuf_t; +struct rb_vm_tag +{ + rb_jmpbuf_t buf; +}rb_ensure_list_t; + +typedef struct rb_thread_struct +{ + rb_control_frame_t *cfp; + struct rb_vm_tag *tag; +} rb_thread_t; + +struct iseq_catch_table_entry +{ + const rb_iseq_t *iseq; +}; + +struct iseq_catch_table +{ + unsigned int size; +}; + +extern unsigned long long __sdt_unsp; +extern unsigned short ruby_cmethod__return_semaphore; + +struct ruby_dtrace_method_hook_args +{ + const char *classname; + const char *methodname; + const char *filename; + int line_no; +}; + +int ruby_th_dtrace_setup(rb_thread_t *th, VALUE klass, ID id, struct ruby_dtrace_method_hook_args *args); +int rb_threadptr_tag_state (rb_thread_t *th); +VALUE vm_exec_core (rb_thread_t *th, VALUE initial); +const rb_callable_method_entry_t *rb_vm_frame_method_entry (const rb_control_frame_t *cfp); + +struct vm_throw_data; +const rb_control_frame_t * THROW_DATA_CATCH_FRAME(const struct vm_throw_data *obj); +rb_control_frame_t * vm_push_frame(rb_thread_t *th, const rb_iseq_t *iseq, VALUE type, VALUE self, VALUE specval, VALUE cref_or_me, const VALUE *pc, VALUE *sp, int local_size, int stack_max); + + +VALUE vm_exec(rb_thread_t *th) +{ + int state; + VALUE result; + VALUE initial = 0; + struct vm_throw_data *err; + rb_thread_t * const _th = (th); + struct rb_vm_tag _tag; + + if ((state = (__builtin_setjmp((_tag.buf)) ? rb_threadptr_tag_state((_th)) : ((void)(_th->tag = &_tag), 0))) == 0) + { + result = vm_exec_core(th, initial); + } + else + { + unsigned int i; + const struct iseq_catch_table_entry *entry; + const struct iseq_catch_table *ct; + unsigned long epc, cont_pc, cont_sp; + const rb_iseq_t *catch_iseq; + rb_control_frame_t *cfp; + const rb_control_frame_t *escape_cfp; + + while (th->cfp->pc == 0 || th->cfp->iseq == 0) + { + if (ruby_cmethod__return_semaphore) + { + struct ruby_dtrace_method_hook_args args; + if (ruby_th_dtrace_setup(th, rb_vm_frame_method_entry(th->cfp)->owner, rb_vm_frame_method_entry(th->cfp)->called_id, &args)) + { + __asm__ __volatile__ ( + ".asciz \"%n[_SDT_S1]@%[_SDT_A1] %n[_SDT_S2]@%[_SDT_A2] %n[_SDT_S3]@%[_SDT_A3] %n[_SDT_S4]@%[_SDT_A4]\"\n" + : + : [_SDT_S1] "n" (((!__extension__ (__builtin_constant_p ((((unsigned long long) (__typeof (__builtin_choose_expr (((__builtin_classify_type ( args.classname ) + 3) & -4) == 4, ( args.classname ), 0U))) __sdt_unsp) & ((unsigned long long)1 << (sizeof (unsigned long long) * 8 - 1))) == 0) || (__typeof (__builtin_choose_expr (((__builtin_classify_type ( args.classname ) + 3) & -4) == 4, ( args.classname ), 0U))) -1 > (__typeof (__builtin_choose_expr (((__builtin_classify_type ( args.classname ) + 3) & -4) == 4, ( args.classname ), 0U))) 0)) ? 1 : -1) * (int) ((__builtin_classify_type ( args.classname ) == 14 || __builtin_classify_type ( args.classname ) == 5) ? sizeof (void *) : sizeof ( args.classname ))), + [_SDT_A1] "nor" (( args.classname )), + [_SDT_S2] "n" (((!__extension__ (__builtin_constant_p ((((unsigned long long) (__typeof (__builtin_choose_expr (((__builtin_classify_type ( args.methodname ) + 3) & -4) == 4, ( args.methodname ), 0U))) __sdt_unsp) & ((unsigned long long)1 << (sizeof (unsigned long long) * 8 - 1))) == 0) || (__typeof (__builtin_choose_expr (((__builtin_classify_type ( args.methodname ) + 3) & -4) == 4, ( args.methodname ), 0U))) -1 > (__typeof (__builtin_choose_expr (((__builtin_classify_type ( args.methodname ) + 3) & -4) == 4, ( args.methodname ), 0U))) 0)) ? 1 : -1) * (int) ((__builtin_classify_type ( args.methodname ) == 14 || __builtin_classify_type ( args.methodname ) == 5) ? sizeof (void *) : sizeof ( args.methodname ))), + [_SDT_A2] "nor" (( args.methodname )), + [_SDT_S3] "n" (((!__extension__ (__builtin_constant_p ((((unsigned long long) (__typeof (__builtin_choose_expr (((__builtin_classify_type ( args.filename ) + 3) & -4) == 4, ( args.filename ), 0U))) __sdt_unsp) & ((unsigned long long)1 << (sizeof (unsigned long long) * 8 - 1))) == 0) || (__typeof (__builtin_choose_expr (((__builtin_classify_type ( args.filename ) + 3) & -4) == 4, ( args.filename ), 0U))) -1 > (__typeof (__builtin_choose_expr (((__builtin_classify_type ( args.filename ) + 3) & -4) == 4, ( args.filename ), 0U))) 0)) ? 1 : -1) * (int) ((__builtin_classify_type ( args.filename ) == 14 || __builtin_classify_type ( args.filename ) == 5) ? sizeof (void *) : sizeof ( args.filename ))), + [_SDT_A3] "nor" (( args.filename )), + [_SDT_S4] "n" (((!__extension__ (__builtin_constant_p ((((unsigned long long) (__typeof (__builtin_choose_expr (((__builtin_classify_type ( args.line_no ) + 3) & -4) == 4, ( args.line_no ), 0U))) __sdt_unsp) & ((unsigned long long)1 << (sizeof (unsigned long long) * 8 - 1))) == 0) || (__typeof (__builtin_choose_expr (((__builtin_classify_type ( args.line_no ) + 3) & -4) == 4, ( args.line_no ), 0U))) -1 > (__typeof (__builtin_choose_expr (((__builtin_classify_type ( args.line_no ) + 3) & -4) == 4, ( args.line_no ), 0U))) 0)) ? 1 : -1) * (int) ((__builtin_classify_type ( args.line_no ) == 14 || __builtin_classify_type ( args.line_no ) == 5) ? sizeof (void *) : sizeof ( args.line_no ))), + [_SDT_A4] "nor" (( args.line_no )) + ); + } + } + } + + if (cfp == escape_cfp && !(((cfp)->flag & 0x0200) != 0)) + catch_iseq = entry->iseq; + + if (state == 6) + { + escape_cfp = THROW_DATA_CATCH_FRAME(err); + + if (ct) + for (i = 0; i < ct->size; i++) { } + } + else + ct = cfp->iseq->catch_table; + + vm_push_frame(th, catch_iseq, 0xb1, 0, 1, 0, 0, 0, 5, 123); + } +} diff --git a/gcc/testsuite/gcc.target/sparc/20151219-1.c b/gcc/testsuite/gcc.target/sparc/20151219-1.c index efe720af6cd..e331d3eecdb 100644 --- a/gcc/testsuite/gcc.target/sparc/20151219-1.c +++ b/gcc/testsuite/gcc.target/sparc/20151219-1.c @@ -2,6 +2,7 @@ /* Reported by Sebastian Huber <sebastian.huber@embedded-brains.de> */ /* { dg-do compile } */ +/* { dg-require-effective-target ilp32 } */ /* { dg-options "-O2 -mtune=supersparc" } */ typedef unsigned int size_t; diff --git a/gcc/testsuite/gfortran.dg/coarray_allocate_6.f08 b/gcc/testsuite/gfortran.dg/coarray_allocate_6.f08 new file mode 100644 index 00000000000..2fdd4c128ef --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_allocate_6.f08 @@ -0,0 +1,27 @@ +! { dg-do run } +! { dg-options "-fcoarray=single -fdump-tree-original" } + +! Contributed by Tobias Burnus <burnus@gcc.gnu.org> +! Test fix for pr65795. + +implicit none + +type t2 + integer, allocatable :: x +end type t2 + +type t3 + type(t2), allocatable :: caf[:] +end type t3 + +!type(t3), save, target :: c, d +type(t3), target :: c, d +integer :: stat + +allocate(c%caf[*], stat=stat) +end + +! Besides checking that the executable does not crash anymore, check +! that the cause has been remove. +! { dg-final { scan-tree-dump-not "c.caf.x = 0B" "original" } } + diff --git a/gcc/testsuite/gfortran.dg/deferred_character_16.f90 b/gcc/testsuite/gfortran.dg/deferred_character_16.f90 new file mode 100644 index 00000000000..27fb11249a8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/deferred_character_16.f90 @@ -0,0 +1,24 @@ +! { dg-do run } + +program truc +implicit none + +type t_env_table + character(len=:), allocatable :: key +end type + +type(t_env_table), dimension(:), allocatable :: environment_table + +character(len=:), allocatable :: s + +allocate(environment_table(1)) +environment_table(1)%key='tt' + +allocate(s, source=environment_table(1)%key) + +if ( .not. allocated(s) ) call abort() +if ( s /= "tt" ) call abort() +if ( len(s) /= 2 ) call abort() +!print *, 's:"', s, '" derived:"',environment_table(1)%key,'"' + +end program diff --git a/gcc/testsuite/gfortran.dg/deferred_character_17.f90 b/gcc/testsuite/gfortran.dg/deferred_character_17.f90 new file mode 100644 index 00000000000..f5931acd3c7 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/deferred_character_17.f90 @@ -0,0 +1,19 @@ +! { dg-do run } +! PR70592 dynamically-allocated character array +! Contributed by Peter Knowles <KnowlesPJ@Cardiff.ac.uk> +! +PROGRAM main + character(len=7) :: res + CHARACTER(len=:), DIMENSION(:), POINTER :: cp + INTEGER :: i + ALLOCATE(CHARACTER(len=1) :: cp(1:6)) + if (SIZE(cp) /= 6 .or. LBOUND(cp,1) /= 1 .or. UBOUND(cp,1) /= 6) call abort() + cp(1)='1' + cp(2)='2' + cp(3)='3' + cp(4)='4' + cp(5)='5' + cp(6)='6' + write (res, *) cp + if (res /= ' 123456') call abort() +END PROGRAM main diff --git a/gcc/testsuite/gfortran.dg/fmt_pf.f90 b/gcc/testsuite/gfortran.dg/fmt_pf.f90 new file mode 100644 index 00000000000..6cefa86e4a8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/fmt_pf.f90 @@ -0,0 +1,226 @@ +! { dg-do run } +! PR70235 Incorrect output with PF format. +! Test case provided by Antoine Gardeux. +program pr70235 +use ISO_FORTRAN_ENV + implicit none + integer, parameter :: j(size(real_kinds)+4)=[REAL_KINDS, [4, 4, 4, 4]] + logical :: l_skip(4) = .false. + integer :: i + integer :: n_tst = 0, n_cnt = 0, n_skip = 0 + character(len=20) :: s, s1 + +! Check that the default rounding mode is to nearest and to even on tie. + do i=1,size(real_kinds) + if (i == 1) then + write(s, '(2F4.1,2F4.0)') real(-9.49999905,kind=j(1)), & + real(9.49999905,kind=j(1)), & + real(9.5,kind=j(1)), real(8.5,kind=j(1)) + write(s1, '(3PE10.3,2PE10.3)') real(987350.,kind=j(1)), & + real(98765.0,kind=j(1)) + else if (i == 2) then + write(s, '(2F4.1,2F4.0)') real(-9.49999905,kind=j(2)), & + real(9.49999905,kind=j(2)), & + real(9.5,kind=j(2)), real(8.5,kind=j(2)) + write(s1, '(3PE10.3,2PE10.3)') real(987350.,kind=j(2)), & + real(98765.0,kind=j(2)) + else if (i == 3) then + write(s, '(2F4.1,2F4.0)') real(-9.49999905,kind=j(3)), & + real(9.49999905,kind=j(3)), & + real(9.5,kind=j(3)), real(8.5,kind=j(3)) + write(s1, '(3PE10.3,2PE10.3)') real(987350.,kind=j(3)), & + real(98765.0,kind=j(3)) + else if (i == 4) then + write(s, '(2F4.1,2F4.0)') real(-9.49999905,kind=j(4)), & + real(9.49999905,kind=j(4)), & + real(9.5,kind=j(4)), real(8.5,kind=j(4)) + write(s1, '(3PE10.3,2PE10.3)') real(987350.,kind=j(4)), & + real(98765.0,kind=j(4)) + end if + if (s /= '-9.5 9.5 10. 8.' .or. s1 /= ' 987.4E+03 98.76E+03') then + l_skip(i) = .true. +! print "('Unsupported rounding for real(',i0,')')", j(i) + end if + end do + + +! Original test. + call checkfmt("(-6PF8.3)", 1.0e4, " 0.010") + call checkfmt("(-6PF8.3)", 0.0, " 0.000") + +! Test for the bug in comment 6. + call checkfmt("(-8pf18.3)", 643.125, " 0.000") + call checkfmt("(-7pf18.3)", 643.125, " 0.000") + call checkfmt("(-6pf18.3)", 643.125, " 0.001") + call checkfmt("(-5pf18.3)", 643.125, " 0.006") + call checkfmt("(-4pf18.3)", 643.125, " 0.064") + call checkfmt("(-3pf18.3)", 643.125, " 0.643") + call checkfmt("(-2pf18.3)", 643.125, " 6.431") + call checkfmt("(-1pf18.3)", 643.125, " 64.312") + call checkfmt("( 0pf18.3)", 643.125, " 643.125") + + call checkfmt("(ru,-8pf18.3)", 643.125, " 0.001") + call checkfmt("(ru,-7pf18.3)", 643.125, " 0.001") + call checkfmt("(ru,-6pf18.3)", 643.125, " 0.001") + call checkfmt("(ru,-5pf18.3)", 643.125, " 0.007") + call checkfmt("(ru,-4pf18.3)", 643.125, " 0.065") + call checkfmt("(ru,-3pf18.3)", 643.125, " 0.644") + call checkfmt("(ru,-2pf18.3)", 643.125, " 6.432") + call checkfmt("(ru,-1pf18.3)", 643.125, " 64.313") + call checkfmt("(ru, 0pf18.3)", 643.125, " 643.125") + + call checkfmt("(rd,-8pf18.3)", 643.125, " 0.000") + call checkfmt("(rd,-7pf18.3)", 643.125, " 0.000") + call checkfmt("(rd,-6pf18.3)", 643.125, " 0.000") + call checkfmt("(rd,-5pf18.3)", 643.125, " 0.006") + call checkfmt("(rd,-4pf18.3)", 643.125, " 0.064") + call checkfmt("(rd,-3pf18.3)", 643.125, " 0.643") + call checkfmt("(rd,-2pf18.3)", 643.125, " 6.431") + call checkfmt("(rd,-1pf18.3)", 643.125, " 64.312") + call checkfmt("(rd, 0pf18.3)", 643.125, " 643.125") + + call checkfmt("(rz,-8pf18.3)", 643.125, " 0.000") + call checkfmt("(rz,-7pf18.3)", 643.125, " 0.000") + call checkfmt("(rz,-6pf18.3)", 643.125, " 0.000") + call checkfmt("(rz,-5pf18.3)", 643.125, " 0.006") + call checkfmt("(rz,-4pf18.3)", 643.125, " 0.064") + call checkfmt("(rz,-3pf18.3)", 643.125, " 0.643") + call checkfmt("(rz,-2pf18.3)", 643.125, " 6.431") + call checkfmt("(rz,-1pf18.3)", 643.125, " 64.312") + call checkfmt("(rz, 0pf18.3)", 643.125, " 643.125") + + call checkfmt("(rc,-8pf18.3)", 643.125, " 0.000") + call checkfmt("(rc,-7pf18.3)", 643.125, " 0.000") + call checkfmt("(rc,-6pf18.3)", 643.125, " 0.001") + call checkfmt("(rc,-5pf18.3)", 643.125, " 0.006") + call checkfmt("(rc,-4pf18.3)", 643.125, " 0.064") + call checkfmt("(rc,-3pf18.3)", 643.125, " 0.643") + call checkfmt("(rc,-2pf18.3)", 643.125, " 6.431") + call checkfmt("(rc,-1pf18.3)", 643.125, " 64.313") + call checkfmt("(rc, 0pf18.3)", 643.125, " 643.125") + + call checkfmt("(rn,-8pf18.3)", 643.125, " 0.000") + call checkfmt("(rn,-7pf18.3)", 643.125, " 0.000") + call checkfmt("(rn,-6pf18.3)", 643.125, " 0.001") + call checkfmt("(rn,-5pf18.3)", 643.125, " 0.006") + call checkfmt("(rn,-4pf18.3)", 643.125, " 0.064") + call checkfmt("(rn,-3pf18.3)", 643.125, " 0.643") + call checkfmt("(rn,-2pf18.3)", 643.125, " 6.431") + call checkfmt("(rn,-1pf18.3)", 643.125, " 64.312") + call checkfmt("(rn, 0pf18.3)", 643.125, " 643.125") + + call checkfmt("(rp,-8pf18.3)", 643.125, " 0.000") + call checkfmt("(rp,-7pf18.3)", 643.125, " 0.000") + call checkfmt("(rp,-6pf18.3)", 643.125, " 0.001") + call checkfmt("(rp,-5pf18.3)", 643.125, " 0.006") + call checkfmt("(rp,-4pf18.3)", 643.125, " 0.064") + call checkfmt("(rp,-3pf18.3)", 643.125, " 0.643") + call checkfmt("(rp,-2pf18.3)", 643.125, " 6.431") + call checkfmt("(rp,-1pf18.3)", 643.125, " 64.312") + call checkfmt("(rp, 0pf18.3)", 643.125, " 643.125") + + call checkfmt("(-8pf18.3)", -643.125, " -0.000") + call checkfmt("(-7pf18.3)", -643.125, " -0.000") + call checkfmt("(-6pf18.3)", -643.125, " -0.001") + call checkfmt("(-5pf18.3)", -643.125, " -0.006") + call checkfmt("(-4pf18.3)", -643.125, " -0.064") + call checkfmt("(-3pf18.3)", -643.125, " -0.643") + call checkfmt("(-2pf18.3)", -643.125, " -6.431") + call checkfmt("(-1pf18.3)", -643.125, " -64.312") + call checkfmt("( 0pf18.3)", -643.125, " -643.125") + + call checkfmt("(ru,-8pf18.3)", -643.125, " -0.000") + call checkfmt("(ru,-7pf18.3)", -643.125, " -0.000") + call checkfmt("(ru,-6pf18.3)", -643.125, " -0.000") + call checkfmt("(ru,-5pf18.3)", -643.125, " -0.006") + call checkfmt("(ru,-4pf18.3)", -643.125, " -0.064") + call checkfmt("(ru,-3pf18.3)", -643.125, " -0.643") + call checkfmt("(ru,-2pf18.3)", -643.125, " -6.431") + call checkfmt("(ru,-1pf18.3)", -643.125, " -64.312") + call checkfmt("(ru, 0pf18.3)", -643.125, " -643.125") + + call checkfmt("(rd,-8pf18.3)", -643.125, " -0.001") + call checkfmt("(rd,-7pf18.3)", -643.125, " -0.001") + call checkfmt("(rd,-6pf18.3)", -643.125, " -0.001") + call checkfmt("(rd,-5pf18.3)", -643.125, " -0.007") + call checkfmt("(rd,-4pf18.3)", -643.125, " -0.065") + call checkfmt("(rd,-3pf18.3)", -643.125, " -0.644") + call checkfmt("(rd,-2pf18.3)", -643.125, " -6.432") + call checkfmt("(rd,-1pf18.3)", -643.125, " -64.313") + call checkfmt("(rd, 0pf18.3)", -643.125, " -643.125") + + call checkfmt("(rz,-8pf18.3)", -643.125, " -0.000") + call checkfmt("(rz,-7pf18.3)", -643.125, " -0.000") + call checkfmt("(rz,-6pf18.3)", -643.125, " -0.000") + call checkfmt("(rz,-5pf18.3)", -643.125, " -0.006") + call checkfmt("(rz,-4pf18.3)", -643.125, " -0.064") + call checkfmt("(rz,-3pf18.3)", -643.125, " -0.643") + call checkfmt("(rz,-2pf18.3)", -643.125, " -6.431") + call checkfmt("(rz,-1pf18.3)", -643.125, " -64.312") + call checkfmt("(rz, 0pf18.3)", -643.125, " -643.125") + + call checkfmt("(rc,-8pf18.3)", -643.125, " -0.000") + call checkfmt("(rc,-7pf18.3)", -643.125, " -0.000") + call checkfmt("(rc,-6pf18.3)", -643.125, " -0.001") + call checkfmt("(rc,-5pf18.3)", -643.125, " -0.006") + call checkfmt("(rc,-4pf18.3)", -643.125, " -0.064") + call checkfmt("(rc,-3pf18.3)", -643.125, " -0.643") + call checkfmt("(rc,-2pf18.3)", -643.125, " -6.431") + call checkfmt("(rc,-1pf18.3)", -643.125, " -64.313") + call checkfmt("(rc, 0pf18.3)", -643.125, " -643.125") + + call checkfmt("(rn,-8pf18.3)", -643.125, " -0.000") + call checkfmt("(rn,-7pf18.3)", -643.125, " -0.000") + call checkfmt("(rn,-6pf18.3)", -643.125, " -0.001") + call checkfmt("(rn,-5pf18.3)", -643.125, " -0.006") + call checkfmt("(rn,-4pf18.3)", -643.125, " -0.064") + call checkfmt("(rn,-3pf18.3)", -643.125, " -0.643") + call checkfmt("(rn,-2pf18.3)", -643.125, " -6.431") + call checkfmt("(rn,-1pf18.3)", -643.125, " -64.312") + call checkfmt("(rn, 0pf18.3)", -643.125, " -643.125") + + call checkfmt("(rp,-8pf18.3)", -643.125, " -0.000") + call checkfmt("(rp,-7pf18.3)", -643.125, " -0.000") + call checkfmt("(rp,-6pf18.3)", -643.125, " -0.001") + call checkfmt("(rp,-5pf18.3)", -643.125, " -0.006") + call checkfmt("(rp,-4pf18.3)", -643.125, " -0.064") + call checkfmt("(rp,-3pf18.3)", -643.125, " -0.643") + call checkfmt("(rp,-2pf18.3)", -643.125, " -6.431") + call checkfmt("(rp,-1pf18.3)", -643.125, " -64.312") + call checkfmt("(rp, 0pf18.3)", -643.125, " -643.125") + + ! print *, n_tst, n_cnt, n_skip + if (n_cnt /= 0) call abort + if (all(.not. l_skip)) print *, "All kinds rounded to nearest" + +contains + subroutine checkfmt(fmt, x, cmp) + implicit none + integer :: i + character(len=*), intent(in) :: fmt + real, intent(in) :: x + character(len=*), intent(in) :: cmp + do i=1,size(real_kinds) + if (i == 1) then + write(s, fmt) real(x,kind=j(1)) + else if (i == 2) then + write(s, fmt) real(x,kind=j(2)) + else if (i == 3) then + write(s, fmt) real(x,kind=j(3)) + else if (i == 4) then + write(s, fmt) real(x,kind=j(4)) + end if + n_tst = n_tst + 1 + if (s /= cmp) then + if (l_skip(i)) then + n_skip = n_skip + 1 + else + print "(a,1x,a,' expected: ',1x,a)", fmt, s, cmp + n_cnt = n_cnt + 1 + end if + end if + end do + + end subroutine +end program +! { dg-output "All kinds rounded to nearest" { xfail { i?86-*-solaris2.9* hppa*-*-hpux* } } } diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_25.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_25.f90 new file mode 100644 index 00000000000..d0b2a2e32d1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_25.f90 @@ -0,0 +1,40 @@ +! { dg-do run } +! +! Test contributed by Valery Weber <valeryweber@hotmail.com> + +module mod + + TYPE, PUBLIC :: base_type + END TYPE base_type + + TYPE, PUBLIC :: dict_entry_type + CLASS( * ), ALLOCATABLE :: key + CLASS( * ), ALLOCATABLE :: val + END TYPE dict_entry_type + + +contains + + SUBROUTINE dict_put ( this, key, val ) + CLASS(dict_entry_type), INTENT(INOUT) :: this + CLASS(base_type), INTENT(IN) :: key, val + INTEGER :: istat + ALLOCATE( this%key, SOURCE=key, STAT=istat ) + end SUBROUTINE dict_put +end module mod + +program test + use mod + type(dict_entry_type) :: t + type(base_type) :: a, b + call dict_put(t, a, b) + + if (.NOT. allocated(t%key)) call abort() + select type (x => t%key) + type is (base_type) + class default + call abort() + end select + deallocate(t%key) +end + diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_26.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_26.f90 new file mode 100644 index 00000000000..130006907a9 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_26.f90 @@ -0,0 +1,47 @@ +! { dg-do run } +! +! Test contributed by Valery Weber <valeryweber@hotmail.com> + +module mod + + TYPE, PUBLIC :: dict_entry_type + CLASS( * ), ALLOCATABLE :: key + CLASS( * ), ALLOCATABLE :: val + END TYPE dict_entry_type + + +contains + + SUBROUTINE dict_put ( this, key, val ) + CLASS(dict_entry_type), INTENT(INOUT) :: this + CLASS(*), INTENT(IN) :: key, val + INTEGER :: istat + ALLOCATE( this%key, SOURCE=key, STAT=istat ) + ALLOCATE( this%val, SOURCE=val, STAT=istat ) + end SUBROUTINE dict_put +end module mod + +program test + use mod + type(dict_entry_type) :: t + call dict_put(t, "foo", 42) + + if (.NOT. allocated(t%key)) call abort() + select type (x => t%key) + type is (CHARACTER(*)) + if (x /= "foo") call abort() + class default + call abort() + end select + deallocate(t%key) + + if (.NOT. allocated(t%val)) call abort() + select type (x => t%val) + type is (INTEGER) + if (x /= 42) call abort() + class default + call abort() + end select + deallocate(t%val) +end + diff --git a/gcc/testsuite/gnat.dg/specs/double_record_extension3.ads b/gcc/testsuite/gnat.dg/specs/double_record_extension3.ads new file mode 100644 index 00000000000..de53655bace --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/double_record_extension3.ads @@ -0,0 +1,22 @@ +-- { dg-do compile } + +package Double_Record_Extension3 is + + type Rec1 is tagged record + Id : Integer; + end record; + + for Rec1 use record + Id at 8 range 0 .. 31; + end record; + + type Rec2 (Size : Integer) is new Rec1 with record + Data : String (1 .. Size); + end record; + + type Rec3 is new Rec2 (Size => 128) with record + Valid : Boolean; + end record; + +end Double_Record_Extension3; + diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 771a0d4d593..6df3bf22e26 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2942,7 +2942,9 @@ proc check_effective_target_arm_fp16_ok { } { # Creates a series of routines that return 1 if the given architecture # can be selected and a routine to give the flags to select that architecture # Note: Extra flags may be added to disable options from newer compilers -# (Thumb in particular - but others may be added in the future) +# (Thumb in particular - but others may be added in the future). +# -march=armv7ve is special and is handled explicitly after this loop because +# it needs more than one predefine check to identify. # Usage: /* { dg-require-effective-target arm_arch_v5_ok } */ # /* { dg-add-options arm_arch_v5 } */ # /* { dg-require-effective-target arm_arch_v5_multilib } */ @@ -2957,7 +2959,6 @@ foreach { armfunc armflag armdef } { v4 "-march=armv4 -marm" __ARM_ARCH_4__ v6z "-march=armv6z" __ARM_ARCH_6Z__ v6m "-march=armv6-m -mthumb" __ARM_ARCH_6M__ v7a "-march=armv7-a" __ARM_ARCH_7A__ - v7ve "-march=armv7ve" __ARM_ARCH_7A__ v7r "-march=armv7-r" __ARM_ARCH_7R__ v7m "-march=armv7-m -mthumb" __ARM_ARCH_7M__ v7em "-march=armv7e-m -mthumb" __ARM_ARCH_7EM__ @@ -2992,6 +2993,26 @@ foreach { armfunc armflag armdef } { v4 "-march=armv4 -marm" __ARM_ARCH_4__ }] } +# Same functions as above but for -march=armv7ve. To uniquely identify +# -march=armv7ve we need to check for __ARM_ARCH_7A__ as well as +# __ARM_FEATURE_IDIV otherwise it aliases with armv7-a. + +proc check_effective_target_arm_arch_v7ve_ok { } { + if { [ string match "*-marm*" "-march=armv7ve" ] && + ![check_effective_target_arm_arm_ok] } { + return 0 + } + return [check_no_compiler_messages arm_arch_v7ve_ok assembly { + #if !defined (__ARM_ARCH_7A__) || !defined (__ARM_FEATURE_IDIV) + #error !armv7ve + #endif + } "-march=armv7ve" ] +} + +proc add_options_for_arm_arch_v7ve { flags } { + return "$flags -march=armv7ve" +} + # Return 1 if this is an ARM target where -marm causes ARM to be # used (not Thumb) |