From a509608c287a60934ef67b2a58dc0caa77e47dff Mon Sep 17 00:00:00 2001 From: Yvan Roux Date: Tue, 9 Feb 2016 13:56:57 +0100 Subject: Merge branches/gcc-5-branch rev 233233. Change-Id: If2cd17ed92b705b4b6468ed3da7c1bdc102a2368 --- fixincludes/ChangeLog | 7 + fixincludes/fixincl.x | 63 +++- fixincludes/inclhack.def | 14 + fixincludes/tests/base/stdio.h | 5 + gcc/ChangeLog | 284 +++++++++++++++- gcc/DATESTAMP | 2 +- gcc/ada/ChangeLog | 7 + gcc/ada/gcc-interface/trans.c | 29 +- gcc/c/ChangeLog | 15 + gcc/c/c-typeck.c | 28 ++ gcc/combine.c | 16 +- gcc/config/aarch64/aarch64-modes.def | 1 + gcc/config/aarch64/aarch64-protos.h | 1 + gcc/config/aarch64/aarch64.c | 26 ++ gcc/config/aarch64/aarch64.md | 300 ++++++++++------ gcc/config/aarch64/iterators.md | 3 + gcc/config/aarch64/predicates.md | 19 ++ gcc/config/arm/arm-builtins.c | 3 +- gcc/config/i386/constraints.md | 9 +- gcc/config/i386/i386.c | 50 ++- gcc/config/i386/sse.md | 138 +------- gcc/config/ia64/ia64.c | 11 +- gcc/config/ia64/predicates.md | 26 ++ gcc/config/rs6000/predicates.md | 13 +- gcc/config/rs6000/rs6000.c | 9 +- gcc/config/s390/s390.c | 4 + gcc/cp/ChangeLog | 35 ++ gcc/cp/method.c | 23 +- gcc/cp/optimize.c | 2 + gcc/cp/pt.c | 41 ++- gcc/cp/semantics.c | 5 +- gcc/cp/typeck.c | 14 + gcc/doc/md.texi | 2 +- gcc/fortran/ChangeLog | 71 ++++ gcc/fortran/decl.c | 13 +- gcc/fortran/invoke.texi | 2 +- gcc/fortran/primary.c | 21 +- gcc/fortran/symbol.c | 68 ++-- gcc/fortran/trans-array.c | 20 +- gcc/fortran/trans-expr.c | 176 +++++++--- gcc/fortran/trans-stmt.c | 130 +++++-- gcc/gimple-ssa-strength-reduction.c | 12 +- gcc/lra-remat.c | 79 +++-- gcc/match.pd | 3 + gcc/testsuite/ChangeLog | 309 ++++++++++++++++- gcc/testsuite/c-c++-common/vector-compare-4.c | 42 +++ gcc/testsuite/g++.dg/cpp0x/constexpr-array15.C | 29 ++ gcc/testsuite/g++.dg/cpp0x/union7.C | 15 + gcc/testsuite/g++.dg/cpp1y/parameter-pack-1.C | 23 ++ gcc/testsuite/g++.dg/cpp1y/parameter-pack-2.C | 21 ++ gcc/testsuite/g++.dg/cpp1y/var-templ47.C | 19 ++ gcc/testsuite/g++.dg/pr63995-1.C | 3 +- .../gcc.c-torture/execute/builtins/memops-asm.x | 10 + .../gcc.c-torture/execute/builtins/strstr-asm.c | 1 - .../gcc.c-torture/execute/builtins/strstr-asm.x | 10 + gcc/testsuite/gcc.c-torture/execute/pr69447.c | 26 ++ gcc/testsuite/gcc.dg/autopar/pr69110.c | 17 + gcc/testsuite/gcc.dg/autopar/pr69426.c | 19 ++ gcc/testsuite/gcc.dg/pr68513.c | 125 +++++++ gcc/testsuite/gcc.dg/pr69644.c | 11 + gcc/testsuite/gcc.dg/torture/pr69542.c | 37 ++ gcc/testsuite/gcc.dg/tree-ssa/pr67755.c | 25 ++ gcc/testsuite/gcc.dg/tree-ssa/pr69355.c | 44 +++ .../gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c | 2 +- gcc/testsuite/gcc.target/arm/pr69194.c | 13 + .../gcc.target/i386/avx512dq-vrangepd-1.c | 6 +- .../gcc.target/i386/avx512dq-vrangeps-1.c | 6 +- .../gcc.target/i386/avx512dq-vrangesd-1.c | 2 +- .../gcc.target/i386/avx512dq-vrangess-1.c | 2 +- .../gcc.target/i386/avx512f-vcvtsi2sd64-1.c | 2 +- .../gcc.target/i386/avx512f-vcvtsi2ss-1.c | 2 +- .../gcc.target/i386/avx512f-vcvtsi2ss64-1.c | 2 +- .../gcc.target/i386/avx512f-vcvtusi2sd64-1.c | 2 +- .../gcc.target/i386/avx512f-vcvtusi2ss-1.c | 2 +- .../gcc.target/i386/avx512f-vcvtusi2ss64-1.c | 2 +- .../gcc.target/i386/avx512pf-vscatterpf0dpd-1.c | 3 +- .../gcc.target/i386/avx512pf-vscatterpf0dps-1.c | 3 +- .../gcc.target/i386/avx512pf-vscatterpf0qpd-1.c | 3 +- .../gcc.target/i386/avx512pf-vscatterpf0qps-1.c | 3 +- .../gcc.target/i386/avx512pf-vscatterpf1dpd-1.c | 3 +- .../gcc.target/i386/avx512pf-vscatterpf1dps-1.c | 3 +- .../gcc.target/i386/avx512pf-vscatterpf1qpd-1.c | 3 +- .../gcc.target/i386/avx512pf-vscatterpf1qps-1.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-always_inline.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-bndret.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-builtins-1.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-builtins-2.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-builtins-3.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-builtins-4.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-const-check-1.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-const-check-2.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-hidden-def.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-label-address.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c | 3 +- .../gcc.target/i386/chkp-remove-bndint-1.c | 3 +- .../gcc.target/i386/chkp-remove-bndint-2.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-strchr.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-strlen-1.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-strlen-2.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-strlen-3.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-strlen-4.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-strlen-5.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-1.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-10.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-11.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-12.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-13.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-14.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-15.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-16.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-2.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-3.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-4.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-5.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-6.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-7.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-8.c | 3 +- gcc/testsuite/gcc.target/i386/chkp-stropt-9.c | 3 +- gcc/testsuite/gcc.target/i386/pr63995-2.c | 3 +- gcc/testsuite/gcc.target/i386/pr64805.c | 3 +- gcc/testsuite/gcc.target/i386/pr65044.c | 3 +- gcc/testsuite/gcc.target/i386/pr65167.c | 3 +- gcc/testsuite/gcc.target/i386/pr65183.c | 3 +- gcc/testsuite/gcc.target/i386/pr65184.c | 3 +- gcc/testsuite/gcc.target/i386/pr68986-1.c | 11 + gcc/testsuite/gcc.target/i386/pr68986-2.c | 13 + gcc/testsuite/gcc.target/i386/pr68986-3.c | 13 + gcc/testsuite/gcc.target/i386/pr69140.c | 24 ++ gcc/testsuite/gcc.target/i386/pr69459.c | 42 +++ gcc/testsuite/gcc.target/i386/pr69551.c | 23 ++ gcc/testsuite/gcc.target/i386/thunk-retbnd.c | 3 +- .../gcc.target/ia64/pr60465-gprel64-c37.c | 10 + gcc/testsuite/gcc.target/ia64/pr60465-gprel64.c | 27 ++ gcc/testsuite/gcc.target/powerpc/pr69548.c | 11 + gcc/testsuite/gcc.target/s390/gpr2fprsavecfi.c | 23 ++ .../gfortran.dg/alloc_comp_auto_array_3.f90 | 30 ++ .../gfortran.dg/allocatable_scalar_13.f90 | 4 +- .../gfortran.dg/allocate_with_source_14.f03 | 2 +- .../gfortran.dg/allocate_with_source_16.f90 | 26 ++ gcc/testsuite/gfortran.dg/coarray_allocate_2.f08 | 26 ++ gcc/testsuite/gfortran.dg/coarray_allocate_3.f08 | 28 ++ gcc/testsuite/gfortran.dg/coarray_allocate_4.f08 | 43 +++ gcc/testsuite/gfortran.dg/common_22.f90 | 24 ++ gcc/testsuite/gfortran.dg/common_23.f90 | 10 + .../gfortran.dg/derived_constructor_comps_6.f90 | 133 ++++++++ gcc/testsuite/gfortran.dg/pr68283.f90 | 15 + gcc/testsuite/gnat.dg/inline12.adb | 23 ++ gcc/tree-data-ref.c | 21 +- gcc/tree-parloops.c | 1 + gcc/tree-sra.c | 2 +- gcc/tree-ssa-threadupdate.c | 21 +- libcpp/po/ChangeLog | 4 + libcpp/po/fi.po | 376 ++++++++++----------- libgo/mksysinfo.sh | 27 +- libgomp/ChangeLog | 10 + libgomp/testsuite/libgomp.c/pr69110.c | 26 ++ libgomp/testsuite/libgomp.fortran/pr66680.f90 | 46 +++ libmpx/ChangeLog | 8 + libmpx/mpxrt/mpxrt.c | 4 +- libstdc++-v3/ChangeLog | 13 + .../post/x86_64-linux-gnu/x32/baseline_symbols.txt | 6 + libstdc++-v3/include/c_global/cmath | 6 +- .../testsuite/26_numerics/headers/cmath/60637.cc | 35 ++ 164 files changed, 3116 insertions(+), 833 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/vector-compare-4.c create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-array15.C create mode 100644 gcc/testsuite/g++.dg/cpp0x/union7.C create mode 100644 gcc/testsuite/g++.dg/cpp1y/parameter-pack-1.C create mode 100644 gcc/testsuite/g++.dg/cpp1y/parameter-pack-2.C create mode 100644 gcc/testsuite/g++.dg/cpp1y/var-templ47.C create mode 100644 gcc/testsuite/gcc.c-torture/execute/builtins/memops-asm.x create mode 100644 gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.x create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr69447.c create mode 100644 gcc/testsuite/gcc.dg/autopar/pr69110.c create mode 100644 gcc/testsuite/gcc.dg/autopar/pr69426.c create mode 100644 gcc/testsuite/gcc.dg/pr68513.c create mode 100644 gcc/testsuite/gcc.dg/pr69644.c create mode 100644 gcc/testsuite/gcc.dg/torture/pr69542.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr67755.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr69355.c create mode 100644 gcc/testsuite/gcc.target/arm/pr69194.c create mode 100644 gcc/testsuite/gcc.target/i386/pr68986-1.c create mode 100644 gcc/testsuite/gcc.target/i386/pr68986-2.c create mode 100644 gcc/testsuite/gcc.target/i386/pr68986-3.c create mode 100644 gcc/testsuite/gcc.target/i386/pr69140.c create mode 100644 gcc/testsuite/gcc.target/i386/pr69459.c create mode 100644 gcc/testsuite/gcc.target/i386/pr69551.c create mode 100644 gcc/testsuite/gcc.target/ia64/pr60465-gprel64-c37.c create mode 100644 gcc/testsuite/gcc.target/ia64/pr60465-gprel64.c create mode 100644 gcc/testsuite/gcc.target/powerpc/pr69548.c create mode 100644 gcc/testsuite/gcc.target/s390/gpr2fprsavecfi.c create mode 100644 gcc/testsuite/gfortran.dg/alloc_comp_auto_array_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/allocate_with_source_16.f90 create mode 100644 gcc/testsuite/gfortran.dg/coarray_allocate_2.f08 create mode 100644 gcc/testsuite/gfortran.dg/coarray_allocate_3.f08 create mode 100644 gcc/testsuite/gfortran.dg/coarray_allocate_4.f08 create mode 100644 gcc/testsuite/gfortran.dg/common_22.f90 create mode 100644 gcc/testsuite/gfortran.dg/common_23.f90 create mode 100644 gcc/testsuite/gfortran.dg/derived_constructor_comps_6.f90 create mode 100644 gcc/testsuite/gfortran.dg/pr68283.f90 create mode 100644 gcc/testsuite/gnat.dg/inline12.adb create mode 100644 libgomp/testsuite/libgomp.c/pr69110.c create mode 100644 libgomp/testsuite/libgomp.fortran/pr66680.f90 create mode 100644 libstdc++-v3/testsuite/26_numerics/headers/cmath/60637.cc diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 4e0a4c6b171..55cbe58d6e7 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,10 @@ +2016-02-01 John David Anglin + + PR target/68741 + * inclhack.def (hpux_vsscanf): New fix. + * fixincl.x: Regenerated. + * tests/base/stdio.h [HPUX_VSSCANF_CHECK]: New test. + 2015-12-04 Release Manager * GCC 5.3.0 released. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 79af6d10f55..a7d8edc313b 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -1,12 +1,12 @@ /* -*- buffer-read-only: t -*- vi: set ro: - * - *DO NOT EDIT THIS FILE (fixincl.x) - * - *It has been AutoGen-ed August 13, 2015 at 05:25:50 PM by AutoGen 5.18.3 - *From the definitions inclhack.def - *and the template file fixincl + * + * DO NOT EDIT THIS FILE (fixincl.x) + * + * It has been AutoGen-ed Monday February 1, 2016 at 03:24:02 PM EST + * From the definitions inclhack.def + * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Aug 13 17:25:50 UTC 2015 +/* DO NOT SVN-MERGE THIS FILE, EITHER Mon 1 Feb 2016 15:24:02 EST * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 230 fixup descriptions. + * This file contains 231 fixup descriptions. * * See README for more information. * @@ -4324,6 +4324,43 @@ static const char* apzHpux11_VsnprintfPatch[] = { "%1 __va_list);", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Hpux_Vsscanf fix + */ +tSCC zHpux_VsscanfName[] = + "hpux_vsscanf"; + +/* + * File name selection pattern + */ +tSCC zHpux_VsscanfList[] = + "stdio.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzHpux_VsscanfMachs[] = { + "*-*-hpux*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zHpux_VsscanfSelect0[] = + "(extern int vsscanf\\()char"; + +#define HPUX_VSSCANF_TEST_CT 1 +static tTestDesc aHpux_VsscanfTests[] = { + { TT_EGREP, zHpux_VsscanfSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Hpux_Vsscanf + */ +static const char* apzHpux_VsscanfPatch[] = { + "format", + "%1const char", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Hpux8_Bogus_Inlines fix @@ -9448,9 +9485,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 267 +#define REGEX_COUNT 268 #define MACH_LIST_SIZE_LIMIT 187 -#define FIX_COUNT 230 +#define FIX_COUNT 231 /* * Enumerate the fixes @@ -9556,6 +9593,7 @@ typedef enum { HPUX11_SIZE_T_FIXIDX, HPUX11_SNPRINTF_FIXIDX, HPUX11_VSNPRINTF_FIXIDX, + HPUX_VSSCANF_FIXIDX, HPUX8_BOGUS_INLINES_FIXIDX, HPUX_C99_INTPTR_FIXIDX, HPUX_C99_INTTYPES_FIXIDX, @@ -10189,6 +10227,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { HPUX11_VSNPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aHpux11_VsnprintfTests, apzHpux11_VsnprintfPatch, 0 }, + { zHpux_VsscanfName, zHpux_VsscanfList, + apzHpux_VsscanfMachs, + HPUX_VSSCANF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux_VsscanfTests, apzHpux_VsscanfPatch, 0 }, + { zHpux8_Bogus_InlinesName, zHpux8_Bogus_InlinesList, apzHpux8_Bogus_InlinesMachs, HPUX8_BOGUS_INLINES_TEST_CT, FD_MACH_ONLY, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index fc72add35dc..8b6d1fe3a13 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -2272,6 +2272,20 @@ fix = { ' __va__list);'; }; +/* + * Fix missing const in hpux vsscanf declaration + */ +fix = { + hackname = hpux_vsscanf; + mach = "*-*-hpux*"; + files = stdio.h; + select = '(extern int vsscanf\()char'; + c_fix = format; + c_fix_arg = "%1const char"; + + test_text = 'extern int vsscanf(char *, const char *, __va_list);'; +}; + /* * get rid of bogus inline definitions in HP-UX 8.0 */ diff --git a/fixincludes/tests/base/stdio.h b/fixincludes/tests/base/stdio.h index 275931c52cc..4ca4fafeb95 100644 --- a/fixincludes/tests/base/stdio.h +++ b/fixincludes/tests/base/stdio.h @@ -59,6 +59,11 @@ extern int vsnprintf(char *, _hpux_size_t, const char *, __gnuc_va_list); #endif /* HPUX11_VSNPRINTF_CHECK */ +#if defined( HPUX_VSSCANF_CHECK ) +extern int vsscanf(const char *, const char *, __gnuc_va_list); +#endif /* HPUX_VSSCANF_CHECK */ + + #if defined( IRIX_STDIO_DUMMY_VA_LIST_CHECK ) extern int printf( const char *, __gnuc_va_list ); #endif /* IRIX_STDIO_DUMMY_VA_LIST_CHECK */ diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 66610de4cb7..df0b22aa770 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,274 @@ +2016-02-04 Segher Boessenkool + + Backport from mainline + 2016-02-04 Segher Boessenkool + + PR rtl-optimization/64682 + PR rtl-optimization/69567 + * combine.c (distribute_notes) : Place the death note + before I2 only if the register is both used and set in I2. + +2016-02-04 Jakub Jelinek + + Backported from mainline + 2016-02-03 Jakub Jelinek + + PR target/69644 + * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap): + Force oldval into register if it does not satisfy reg_or_short_operand + predicate. Fix up formatting. + +2016-02-03 Kirill Yukhin + + PR target/69118 + * config/i386/sse.md (define_insn "avx512f_maskcmp3"): + Fix target. + +2016-02-02 Uros Bizjak + + PR target/67032 + * config/i386/i386.c (geode_cost): Increase cost of MMX and SSE moves. + +2016-02-02 Alan Modra + + PR target/69548 + * config/rs6000/predicates.md (quad_int_reg_operand): Don't + allow subregs. + +2016-02-01 H.J. Lu + + Backport from mainline + 2016-01-26 H.J. Lu + PR target/68986 + * config/i386/i386.c (ix86_compute_frame_layout): Move stack + alignment adjustment to ... + (ix86_update_stack_boundary): Here. Don't over-align stack nor + change stack_alignment_needed for __tls_get_addr. + (ix86_finalize_stack_realign_flags): Use stack_alignment_needed + if __tls_get_addr is called. + +2016-02-01 Richard Henderson + + Backport from mainline. + 2016-01-28 Richard Henderson + + PR target/69305 + * config/aarch64/aarch64-modes.def (CC_Cmode): New + * config/aarch64/aarch64-protos.h: Update. + * config/aarch64/aarch64.c (aarch64_zero_extend_const_eq): New. + (aarch64_select_cc_mode): Add check for use of CC_Cmode. + (aarch64_get_condition_code_1): Handle CC_Cmode. + * config/aarch64/aarch64.md (addti3): Use adddi3_compareC. + (*add3_compareC_cconly_imm): New. + (*add3_compareC_cconly): New. + (*add3_compareC_imm): New. + (add3_compareC): New. + (add3_carryin, *addsi3_carryin_uxtw): Sort compare operand + to be first. Use aarch64_carry_operation. + (*add3_carryin_alt1, *addsi3_carryin_alt1_uxtw): Remove. + (*add3_carryin_alt2, *addsi3_carryin_alt2_uxtw): Remove. + (*add3_carryin_alt3, *addsi3_carryin_alt3_uxtw): Remove. + (subti3): Use subdi3_compare1. + (*sub3_compare0): Rename from sub3_compare0. + (sub3_compare1): New. + (*sub3_carryin0, *subsi3_carryin_uxtw): New. + (*sub3_carryin): Use aarch64_borrow_operation. + (*subsi3_carryin_uxtw): Likewise. + (*ngc, *ngcsi_uxtw): Likewise. + (*sub3_carryin_alt, *subsi3_carryin_alt_uxtw): New. + * config/aarch64/iterators.md (DWI): New. + * config/aarch64/predicates.md (aarch64_carry_operation): New. + (aarch64_borrow_operation): New. + +2016-01-29 Uros Bizjak + + PR target/69459 + * config/i386/constraints.md (C): Only accept constant zero operand. + (BC): New constraint. + * config/i386/sse.md (*mov_internal): Use BC constraint + instead of C constraint. + * doc/md.texi (Machine Constraints): Update description + of C constraint. + +2016-01-29 Jakub Jelinek + + PR target/69551 + * config/i386/i386.c (ix86_expand_vector_set) : For + SSE1, copy target into the temporary reg first before recursing + on it. + +2016-01-28 Jakub Jelinek + + PR middle-end/69542 + * lra-remat.c (calculate_local_reg_remat_bb_data): Only consider + non-debug insns. + +2016-01-28 Richard Henderson + + PR rtl-opt/69447 + * lra-remat.c (subreg_regs): New. + (dump_candidates_and_remat_bb_data): Dump it. + (operand_to_remat): Reject if operand in subreg_regs. + (set_bb_regs): Collect subreg_regs. + (lra_remat): Init and free subreg_regs. Compute + calculate_local_reg_remat_bb_data before create_cands. + +2016-01-28 Martin Jambor + + PR tree-optimization/69355 + * tree-sra.c (analyze_access_subtree): Correct hole detection when + total_scalarization fails. + +2016-01-26 Tom de Vries + + PR tree-optimization/69110 + * tree-data-ref.c (initialize_data_dependence_relation): Handle + DR_NUM_DIMENSIONS == 0. + +2016-01-26 Eric Botcazou + + * config/ia64/ia64.c (ia64_expand_vecint_compare): Use gen_int_mode. + +2016-01-23 Tom de Vries + + PR tree-optimization/69426 + * tree-parloops.c (eliminate_local_variables_stmt): Handle vdef of + removed clobber. + +2016-01-22 Kyrylo Tkachov + + Backport from mainline + 2016-01-22 Kyrylo Tkachov + + PR target/69403 + * config/arm/thumb2.md (*thumb2_ior_scc_strict_it): Convert to + define_insn_and_split. Ensure operands[1] and operands[0] do not + get assigned the same register. + +2016-01-21 Andreas Krebbel + + Backported from mainline + 2015-07-24 Andreas Krebbel + + * config/s390/s390.c (s390_save_gprs_to_fprs): Add CFA_REGISTER + reg note to the GPR -> FPR save instructions. + +2016-01-21 Thomas Preud'homme + + Backport from mainline + 2016-01-08 Thomas Preud'homme + + PR tree-optimization/67781 + * tree-ssa-math-opts.c (find_bswap_or_nop): Zero out bytes in cmpxchg + and cmpnop in two steps: first the ones not accessed in original + gimple expression in a endian independent way and then the ones not + accessed in the final result in an endian-specific way. + +2016-01-20 Marek Polacek + + PR c/68513 + * match.pd ((x & ~m) | (y & m)): Only perform on GIMPLE. + +2016-01-19 Sergei Trofimovich + + Backport from mainline + PR other/60465 + * config/ia64/ia64.c (ia64_expand_load_address): Use gprel64 + for local symbolic operands. + * config/ia64/predicates.md (local_symbolic_operand64): New + predicate. + +2016-01-19 Jeff Law + + Backport from mainline + 2016-01-12 Jeff Law + + PR tree-optimization/pr67755 + * tree-ssa-threadupdate.c (struct ssa_local_info_t): Add new field + "need_profile_correction". + (thread_block_1): Initialize new field to false by default. If we + have multiple thread paths through a common joiner to different + final targets, then set new field to true. + (compute_path_counts): Only do count adjustment when it's really + needed. + +2016-01-19 Kyrylo Tkachov + + Backport from mainline + 2016-01-19 Kyrylo Tkachov + + PR target/69135 + * config/arm/vfp.md (lsi2): Set "conds" + attribute to unconditional. Remove %? from output template. + +2016-01-18 Alexander Fomin + + Backport from mainline + 2015-10-09 Alexander Fomin + + PR target/67895 + * config/i386/sse.md (define_insn "sse_cvtsi2ss"): + Adjust embedded rounding/SAE specifier position. + (define_insn "sse_cvtsi2ssq"): Likewise. + (define_insn "cvtusi232"): Likewise. + (define_insn "cvtusi264"): Likewise. + (define_insn "sse2_cvtsi2sdq"): Likewise. + (define_insn "avx512dq_rangep"): + Likewise. + (define_insn "avx512dq_ranges"): Likewise. + +2016-01-18 Uros Bizjak + + Backport from mainline + 2016-01-07 Uros Bizjak + + PR target/69140 + * config/i386/i386.c (ix86_frame_pointer_required): Enable + frame pointer for TARGET_64BIT_MS_ABI when stack is misaligned. + +2016-01-17 Bill Schmidt + + Backport from mainline: + 2016-01-17 Bill Schmidt + + PR tree-optimization/68799 + * gimple-ssa-strength-reduction.c (create_phi_basis): Directly + look up phi candidates in the statement-candidate map. + (phi_add_costs): Likewise. + (record_phi_increments): Likewise. + (phi_incr_cost): Likewise. + (ncd_with_phi): Likewise. + (all_phi_incrs_profitable): Likewise. + +2016-01-17 Kugan Vivekanandarajah + + Backport from mainline + 2016-01-12 Kugan Vivekanandarajah + Jim Wilson + + PR target/69194 + * config/arm/arm-builtins.c (arm_expand_neon_args): Call + copy_to_mode_reg instead of force_reg. + +2016-01-15 Alexander Fomin + + Backport from mainline + 2016-01-13 Alexander Fomin + + PR target/69228 + * config/i386/sse.md (define_expand "avx512pf_gatherpfsf"): + Change first operand predicate from register_or_constm1_operand + to register_operand. + (define_expand "avx512pf_gatherpfdf"): Likewise. + (define_expand "avx512pf_scatterpfsf"): Likewise. + (define_expand "avx512pf_scatterpfdf"): Likewise. + (define_insn "*avx512pf_gatherpfsf"): Remove. + (define_insn "*avx512pf_gatherpfdf"): Likewise. + (define_insn "*avx512pf_scatterpfsf"): Likewise. + (define_insn "*avx512pf_scatterpfdf"): Likewise. + * config/i386/i386.c (ix86_expand_builtin): Remove first operand + comparison with constm1_rtx from vec_prefetch_gen part. + 2016-01-13 Richard Biener PR tree-optimization/69013 @@ -138,7 +409,8 @@ 2015-12-02 Andreas Krebbel * config/s390/predicates.md (const_mask_operand): New predicate. - * config/s390/s390-builtins.def: Set a smaller bitmask for a few builtins. + * config/s390/s390-builtins.def: Set a smaller bitmask for a + few builtins. * config/s390/vector.md: Change predicate from immediate_operand to either const_int_operand or const_mask_operand. Add special insn conditions on patterns which have to exclude certain values. @@ -272,7 +544,7 @@ 2015-12-14 James Greenhalgh Backport from mainline. - 2015-12-09 James Greenhalgh + 2015-12-09 James Greenhalgh PR rtl-optimization/67609 * config/aarch64/aarch64-protos.h @@ -411,7 +683,7 @@ Backport from mainline 2015-09-30 Bernd Edlinger - PR rtl-optimization/67037 + PR rtl-optimization/67037 * lra-constraints.c (process_addr_reg): Use copy_rtx when necessary. 2015-11-26 David Edelsohn @@ -683,12 +955,12 @@ (contains_type_p): Fix out of range check, clear dynamic flag. 2015-10-23 Jan Hubicka - + PR ipa/pr67600 * ipa-polymorphic-call.c (ipa_polymorphic_call_context::get_dynamic_type): Do not confuse instance offset with offset of outer type. - + 2015-10-12 Richard Biener PR ipa/67783 @@ -697,7 +969,7 @@ quadratic behavior. 2015-10-11 Jan Hubicka - + PR ipa/67056 * ipa-polymorphic-call.c (possible_placement_new): If cur_offset is negative we don't know the type. diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 17164ba836e..4af6ae4a9d5 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20160113 +20160209 diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 606a9cebdfe..867f7915e2e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2016-01-18 Eric Botcazou + + PR ada/69219 + * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider + the parent function instead of the current function in order to issue + the warning or the error. Add guard for ignored functions. + 2015-12-06 Piotr Trojanek PR ada/60164 diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 1e4d3734b62..d1429894484 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -1502,7 +1502,7 @@ Pragma_to_gnu (Node_Id gnat_node) } -/* Check the inlining status of nested function FNDECL in the current context. +/* Check the inline status of nested function FNDECL wrt its parent function. If a non-inline nested function is referenced from an inline external function, we cannot honor both requests at the same time without cloning @@ -1510,24 +1510,27 @@ Pragma_to_gnu (Node_Id gnat_node) We could inline it as well but it's probably better to err on the side of too little inlining. - This must be invoked only on nested functions present in the source code + This must be done only on nested functions present in the source code and not on nested functions generated by the compiler, e.g. finalizers, - because they are not marked inline and we don't want them to block the - inlining of the parent function. */ + because they may be not marked inline and we don't want them to block + the inlining of the parent function. */ static void check_inlining_for_nested_subprog (tree fndecl) { - if (!DECL_DECLARED_INLINE_P (fndecl) - && current_function_decl - && DECL_EXTERNAL (current_function_decl) - && DECL_DECLARED_INLINE_P (current_function_decl)) + if (DECL_IGNORED_P (current_function_decl) || DECL_IGNORED_P (fndecl)) + return; + + if (DECL_DECLARED_INLINE_P (fndecl)) + return; + + tree parent_decl = decl_function_context (fndecl); + if (DECL_EXTERNAL (parent_decl) && DECL_DECLARED_INLINE_P (parent_decl)) { const location_t loc1 = DECL_SOURCE_LOCATION (fndecl); - const location_t loc2 = DECL_SOURCE_LOCATION (current_function_decl); + const location_t loc2 = DECL_SOURCE_LOCATION (parent_decl); - if (lookup_attribute ("always_inline", - DECL_ATTRIBUTES (current_function_decl))) + if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (parent_decl))) { error_at (loc1, "subprogram %q+F not marked Inline_Always", fndecl); error_at (loc2, "parent subprogram cannot be inlined"); @@ -1539,8 +1542,8 @@ check_inlining_for_nested_subprog (tree fndecl) warning_at (loc2, OPT_Winline, "parent subprogram cannot be inlined"); } - DECL_DECLARED_INLINE_P (current_function_decl) = 0; - DECL_UNINLINABLE (current_function_decl) = 1; + DECL_DECLARED_INLINE_P (parent_decl) = 0; + DECL_UNINLINABLE (parent_decl) = 1; } } diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index dde89d5df39..dbbcb73d399 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,18 @@ +2016-01-28 Marek Polacek + + * c-typeck.c (build_binary_op) [GE_EXPR]: Move the duplicated hunk of + code... + (build_binary_op) [EQ_EXPR]: ... here. + +2016-01-27 Marek Polacek + + Backport from mainline + 2016-01-27 Marek Polacek + + PR c/68062 + * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand + to unsigned, if needed. Add -Wsign-compare warning. + 2015-12-30 Joseph Myers PR c/69037 diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index 466326db00d..8eb60351868 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -10754,6 +10754,20 @@ build_binary_op (location_t location, enum tree_code code, return error_mark_node; } + /* It's not precisely specified how the usual arithmetic + conversions apply to the vector types. Here, we use + the unsigned type if one of the operands is signed and + the other one is unsigned. */ + if (TYPE_UNSIGNED (type0) != TYPE_UNSIGNED (type1)) + { + if (!TYPE_UNSIGNED (type0)) + op0 = build1 (VIEW_CONVERT_EXPR, type1, op0); + else + op1 = build1 (VIEW_CONVERT_EXPR, type0, op1); + warning_at (location, OPT_Wsign_compare, "comparison between " + "types %qT and %qT", type0, type1); + } + /* Always construct signed integer vector type. */ intt = c_common_type_for_size (GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (type0))), 0); @@ -10896,6 +10910,20 @@ build_binary_op (location_t location, enum tree_code code, return error_mark_node; } + /* It's not precisely specified how the usual arithmetic + conversions apply to the vector types. Here, we use + the unsigned type if one of the operands is signed and + the other one is unsigned. */ + if (TYPE_UNSIGNED (type0) != TYPE_UNSIGNED (type1)) + { + if (!TYPE_UNSIGNED (type0)) + op0 = build1 (VIEW_CONVERT_EXPR, type1, op0); + else + op1 = build1 (VIEW_CONVERT_EXPR, type0, op1); + warning_at (location, OPT_Wsign_compare, "comparison between " + "types %qT and %qT", type0, type1); + } + /* Always construct signed integer vector type. */ intt = c_common_type_for_size (GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (type0))), 0); diff --git a/gcc/combine.c b/gcc/combine.c index c903db2c8b0..b059469a8e1 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -13821,6 +13821,7 @@ distribute_notes (rtx notes, rtx_insn *from_insn, rtx_insn *i3, rtx_insn *i2, tem_insn = from_insn; else { + tem_insn = i3; if (from_insn && CALL_P (from_insn) && find_reg_fusage (from_insn, USE, XEXP (note, 0))) @@ -13829,7 +13830,14 @@ distribute_notes (rtx notes, rtx_insn *from_insn, rtx_insn *i3, rtx_insn *i2, place = i3; else if (i2 != 0 && next_nonnote_nondebug_insn (i2) == i3 && reg_referenced_p (XEXP (note, 0), PATTERN (i2))) - place = i2; + { + place = i2; + /* If the new I2 sets the same register that is marked dead + in the note, the note now should not be put on I2, as the + note refers to a previous incarnation of the reg. */ + if (reg_set_p (XEXP (note, 0), PATTERN (i2))) + tem_insn = i2; + } else if ((rtx_equal_p (XEXP (note, 0), elim_i2) && !(i2mod && reg_overlap_mentioned_p (XEXP (note, 0), @@ -13837,12 +13845,6 @@ distribute_notes (rtx notes, rtx_insn *from_insn, rtx_insn *i3, rtx_insn *i2, || rtx_equal_p (XEXP (note, 0), elim_i1) || rtx_equal_p (XEXP (note, 0), elim_i0)) break; - tem_insn = i3; - /* If the new I2 sets the same register that is marked dead - in the note, the note now should not be put on I2, as the - note refers to a previous incarnation of the reg. */ - if (i2 != 0 && reg_set_p (XEXP (note, 0), PATTERN (i2))) - tem_insn = i2; } if (place == 0) diff --git a/gcc/config/aarch64/aarch64-modes.def b/gcc/config/aarch64/aarch64-modes.def index 3bf3b2dea3c..361a93e9de1 100644 --- a/gcc/config/aarch64/aarch64-modes.def +++ b/gcc/config/aarch64/aarch64-modes.def @@ -25,6 +25,7 @@ CC_MODE (CC_ZESWP); /* zero-extend LHS (but swap to make it RHS). */ CC_MODE (CC_SESWP); /* sign-extend LHS (but swap to make it RHS). */ CC_MODE (CC_NZ); /* Only N and Z bits of condition flags are valid. */ CC_MODE (CC_Z); /* Only Z bit of condition flags is valid. */ +CC_MODE (CC_C); /* Only C bit of condition flags is valid. */ CC_MODE (CC_DNE); CC_MODE (CC_DEQ); CC_MODE (CC_DLE); diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index 91ea8fa0ff0..338b5ae9b22 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -268,6 +268,7 @@ void aarch64_declare_function_name (FILE *, const char*, tree); bool aarch64_legitimate_pic_operand_p (rtx); bool aarch64_modes_tieable_p (machine_mode mode1, machine_mode mode2); +bool aarch64_zero_extend_const_eq (machine_mode, rtx, machine_mode, rtx); bool aarch64_move_imm (HOST_WIDE_INT, machine_mode); bool aarch64_mov_operand_p (rtx, machine_mode); int aarch64_simd_attr_length_rglist (enum machine_mode); diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 4189c6630a5..7ade6235dc2 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -1415,6 +1415,16 @@ aarch64_split_simd_move (rtx dst, rtx src) } } +bool +aarch64_zero_extend_const_eq (machine_mode xmode, rtx x, + machine_mode ymode, rtx y) +{ + rtx r = simplify_const_unary_operation (ZERO_EXTEND, xmode, y, ymode); + gcc_assert (r != NULL); + return rtx_equal_p (x, r); +} + + static rtx aarch64_force_temporary (machine_mode mode, rtx x, rtx value) { @@ -3915,6 +3925,13 @@ aarch64_select_cc_mode (RTX_CODE code, rtx x, rtx y) return ((code == GT || code == GE || code == LE || code == LT) ? CC_SESWPmode : CC_ZESWPmode); + /* A test for unsigned overflow. */ + if ((GET_MODE (x) == DImode || GET_MODE (x) == TImode) + && code == NE + && GET_CODE (x) == PLUS + && GET_CODE (y) == ZERO_EXTEND) + return CC_Cmode; + /* For everything else, return CCmode. */ return CCmode; } @@ -4065,6 +4082,15 @@ aarch64_get_condition_code_1 (enum machine_mode mode, enum rtx_code comp_code) } break; + case CC_Cmode: + switch (comp_code) + { + case NE: return AARCH64_CS; + case EQ: return AARCH64_CC; + default: return -1; + } + break; + default: return -1; break; diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index e946b23ec52..cdf7b482f74 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -1703,7 +1703,7 @@ "" { rtx low = gen_reg_rtx (DImode); - emit_insn (gen_adddi3_compare0 (low, gen_lowpart (DImode, operands[1]), + emit_insn (gen_adddi3_compareC (low, gen_lowpart (DImode, operands[1]), gen_lowpart (DImode, operands[2]))); rtx high = gen_reg_rtx (DImode); @@ -1748,6 +1748,71 @@ [(set_attr "type" "alus_sreg,alus_imm,alus_imm")] ) +(define_insn "*add3_compareC_cconly_imm" + [(set (reg:CC_C CC_REGNUM) + (ne:CC_C + (plus: + (zero_extend: (match_operand:GPI 0 "register_operand" "r,r")) + (match_operand: 2 "const_scalar_int_operand" "")) + (zero_extend: + (plus:GPI + (match_dup 0) + (match_operand:GPI 1 "aarch64_plus_immediate" "I,J")))))] + "aarch64_zero_extend_const_eq (mode, operands[2], + mode, operands[1])" + "@ + cmn\\t%0, %1 + cmp\\t%0, #%n1" + [(set_attr "type" "alus_imm")] +) + +(define_insn "*add3_compareC_cconly" + [(set (reg:CC_C CC_REGNUM) + (ne:CC_C + (plus: + (zero_extend: (match_operand:GPI 0 "register_operand" "r")) + (zero_extend: (match_operand:GPI 1 "register_operand" "r"))) + (zero_extend: (plus:GPI (match_dup 0) (match_dup 1)))))] + "" + "cmn\\t%0, %1" + [(set_attr "type" "alus_sreg")] +) + +(define_insn "*add3_compareC_imm" + [(set (reg:CC_C CC_REGNUM) + (ne:CC_C + (plus: + (zero_extend: (match_operand:GPI 1 "register_operand" "r,r")) + (match_operand: 3 "const_scalar_int_operand" "")) + (zero_extend: + (plus:GPI + (match_dup 1) + (match_operand:GPI 2 "aarch64_plus_immediate" "I,J"))))) + (set (match_operand:GPI 0 "register_operand" "=r,r") + (plus:GPI (match_dup 1) (match_dup 2)))] + "aarch64_zero_extend_const_eq (mode, operands[3], + mode, operands[2])" + "@ + adds\\t%0, %1, %2 + subs\\t%0, %1, #%n2" + [(set_attr "type" "alus_imm")] +) + +(define_insn "add3_compareC" + [(set (reg:CC_C CC_REGNUM) + (ne:CC_C + (plus: + (zero_extend: (match_operand:GPI 1 "register_operand" "r")) + (zero_extend: (match_operand:GPI 2 "register_operand" "r"))) + (zero_extend: + (plus:GPI (match_dup 1) (match_dup 2))))) + (set (match_operand:GPI 0 "register_operand" "=r") + (plus:GPI (match_dup 1) (match_dup 2)))] + "" + "adds\\t%0, %1, %2" + [(set_attr "type" "alus_sreg")] +) + (define_insn "*adds_shift_imm_" [(set (reg:CC_NZ CC_REGNUM) (compare:CC_NZ @@ -2067,105 +2132,41 @@ [(set_attr "type" "alu_ext")] ) -(define_insn "add3_carryin" - [(set - (match_operand:GPI 0 "register_operand" "=r") - (plus:GPI (geu:GPI (reg:CC CC_REGNUM) (const_int 0)) - (plus:GPI - (match_operand:GPI 1 "register_operand" "r") - (match_operand:GPI 2 "register_operand" "r"))))] - "" - "adc\\t%0, %1, %2" - [(set_attr "type" "adc_reg")] -) - -;; zero_extend version of above -(define_insn "*addsi3_carryin_uxtw" - [(set - (match_operand:DI 0 "register_operand" "=r") - (zero_extend:DI - (plus:SI (geu:SI (reg:CC CC_REGNUM) (const_int 0)) - (plus:SI - (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "register_operand" "r")))))] - "" - "adc\\t%w0, %w1, %w2" - [(set_attr "type" "adc_reg")] -) - -(define_insn "*add3_carryin_alt1" - [(set - (match_operand:GPI 0 "register_operand" "=r") - (plus:GPI (plus:GPI - (match_operand:GPI 1 "register_operand" "r") - (match_operand:GPI 2 "register_operand" "r")) - (geu:GPI (reg:CC CC_REGNUM) (const_int 0))))] +(define_expand "add3_carryin" + [(set (match_operand:GPI 0 "register_operand") + (plus:GPI + (plus:GPI + (ne:GPI (reg:CC_C CC_REGNUM) (const_int 0)) + (match_operand:GPI 1 "aarch64_reg_or_zero")) + (match_operand:GPI 2 "aarch64_reg_or_zero")))] "" - "adc\\t%0, %1, %2" - [(set_attr "type" "adc_reg")] -) - -;; zero_extend version of above -(define_insn "*addsi3_carryin_alt1_uxtw" - [(set - (match_operand:DI 0 "register_operand" "=r") - (zero_extend:DI - (plus:SI (plus:SI - (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "register_operand" "r")) - (geu:SI (reg:CC CC_REGNUM) (const_int 0)))))] "" - "adc\\t%w0, %w1, %w2" - [(set_attr "type" "adc_reg")] ) -(define_insn "*add3_carryin_alt2" - [(set - (match_operand:GPI 0 "register_operand" "=r") - (plus:GPI (plus:GPI - (geu:GPI (reg:CC CC_REGNUM) (const_int 0)) - (match_operand:GPI 1 "register_operand" "r")) - (match_operand:GPI 2 "register_operand" "r")))] - "" - "adc\\t%0, %1, %2" - [(set_attr "type" "adc_reg")] -) +;; Note that add with carry with two zero inputs is matched by cset, +;; and that add with carry with one zero input is matched by cinc. -;; zero_extend version of above -(define_insn "*addsi3_carryin_alt2_uxtw" - [(set - (match_operand:DI 0 "register_operand" "=r") - (zero_extend:DI - (plus:SI (plus:SI - (geu:SI (reg:CC CC_REGNUM) (const_int 0)) - (match_operand:SI 1 "register_operand" "r")) - (match_operand:SI 2 "register_operand" "r"))))] - "" - "adc\\t%w0, %w1, %w2" - [(set_attr "type" "adc_reg")] -) - -(define_insn "*add3_carryin_alt3" - [(set - (match_operand:GPI 0 "register_operand" "=r") - (plus:GPI (plus:GPI - (geu:GPI (reg:CC CC_REGNUM) (const_int 0)) - (match_operand:GPI 2 "register_operand" "r")) - (match_operand:GPI 1 "register_operand" "r")))] +(define_insn "*add3_carryin" + [(set (match_operand:GPI 0 "register_operand" "=r") + (plus:GPI + (plus:GPI + (match_operand:GPI 3 "aarch64_carry_operation" "") + (match_operand:GPI 1 "register_operand" "r")) + (match_operand:GPI 2 "register_operand" "r")))] "" "adc\\t%0, %1, %2" [(set_attr "type" "adc_reg")] ) ;; zero_extend version of above -(define_insn "*addsi3_carryin_alt3_uxtw" - [(set - (match_operand:DI 0 "register_operand" "=r") - (zero_extend:DI - (plus:SI (plus:SI - (geu:SI (reg:CC CC_REGNUM) (const_int 0)) - (match_operand:SI 2 "register_operand" "r")) - (match_operand:SI 1 "register_operand" "r"))))] +(define_insn "*addsi3_carryin_uxtw" + [(set (match_operand:DI 0 "register_operand" "=r") + (zero_extend:DI + (plus:SI + (plus:SI + (match_operand:SI 3 "aarch64_carry_operation" "") + (match_operand:SI 1 "register_operand" "r")) + (match_operand:SI 2 "register_operand" "r"))))] "" "adc\\t%w0, %w1, %w2" [(set_attr "type" "adc_reg")] @@ -2274,7 +2275,7 @@ "" { rtx low = gen_reg_rtx (DImode); - emit_insn (gen_subdi3_compare0 (low, gen_lowpart (DImode, operands[1]), + emit_insn (gen_subdi3_compare1 (low, gen_lowpart (DImode, operands[1]), gen_lowpart (DImode, operands[2]))); rtx high = gen_reg_rtx (DImode); @@ -2286,7 +2287,7 @@ DONE; }) -(define_insn "sub3_compare0" +(define_insn "*sub3_compare0" [(set (reg:CC_NZ CC_REGNUM) (compare:CC_NZ (minus:GPI (match_operand:GPI 1 "register_operand" "r") (match_operand:GPI 2 "register_operand" "r")) @@ -2311,6 +2312,18 @@ [(set_attr "type" "alus_sreg")] ) +(define_insn "sub3_compare1" + [(set (reg:CC CC_REGNUM) + (compare:CC + (match_operand:GPI 1 "aarch64_reg_or_zero" "rZ") + (match_operand:GPI 2 "aarch64_reg_or_zero" "rZ"))) + (set (match_operand:GPI 0 "register_operand" "=r") + (minus:GPI (match_dup 1) (match_dup 2)))] + "" + "subs\\t%0, %1, %2" + [(set_attr "type" "alus_sreg")] +) + (define_insn "*sub__" [(set (match_operand:GPI 0 "register_operand" "=r") (minus:GPI (match_operand:GPI 3 "register_operand" "r") @@ -2433,13 +2446,53 @@ [(set_attr "type" "alu_ext")] ) -(define_insn "sub3_carryin" - [(set - (match_operand:GPI 0 "register_operand" "=r") - (minus:GPI (minus:GPI - (match_operand:GPI 1 "register_operand" "r") - (ltu:GPI (reg:CC CC_REGNUM) (const_int 0))) - (match_operand:GPI 2 "register_operand" "r")))] +;; The hardware description is op1 + ~op2 + C. +;; = op1 + (-op2 + 1) + (1 - !C) +;; = op1 - op2 - 1 + 1 - !C +;; = op1 - op2 - !C. +;; We describe the latter. + +(define_insn "*sub3_carryin0" + [(set (match_operand:GPI 0 "register_operand" "=r") + (minus:GPI + (match_operand:GPI 1 "aarch64_reg_or_zero" "rZ") + (match_operand:GPI 2 "aarch64_borrow_operation" "")))] + "" + "sbc\\t%0, %1, zr" + [(set_attr "type" "adc_reg")] +) + +;; zero_extend version of the above +(define_insn "*subsi3_carryin_uxtw" + [(set (match_operand:DI 0 "register_operand" "=r") + (zero_extend:DI + (minus:SI + (match_operand:SI 1 "aarch64_reg_or_zero" "rZ") + (match_operand:SI 2 "aarch64_borrow_operation" ""))))] + "" + "sbc\\t%w0, %w1, wzr" + [(set_attr "type" "adc_reg")] +) + +(define_expand "sub3_carryin" + [(set (match_operand:GPI 0 "register_operand") + (minus:GPI + (minus:GPI + (match_operand:GPI 1 "aarch64_reg_or_zero") + (match_operand:GPI 2 "register_operand")) + (ltu:GPI (reg:CC CC_REGNUM) (const_int 0))))] + "" + "" +) + +(define_insn "*sub3_carryin" + [(set (match_operand:GPI 0 "register_operand" "=r") + (minus:GPI + (minus:GPI + (match_operand:GPI 1 "aarch64_reg_or_zero" "rZ") + (match_operand:GPI 2 "register_operand" "r")) + (match_operand:GPI 3 "aarch64_borrow_operation" "")))] + "" "sbc\\t%0, %1, %2" [(set_attr "type" "adc_reg")] @@ -2447,13 +2500,40 @@ ;; zero_extend version of the above (define_insn "*subsi3_carryin_uxtw" - [(set - (match_operand:DI 0 "register_operand" "=r") - (zero_extend:DI - (minus:SI (minus:SI - (match_operand:SI 1 "register_operand" "r") - (ltu:SI (reg:CC CC_REGNUM) (const_int 0))) - (match_operand:SI 2 "register_operand" "r"))))] + [(set (match_operand:DI 0 "register_operand" "=r") + (zero_extend:DI + (minus:SI + (minus:SI + (match_operand:SI 1 "aarch64_reg_or_zero" "rZ") + (match_operand:SI 2 "register_operand" "r")) + (match_operand:SI 3 "aarch64_borrow_operation" ""))))] + + "" + "sbc\\t%w0, %w1, %w2" + [(set_attr "type" "adc_reg")] +) + +(define_insn "*sub3_carryin_alt" + [(set (match_operand:GPI 0 "register_operand" "=r") + (minus:GPI + (minus:GPI + (match_operand:GPI 1 "aarch64_reg_or_zero" "rZ") + (match_operand:GPI 3 "aarch64_borrow_operation" "")) + (match_operand:GPI 2 "register_operand" "r")))] + "" + "sbc\\t%0, %1, %2" + [(set_attr "type" "adc_reg")] +) + +;; zero_extend version of the above +(define_insn "*subsi3_carryin_alt_uxtw" + [(set (match_operand:DI 0 "register_operand" "=r") + (zero_extend:DI + (minus:SI + (minus:SI + (match_operand:SI 1 "aarch64_reg_or_zero" "rZ") + (match_operand:SI 3 "aarch64_borrow_operation" "")) + (match_operand:SI 2 "register_operand" "r"))))] "" "sbc\\t%w0, %w1, %w2" [(set_attr "type" "adc_reg")] @@ -2557,8 +2637,9 @@ (define_insn "*ngc" [(set (match_operand:GPI 0 "register_operand" "=r") - (minus:GPI (neg:GPI (ltu:GPI (reg:CC CC_REGNUM) (const_int 0))) - (match_operand:GPI 1 "register_operand" "r")))] + (minus:GPI + (neg:GPI (match_operand:GPI 2 "aarch64_borrow_operation" "")) + (match_operand:GPI 1 "register_operand" "r")))] "" "ngc\\t%0, %1" [(set_attr "type" "adc_reg")] @@ -2567,8 +2648,9 @@ (define_insn "*ngcsi_uxtw" [(set (match_operand:DI 0 "register_operand" "=r") (zero_extend:DI - (minus:SI (neg:SI (ltu:SI (reg:CC CC_REGNUM) (const_int 0))) - (match_operand:SI 1 "register_operand" "r"))))] + (minus:SI + (neg:SI (match_operand:SI 2 "aarch64_borrow_operation" "")) + (match_operand:SI 1 "register_operand" "r"))))] "" "ngc\\t%w0, %w1" [(set_attr "type" "adc_reg")] diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md index 4167c0ec2bf..ecc1de4dffd 100644 --- a/gcc/config/aarch64/iterators.md +++ b/gcc/config/aarch64/iterators.md @@ -347,6 +347,9 @@ ;; For constraints used in scalar immediate vector moves (define_mode_attr hq [(HI "h") (QI "q")]) +;; For doubling width of an integer mode +(define_mode_attr DWI [(QI "HI") (HI "SI") (SI "DI") (DI "TI")]) + ;; For scalar usage of vector/FP registers (define_mode_attr v [(QI "b") (HI "h") (SI "s") (DI "d") (SF "s") (DF "d") diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md index cd235acf73a..fe649041017 100644 --- a/gcc/config/aarch64/predicates.md +++ b/gcc/config/aarch64/predicates.md @@ -252,6 +252,25 @@ return aarch64_get_condition_code (op) >= 0; }) +(define_special_predicate "aarch64_carry_operation" + (match_code "ne,geu") +{ + if (XEXP (op, 1) != const0_rtx) + return false; + machine_mode ccmode = (GET_CODE (op) == NE ? CC_Cmode : CCmode); + rtx op0 = XEXP (op, 0); + return REG_P (op0) && REGNO (op0) == CC_REGNUM && GET_MODE (op0) == ccmode; +}) + +(define_special_predicate "aarch64_borrow_operation" + (match_code "eq,ltu") +{ + if (XEXP (op, 1) != const0_rtx) + return false; + machine_mode ccmode = (GET_CODE (op) == EQ ? CC_Cmode : CCmode); + rtx op0 = XEXP (op, 0); + return REG_P (op0) && REGNO (op0) == CC_REGNUM && GET_MODE (op0) == ccmode; +}) ;; True if the operand is memory reference suitable for a load/store exclusive. (define_predicate "aarch64_sync_memory_operand" diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c index a70cb536792..9c3a7e2dc7e 100644 --- a/gcc/config/arm/arm-builtins.c +++ b/gcc/config/arm/arm-builtins.c @@ -2151,7 +2151,8 @@ constant_arg: if (!(*insn_data[icode].operand[opno].predicate) (op[argc], mode[argc])) op[argc] = (replace_equiv_address - (op[argc], force_reg (Pmode, XEXP (op[argc], 0)))); + (op[argc], + copy_to_mode_reg (Pmode, XEXP (op[argc], 0)))); break; case NEON_ARG_STOP: diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md index 2271bd168e7..00a84a03885 100644 --- a/gcc/config/i386/constraints.md +++ b/gcc/config/i386/constraints.md @@ -149,6 +149,7 @@ ;; s Sibcall memory operand, not valid for TARGET_X32 ;; w Call memory operand, not valid for TARGET_X32 ;; z Constant call address operand. +;; C SSE constant operand. (define_constraint "Bs" "@internal Sibcall memory operand." @@ -164,6 +165,10 @@ "@internal Constant call address operand." (match_operand 0 "constant_call_address_operand")) +(define_constraint "BC" + "@internal SSE constant operand." + (match_test "standard_sse_constant_p (op)")) + ;; Integer constant constraints. (define_constraint "I" "Integer constant in the range 0 @dots{} 31, for 32-bit shifts." @@ -214,8 +219,8 @@ ;; This can theoretically be any mode's CONST0_RTX. (define_constraint "C" - "Standard SSE floating point constant." - (match_test "standard_sse_constant_p (op)")) + "SSE constant zero operand." + (match_test "standard_sse_constant_p (op) == 1")) ;; Constant-or-symbol-reference constraints. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 4e7ae91a743..45deba124fd 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -562,17 +562,17 @@ struct processor_costs geode_cost = { {4, 6, 6}, /* cost of storing fp registers in SFmode, DFmode and XFmode */ - 1, /* cost of moving MMX register */ - {1, 1}, /* cost of loading MMX registers + 2, /* cost of moving MMX register */ + {2, 2}, /* cost of loading MMX registers in SImode and DImode */ - {1, 1}, /* cost of storing MMX registers + {2, 2}, /* cost of storing MMX registers in SImode and DImode */ - 1, /* cost of moving SSE register */ - {1, 1, 1}, /* cost of loading SSE registers + 2, /* cost of moving SSE register */ + {2, 2, 8}, /* cost of loading SSE registers in SImode, DImode and TImode */ - {1, 1, 1}, /* cost of storing SSE registers + {2, 2, 8}, /* cost of storing SSE registers in SImode, DImode and TImode */ - 1, /* MMX or SSE register to integer */ + 3, /* MMX or SSE register to integer */ 64, /* size of l1 cache. */ 128, /* size of l2 cache. */ 32, /* size of prefetch block */ @@ -9690,6 +9690,10 @@ ix86_frame_pointer_required (void) if (TARGET_64BIT_MS_ABI && get_frame_size () > SEH_MAX_FRAME_SIZE) return true; + /* SSE saves require frame-pointer when stack is misaligned. */ + if (TARGET_64BIT_MS_ABI && ix86_incoming_stack_boundary < 128) + return true; + /* In ix86_option_override_internal, TARGET_OMIT_LEAF_FRAME_POINTER turns off the frame pointer by default. Turn it back on now if we've not got a leaf function. */ @@ -10127,18 +10131,6 @@ ix86_compute_frame_layout (struct ix86_frame *frame) crtl->preferred_stack_boundary = 128; crtl->stack_alignment_needed = 128; } - /* preferred_stack_boundary is never updated for call - expanded from tls descriptor. Update it here. We don't update it in - expand stage because according to the comments before - ix86_current_function_calls_tls_descriptor, tls calls may be optimized - away. */ - else if (ix86_current_function_calls_tls_descriptor - && crtl->preferred_stack_boundary < PREFERRED_STACK_BOUNDARY) - { - crtl->preferred_stack_boundary = PREFERRED_STACK_BOUNDARY; - if (crtl->stack_alignment_needed < PREFERRED_STACK_BOUNDARY) - crtl->stack_alignment_needed = PREFERRED_STACK_BOUNDARY; - } stack_alignment_needed = crtl->stack_alignment_needed / BITS_PER_UNIT; preferred_alignment = crtl->preferred_stack_boundary / BITS_PER_UNIT; @@ -10812,6 +10804,11 @@ ix86_update_stack_boundary (void) && cfun->stdarg && crtl->stack_alignment_estimated < 128) crtl->stack_alignment_estimated = 128; + + /* __tls_get_addr needs to be called with 16-byte aligned stack. */ + if (ix86_tls_descriptor_calls_expanded_in_cfun + && crtl->preferred_stack_boundary < 128) + crtl->preferred_stack_boundary = 128; } /* Handle the TARGET_GET_DRAP_RTX hook. Return NULL if no DRAP is @@ -11271,10 +11268,11 @@ ix86_finalize_stack_realign_flags (void) unsigned int incoming_stack_boundary = (crtl->parm_stack_boundary > ix86_incoming_stack_boundary ? crtl->parm_stack_boundary : ix86_incoming_stack_boundary); - unsigned int stack_realign = (incoming_stack_boundary - < (crtl->is_leaf - ? crtl->max_used_stack_slot_alignment - : crtl->stack_alignment_needed)); + unsigned int stack_realign + = (incoming_stack_boundary + < (crtl->is_leaf && !ix86_current_function_calls_tls_descriptor + ? crtl->max_used_stack_slot_alignment + : crtl->stack_alignment_needed)); if (crtl->stack_realign_finalized) { @@ -40244,13 +40242,12 @@ rdseed_step: op0 = fixup_modeless_constant (op0, mode0); - if (GET_MODE (op0) == mode0 - || (GET_MODE (op0) == VOIDmode && op0 != constm1_rtx)) + if (GET_MODE (op0) == mode0 || GET_MODE (op0) == VOIDmode) { if (!insn_data[icode].operand[0].predicate (op0, mode0)) op0 = copy_to_mode_reg (mode0, op0); } - else if (op0 != constm1_rtx) + else { op0 = copy_to_reg (op0); op0 = simplify_gen_subreg (mode0, op0, GET_MODE (op0), 0); @@ -45075,6 +45072,7 @@ ix86_expand_vector_set (bool mmx_ok, rtx target, rtx val, int elt) { /* For SSE1, we have to reuse the V4SF code. */ rtx t = gen_reg_rtx (V4SFmode); + emit_move_insn (t, gen_lowpart (V4SFmode, target)); ix86_expand_vector_set (false, t, gen_lowpart (SFmode, val), elt); emit_move_insn (target, gen_lowpart (mode, t)); } diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 8f9d894971f..083c4182edd 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -804,7 +804,7 @@ (define_insn "*mov_internal" [(set (match_operand:VMOVE 0 "nonimmediate_operand" "=v,v ,m") - (match_operand:VMOVE 1 "nonimmediate_or_sse_const_operand" "C ,vm,v"))] + (match_operand:VMOVE 1 "nonimmediate_or_sse_const_operand" "BC,vm,v"))] "TARGET_SSE && (register_operand (operands[0], mode) || register_operand (operands[1], mode))" @@ -2605,7 +2605,7 @@ (match_operator: 3 "sse_comparison_operator" [(match_operand:VF 1 "register_operand" "v") (match_operand:VF 2 "nonimmediate_operand" "vm")]))] - "TARGET_SSE" + "TARGET_AVX512F" "vcmp%D3\t{%2, %1, %0|%0, %1, %2}" [(set_attr "type" "ssecmp") (set_attr "length_immediate" "1") @@ -3855,7 +3855,7 @@ "@ cvtsi2ss\t{%2, %0|%0, %2} cvtsi2ss\t{%2, %0|%0, %2} - vcvtsi2ss\t{%2, %1, %0|%0, %1, %2}" + vcvtsi2ss\t{%2, %1, %0|%0, %1, %2}" [(set_attr "isa" "noavx,noavx,avx") (set_attr "type" "sseicvt") (set_attr "athlon_decode" "vector,double,*") @@ -3876,7 +3876,7 @@ "@ cvtsi2ssq\t{%2, %0|%0, %2} cvtsi2ssq\t{%2, %0|%0, %2} - vcvtsi2ssq\t{%2, %1, %0|%0, %1, %2}" + vcvtsi2ssq\t{%2, %1, %0|%0, %1, %2}" [(set_attr "isa" "noavx,noavx,avx") (set_attr "type" "sseicvt") (set_attr "athlon_decode" "vector,double,*") @@ -3989,7 +3989,7 @@ (match_operand:VF_128 1 "register_operand" "v") (const_int 1)))] "TARGET_AVX512F && " - "vcvtusi2\t{%2, %1, %0|%0, %1, %2}" + "vcvtusi2\t{%2, %1, %0|%0, %1, %2}" [(set_attr "type" "sseicvt") (set_attr "prefix" "evex") (set_attr "mode" "")]) @@ -4003,7 +4003,7 @@ (match_operand:VF_128 1 "register_operand" "v") (const_int 1)))] "TARGET_AVX512F && TARGET_64BIT" - "vcvtusi2\t{%2, %1, %0|%0, %1, %2}" + "vcvtusi2\t{%2, %1, %0|%0, %1, %2}" [(set_attr "type" "sseicvt") (set_attr "prefix" "evex") (set_attr "mode" "")]) @@ -4268,7 +4268,7 @@ "@ cvtsi2sdq\t{%2, %0|%0, %2} cvtsi2sdq\t{%2, %0|%0, %2} - vcvtsi2sdq\t{%2, %1, %0|%0, %1, %2}" + vcvtsi2sdq\t{%2, %1, %0|%0, %1, %2}" [(set_attr "isa" "noavx,noavx,avx") (set_attr "type" "sseicvt") (set_attr "athlon_decode" "double,direct,*") @@ -15210,7 +15210,7 @@ (define_expand "avx512pf_gatherpfsf" [(unspec - [(match_operand: 0 "register_or_constm1_operand") + [(match_operand: 0 "register_operand") (mem: (match_par_dup 5 [(match_operand 2 "vsib_address_operand") @@ -15252,37 +15252,10 @@ (set_attr "prefix" "evex") (set_attr "mode" "XI")]) -(define_insn "*avx512pf_gatherpfsf" - [(unspec - [(const_int -1) - (match_operator: 4 "vsib_mem_operator" - [(unspec:P - [(match_operand:P 1 "vsib_address_operand" "Tv") - (match_operand:VI48_512 0 "register_operand" "v") - (match_operand:SI 2 "const1248_operand" "n")] - UNSPEC_VSIBADDR)]) - (match_operand:SI 3 "const_2_to_3_operand" "n")] - UNSPEC_GATHER_PREFETCH)] - "TARGET_AVX512PF" -{ - switch (INTVAL (operands[3])) - { - case 3: - return "vgatherpf0ps\t{%4|%4}"; - case 2: - return "vgatherpf1ps\t{%4|%4}"; - default: - gcc_unreachable (); - } -} - [(set_attr "type" "sse") - (set_attr "prefix" "evex") - (set_attr "mode" "XI")]) - ;; Packed double variants (define_expand "avx512pf_gatherpfdf" [(unspec - [(match_operand: 0 "register_or_constm1_operand") + [(match_operand: 0 "register_operand") (mem:V8DF (match_par_dup 5 [(match_operand 2 "vsib_address_operand") @@ -15324,37 +15297,10 @@ (set_attr "prefix" "evex") (set_attr "mode" "XI")]) -(define_insn "*avx512pf_gatherpfdf" - [(unspec - [(const_int -1) - (match_operator:V8DF 4 "vsib_mem_operator" - [(unspec:P - [(match_operand:P 1 "vsib_address_operand" "Tv") - (match_operand:VI4_256_8_512 0 "register_operand" "v") - (match_operand:SI 2 "const1248_operand" "n")] - UNSPEC_VSIBADDR)]) - (match_operand:SI 3 "const_2_to_3_operand" "n")] - UNSPEC_GATHER_PREFETCH)] - "TARGET_AVX512PF" -{ - switch (INTVAL (operands[3])) - { - case 3: - return "vgatherpf0pd\t{%4|%4}"; - case 2: - return "vgatherpf1pd\t{%4|%4}"; - default: - gcc_unreachable (); - } -} - [(set_attr "type" "sse") - (set_attr "prefix" "evex") - (set_attr "mode" "XI")]) - ;; Packed float variants (define_expand "avx512pf_scatterpfsf" [(unspec - [(match_operand: 0 "register_or_constm1_operand") + [(match_operand: 0 "register_operand") (mem: (match_par_dup 5 [(match_operand 2 "vsib_address_operand") @@ -15398,39 +15344,10 @@ (set_attr "prefix" "evex") (set_attr "mode" "XI")]) -(define_insn "*avx512pf_scatterpfsf" - [(unspec - [(const_int -1) - (match_operator: 4 "vsib_mem_operator" - [(unspec:P - [(match_operand:P 1 "vsib_address_operand" "Tv") - (match_operand:VI48_512 0 "register_operand" "v") - (match_operand:SI 2 "const1248_operand" "n")] - UNSPEC_VSIBADDR)]) - (match_operand:SI 3 "const2367_operand" "n")] - UNSPEC_SCATTER_PREFETCH)] - "TARGET_AVX512PF" -{ - switch (INTVAL (operands[3])) - { - case 3: - case 7: - return "vscatterpf0ps\t{%4|%4}"; - case 2: - case 6: - return "vscatterpf1ps\t{%4|%4}"; - default: - gcc_unreachable (); - } -} - [(set_attr "type" "sse") - (set_attr "prefix" "evex") - (set_attr "mode" "XI")]) - ;; Packed double variants (define_expand "avx512pf_scatterpfdf" [(unspec - [(match_operand: 0 "register_or_constm1_operand") + [(match_operand: 0 "register_operand") (mem:V8DF (match_par_dup 5 [(match_operand 2 "vsib_address_operand") @@ -15474,35 +15391,6 @@ (set_attr "prefix" "evex") (set_attr "mode" "XI")]) -(define_insn "*avx512pf_scatterpfdf" - [(unspec - [(const_int -1) - (match_operator:V8DF 4 "vsib_mem_operator" - [(unspec:P - [(match_operand:P 1 "vsib_address_operand" "Tv") - (match_operand:VI4_256_8_512 0 "register_operand" "v") - (match_operand:SI 2 "const1248_operand" "n")] - UNSPEC_VSIBADDR)]) - (match_operand:SI 3 "const2367_operand" "n")] - UNSPEC_SCATTER_PREFETCH)] - "TARGET_AVX512PF" -{ - switch (INTVAL (operands[3])) - { - case 3: - case 7: - return "vscatterpf0pd\t{%4|%4}"; - case 2: - case 6: - return "vscatterpf1pd\t{%4|%4}"; - default: - gcc_unreachable (); - } -} - [(set_attr "type" "sse") - (set_attr "prefix" "evex") - (set_attr "mode" "XI")]) - (define_insn "avx512er_exp2" [(set (match_operand:VF_512 0 "register_operand" "=v") (unspec:VF_512 @@ -18547,7 +18435,7 @@ (match_operand:SI 3 "const_0_to_15_operand")] UNSPEC_RANGE))] "TARGET_AVX512DQ && " - "vrange\t{%3, %2, %1, %0|%0, %1, %2, %3}" + "vrange\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "sse") (set_attr "prefix" "evex") (set_attr "mode" "")]) @@ -18563,7 +18451,7 @@ (match_dup 1) (const_int 1)))] "TARGET_AVX512DQ" - "vrange\t{%3, %2, %1, %0|%0, %1, %2, %3}" + "vrange\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "sse") (set_attr "prefix" "evex") (set_attr "mode" "")]) diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 21da9e212c2..f6eae199769 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -1146,6 +1146,15 @@ ia64_expand_load_address (rtx dest, rtx src) emit_insn (gen_load_fptr (dest, src)); else if (sdata_symbolic_operand (src, VOIDmode)) emit_insn (gen_load_gprel (dest, src)); + else if (local_symbolic_operand64 (src, VOIDmode)) + { + /* We want to use @gprel rather than @ltoff relocations for local + symbols: + - @gprel does not require dynamic linker + - and does not use .sdata section + https://gcc.gnu.org/bugzilla/60465 */ + emit_insn (gen_load_gprel64 (dest, src)); + } else { HOST_WIDE_INT addend = 0; @@ -1944,7 +1953,7 @@ ia64_expand_vecint_compare (enum rtx_code code, machine_mode mode, /* Subtract (-(INT MAX) - 1) from both operands to make them signed. */ - mask = GEN_INT (0x80000000); + mask = gen_int_mode (0x80000000, SImode); mask = gen_rtx_CONST_VECTOR (V2SImode, gen_rtvec (2, mask, mask)); mask = force_reg (mode, mask); t1 = gen_reg_rtx (mode); diff --git a/gcc/config/ia64/predicates.md b/gcc/config/ia64/predicates.md index 2aa7a780e02..2e148f2ebfa 100644 --- a/gcc/config/ia64/predicates.md +++ b/gcc/config/ia64/predicates.md @@ -97,6 +97,32 @@ } }) +;; True if OP refers to a local symbol [+any offset]. +;; To be encoded as: +;; movl % = @gprel(symbol+offset) +;; add % = %, gp +(define_predicate "local_symbolic_operand64" + (match_code "symbol_ref,const") +{ + switch (GET_CODE (op)) + { + case CONST: + op = XEXP (op, 0); + if (GET_CODE (op) != PLUS + || GET_CODE (XEXP (op, 0)) != SYMBOL_REF + || GET_CODE (XEXP (op, 1)) != CONST_INT) + return false; + op = XEXP (op, 0); + /* FALLTHRU */ + + case SYMBOL_REF: + return SYMBOL_REF_LOCAL_P (op); + + default: + gcc_unreachable (); + } +}) + ;; True if OP refers to a symbol in the small address area. (define_predicate "small_addr_symbolic_operand" (match_code "symbol_ref,const") diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md index 3a23dfe0311..2a52c9cb488 100644 --- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -278,20 +278,19 @@ ;; Return 1 if op is a general purpose register that is an even register ;; which suitable for a load/store quad operation +;; Subregs are not allowed here because when they are combine can +;; create (subreg:PTI (reg:TI pseudo)) which will cause reload to +;; think the innermost reg needs reloading, in TImode instead of +;; PTImode. So reload will choose a reg in TImode which has no +;; requirement that the reg be even. (define_predicate "quad_int_reg_operand" - (match_operand 0 "register_operand") + (match_code "reg") { HOST_WIDE_INT r; if (!TARGET_QUAD_MEMORY && !TARGET_QUAD_MEMORY_ATOMIC) return 0; - if (GET_CODE (op) == SUBREG) - op = SUBREG_REG (op); - - if (!REG_P (op)) - return 0; - r = REGNO (op); if (r >= FIRST_PSEUDO_REGISTER) return 1; diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index e17c36ada56..ff7b26de845 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -20737,6 +20737,9 @@ rs6000_expand_atomic_compare_and_swap (rtx operands[]) else if (reg_overlap_mentioned_p (retval, oldval)) oldval = copy_to_reg (oldval); + if (mode != TImode && !reg_or_short_operand (oldval, mode)) + oldval = copy_to_mode_reg (mode, oldval); + mem = rs6000_pre_atomic_barrier (mem, mod_s); label1 = NULL_RTX; @@ -20751,10 +20754,8 @@ rs6000_expand_atomic_compare_and_swap (rtx operands[]) x = retval; if (mask) - { - x = expand_simple_binop (SImode, AND, retval, mask, - NULL_RTX, 1, OPTAB_LIB_WIDEN); - } + x = expand_simple_binop (SImode, AND, retval, mask, + NULL_RTX, 1, OPTAB_LIB_WIDEN); cond = gen_reg_rtx (CCmode); /* If we have TImode, synthesize a comparison. */ diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 5a02d5ee06b..783f9e851a5 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -10149,6 +10149,10 @@ s390_save_gprs_to_fprs (void) emit_move_insn (gen_rtx_REG (DImode, cfun_gpr_save_slot (i)), gen_rtx_REG (DImode, i)); RTX_FRAME_RELATED_P (insn) = 1; + /* This prevents dwarf2cfi from interpreting the set. Doing + so it might emit def_cfa_register infos setting an FPR as + new CFA. */ + add_reg_note (insn, REG_CFA_REGISTER, PATTERN (insn)); } } } diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1bdf35ba8e8..18206309402 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,38 @@ +2016-01-31 Jason Merrill + + PR c++/69009 + * pt.c (partial_specialization_p, impartial_args): New. + (instantiate_decl): Call impartial_args. + +2016-01-27 Marek Polacek + + Backport from mainline + 2016-01-27 Marek Polacek + + PR c/68062 + * typeck.c (cp_build_binary_op): Promote operand to unsigned, if + needed. Add -Wsign-compare warning. + +2016-01-27 Jason Merrill + + PR c++/68949 + * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE of the alias. + * semantics.c (expand_or_defer_fn_1): Keep DECL_SAVED_TREE of + maybe-in-charge *tor. + + PR c++/69131 + * method.c (walk_field_subobs): Add dtor_from_ctor parm. + (process_subob_fn): Likewise. Don't consider triviality if true. + (synthesize_method_walk): Pass it. + +2016-01-19 Marek Polacek + + Backported from mainline + 2016-01-19 Marek Polacek + + PR c++/68965 + * pt.c (tsubst_copy): Mark elements in expanded vector as used. + 2016-01-08 Marek Polacek PR c++/68449 diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 33e2f3cb52f..11fc20cb35f 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1118,7 +1118,7 @@ is_trivially_xible (enum tree_code code, tree to, tree from) static void process_subob_fn (tree fn, tree *spec_p, bool *trivial_p, bool *deleted_p, bool *constexpr_p, - bool diag, tree arg) + bool diag, tree arg, bool dtor_from_ctor = false) { if (!fn || fn == error_mark_node) goto bad; @@ -1130,7 +1130,7 @@ process_subob_fn (tree fn, tree *spec_p, bool *trivial_p, *spec_p = merge_exception_specifiers (*spec_p, raises); } - if (!trivial_fn_p (fn)) + if (!trivial_fn_p (fn) && !dtor_from_ctor) { if (trivial_p) *trivial_p = false; @@ -1163,14 +1163,17 @@ process_subob_fn (tree fn, tree *spec_p, bool *trivial_p, } /* Subroutine of synthesized_method_walk to allow recursion into anonymous - aggregates. */ + aggregates. If DTOR_FROM_CTOR is true, we're walking subobject destructors + called from a synthesized constructor, in which case we don't consider + the triviality of the subobject destructor. */ static void walk_field_subobs (tree fields, tree fnname, special_function_kind sfk, int quals, bool copy_arg_p, bool move_p, bool assign_p, tree *spec_p, bool *trivial_p, bool *deleted_p, bool *constexpr_p, - bool diag, int flags, tsubst_flags_t complain) + bool diag, int flags, tsubst_flags_t complain, + bool dtor_from_ctor) { tree field; for (field = fields; field; field = DECL_CHAIN (field)) @@ -1287,7 +1290,7 @@ walk_field_subobs (tree fields, tree fnname, special_function_kind sfk, walk_field_subobs (TYPE_FIELDS (mem_type), fnname, sfk, quals, copy_arg_p, move_p, assign_p, spec_p, trivial_p, deleted_p, constexpr_p, - diag, flags, complain); + diag, flags, complain, dtor_from_ctor); continue; } @@ -1304,7 +1307,7 @@ walk_field_subobs (tree fields, tree fnname, special_function_kind sfk, rval = locate_fn_flags (mem_type, fnname, argtype, flags, complain); process_subob_fn (rval, spec_p, trivial_p, deleted_p, - constexpr_p, diag, field); + constexpr_p, diag, field, dtor_from_ctor); } } @@ -1487,7 +1490,7 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, dtors would be a double-fault). */ process_subob_fn (rval, NULL, NULL, deleted_p, NULL, false, - basetype); + basetype, /*dtor_from_ctor*/true); } if (check_vdtor && type_has_virtual_destructor (basetype)) @@ -1534,7 +1537,7 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, NULL_TREE, flags, complain); process_subob_fn (rval, NULL, NULL, deleted_p, NULL, false, - basetype); + basetype, /*dtor_from_ctor*/true); } } } @@ -1543,13 +1546,13 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, walk_field_subobs (TYPE_FIELDS (ctype), fnname, sfk, quals, copy_arg_p, move_p, assign_p, spec_p, trivial_p, deleted_p, constexpr_p, - diag, flags, complain); + diag, flags, complain, /*dtor_from_ctor*/false); if (ctor_p) walk_field_subobs (TYPE_FIELDS (ctype), complete_dtor_identifier, sfk_destructor, TYPE_UNQUALIFIED, false, false, false, NULL, NULL, deleted_p, NULL, - false, flags, complain); + false, flags, complain, /*dtor_from_ctor*/true); pop_scope (scope); diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index a2dd880ea49..e485a6da817 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -670,6 +670,8 @@ maybe_clone_body (tree fn) { if (expand_or_defer_fn_1 (clone)) emit_associated_thunks (clone); + /* We didn't generate a body, so remove the empty one. */ + DECL_SAVED_TREE (clone) = NULL_TREE; } else expand_or_defer_fn (clone); diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 3069c28181b..3bb491860c7 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -13248,7 +13248,12 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl) --c_inhibit_evaluation_warnings; if (TREE_CODE (expanded) == TREE_VEC) - len = TREE_VEC_LENGTH (expanded); + { + len = TREE_VEC_LENGTH (expanded); + /* Set TREE_USED for the benefit of -Wunused. */ + for (int i = 0; i < len; i++) + TREE_USED (TREE_VEC_ELT (expanded, i)) = true; + } if (expanded == error_mark_node) return error_mark_node; @@ -19472,6 +19477,38 @@ most_general_template (tree decl) return decl; } +/* True iff the TEMPLATE_DECL tmpl is a partial specialization. */ + +static bool +partial_specialization_p (tree tmpl) +{ + /* Any specialization has DECL_TEMPLATE_SPECIALIZATION. */ + if (!DECL_TEMPLATE_SPECIALIZATION (tmpl)) + return false; + if (!VAR_P (DECL_TEMPLATE_RESULT (tmpl))) + return false; + tree t = DECL_TI_TEMPLATE (tmpl); + /* A specialization that fully specializes one of the containing classes is + not a partial specialization. */ + return (list_length (DECL_TEMPLATE_PARMS (tmpl)) + == list_length (DECL_TEMPLATE_PARMS (t))); +} + +/* If TMPL is a partial specialization, return the arguments for its primary + template. */ + +static tree +impartial_args (tree tmpl, tree args) +{ + if (!partial_specialization_p (tmpl)) + return args; + + /* If TMPL is a partial specialization, we need to substitute to get + the args for the primary template. */ + return tsubst_template_args (DECL_TI_ARGS (tmpl), args, + tf_warning_or_error, tmpl); +} + /* Return the most specialized of the template partial specializations which can produce TARGET, a specialization of some class or variable template. The value returned is actually a TREE_LIST; the TREE_VALUE is @@ -20286,7 +20323,7 @@ instantiate_decl (tree d, int defer_ok, return d; gen_tmpl = most_general_template (tmpl); - gen_args = DECL_TI_ARGS (d); + gen_args = impartial_args (tmpl, DECL_TI_ARGS (d)); if (tmpl != gen_tmpl) /* We should already have the extra args. */ diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index feba03d1c7f..abd30e23ce8 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -4104,9 +4104,8 @@ expand_or_defer_fn_1 (tree fn) /* We don't want to process FN again, so pretend we've written it out, even though we haven't. */ TREE_ASM_WRITTEN (fn) = 1; - /* If this is an instantiation of a constexpr function, keep - DECL_SAVED_TREE for explain_invalid_constexpr_fn. */ - if (!is_instantiation_of_constexpr (fn)) + /* If this is a constexpr function, keep DECL_SAVED_TREE. */ + if (!DECL_DECLARED_CONSTEXPR_P (fn)) DECL_SAVED_TREE (fn) = NULL_TREE; return false; } diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 22792556c24..45eb9a5680e 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -4672,6 +4672,20 @@ cp_build_binary_op (location_t location, return error_mark_node; } + /* It's not precisely specified how the usual arithmetic + conversions apply to the vector types. Here, we use + the unsigned type if one of the operands is signed and + the other one is unsigned. */ + if (TYPE_UNSIGNED (type0) != TYPE_UNSIGNED (type1)) + { + if (!TYPE_UNSIGNED (type0)) + op0 = build1 (VIEW_CONVERT_EXPR, type1, op0); + else + op1 = build1 (VIEW_CONVERT_EXPR, type0, op1); + warning_at (location, OPT_Wsign_compare, "comparison between " + "types %qT and %qT", type0, type1); + } + /* Always construct signed integer vector type. */ intt = c_common_type_for_size (GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (type0))), 0); diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 8f20fca8ba0..30fcdb9b17e 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -3996,7 +3996,7 @@ Integer constant in the range 0 @dots{} 127, for 128-bit shifts. Standard 80387 floating point constant. @item C -Standard SSE floating point constant. +SSE constant zero operand. @item e 32-bit signed integer constant, or a symbolic reference known diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 0ce65a5504e..9810864b4da 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,74 @@ +2016-02-03 Andre Vehreschild + + PR fortran/67451 + PR fortran/69418 + * trans-expr.c (gfc_copy_class_to_class): For coarrays just the + pointer is passed. Take it as is without trying to deref the + _data component. + * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as + argument to source=-expression. + +2016-01-30 Bud Davis + Mikael Morin + + Backport from trunk. + PR fortran/59746 + * symbol.c (gfc_restore_last_undo_checkpoint): Delete + a common block symbol if it was put in the list. + +2016-01-28 Janus Weil + + PR fortran/69484 + * invoke.texi: Fix documentation of -Wall with respect to -Wtabs. + +2016-01-28 Andre Vehreschild + + PR fortran/62536 + * decl.c: Prevent setting gfc_current_ns to NULL when block statement's + nesting is incomplete. There is already an error conditon, so having + gfc_current_ns pointing to an eventually wrong namespace does not matter + that much. + +2016-01-27 Andre Vehreschild + + PR fortran/p69268 + * trans-stmt.c (gfc_trans_allocate): Make sure the source= + expression is evaluated once only. Use gfc_trans_assignment () + instead of explicitly calling gfc_trans_string_copy () to + reduce the code complexity in trans_allocate. + +2016-01-25 Dominique d'Humieres + + PR fortran/68283 + * primary.c (gfc_variable_attr): revert revision r221955, + call gfc_internal_error only if there is no error. + +2016-01-17 Mikael Morin + Dominique d'Humieres + + Backport from trunk. + PR fortran/61831 + * trans-array.c (gfc_conv_array_parameter): Guard allocatable + component deallocation code generation with descriptorless + calling convention flag. + * trans-expr.c (gfc_conv_expr_reference): Remove allocatable + component deallocation code generation from revision 212329. + (expr_may_alias_variables): New function. + (gfc_conv_procedure_call): New boolean elemental_proc to factor + check for procedure elemental-ness. Rename boolean f to nodesc_arg + and declare it in the outer scope. Use expr_may_alias_variables, + elemental_proc and nodesc_arg to decide whether generate allocatable + component deallocation code. + (gfc_trans_subarray_assign): Set deep copy flag. + +2016-01-17 Paul Thomas + + Backport from trunk. + PR fortran/66082 + * trans-array.c (gfc_conv_array_parameter): Ensure that all + non-variable arrays with allocatable components have the + components deallocated after the procedure call. + 2016-01-10 Paul Thomas Update copyright years in updated files. diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 2708413a115..adea3f3b1d0 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -6454,9 +6454,16 @@ cleanup: prev_ns = ns; ns = ns->sibling; } - - gfc_free_namespace (gfc_current_ns); - gfc_current_ns = parent_ns; + + if (parent_ns) + { + /* Free the current namespace only when the parent one exists. This + prevents an ICE when more END BLOCK then BLOCK statements are + present. It does not mean any further harm, because we already + have errored. */ + gfc_free_namespace (gfc_current_ns); + gfc_current_ns = parent_ns; + } } return MATCH_ERROR; diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index af123dbbe5a..b0963fa246e 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -742,7 +742,7 @@ Enables commonly used warning options pertaining to usage that we recommend avoiding and that we believe are easy to avoid. This currently includes @option{-Waliasing}, @option{-Wampersand}, @option{-Wconversion}, @option{-Wsurprising}, @option{-Wc-binding-type}, -@option{-Wintrinsics-std}, @option{-Wno-tabs}, @option{-Wintrinsic-shadow}, +@option{-Wintrinsics-std}, @option{-Wtabs}, @option{-Wintrinsic-shadow}, @option{-Wline-truncation}, @option{-Wtarget-lifetime}, @option{-Wreal-q-constant} and @option{-Wunused}. diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index f8459173932..44b9901cf67 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -2142,7 +2142,7 @@ check_substring: symbol_attribute gfc_variable_attr (gfc_expr *expr, gfc_typespec *ts) { - int dimension, codimension, pointer, allocatable, target, n; + int dimension, codimension, pointer, allocatable, target; symbol_attribute attr; gfc_ref *ref; gfc_symbol *sym; @@ -2201,22 +2201,9 @@ gfc_variable_attr (gfc_expr *expr, gfc_typespec *ts) case AR_UNKNOWN: /* If any of start, end or stride is not integer, there will already have been an error issued. */ - for (n = 0; n < ref->u.ar.as->rank; n++) - { - int errors; - gfc_get_errors (NULL, &errors); - if (((ref->u.ar.start[n] - && ref->u.ar.start[n]->ts.type == BT_UNKNOWN) - || - (ref->u.ar.end[n] - && ref->u.ar.end[n]->ts.type == BT_UNKNOWN) - || - (ref->u.ar.stride[n] - && ref->u.ar.stride[n]->ts.type == BT_UNKNOWN)) - && errors > 0) - break; - } - if (n == ref->u.ar.as->rank) + int errors; + gfc_get_errors (NULL, &errors); + if (errors == 0) gfc_internal_error ("gfc_variable_attr(): Bad array reference"); } diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 8c43854c177..a4a906b96d9 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -3121,49 +3121,49 @@ gfc_restore_last_undo_checkpoint (void) FOR_EACH_VEC_ELT (latest_undo_chgset->syms, i, p) { - if (p->gfc_new) + /* Symbol was new. Or was old and just put in common */ + if ((p->gfc_new + || (p->attr.in_common && !p->old_symbol->attr.in_common )) + && p->attr.in_common && p->common_block && p->common_block->head) { - /* Symbol was new. */ - if (p->attr.in_common && p->common_block && p->common_block->head) - { - /* If the symbol was added to any common block, it - needs to be removed to stop the resolver looking - for a (possibly) dead symbol. */ + /* If the symbol was added to any common block, it + needs to be removed to stop the resolver looking + for a (possibly) dead symbol. */ - if (p->common_block->head == p && !p->common_next) + if (p->common_block->head == p && !p->common_next) + { + gfc_symtree st, *st0; + st0 = find_common_symtree (p->ns->common_root, + p->common_block); + if (st0) { - gfc_symtree st, *st0; - st0 = find_common_symtree (p->ns->common_root, - p->common_block); - if (st0) - { - st.name = st0->name; - gfc_delete_bbt (&p->ns->common_root, &st, compare_symtree); - free (st0); - } + st.name = st0->name; + gfc_delete_bbt (&p->ns->common_root, &st, compare_symtree); + free (st0); } + } - if (p->common_block->head == p) - p->common_block->head = p->common_next; - else - { - gfc_symbol *cparent, *csym; - - cparent = p->common_block->head; - csym = cparent->common_next; - - while (csym != p) - { - cparent = csym; - csym = csym->common_next; - } + if (p->common_block->head == p) + p->common_block->head = p->common_next; + else + { + gfc_symbol *cparent, *csym; - gcc_assert(cparent->common_next == p); + cparent = p->common_block->head; + csym = cparent->common_next; - cparent->common_next = csym->common_next; + while (csym != p) + { + cparent = csym; + csym = csym->common_next; } - } + gcc_assert(cparent->common_next == p); + cparent->common_next = csym->common_next; + } + } + if (p->gfc_new) + { /* The derived type is saved in the symtree with the first letter capitalized; the all lower-case version to the derived type contains its associated generic function. */ diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 75bcb50de88..8047c486e56 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -7192,6 +7192,17 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, bool g77, if (no_pack || array_constructor || good_allocatable || ultimate_alloc_comp) { gfc_conv_expr_descriptor (se, expr); + /* Deallocate the allocatable components of structures that are + not variable. */ + if ((expr->ts.type == BT_DERIVED || expr->ts.type == BT_CLASS) + && expr->ts.u.derived->attr.alloc_comp + && expr->expr_type != EXPR_VARIABLE) + { + tmp = gfc_deallocate_alloc_comp (expr->ts.u.derived, se->expr, expr->rank); + + /* The components shall be deallocated before their containing entity. */ + gfc_prepend_expr_to_block (&se->post, tmp); + } if (expr->ts.type == BT_CHARACTER) se->string_length = expr->ts.u.cl->backend_decl; if (size) @@ -7227,10 +7238,11 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, bool g77, } /* Deallocate the allocatable components of structures that are - not variable. */ - if ((expr->ts.type == BT_DERIVED || expr->ts.type == BT_CLASS) - && expr->ts.u.derived->attr.alloc_comp - && expr->expr_type != EXPR_VARIABLE) + not variable, for descriptorless arguments. + Arguments with a descriptor are handled in gfc_conv_procedure_call. */ + if (g77 && (expr->ts.type == BT_DERIVED || expr->ts.type == BT_CLASS) + && expr->ts.u.derived->attr.alloc_comp + && expr->expr_type != EXPR_VARIABLE) { tmp = build_fold_indirect_ref_loc (input_location, se->expr); tmp = gfc_deallocate_alloc_comp (expr->ts.u.derived, tmp, expr->rank); diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index e2c4b7782da..0daa63197a9 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1019,6 +1019,7 @@ gfc_copy_class_to_class (tree from, tree to, tree nelems, bool unlimited) tree fcn; tree fcn_type; tree from_data; + tree from_class_base = NULL; tree from_len; tree to_data; tree to_len; @@ -1035,21 +1036,41 @@ gfc_copy_class_to_class (tree from, tree to, tree nelems, bool unlimited) from_len = to_len = NULL_TREE; if (from != NULL_TREE) - fcn = gfc_class_vtab_copy_get (from); + { + /* Check that from is a class. When the class is part of a coarray, + then from is a common pointer and is to be used as is. */ + tmp = POINTER_TYPE_P (TREE_TYPE (from)) && !DECL_P (from) + ? TREE_OPERAND (from, 0) : from; + if (GFC_CLASS_TYPE_P (TREE_TYPE (tmp)) + || (DECL_P (tmp) && GFC_DECL_CLASS (tmp))) + { + from_class_base = from; + from_data = gfc_class_data_get (from_class_base); + } + else + { + /* For arrays two component_refs can be present. */ + if (TREE_CODE (tmp) == COMPONENT_REF) + tmp = TREE_OPERAND (tmp, 0); + if (TREE_CODE (tmp) == COMPONENT_REF) + tmp = TREE_OPERAND (tmp, 0); + from_class_base = tmp; + from_data = from; + } + fcn = gfc_class_vtab_copy_get (from_class_base); + } else - fcn = gfc_class_vtab_copy_get (to); + { + fcn = gfc_class_vtab_copy_get (to); + from_data = gfc_class_vtab_def_init_get (to); + } fcn_type = TREE_TYPE (TREE_TYPE (fcn)); - if (from != NULL_TREE) - from_data = gfc_class_data_get (from); - else - from_data = gfc_class_vtab_def_init_get (to); - if (unlimited) { - if (from != NULL_TREE && unlimited) - from_len = gfc_class_len_get (from); + if (from_class_base != NULL_TREE) + from_len = gfc_class_len_get (from_class_base); else from_len = integer_zero_node; } @@ -4398,6 +4419,62 @@ conv_arglist_function (gfc_se *se, gfc_expr *expr, const char *name) } +/* This function tells whether the middle-end representation of the expression + E given as input may point to data otherwise accessible through a variable + (sub-)reference. + It is assumed that the only expressions that may alias are variables, + and array constructors if ARRAY_MAY_ALIAS is true and some of its elements + may alias. + This function is used to decide whether freeing an expression's allocatable + components is safe or should be avoided. + + If ARRAY_MAY_ALIAS is true, an array constructor may alias if some of + its elements are copied from a variable. This ARRAY_MAY_ALIAS trick + is necessary because for array constructors, aliasing depends on how + the array is used: + - If E is an array constructor used as argument to an elemental procedure, + the array, which is generated through shallow copy by the scalarizer, + is used directly and can alias the expressions it was copied from. + - If E is an array constructor used as argument to a non-elemental + procedure,the scalarizer is used in gfc_conv_expr_descriptor to generate + the array as in the previous case, but then that array is used + to initialize a new descriptor through deep copy. There is no alias + possible in that case. + Thus, the ARRAY_MAY_ALIAS flag is necessary to distinguish the two cases + above. */ + +static bool +expr_may_alias_variables (gfc_expr *e, bool array_may_alias) +{ + gfc_constructor *c; + + if (e->expr_type == EXPR_VARIABLE) + return true; + else if (e->expr_type == EXPR_FUNCTION) + { + gfc_symbol *proc_ifc = gfc_get_proc_ifc_for_expr (e); + + if ((proc_ifc->result->ts.type == BT_CLASS + && proc_ifc->result->ts.u.derived->attr.is_class + && CLASS_DATA (proc_ifc->result)->attr.class_pointer) + || proc_ifc->result->attr.pointer) + return true; + else + return false; + } + else if (e->expr_type != EXPR_ARRAY || !array_may_alias) + return false; + + for (c = gfc_constructor_first (e->value.constructor); + c; c = gfc_constructor_next (c)) + if (c->expr + && expr_may_alias_variables (c->expr, array_may_alias)) + return true; + + return false; +} + + /* Generate code for a procedure call. Note can return se->post != NULL. If se->direct_byref is set then se->expr contains the return parameter. Return nonzero, if the call has alternate specifiers. @@ -4448,9 +4525,15 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, comp = gfc_get_proc_ptr_comp (expr); + bool elemental_proc = (comp + && comp->ts.interface + && comp->ts.interface->attr.elemental) + || (comp && comp->attr.elemental) + || sym->attr.elemental; + if (se->ss != NULL) { - if (!sym->attr.elemental && !(comp && comp->attr.elemental)) + if (!elemental_proc) { gcc_assert (se->ss->info->type == GFC_SS_FUNCTION); if (se->ss->info->useflags) @@ -4501,6 +4584,23 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, fsym = formal ? formal->sym : NULL; parm_kind = MISSING; + /* If the procedure requires an explicit interface, the actual + argument is passed according to the corresponding formal + argument. If the corresponding formal argument is a POINTER, + ALLOCATABLE or assumed shape, we do not use g77's calling + convention, and pass the address of the array descriptor + instead. Otherwise we use g77's calling convention, in other words + pass the array data pointer without descriptor. */ + bool nodesc_arg = fsym != NULL + && !(fsym->attr.pointer || fsym->attr.allocatable) + && fsym->as + && fsym->as->type != AS_ASSUMED_SHAPE + && fsym->as->type != AS_ASSUMED_RANK; + if (comp) + nodesc_arg = nodesc_arg || !comp->attr.always_explicit; + else + nodesc_arg = nodesc_arg || !sym->attr.always_explicit; + /* Class array expressions are sometimes coming completely unadorned with either arrayspec or _data component. Correct that here. OOP-TODO: Move this to the frontend. */ @@ -5020,22 +5120,6 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, } else { - /* If the procedure requires an explicit interface, the actual - argument is passed according to the corresponding formal - argument. If the corresponding formal argument is a POINTER, - ALLOCATABLE or assumed shape, we do not use g77's calling - convention, and pass the address of the array descriptor - instead. Otherwise we use g77's calling convention. */ - bool f; - f = (fsym != NULL) - && !(fsym->attr.pointer || fsym->attr.allocatable) - && fsym->as && fsym->as->type != AS_ASSUMED_SHAPE - && fsym->as->type != AS_ASSUMED_RANK; - if (comp) - f = f || !comp->attr.always_explicit; - else - f = f || !sym->attr.always_explicit; - /* If the argument is a function call that may not create a temporary for the result, we have to check that we can do it, i.e. that there is no alias between this @@ -5080,7 +5164,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, array of derived types. In this case, the argument is converted to a temporary, which is passed and then written back after the procedure call. */ - gfc_conv_subref_array_arg (&parmse, e, f, + gfc_conv_subref_array_arg (&parmse, e, nodesc_arg, fsym ? fsym->attr.intent : INTENT_INOUT, fsym && fsym->attr.pointer); else if (gfc_is_class_array_ref (e, NULL) @@ -5092,7 +5176,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, OOP-TODO: Insert code so that if the dynamic type is the same as the declared type, copy-in/copy-out does not occur. */ - gfc_conv_subref_array_arg (&parmse, e, f, + gfc_conv_subref_array_arg (&parmse, e, nodesc_arg, fsym ? fsym->attr.intent : INTENT_INOUT, fsym && fsym->attr.pointer); @@ -5103,12 +5187,13 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, intent in. */ { e->must_finalize = 1; - gfc_conv_subref_array_arg (&parmse, e, f, + gfc_conv_subref_array_arg (&parmse, e, nodesc_arg, INTENT_IN, fsym && fsym->attr.pointer); } else - gfc_conv_array_parameter (&parmse, e, f, fsym, sym->name, NULL); + gfc_conv_array_parameter (&parmse, e, nodesc_arg, fsym, + sym->name, NULL); /* If an ALLOCATABLE dummy argument has INTENT(OUT) and is allocated on entry, it must be deallocated. */ @@ -5150,7 +5235,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, but do not always set fsym. */ if (e->expr_type == EXPR_VARIABLE && e->symtree->n.sym->attr.optional - && ((e->rank != 0 && sym->attr.elemental) + && ((e->rank != 0 && elemental_proc) || e->representation.length || e->ts.type == BT_CHARACTER || (e->rank != 0 && (fsym == NULL @@ -5185,13 +5270,16 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, gfc_add_block_to_block (&post, &parmse.post); /* Allocated allocatable components of derived types must be - deallocated for non-variable scalars. Non-variable arrays are - dealt with in trans-array.c(gfc_conv_array_parameter). */ + deallocated for non-variable scalars, array arguments to elemental + procedures, and array arguments with descriptor to non-elemental + procedures. As bounds information for descriptorless arrays is no + longer available here, they are dealt with in trans-array.c + (gfc_conv_array_parameter). */ if (e && (e->ts.type == BT_DERIVED || e->ts.type == BT_CLASS) && e->ts.u.derived->attr.alloc_comp - && !(e->symtree && e->symtree->n.sym->attr.pointer) - && (e->expr_type != EXPR_VARIABLE && !e->rank)) - { + && (e->rank == 0 || elemental_proc || !nodesc_arg) + && !expr_may_alias_variables (e, elemental_proc)) + { int parm_rank; tmp = build_fold_indirect_ref_loc (input_location, parmse.expr); @@ -6519,7 +6607,7 @@ gfc_trans_subarray_assign (tree dest, gfc_component * cm, gfc_expr * expr) gfc_conv_expr (&rse, expr); - tmp = gfc_trans_scalar_assign (&lse, &rse, cm->ts, true, false, true); + tmp = gfc_trans_scalar_assign (&lse, &rse, cm->ts, true, true, true); gfc_add_expr_to_block (&body, tmp); gcc_assert (rse.ss == gfc_ss_terminator); @@ -7404,20 +7492,6 @@ gfc_conv_expr_reference (gfc_se * se, gfc_expr * expr) /* Take the address of that value. */ se->expr = gfc_build_addr_expr (NULL_TREE, var); - if (expr->ts.type == BT_DERIVED && expr->rank - && !gfc_is_finalizable (expr->ts.u.derived, NULL) - && expr->ts.u.derived->attr.alloc_comp - && expr->expr_type != EXPR_VARIABLE) - { - tree tmp; - - tmp = build_fold_indirect_ref_loc (input_location, se->expr); - tmp = gfc_deallocate_alloc_comp (expr->ts.u.derived, tmp, expr->rank); - - /* The components shall be deallocated before - their containing entity. */ - gfc_prepend_expr_to_block (&se->post, tmp); - } } diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 68601f61fd2..9c1f9204add 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -5108,7 +5108,7 @@ tree gfc_trans_allocate (gfc_code * code) { gfc_alloc *al; - gfc_expr *expr; + gfc_expr *expr, *e3rhs = NULL; gfc_se se, se_sz; tree tmp; tree parm; @@ -5130,6 +5130,7 @@ gfc_trans_allocate (gfc_code * code) stmtblock_t post; tree nelems; bool upoly_expr, tmp_expr3_len_flag = false, al_len_needs_set; + gfc_symtree *newsym = NULL; if (!code->ext.alloc.list) return NULL_TREE; @@ -5179,7 +5180,7 @@ gfc_trans_allocate (gfc_code * code) _vptr, _len and element_size for expr3. */ if (code->expr3) { - bool vtab_needed = false; + bool vtab_needed = false, is_coarray = gfc_is_coarray (code->expr3); /* expr3_tmp gets the tree when code->expr3.mold is set, i.e., the expression is only needed to get the _vptr, _len a.s.o. */ tree expr3_tmp = NULL_TREE; @@ -5239,16 +5240,29 @@ gfc_trans_allocate (gfc_code * code) false, false); gfc_add_block_to_block (&block, &se.pre); gfc_add_block_to_block (&post, &se.post); - /* Prevent aliasing, i.e., se.expr may be already a - variable declaration. */ + if (!VAR_P (se.expr)) { - tmp = build_fold_indirect_ref_loc (input_location, + tree var; + + tmp = is_coarray ? se.expr + : build_fold_indirect_ref_loc (input_location, se.expr); - tmp = gfc_evaluate_now (tmp, &block); + + /* We need a regular (non-UID) symbol here, therefore give a + prefix. */ + var = gfc_create_var (TREE_TYPE (tmp), "source"); + if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (tmp))) + { + gfc_allocate_lang_decl (var); + GFC_DECL_SAVED_DESCRIPTOR (var) = GFC_DECL_SAVED_DESCRIPTOR (tmp); + } + gfc_add_modify_loc (input_location, &block, var, tmp); + tmp = var; } else tmp = se.expr; + if (!code->expr3->mold) expr3 = tmp; else @@ -5284,6 +5298,16 @@ gfc_trans_allocate (gfc_code * code) else if (expr3_tmp != NULL_TREE && (VAR_P (expr3_tmp) ||!code->expr3->ref)) tmp = gfc_class_vptr_get (expr3_tmp); + else if (is_coarray && expr3 != NULL_TREE) + { + /* Get the ref to coarray's data. May be wrapped in a + NOP_EXPR. */ + tmp = POINTER_TYPE_P (TREE_TYPE (expr3)) ? TREE_OPERAND (expr3, 0) + : tmp; + /* Get to the base variable, i.e., strip _data.data. */ + tmp = TREE_OPERAND (TREE_OPERAND (tmp, 0), 0); + tmp = gfc_class_vptr_get (tmp); + } else { rhs = gfc_find_and_cut_at_last_class_ref (code->expr3); @@ -5357,6 +5381,71 @@ gfc_trans_allocate (gfc_code * code) else expr3_esize = TYPE_SIZE_UNIT ( gfc_typenode_for_spec (&code->expr3->ts)); + + /* The routine gfc_trans_assignment () already implements all + techniques needed. Unfortunately we may have a temporary + variable for the source= expression here. When that is the + case convert this variable into a temporary gfc_expr of type + EXPR_VARIABLE and used it as rhs for the assignment. The + advantage is, that we get scalarizer support for free, + don't have to take care about scalar to array treatment and + will benefit of every enhancements gfc_trans_assignment () + gets. + Exclude variables since the following block does not handle + array sections. In any case, there is no harm in sending + variables to gfc_trans_assignment because there is no + evaluation of variables. */ + if (code->expr3->expr_type != EXPR_VARIABLE + && code->expr3->mold != 1 && expr3 != NULL_TREE + && DECL_P (expr3) && DECL_ARTIFICIAL (expr3)) + { + /* Build a temporary symtree and symbol. Do not add it to + the current namespace to prevent accidently modifying + a colliding symbol's as. */ + newsym = XCNEW (gfc_symtree); + /* The name of the symtree should be unique, because + gfc_create_var () took care about generating the + identifier. */ + newsym->name = gfc_get_string (IDENTIFIER_POINTER ( + DECL_NAME (expr3))); + newsym->n.sym = gfc_new_symbol (newsym->name, NULL); + /* The backend_decl is known. It is expr3, which is inserted + here. */ + newsym->n.sym->backend_decl = expr3; + e3rhs = gfc_get_expr (); + e3rhs->ts = code->expr3->ts; + e3rhs->rank = code->expr3->rank; + e3rhs->symtree = newsym; + /* Mark the symbol referenced or gfc_trans_assignment will + bug. */ + newsym->n.sym->attr.referenced = 1; + e3rhs->expr_type = EXPR_VARIABLE; + e3rhs->where = code->expr3->where; + /* Set the symbols type, upto it was BT_UNKNOWN. */ + newsym->n.sym->ts = e3rhs->ts; + /* Check whether the expr3 is array valued. */ + if (e3rhs->rank) + { + gfc_array_spec *arr; + arr = gfc_get_array_spec (); + arr->rank = e3rhs->rank; + arr->type = AS_DEFERRED; + /* Set the dimension and pointer attribute for arrays + to be on the safe side. */ + newsym->n.sym->attr.dimension = 1; + newsym->n.sym->attr.pointer = 1; + newsym->n.sym->as = arr; + gfc_add_full_array_ref (e3rhs, arr); + } + else if (POINTER_TYPE_P (TREE_TYPE (expr3))) + newsym->n.sym->attr.pointer = 1; + /* The string length is known to. Set it for char arrays. */ + if (e3rhs->ts.type == BT_CHARACTER) + newsym->n.sym->ts.u.cl->backend_decl = expr3_len; + gfc_commit_symbol (newsym->n.sym); + } + else + e3rhs = gfc_copy_expr (code->expr3); } gcc_assert (expr3_esize); expr3_esize = fold_convert (sizetype, expr3_esize); @@ -5674,7 +5763,6 @@ gfc_trans_allocate (gfc_code * code) { /* Initialization via SOURCE block (or static default initializer). */ - gfc_expr *rhs = gfc_copy_expr (code->expr3); if (expr3 != NULL_TREE && ((POINTER_TYPE_P (TREE_TYPE (expr3)) && TREE_CODE (expr3) != POINTER_PLUS_EXPR) @@ -5688,25 +5776,13 @@ gfc_trans_allocate (gfc_code * code) tmp = gfc_copy_class_to_class (expr3, to, nelems, upoly_expr); } - else if (code->expr3->ts.type == BT_CHARACTER - && !GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (se.expr))) - { - tmp = INDIRECT_REF_P (se.expr) ? - se.expr : - build_fold_indirect_ref_loc (input_location, - se.expr); - gfc_trans_string_copy (&block, al_len, tmp, - code->expr3->ts.kind, - expr3_len, expr3, - code->expr3->ts.kind); - tmp = NULL_TREE; - } else if (al->expr->ts.type == BT_CLASS) { gfc_actual_arglist *actual, *last_arg; gfc_expr *ppc; gfc_code *ppc_code; gfc_ref *ref, *dataref; + gfc_expr *rhs = e3rhs ? e3rhs : gfc_copy_expr (code->expr3); /* Do a polymorphic deep copy. */ actual = gfc_get_actual_arglist (); @@ -5818,6 +5894,8 @@ gfc_trans_allocate (gfc_code * code) void_type_node, tmp, extcopy, stdcopy); } gfc_free_statements (ppc_code); + if (rhs != e3rhs) + gfc_free_expr (rhs); } else { @@ -5826,10 +5904,9 @@ gfc_trans_allocate (gfc_code * code) int realloc_lhs = flag_realloc_lhs; flag_realloc_lhs = 0; tmp = gfc_trans_assignment (gfc_expr_to_initialize (expr), - rhs, false, false); + e3rhs, false, false); flag_realloc_lhs = realloc_lhs; } - gfc_free_expr (rhs); gfc_add_expr_to_block (&block, tmp); } else if (code->expr3 && code->expr3->mold @@ -5847,6 +5924,15 @@ gfc_trans_allocate (gfc_code * code) gfc_free_expr (expr); } // for-loop + if (e3rhs) + { + if (newsym) + { + gfc_free_symbol (newsym->n.sym); + XDELETE (newsym); + } + gfc_free_expr (e3rhs); + } /* STAT. */ if (code->expr1) { diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index 5b84bbecde9..fef5905033a 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -2267,7 +2267,7 @@ create_phi_basis (slsr_cand_t c, gimple from_phi, tree basis_name, slsr_cand_t basis = lookup_cand (c->basis); int nargs = gimple_phi_num_args (from_phi); basic_block phi_bb = gimple_bb (from_phi); - slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (from_phi)); + slsr_cand_t phi_cand = *stmt_cand_map->get (from_phi); phi_args.create (nargs); /* Process each argument of the existing phi that represents @@ -2376,7 +2376,7 @@ phi_add_costs (gimple phi, slsr_cand_t c, int one_add_cost) { unsigned i; int cost = 0; - slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (phi)); + slsr_cand_t phi_cand = *stmt_cand_map->get (phi); /* If we work our way back to a phi that isn't dominated by the hidden basis, this isn't a candidate for replacement. Indicate this by @@ -2587,7 +2587,7 @@ static void record_phi_increments (slsr_cand_t basis, gimple phi) { unsigned i; - slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (phi)); + slsr_cand_t phi_cand = *stmt_cand_map->get (phi); for (i = 0; i < gimple_phi_num_args (phi); i++) { @@ -2658,7 +2658,7 @@ phi_incr_cost (slsr_cand_t c, const widest_int &incr, gimple phi, int *savings) unsigned i; int cost = 0; slsr_cand_t basis = lookup_cand (c->basis); - slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (phi)); + slsr_cand_t phi_cand = *stmt_cand_map->get (phi); for (i = 0; i < gimple_phi_num_args (phi); i++) { @@ -3002,7 +3002,7 @@ ncd_with_phi (slsr_cand_t c, const widest_int &incr, gphi *phi, { unsigned i; slsr_cand_t basis = lookup_cand (c->basis); - slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (phi)); + slsr_cand_t phi_cand = *stmt_cand_map->get (phi); for (i = 0; i < gimple_phi_num_args (phi); i++) { @@ -3212,7 +3212,7 @@ all_phi_incrs_profitable (slsr_cand_t c, gimple phi) { unsigned i; slsr_cand_t basis = lookup_cand (c->basis); - slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (phi)); + slsr_cand_t phi_cand = *stmt_cand_map->get (phi); for (i = 0; i < gimple_phi_num_args (phi); i++) { diff --git a/gcc/lra-remat.c b/gcc/lra-remat.c index f2d226c6fcb..9311eaa4fee 100644 --- a/gcc/lra-remat.c +++ b/gcc/lra-remat.c @@ -112,6 +112,9 @@ static int call_used_regs_arr[FIRST_PSEUDO_REGISTER]; /* Bitmap used for different calculations. */ static bitmap_head temp_bitmap; +/* Registers accessed via subreg_p. */ +static bitmap_head subreg_regs; + typedef struct cand *cand_t; typedef const struct cand *const_cand_t; @@ -418,30 +421,30 @@ operand_to_remat (rtx_insn *insn) return -1; /* First find a pseudo which can be rematerialized. */ for (reg = id->regs; reg != NULL; reg = reg->next) - /* True FRAME_POINTER_NEEDED might be because we can not follow - changing sp offsets, e.g. alloca is used. If the insn contains - stack pointer in such case, we can not rematerialize it as we - can not know sp offset at a rematerialization place. */ - if (reg->regno == STACK_POINTER_REGNUM && frame_pointer_needed) - return -1; - else if (reg->type == OP_OUT && ! reg->subreg_p - && find_regno_note (insn, REG_UNUSED, reg->regno) == NULL) - { - /* We permits only one spilled reg. */ - if (found_reg != NULL) - return -1; - found_reg = reg; - } - /* IRA calculates conflicts separately for subregs of two words - pseudo. Even if the pseudo lives, e.g. one its subreg can be - used lately, another subreg hard register can be already used - for something else. In such case, it is not safe to - rematerialize the insn. */ - else if (reg->type == OP_IN && reg->subreg_p - && reg->regno >= FIRST_PSEUDO_REGISTER - && (GET_MODE_SIZE (PSEUDO_REGNO_MODE (reg->regno)) - == 2 * UNITS_PER_WORD)) - return -1; + { + /* True FRAME_POINTER_NEEDED might be because we can not follow + changing sp offsets, e.g. alloca is used. If the insn contains + stack pointer in such case, we can not rematerialize it as we + can not know sp offset at a rematerialization place. */ + if (reg->regno == STACK_POINTER_REGNUM && frame_pointer_needed) + return -1; + else if (reg->type == OP_OUT && ! reg->subreg_p + && find_regno_note (insn, REG_UNUSED, reg->regno) == NULL) + { + /* We permits only one spilled reg. */ + if (found_reg != NULL) + return -1; + found_reg = reg; + } + /* IRA calculates conflicts separately for subregs of two words + pseudo. Even if the pseudo lives, e.g. one its subreg can be + used lately, another subreg hard register can be already used + for something else. In such case, it is not safe to + rematerialize the insn. */ + if (reg->regno >= FIRST_PSEUDO_REGISTER + && bitmap_bit_p (&subreg_regs, reg->regno)) + return -1; + } if (found_reg == NULL) return -1; if (found_reg->regno < FIRST_PSEUDO_REGISTER) @@ -668,6 +671,9 @@ dump_candidates_and_remat_bb_data (void) lra_dump_bitmap_with_title ("avout cands in BB", &get_remat_bb_data (bb)->avout_cands, bb->index); } + fprintf (lra_dump_file, "subreg regs:"); + dump_regset (&subreg_regs, lra_dump_file); + putc ('\n', lra_dump_file); } /* Free all BB data. */ @@ -692,21 +698,24 @@ finish_remat_bb_data (void) -/* Update changed_regs and dead_regs of BB from INSN. */ +/* Update changed_regs, dead_regs, subreg_regs of BB from INSN. */ static void set_bb_regs (basic_block bb, rtx_insn *insn) { lra_insn_recog_data_t id = lra_get_insn_recog_data (insn); + remat_bb_data_t bb_info = get_remat_bb_data (bb); struct lra_insn_reg *reg; for (reg = id->regs; reg != NULL; reg = reg->next) - if (reg->type != OP_IN) - bitmap_set_bit (&get_remat_bb_data (bb)->changed_regs, reg->regno); - else - { - if (find_regno_note (insn, REG_DEAD, (unsigned) reg->regno) != NULL) - bitmap_set_bit (&get_remat_bb_data (bb)->dead_regs, reg->regno); - } + { + unsigned regno = reg->regno; + if (reg->type != OP_IN) + bitmap_set_bit (&bb_info->changed_regs, regno); + else if (find_regno_note (insn, REG_DEAD, regno) != NULL) + bitmap_set_bit (&bb_info->dead_regs, regno); + if (regno >= FIRST_PSEUDO_REGISTER && reg->subreg_p) + bitmap_set_bit (&subreg_regs, regno); + } if (CALL_P (insn)) for (int i = 0; i < call_used_regs_arr_len; i++) bitmap_set_bit (&get_remat_bb_data (bb)->dead_regs, @@ -722,7 +731,7 @@ calculate_local_reg_remat_bb_data (void) FOR_EACH_BB_FN (bb, cfun) FOR_BB_INSNS (bb, insn) - if (INSN_P (insn)) + if (NONDEBUG_INSN_P (insn)) set_bb_regs (bb, insn); } @@ -1321,10 +1330,11 @@ lra_remat (void) if (call_used_regs[i]) call_used_regs_arr[call_used_regs_arr_len++] = i; initiate_cand_table (); - create_cands (); create_remat_bb_data (); bitmap_initialize (&temp_bitmap, ®_obstack); + bitmap_initialize (&subreg_regs, ®_obstack); calculate_local_reg_remat_bb_data (); + create_cands (); calculate_livein_cands (); calculate_gen_cands (); bitmap_initialize (&all_blocks, ®_obstack); @@ -1335,6 +1345,7 @@ lra_remat (void) result = do_remat (); all_cands.release (); bitmap_clear (&temp_bitmap); + bitmap_clear (&subreg_regs); finish_remat_bb_data (); finish_cand_table (); bitmap_clear (&all_blocks); diff --git a/gcc/match.pd b/gcc/match.pd index e40720e130f..405fec67789 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -382,12 +382,15 @@ along with GCC; see the file COPYING3. If not see (bit_not (bit_not @0)) @0) +/* Disable on GENERIC because of PR68513. */ +#if GIMPLE /* (x & ~m) | (y & m) -> ((x ^ y) & m) ^ x */ (simplify (bit_ior:c (bit_and:c@3 @0 (bit_not @2)) (bit_and:c@4 @1 @2)) (if ((TREE_CODE (@3) != SSA_NAME || has_single_use (@3)) && (TREE_CODE (@4) != SSA_NAME || has_single_use (@4))) (bit_xor (bit_and (bit_xor @0 @1) @2) @0))) +#endif /* Associate (p +p off1) +p off2 as (p +p (off1 + off2)). */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7af47eb8dd5..17187f2cce3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,304 @@ +2016-02-04 Jakub Jelinek + + Backported from mainline + 2016-02-03 Jakub Jelinek + + PR target/69644 + * gcc.dg/pr69644.c: New test. + +2016-02-03 Andre Vehreschild + + PR fortran/67451 + PR fortran/69418 + * gfortran.dg/coarray_allocate_2.f08: New test. + * gfortran.dg/coarray_allocate_3.f08: New test. + * gfortran.dg/coarray_allocate_4.f08: New test. + +2016-02-02 Alan Modra + + PR target/69548 + * gcc.target/powerpc/pr69548.c: New test. + +2016-02-01 H.J. Lu + + Backport from mainline + 2016-01-26 H.J. Lu + PR target/68986 + * gcc.target/i386/pr68986-1.c: New test. + * gcc.target/i386/pr68986-2.c: Likewise. + * gcc.target/i386/pr68986-3.c: Likewise. + +2016-01-30 Dominique d'Humieres + + PR fortran/66707 + gfortran.dg/common_23.f90: New test. + + Backport from trunk. + 2015-08-08 Bud Davis + Mikael Morin + + PR fortran/59746 + * gfortran.dg/common_22.f90: New. + +2016-01-29 Bill Schmidt + + PR target/65546 + * gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c: Correct + condition being checked, and disable it when the target supports + misaligned loads and stores. + +2016-01-29 Uros Bizjak + + PR target/69459 + * gcc.target/i386/pr69459.c: New test. + +2016-01-29 Jakub Jelinek + + PR target/69551 + * gcc.target/i386/pr69551.c: New test. + +2016-01-28 Jakub Jelinek + + PR middle-end/69542 + * gcc.dg/torture/pr69542.c: New test. + +2016-01-28 Martin Jambor + + PR tree-optimization/69355 + * gcc.dg/tree-ssa/pr69355.c: New test. + +2016-01-28 Andre Vehreschild + + PR fortran/62536 + * gfortran.dg/block_14.f08: New test. + +2016-01-27 Marek Polacek + + Backport from mainline + 2016-01-27 Marek Polacek + + PR c/68062 + * c-c++-common/vector-compare-4.c: New test. + +2016-01-27 Andre Vehreschild + + PR fortran/69268 + * gfortran.dg/allocatable_scalar_13.f90: Fixing counts of malloc/ + free to fit the actual number of calls. + * gfortran.dg/allocate_with_source_16.f90: New test. + +2016-01-27 Tom de Vries + + * gcc.dg/autopar/pr69110.c: Fix pass number. + +2016-01-26 Tom de Vries + + PR tree-optimization/69110 + * gcc.dg/autopar/pr69110.c: New test. + +2016-01-25 Peter Bergner + + PR fortran/61831 + * gfortran.dg/derived_constructor_comps_6.f90: Add missing } to fix + up dg-additional-options. + +2016-01-25 Dominique d'Humieres + + PR fortran/68283 + gfortran.dg/pr68283.f90: New test. + +2016-01-23 Tom de Vries + + PR tree-optimization/69426 + * gcc.dg/autopar/pr69426.c: New test. + +2016-01-22 Kyrylo Tkachov + + Backport from mainline + 2016-01-22 Kyrylo Tkachov + + PR target/69403 + * gcc.c-torture/execute/pr69403.c: New test. + +2016-01-21 Andreas Krebbel + + Backported from mainline + 2015-07-24 Andreas Krebbel + + * gcc.target/s390/gpr2fprsavecfi.c: New test. + +2016-01-21 Thomas Preud'homme + + Backport from mainline + 2016-01-08 Thomas Preud'homme + + PR tree-optimization/67781 + * gcc.c-torture/execute/pr67781.c: New file. + +2016-01-20 H.J. Lu + + Backport from mainline + 2016-01-20 H.J. Lu + + PR testsuite/69366 + * g++.dg/pr63995-1.C: Require non-x32 target, instead of, + the MPX run-time library, for compile-time MPX test. + * gcc.target/i386/chkp-always_inline.c: Likewise. + * gcc.target/i386/chkp-bndret.c: Likewise. + * gcc.target/i386/chkp-builtins-1.c: Likewise. + * gcc.target/i386/chkp-builtins-2.c: Likewise. + * gcc.target/i386/chkp-builtins-3.c: Likewise. + * gcc.target/i386/chkp-builtins-4.c: Likewise. + * gcc.target/i386/chkp-const-check-1.c: Likewise. + * gcc.target/i386/chkp-const-check-2.c: Likewise. + * gcc.target/i386/chkp-hidden-def.c: Likewise. + * gcc.target/i386/chkp-label-address.c: Likewise. + * gcc.target/i386/chkp-lifetime-1.c: Likewise. + * gcc.target/i386/chkp-narrow-bounds.c: Likewise. + * gcc.target/i386/chkp-remove-bndint-1.c: Likewise. + * gcc.target/i386/chkp-remove-bndint-2.c: Likewise. + * gcc.target/i386/chkp-strchr.c: Likewise. + * gcc.target/i386/chkp-strlen-1.c: Likewise. + * 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. + * gcc.target/i386/pr63995-2.c: Likewise. + * gcc.target/i386/pr64805.c: Likewise. + * gcc.target/i386/pr65044.c: Likewise. + * gcc.target/i386/pr65167.c: Likewise. + * gcc.target/i386/pr65183.c: Likewise. + * gcc.target/i386/pr65184.c: Likewise. + * gcc.target/i386/thunk-retbnd.c: Likewise. + +2016-01-20 Marek Polacek + + PR c/68513 + * gcc.dg/pr68513.c: New test. + +2016-01-19 Sergei Trofimovich + + Backport from mainline + PR other/60465 + * gcc.target/ia64/pr60465-gprel64.c: New test. + * gcc.target/ia64/pr60465-gprel64-c37.c: New test. + +2016-01-19 Jeff Law + + Backport from mainline + 2016-01-12 Jeff Law + + PR tree-optimization/67755 + * gcc.dg/tree-ssa/pr67755.c: New test. + +2016-01-19 Uros Bizjak + + PR testsuite/68820 + * gcc.c-torture/execute/builtins/memops-asm.x: New file. + * gcc.c-torture/execute/builtins/strstr-asm.x: Ditto. + * gcc.c-torture/execute/builtins/strstr-asm.c: Remove dg-options. + +2016-01-19 Marek Polacek + + Backported from mainline + 2016-01-19 Marek Polacek + + PR c++/68965 + * g++.dg/cpp1y/parameter-pack-1.C: New test. + * g++.dg/cpp1y/parameter-pack-2.C: New test. + +2016-01-19 Kyrylo Tkachov + + Backport from mainline + 2016-01-19 Kyrylo Tkachov + + PR target/69135 + * gcc.target/arm/pr69135_1.c: New test. + +2016-01-18 Alexander Fomin + + Backport from mainline + 2015-10-09 Alexander Fomin + + PR target/67895 + * gcc.target/i386/avx512dq-vrangepd-1.c: Adjust. + * gcc.target/i386/avx512dq-vrangeps-1.c: Likewise. + * gcc.target/i386/avx512dq-vrangesd-1.c: Likewise. + * gcc.target/i386/avx512dq-vrangess-1.c: Likewise. + * gcc.target/i386/avx512f-vcvtsi2sd64-1.c: Likewise. + * gcc.target/i386/avx512f-vcvtsi2ss-1.c: Likewise. + * gcc.target/i386/avx512f-vcvtsi2ss64-1.c: Likewise. + * gcc.target/i386/avx512f-vcvtusi2sd64-1.c: Likewise. + * gcc.target/i386/avx512f-vcvtusi2ss-1.c: Likewise. + * gcc.target/i386/avx512f-vcvtusi2ss64-1.c: Likewise. + +2016-01-18 Uros Bizjak + + Backport from mainline + 2016-01-06 Uros Bizjak + + PR target/69140 + * gcc.target/i386/pr69140.c: New test + +2016-01-18 Eric Botcazou + + * gnat.dg/inline12.adb: New test. + +2016-01-17 Mikael Morin + + Backport from trunk. + PR fortran/61831 + * gfortran.dg/derived_constructor_components_6.f90: New file. + * gfortran.dg/allocate_with_source_14.f03: Change count of + __builtin_malloc from 21 to 23. + +2016-01-17 Paul Thomas + + Backport from trunk. + PR fortran/66082 + * gfortran.dg/alloc_comp_auto_array_3.f90: New file. Count of + __builtin_malloc increased from 3 to 4, relative to trunk. + +2016-01-17 Kugan Vivekanandarajah + + Backport from mainline + 2016-01-12 Kugan Vivekanandarajah + Jim Wilson + + PR target/69194 + * gcc.target/arm/pr69194.c: New test. + +2016-01-15 Alexander Fomin + + Backport from mainline + 2016-01-13 Alexander Fomin + + PR target/69228 + * gcc.target/i386/avx512pf-vscatterpf0dpd-1.c: Adjust. + * gcc.target/i386/avx512pf-vscatterpf0dps-1.c: Likewise. + * gcc.target/i386/avx512pf-vscatterpf0qpd-1.c: Likewise. + * gcc.target/i386/avx512pf-vscatterpf0qps-1.c: Likewise. + * gcc.target/i386/avx512pf-vscatterpf1dpd-1.c: Likewise. + * gcc.target/i386/avx512pf-vscatterpf1dps-1.c: Likewise. + * gcc.target/i386/avx512pf-vscatterpf1qpd-1.c: Likewise. + * gcc.target/i386/avx512pf-vscatterpf1qps-1.c: Likewise. + 2016-01-12 James Greenhalgh Backport from mainline r222186. @@ -564,7 +865,7 @@ 2015-11-06 Vladimir Makarov PR rtl-optimization/68106 - * testsuite/gcc.target/aarch64/pr68106.c: New. + * gcc.target/aarch64/pr68106.c: New. 2015-01-25 Paul Thomas @@ -684,8 +985,8 @@ Backport from mainline 2015-10-09 Martin Jambor - * gcc.dg/ipa/ipa-sra-10.c: New test. - * gcc.dg/torture/pr67794.c: Likewise. + * gcc.dg/ipa/ipa-sra-10.c: New test. + * gcc.dg/torture/pr67794.c: Likewise. 2015-10-22 Paul Thomas @@ -3806,7 +4107,7 @@ 2015-03-05 Martin Sebor - * PR testsuite/63175 + PR testsuite/63175 * gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c (main1): Move checking of results into main to prevent it from getting optimized away. diff --git a/gcc/testsuite/c-c++-common/vector-compare-4.c b/gcc/testsuite/c-c++-common/vector-compare-4.c new file mode 100644 index 00000000000..b44f474f395 --- /dev/null +++ b/gcc/testsuite/c-c++-common/vector-compare-4.c @@ -0,0 +1,42 @@ +/* PR c/68062 */ +/* { dg-do compile } */ +/* { dg-options "-Wsign-compare" } */ + +typedef signed char __attribute__ ((vector_size (4))) v4qi; +typedef unsigned char __attribute__ ((vector_size (4))) uv4qi; +typedef signed int __attribute__ ((vector_size (4 * __SIZEOF_INT__))) v4si; +typedef unsigned int __attribute__ ((vector_size (4 * __SIZEOF_INT__))) uv4si; + +v4qi +fn1 (void) +{ + v4qi a = { 1, 2, 3, 4 }; + uv4qi b = { 4, 3, 2, 1 }; + v4qi v = { 0, 0, 0, 0 }; + + v += (a == b); /* { dg-warning "comparison between types" } */ + v += (a != b); /* { dg-warning "comparison between types" } */ + v += (a >= b); /* { dg-warning "comparison between types" } */ + v += (a <= b); /* { dg-warning "comparison between types" } */ + v += (a > b); /* { dg-warning "comparison between types" } */ + v += (a < b); /* { dg-warning "comparison between types" } */ + + return v; +} + +v4si +fn2 (void) +{ + v4si a = { 1, 2, 3, 4 }; + uv4si b = { 4, 3, 2, 1 }; + v4si v = { 0, 0, 0, 0 }; + + v += (a == b); /* { dg-warning "comparison between types" } */ + v += (a != b); /* { dg-warning "comparison between types" } */ + v += (a >= b); /* { dg-warning "comparison between types" } */ + v += (a <= b); /* { dg-warning "comparison between types" } */ + v += (a > b); /* { dg-warning "comparison between types" } */ + v += (a < b); /* { dg-warning "comparison between types" } */ + + return v; +} diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array15.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array15.C new file mode 100644 index 00000000000..a59e6f5df14 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array15.C @@ -0,0 +1,29 @@ +// PR c++/68949 +// { dg-do run { target c++11 } } + +struct Sub { + int i; + + constexpr Sub() : i(-1) {} // remove constexpr and it works as expected + Sub(Sub&& rhs); // remove this constructor and it works as epxected. +}; + +// v-- move this inline and it works as expected +// v-- remove ': Sub()' and it works as expected +Sub::Sub(Sub&& rhs) : Sub() { int tmp = i; i = rhs.i; rhs.i = tmp; } + +struct Class { + // v-- remove '[1]' and it works as expected + // v-- add '= {}' and it works as expected + Sub s[1]; + + // v-- add ': s{}' and it works as expected + // v-- removing this constructor makes it work as expected + Class() {} +}; + +int main() { + Class c; + if (c.s[0].i != -1) + __builtin_abort(); +} diff --git a/gcc/testsuite/g++.dg/cpp0x/union7.C b/gcc/testsuite/g++.dg/cpp0x/union7.C new file mode 100644 index 00000000000..c42d2177ab0 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/union7.C @@ -0,0 +1,15 @@ +// PR c++/69131 +// { dg-do compile { target c++11 } } + +struct X +{ + ~X() {} +}; + +union U +{ + X x; + ~U() {} +}; + +U u; diff --git a/gcc/testsuite/g++.dg/cpp1y/parameter-pack-1.C b/gcc/testsuite/g++.dg/cpp1y/parameter-pack-1.C new file mode 100644 index 00000000000..27a6bf9dedb --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/parameter-pack-1.C @@ -0,0 +1,23 @@ +// PR c++/68965 +// { dg-do compile { target c++14 } } +// { dg-options "-Wall -Wextra" } + +auto count = [](auto&&... xs) +{ + return sizeof...(xs); +}; + +struct count_struct +{ + template + auto operator()(Ts&&... xs) + { + return sizeof...(xs); + } +}; + +int main() +{ + count(1,2,3); + count_struct{}(1,2,3); +} diff --git a/gcc/testsuite/g++.dg/cpp1y/parameter-pack-2.C b/gcc/testsuite/g++.dg/cpp1y/parameter-pack-2.C new file mode 100644 index 00000000000..95208758a6b --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/parameter-pack-2.C @@ -0,0 +1,21 @@ +// PR c++/68965 +// { dg-do compile { target c++14 } } +// { dg-options "-Wall -Wextra" } + +auto count = [](auto&&... xs) // { dg-warning "unused parameter" } +{ +}; + +struct count_struct +{ + template + auto operator()(Ts&&... xs) // { dg-warning "unused parameter" } + { + } +}; + +int main() +{ + count(1,2,3); + count_struct{}(1,2,3); +} diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ47.C b/gcc/testsuite/g++.dg/cpp1y/var-templ47.C new file mode 100644 index 00000000000..a40ec575be4 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/var-templ47.C @@ -0,0 +1,19 @@ +// PR c++/69009 +// { dg-do compile { target c++14 } } + +using _uchar = char; +using _size_t = decltype(sizeof(_uchar)); +using size_t = _size_t; +template struct integral_constant; +template using bool_constant = integral_constant; +template constexpr auto tuple_size_v = 0; +template auto const tuple_size_v = tuple_size_v; +template +using tuple_size = integral_constant>; +template +using is_base_of = bool_constant<__is_base_of(Base, Deriv)>; +template void test() { + is_base_of, tuple_size> value( + is_base_of, tuple_size>); +} +void foo() { test; } diff --git a/gcc/testsuite/g++.dg/pr63995-1.C b/gcc/testsuite/g++.dg/pr63995-1.C index 82e76063ef1..41a1c01153b 100644 --- a/gcc/testsuite/g++.dg/pr63995-1.C +++ b/gcc/testsuite/g++.dg/pr63995-1.C @@ -1,5 +1,4 @@ -/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ! x32 } } } } */ /* { dg-options "-O2 -g -fcheck-pointer-bounds -mmpx" } */ int test1 (int i) diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/memops-asm.x b/gcc/testsuite/gcc.c-torture/execute/builtins/memops-asm.x new file mode 100644 index 00000000000..031049dc812 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/builtins/memops-asm.x @@ -0,0 +1,10 @@ +# Different translation units may have different user name overrides +# and we do not preserve enough context to known which one we want. + +set torture_eval_before_compile { + if {[string match {*-flto*} "$option"]} { + continue + } +} + +return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.c b/gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.c index 41678412b63..3c3e45dfa5d 100644 --- a/gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.c +++ b/gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.c @@ -2,7 +2,6 @@ Ensure all expected transformations of builtin strstr occur and perform correctly in presence of redirect. */ -/* { dg-options "-ffat-lto-objects" } */ #define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname) #define ASMNAME2(prefix, cname) STRING (prefix) cname diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.x b/gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.x new file mode 100644 index 00000000000..031049dc812 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.x @@ -0,0 +1,10 @@ +# Different translation units may have different user name overrides +# and we do not preserve enough context to known which one we want. + +set torture_eval_before_compile { + if {[string match {*-flto*} "$option"]} { + continue + } +} + +return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr69447.c b/gcc/testsuite/gcc.c-torture/execute/pr69447.c new file mode 100644 index 00000000000..b6d8591f6d6 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr69447.c @@ -0,0 +1,26 @@ +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long long u64; + +u64 __attribute__((noinline, noclone)) +foo(u8 u8_0, u16 u16_0, u64 u64_0, u8 u8_1, u16 u16_1, u64 u64_1, u64 u64_2, u8 u8_3, u64 u64_3) +{ + u64_1 *= 0x7730; + u64_3 *= u64_3; + u16_1 |= u64_3; + u64_3 -= 2; + u8_3 /= u64_2; + u8_0 |= 3; + u64_3 %= u8_0; + u8_0 -= 1; + return u8_0 + u16_0 + u64_0 + u8_1 + u16_1 + u64_1 + u8_3 + u64_3; +} + +int main() +{ + unsigned x = foo(1, 1, 1, 1, 1, 1, 1, 1, 1); + if (x != 0x7737) + __builtin_abort(); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/autopar/pr69110.c b/gcc/testsuite/gcc.dg/autopar/pr69110.c new file mode 100644 index 00000000000..438281dd990 --- /dev/null +++ b/gcc/testsuite/gcc.dg/autopar/pr69110.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -ftree-parallelize-loops=2 -fno-tree-loop-im -fdump-tree-parloops-details" } */ + +#define N 1000 + +unsigned int i = 0; + +void +foo (void) +{ + unsigned int z; + for (z = 0; z < N; ++z) + ++i; +} + +/* { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 0 "parloops" } } */ +/* { dg-final { scan-tree-dump-times "FAILED: data dependencies exist across iterations" 1 "parloops" } } */ diff --git a/gcc/testsuite/gcc.dg/autopar/pr69426.c b/gcc/testsuite/gcc.dg/autopar/pr69426.c new file mode 100644 index 00000000000..e91421cefed --- /dev/null +++ b/gcc/testsuite/gcc.dg/autopar/pr69426.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftree-parallelize-loops=2" } */ + +int iq; + +void +mr(void) +{ + unsigned int i8; + + for (i8 = 0; i8 != 1; i8 += 3) { + void *f0[] = { f0 }; + int hv; + + for (; hv < 1; ++hv) + iq = 0; + } + ++iq; +} diff --git a/gcc/testsuite/gcc.dg/pr68513.c b/gcc/testsuite/gcc.dg/pr68513.c new file mode 100644 index 00000000000..86f878d5d73 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr68513.c @@ -0,0 +1,125 @@ +/* PR c/68513 */ +/* { dg-do compile } */ +/* { dg-options "-funsafe-math-optimizations -fno-math-errno -O -Wno-div-by-zero" } */ + +int i; +unsigned u; +volatile int *e; + +#define E (i ? *e : 0) + +/* Can't trigger some of them because operand_equal_p will return false + for side-effects. */ + +/* (x & ~m) | (y & m) -> ((x ^ y) & m) ^ x */ +int +fn1 (void) +{ + int r = 0; + r += (short) (E & ~u | i & u); + r += -(short) (E & ~u | i & u); + r += (short) -(E & ~u | i & u); + return r; +} + +/* sqrt(x) < y is x >= 0 && x != +Inf, when y is large. */ +double +fn2 (void) +{ + double r; + r = __builtin_sqrt (E) < __builtin_inf (); + return r; +} + +/* sqrt(x) < c is the same as x >= 0 && x < c*c. */ +double +fn3 (void) +{ + double r; + r = __builtin_sqrt (E) < 1.3; + return r; +} + +/* copysign(x,y)*copysign(x,y) -> x*x. */ +double +fn4 (double y, double x) +{ + return __builtin_copysign (E, y) * __builtin_copysign (E, y); +} + +/* x <= +Inf is the same as x == x, i.e. !isnan(x). */ +int +fn5 (void) +{ + return E <= __builtin_inf (); +} + +/* Fold (A & ~B) - (A & B) into (A ^ B) - B. */ +int +fn6 (void) +{ + return (i & ~E) - (i & E); +} + +/* Fold (A & B) - (A & ~B) into B - (A ^ B). */ +int +fn7 (void) +{ + return (i & E) - (i & ~E); +} + +/* x + (x & 1) -> (x + 1) & ~1 */ +int +fn8 (void) +{ + return E + (E & 1); +} + +/* Simplify comparison of something with itself. */ +int +fn9 (void) +{ + return E <= E | E >= E; +} + +/* Fold (A & ~B) - (A & B) into (A ^ B) - B. */ +int +fn10 (void) +{ + return (i & ~E) - (i & E); +} + +/* abs(x)*abs(x) -> x*x. Should be valid for all types. */ +int +fn11 (void) +{ + return __builtin_abs (E) * __builtin_abs (E); +} + +/* (x | CST1) & CST2 -> (x & CST2) | (CST1 & CST2) */ +int +fn12 (void) +{ + return (E | 11) & 12; +} + +/* fold_range_test */ +int +fn13 (const char *s) +{ + return s[E] != '\0' && s[E] != '/'; +} + +/* fold_comparison */ +int +fn14 (void) +{ + return (!!i ? : (u *= E / 0)) >= (u = E); +} + +/* fold_mult_zconjz */ +_Complex int +fn15 (_Complex volatile int *z) +{ + return *z * ~*z; +} diff --git a/gcc/testsuite/gcc.dg/pr69644.c b/gcc/testsuite/gcc.dg/pr69644.c new file mode 100644 index 00000000000..c60b1917029 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr69644.c @@ -0,0 +1,11 @@ +/* PR target/69644 */ +/* { dg-do compile } */ + +int +main () +{ + unsigned short x = 0x8000; + if (!__sync_bool_compare_and_swap (&x, 0x8000, 0) || x) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr69542.c b/gcc/testsuite/gcc.dg/torture/pr69542.c new file mode 100644 index 00000000000..ced5c326ac8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr69542.c @@ -0,0 +1,37 @@ +/* PR middle-end/69542 */ +/* { dg-do compile } */ +/* { dg-additional-options "-fcompare-debug" } */ + +typedef struct A *B; +extern int *a[]; +struct C { B b; struct D *d; }; +struct A { struct { struct C e[1]; long long f[1]; } u; }; +struct D { int g; B h[100]; }; +int b, c, e, g; +B d, f; +void foo (void) __attribute__ ((__noreturn__)); +int bar (void) +{ + int i = 0; + do + { + if ('E' && a[e][0] != 'V') + foo (); + struct D *k = d->u.e[0].d; + B x = k->h[i], o = f->u.e[0].b; + if (b) + return 0; + if (a[g][0] != 'E' && a[g][0] != 'V') + foo (); + struct D *n = o->u.e[0].d; + int r = x->u.f[0]; + (void) r; + if (c) + foo (); + B y = n->h[x->u.f[0]]; + if (i != y->u.f[0]) + return 0; + i++; + } + while (1); +} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr67755.c b/gcc/testsuite/gcc.dg/tree-ssa/pr67755.c new file mode 100644 index 00000000000..64ffd0b349b --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr67755.c @@ -0,0 +1,25 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-dom2-details-blocks" } */ +/* We want to verify no outgoing edge from a conditional + has a probability of 100%. */ +/* { dg-final { scan-tree-dump-not "succ:\[ \]+. .100.0%. .\(TRUE|FALSE\)_VALUE" "dom2"} } */ + + +void (*zend_block_interruptions) (void); + +int * _zend_mm_alloc_int (int * heap, long int size) +{ + int *best_fit; + long int true_size = (size < 15 ? 32 : size); + + if (zend_block_interruptions) + zend_block_interruptions (); + + if (__builtin_expect ((true_size < 543), 1)) + best_fit = heap + 2; + else + best_fit = heap; + + return best_fit; +} + diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr69355.c b/gcc/testsuite/gcc.dg/tree-ssa/pr69355.c new file mode 100644 index 00000000000..f515c211c99 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr69355.c @@ -0,0 +1,44 @@ +/* { dg-do run } */ +/* { dg-options "-O -fno-strict-aliasing" } */ + +struct S +{ + void *a; + long double b; +}; + +struct Z +{ + long long l; + short s; +} __attribute__((packed)); + +struct S __attribute__((noclone, noinline)) +foo (void *v, struct Z *z) +{ + struct S t; + t.a = v; + *(struct Z *) &t.b = *z; + return t; +} + +struct Z gz; + +int +main (int argc, char **argv) +{ + struct S s; + + if (sizeof (long double) < sizeof (struct Z)) + return 0; + + gz.l = 0xbeef; + gz.s = 0xab; + + s = foo ((void *) 0, &gz); + + if ((((struct Z *) &s.b)->l != gz.l) + || (((struct Z *) &s.b)->s != gz.s)) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c index ff67ff28130..72b4930d9bb 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c +++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c @@ -46,5 +46,5 @@ int main (void) return main1 (); } -/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 1 "vect" { target { ! vect_hw_misalign } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_hw_misalign } } } } */ diff --git a/gcc/testsuite/gcc.target/arm/pr69194.c b/gcc/testsuite/gcc.target/arm/pr69194.c new file mode 100644 index 00000000000..477d5f92c8e --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr69194.c @@ -0,0 +1,13 @@ +/* PR target/69194 */ +/* { dg-do-compile } */ +/* { dg-require-effective-target arm_neon_ok } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_neon } */ + +typedef __simd128_float32_t float32x4_t; + +float32x4_t +sub (float32x4_t a, float32x4_t b, float32x4_t c, float32x4_t d, float32x4_t e) +{ + return __builtin_neon_vld1v4sf((const float *)&e); +} diff --git a/gcc/testsuite/gcc.target/i386/avx512dq-vrangepd-1.c b/gcc/testsuite/gcc.target/i386/avx512dq-vrangepd-1.c index 034c2337e9e..7e5a9cb1393 100644 --- a/gcc/testsuite/gcc.target/i386/avx512dq-vrangepd-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512dq-vrangepd-1.c @@ -1,15 +1,15 @@ /* { dg-do compile } */ /* { dg-options "-mavx512dq -mavx512vl -O2" } */ -/* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ diff --git a/gcc/testsuite/gcc.target/i386/avx512dq-vrangeps-1.c b/gcc/testsuite/gcc.target/i386/avx512dq-vrangeps-1.c index 47f974b02f7..a376dc13e72 100644 --- a/gcc/testsuite/gcc.target/i386/avx512dq-vrangeps-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512dq-vrangeps-1.c @@ -3,15 +3,15 @@ /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512dq-vrangesd-1.c b/gcc/testsuite/gcc.target/i386/avx512dq-vrangesd-1.c index 6f320c0ef89..4f7d6352da4 100644 --- a/gcc/testsuite/gcc.target/i386/avx512dq-vrangesd-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512dq-vrangesd-1.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-mavx512dq -O2" } */ /* { dg-final { scan-assembler-times "vrangesd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vrangesd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vrangesd\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512dq-vrangess-1.c b/gcc/testsuite/gcc.target/i386/avx512dq-vrangess-1.c index 8be003238aa..b0ed86d59ad 100644 --- a/gcc/testsuite/gcc.target/i386/avx512dq-vrangess-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512dq-vrangess-1.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-mavx512dq -O2" } */ /* { dg-final { scan-assembler-times "vrangess\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vrangess\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vrangess\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2sd64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2sd64-1.c index cceaf599043..7e8bcc0f73e 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2sd64-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2sd64-1.c @@ -1,6 +1,6 @@ /* { dg-do compile { target { ! { ia32 } } } } */ /* { dg-options "-mavx512f -O2" } */ -/* { dg-final { scan-assembler-times "vcvtsi2sdq\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtsi2sdq\[ \\t\]+\[^%\n\]*%r\[^\{\n\]*\{ru-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss-1.c index 832f636bf39..179ab64a726 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mavx512f -O2" } */ -/* { dg-final { scan-assembler-times "vcvtsi2ss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtsi2ss\[ \\t\]+\[^%\n\]*%e\[^\{\n\]*\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss64-1.c index 061924069c9..114a687707b 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss64-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss64-1.c @@ -1,6 +1,6 @@ /* { dg-do compile { target { ! { ia32 } } } } */ /* { dg-options "-mavx512f -O2" } */ -/* { dg-final { scan-assembler-times "vcvtsi2ssq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtsi2ssq\[ \\t\]+\[^%\n\]*%r\[^\{\n\]*\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c index 4eea866fe4b..fcdfcacbeca 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c @@ -1,7 +1,7 @@ /* { dg-do compile { target { ! { ia32 } } } } */ /* { dg-options "-mavx512f -O2" } */ /* { dg-final { scan-assembler-times "vcvtusi2sd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vcvtusi2sd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtusi2sd\[ \\t\]+\[^%\n\]*%r\[^\{\n\]*\{ru-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-1.c index 3a621735cd2..cbd5d3f0d5e 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-1.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-mavx512f -O2" } */ /* { dg-final { scan-assembler-times "vcvtusi2ss\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vcvtusi2ss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtusi2ss\[ \\t\]+\[^%\n\]*%e\[^\{\n\]*\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c index 11f0969fbbf..6b9368f8704 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c @@ -1,7 +1,7 @@ /* { dg-do compile { target { ! { ia32 } } } } */ /* { dg-options "-mavx512f -O2" } */ /* { dg-final { scan-assembler-times "vcvtusi2ss\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vcvtusi2ss\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvtusi2ss\[ \\t\]+\[^%\n\]*%r\[^\{\n\]*\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dpd-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dpd-1.c index ace50de4fe2..5a153ea3d4c 100644 --- a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dpd-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dpd-1.c @@ -1,7 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mavx512pf -O2" } */ -/* { dg-final { scan-assembler-times "vscatterpf0dpd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*\\)(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vscatterpf0dpd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vscatterpf0dpd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */ #include volatile __m256i idx; diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dps-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dps-1.c index d648b2ee95c..d1173a2b7f3 100644 --- a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dps-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dps-1.c @@ -1,7 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mavx512pf -O2" } */ -/* { dg-final { scan-assembler-times "vscatterpf0dps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vscatterpf0dps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vscatterpf0dps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qpd-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qpd-1.c index d32345c5a9b..67529e7be83 100644 --- a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qpd-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qpd-1.c @@ -1,7 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mavx512pf -O2" } */ -/* { dg-final { scan-assembler-times "vscatterpf0qpd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vscatterpf0qpd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vscatterpf0qpd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qps-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qps-1.c index 44c908fe4f0..9ff580fea4d 100644 --- a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qps-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qps-1.c @@ -1,7 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mavx512pf -O2" } */ -/* { dg-final { scan-assembler-times "vscatterpf0qps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vscatterpf0qps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vscatterpf0qps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dpd-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dpd-1.c index ff383380369..73a029d10a1 100644 --- a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dpd-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dpd-1.c @@ -1,7 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mavx512pf -O2" } */ -/* { dg-final { scan-assembler-times "vscatterpf1dpd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*\\)(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vscatterpf1dpd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vscatterpf1dpd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dps-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dps-1.c index 8ec3388cd77..439bc853485 100644 --- a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dps-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dps-1.c @@ -1,7 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mavx512pf -O2" } */ -/* { dg-final { scan-assembler-times "vscatterpf1dps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vscatterpf1dps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vscatterpf1dps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qpd-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qpd-1.c index 2c4eb2a5b47..3ae16cd2e19 100644 --- a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qpd-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qpd-1.c @@ -1,7 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mavx512pf -O2" } */ -/* { dg-final { scan-assembler-times "vscatterpf1qpd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vscatterpf1qpd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vscatterpf1qpd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qps-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qps-1.c index 34bcb654949..35cd7d3b5d3 100644 --- a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qps-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qps-1.c @@ -1,7 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-mavx512pf -O2" } */ -/* { dg-final { scan-assembler-times "vscatterpf1qps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vscatterpf1qps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vscatterpf1qps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 2 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/chkp-always_inline.c b/gcc/testsuite/gcc.target/i386/chkp-always_inline.c index 26e80fe1975..c10d1310e0e 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-always_inline.c +++ b/gcc/testsuite/gcc.target/i386/chkp-always_inline.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wno-attributes" } */ static __attribute__((always_inline)) int f1 (int *p) diff --git a/gcc/testsuite/gcc.target/i386/chkp-bndret.c b/gcc/testsuite/gcc.target/i386/chkp-bndret.c index e1f5cea5c17..d84ea70dcda 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-bndret.c +++ b/gcc/testsuite/gcc.target/i386/chkp-bndret.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bndret" "chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c index 2acc087e62a..99cfa82681c 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bnd_init_ptr_bounds" "chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c index dc62238c5bd..6da8d0a83ff 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bnd_copy_ptr_bounds" "chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c index 055f0ed07d9..ae30534c6da 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c +++ b/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bnd_set_ptr_bounds" "chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c index 434df78ac34..d408a490b13 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c +++ b/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bnd_null_ptr_bounds" "chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c b/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c index 4170886584f..6e6d067fb50 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt" } */ /* { dg-final { scan-tree-dump-not "bndcl" "chkpopt" } } */ /* { dg-final { scan-tree-dump-not "bndcu" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c b/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c index 18e497a0b92..683c21ddbe7 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */ int test (int *p) diff --git a/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c b/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c index 8d2b2288db2..ca7e9d2e5ce 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c +++ b/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ /* { dg-final { scan-assembler-not "test.chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-label-address.c b/gcc/testsuite/gcc.target/i386/chkp-label-address.c index 05963e2e6ed..979c33e93e3 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-label-address.c +++ b/gcc/testsuite/gcc.target/i386/chkp-label-address.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */ #include diff --git a/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c b/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c index 5ceaa8e4621..70b8b38dc28 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt-details" } */ /* { dg-final { scan-tree-dump "Moving creation of \[^ \]+ down to its use" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c b/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c index 60e4ed2d602..ab1b122479a 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c +++ b/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump "bndcl" "chkp" } } */ /* { dg-final { scan-tree-dump "bndcu" "chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c b/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c index 7a87926a9c0..7c0f13f8ccf 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized" } */ /* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c b/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c index 942f555b3a1..413941abcc2 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized -Wchkp" } */ /* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-strchr.c b/gcc/testsuite/gcc.target/i386/chkp-strchr.c index 94a5eaab692..01ee619dfd9 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strchr.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strchr.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ #include "string.h" diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c index 01a7b397e6a..de6279f1dfa 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump "memcpy.chkp" "strlen" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c index c20ad8f099d..9f584efee0a 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-require-effective-target stpcpy } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump-not "strlen" "strlen" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c index c8e9a7c6699..311c9a042e0 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c index 62166d0d875..794c8a860da 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-require-effective-target mempcpy } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen -D_GNU_SOURCE" } */ /* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c index 66e9a63a0c4..e44096cd429 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump-times "strlen" 2 "strlen" } } */ /* { dg-final { scan-tree-dump "memcpy" "strlen" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c index 49e62f4fc22..18aa2819cdf 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ /* { dg-final { scan-tree-dump "memcpy_nochk" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c index b8454df956b..26e9f13a190 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump-not "memset_nobnd" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c index 13b6e02e1fb..e84963f11f7 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump-not "memmove_nobnd" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c index 2f1873044bf..898e7768b30 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-require-effective-target mempcpy } */ /* { 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" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c index 609d162d026..3b926b11f83 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { 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" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c index 3c876178a7e..a8d000ba1fa 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { 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" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c index ffe48f65a7d..7c6065657c0 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { 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" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c index d4336be1445..891adb4f293 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-require-effective-target mempcpy } */ /* { 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" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c index 0187411edaf..cac0feaecbb 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ /* { dg-final { scan-tree-dump "memset_nochk" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c index a8da83b5ec4..72ff3869f7b 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ /* { dg-final { scan-tree-dump "memmove_nochk" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c index a68d8fb0e40..3faa58b0aea 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-require-effective-target mempcpy } */ /* { 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" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c index b449801b4a9..02ad9ccc496 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memcpy_nobnd" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c index ffb34b6d92e..6db5d83a0bc 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memset_nobnd" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c index ddaa6234d21..761e6263d86 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memmove_nobnd" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c index 67c34e05e60..01bff6930a3 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-require-effective-target mempcpy } */ /* { 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" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c index 3b14b031ba1..b79d09633dd 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump-not "memcpy_nobnd" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr63995-2.c b/gcc/testsuite/gcc.target/i386/pr63995-2.c index 7c22e625a8d..89b429e7f55 100644 --- a/gcc/testsuite/gcc.target/i386/pr63995-2.c +++ b/gcc/testsuite/gcc.target/i386/pr63995-2.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-O2 -g -fcheck-pointer-bounds -mmpx -fcompare-debug" } */ struct ts diff --git a/gcc/testsuite/gcc.target/i386/pr64805.c b/gcc/testsuite/gcc.target/i386/pr64805.c index 8ba0a972208..3c8d6668dfa 100644 --- a/gcc/testsuite/gcc.target/i386/pr64805.c +++ b/gcc/testsuite/gcc.target/i386/pr64805.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx" } */ #include diff --git a/gcc/testsuite/gcc.target/i386/pr65044.c b/gcc/testsuite/gcc.target/i386/pr65044.c index 4f318d62f88..3b129862aa9 100644 --- a/gcc/testsuite/gcc.target/i386/pr65044.c +++ b/gcc/testsuite/gcc.target/i386/pr65044.c @@ -1,6 +1,5 @@ /* { dg-error "-fcheck-pointer-bounds is not supported with Address Sanitizer" } */ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fsanitize=address" } */ extern int x[]; diff --git a/gcc/testsuite/gcc.target/i386/pr65167.c b/gcc/testsuite/gcc.target/i386/pr65167.c index 35f3d6bc884..64cc7aef520 100644 --- a/gcc/testsuite/gcc.target/i386/pr65167.c +++ b/gcc/testsuite/gcc.target/i386/pr65167.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-O -fschedule-insns -fcheck-pointer-bounds -mmpx" } */ void bar(int *a, int *b, int *c, int *d, int *e, int *f); diff --git a/gcc/testsuite/gcc.target/i386/pr65183.c b/gcc/testsuite/gcc.target/i386/pr65183.c index 069a543af36..4d62267fc0d 100644 --- a/gcc/testsuite/gcc.target/i386/pr65183.c +++ b/gcc/testsuite/gcc.target/i386/pr65183.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-O -fcheck-pointer-bounds -fchkp-use-nochk-string-functions -mmpx" } */ extern void bar(void *); diff --git a/gcc/testsuite/gcc.target/i386/pr65184.c b/gcc/testsuite/gcc.target/i386/pr65184.c index 0355f29a0f2..e12b8a922f1 100644 --- a/gcc/testsuite/gcc.target/i386/pr65184.c +++ b/gcc/testsuite/gcc.target/i386/pr65184.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-O2 -mabi=ms -fcheck-pointer-bounds -mmpx" } */ void diff --git a/gcc/testsuite/gcc.target/i386/pr68986-1.c b/gcc/testsuite/gcc.target/i386/pr68986-1.c new file mode 100644 index 00000000000..998f34f05b4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr68986-1.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target tls_native } */ +/* { dg-require-effective-target fpic } */ +/* { dg-options "-fPIC -mno-accumulate-outgoing-args -mpreferred-stack-boundary=5 -mincoming-stack-boundary=4" } */ + +extern __thread int msgdata; +int +foo () +{ + return msgdata; +} diff --git a/gcc/testsuite/gcc.target/i386/pr68986-2.c b/gcc/testsuite/gcc.target/i386/pr68986-2.c new file mode 100644 index 00000000000..c3a366c1958 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr68986-2.c @@ -0,0 +1,13 @@ +/* { dg-do compile { target ia32 } } */ +/* { dg-require-effective-target tls_native } */ +/* { dg-require-effective-target fpic } */ +/* { dg-options "-fPIC -mno-accumulate-outgoing-args -mpreferred-stack-boundary=2" } */ + +extern __thread int msgdata; +int +foo () +{ + return msgdata; +} + +/* { dg-final { scan-assembler "andl\[\\t \]*\\$-16,\[\\t \]*%esp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr68986-3.c b/gcc/testsuite/gcc.target/i386/pr68986-3.c new file mode 100644 index 00000000000..5744cf222ae --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr68986-3.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target tls_native } */ +/* { dg-require-effective-target fpic } */ +/* { dg-options "-fPIC -mno-sse -mpreferred-stack-boundary=3 -mincoming-stack-boundary=3" } */ + +extern __thread int msgdata; +int +foo () +{ + return msgdata; +} + +/* { dg-final { scan-assembler "and\[lq\]\[\\t \]*\\$-16,\[\\t \]*%\[re\]?sp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr69140.c b/gcc/testsuite/gcc.target/i386/pr69140.c new file mode 100644 index 00000000000..2c345dd75bc --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr69140.c @@ -0,0 +1,24 @@ +/* { dg-do compile { target lp64 } } */ +/* { dg-options "-O2 -mincoming-stack-boundary=3" } */ + +typedef struct { + unsigned int buf[4]; + unsigned char in[64]; +} MD4_CTX; + +static void +MD4Transform (unsigned int buf[4], const unsigned int in[16]) +{ + unsigned int a, b, c, d; + (b) += ((((c)) & ((d))) | ((~(c)) & ((a)))) + (in[7]); + (a) += ((((b)) & ((c))) | ((~(b)) & ((d)))) + (in[8]); + (d) += ((((a)) & ((b))) | ((~(a)) & ((c)))) + (in[9]); + buf[3] += d; +} + +void __attribute__((ms_abi)) +MD4Update (MD4_CTX *ctx, const unsigned char *buf) +{ + MD4Transform( ctx->buf, (unsigned int *)ctx->in); + MD4Transform( ctx->buf, (unsigned int *)ctx->in); +} diff --git a/gcc/testsuite/gcc.target/i386/pr69459.c b/gcc/testsuite/gcc.target/i386/pr69459.c new file mode 100644 index 00000000000..2d0bbbcdbf1 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr69459.c @@ -0,0 +1,42 @@ +/* PR target/69549 */ +/* { dg-do run { target sse2_runtime } } */ +/* { dg-options "-O2 -msse2" } */ + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long long u64; +typedef unsigned char v16u8 __attribute__ ((vector_size (16))); +typedef unsigned short v16u16 __attribute__ ((vector_size (16))); +typedef unsigned int v16u32 __attribute__ ((vector_size (16))); +typedef unsigned long long v16u64 __attribute__ ((vector_size (16))); + +u64 __attribute__((noinline, noclone)) +foo (u8 u8_0, u16 u16_3, v16u8 v16u8_0, v16u16 v16u16_0, v16u32 v16u32_0, v16u64 v16u64_0, v16u8 v16u8_1, v16u16 v16u16_1, v16u32 v16u32_1, v16u64 v16u64_1, v16u8 v16u8_2, v16u16 v16u16_2, v16u32 v16u32_2, v16u64 v16u64_2, v16u8 v16u8_3, v16u16 v16u16_3, v16u32 v16u32_3, v16u64 v16u64_3) +{ + v16u64_0 /= (v16u64){u16_3, ((0))} | 1; + v16u64_1 += (v16u64)~v16u32_0; + v16u16_1 /= (v16u16){-v16u64_3[1]} | 1; + v16u64_3[1] -= 0x1fffffff; + v16u32_2 /= (v16u32)-v16u64_0 | 1; + v16u32_1 += ~v16u32_1; + v16u16_3 %= (v16u16){0xfff, v16u32_2[3], v16u8_0[14]} | 1; + v16u64_3 -= (v16u64)v16u32_2; + if (v16u64_1[1] >= 1) { + v16u64_0 %= (v16u64){v16u32_0[1]} | 1; + v16u32_1[1] %= 0x5fb856; + v16u64_1 |= -v16u64_0; + } + v16u8_0 *= (v16u8)v16u32_1; + return u8_0 + v16u8_0 [12] + v16u8_0 [13] + v16u8_0 [14] + v16u8_0 [15] + v16u16_0 [0] + v16u16_0 [1] + v16u32_0 [0] + v16u32_0 [1] + v16u32_0 [2] + v16u32_0 [3] + v16u64_0 [0] + v16u64_0 [1] + v16u8_1 [9] + v16u8_1 [10] + v16u8_1 [11] + v16u8_1 [15] + v16u16_1 [0] + v16u16_1 [1] + v16u16_1 [3] + v16u64_1 [0] + v16u64_1 [1] + v16u8_2 [3] + v16u8_2 [4] + v16u8_2 [5] + v16u8_2 [0] + v16u32_2 [1] + v16u32_2 [2] + v16u32_2 [3] + v16u64_2 [0] + v16u64_2 [1] + v16u8_3 [0] + v16u16_3 [6] + v16u16_3[7] + v16u32_3[1] + v16u32_3[2] + v16u64_3[0] + v16u64_3[1]; +} + +int +main () +{ + u64 x = foo(1, 1, (v16u8){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, (v16u16){1, 1}, (v16u32){1}, (v16u64){1}, (v16u8){1}, (v16u16){1, 1}, (v16u32){1}, (v16u64){1}, (v16u8){1, 1, 1, 1, 1}, (v16u16){1}, (v16u32){1}, (v16u64){1}, (v16u8){1}, (v16u16){1}, (v16u32){1}, (v16u64){1}); + + if (x != 0xffffffffe0000209) + __builtin_abort(); + return 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr69551.c b/gcc/testsuite/gcc.target/i386/pr69551.c new file mode 100644 index 00000000000..1505fc21dbf --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr69551.c @@ -0,0 +1,23 @@ +/* PR target/69551 */ +/* { dg-do run { target sse_runtime } } */ +/* { dg-options "-O2 -mno-sse2 -msse" } */ + +typedef unsigned char v16qi __attribute__ ((vector_size (16))); +typedef unsigned int v4si __attribute__ ((vector_size (16))); + +char __attribute__ ((noinline, noclone)) +test (v4si vec) +{ + vec[1] = 0x5fb856; + return ((v16qi) vec)[0]; +} + +int +main () +{ + char z = test ((v4si) { -1, -1, -1, -1 }); + + if (z != -1) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.target/i386/thunk-retbnd.c b/gcc/testsuite/gcc.target/i386/thunk-retbnd.c index 88ec9c9441d..dcce6baf104 100644 --- a/gcc/testsuite/gcc.target/i386/thunk-retbnd.c +++ b/gcc/testsuite/gcc.target/i386/thunk-retbnd.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -fdump-tree-optimized" } */ /* { dg-final { scan-tree-dump-times "return &glob," 2 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/ia64/pr60465-gprel64-c37.c b/gcc/testsuite/gcc.target/ia64/pr60465-gprel64-c37.c new file mode 100644 index 00000000000..a7e6809eb6d --- /dev/null +++ b/gcc/testsuite/gcc.target/ia64/pr60465-gprel64-c37.c @@ -0,0 +1,10 @@ +/* { dg-do compile { target ia64-*-* } } */ +/* { dg-options "-O2 -fpic" } */ +/* { dg-final { scan-assembler-not "@ltoffx" } } */ + +/* A bit of https://bugzilla.redhat.com/show_bug.cgi?id=33354 + where many stores to static variables overflow .sdata */ + +static const char *s90; +void f() { s90 = "string 90"; } +const char * g() { return s90; } diff --git a/gcc/testsuite/gcc.target/ia64/pr60465-gprel64.c b/gcc/testsuite/gcc.target/ia64/pr60465-gprel64.c new file mode 100644 index 00000000000..c00ecc947d9 --- /dev/null +++ b/gcc/testsuite/gcc.target/ia64/pr60465-gprel64.c @@ -0,0 +1,27 @@ +/* { dg-do compile { target ia64-*-* } } */ +/* { dg-options "-O2 -fpic" } */ +/* { dg-final { scan-assembler-not "@ltoffx" } } */ + +/* Test imitates early ld.so setup in glibc + where no dynamic relocations must be present. */ + +struct rtld_global +{ + long *p[77]; +}; + +struct rtld_global _rtld_local __attribute__ ((visibility ("hidden"), section (".sdata"))); + +static void __attribute__ ((unused, noinline)) +elf_get_dynamic_info (struct rtld_global * g, long * dyn) +{ + long **info = g->p; + + info[(0x6ffffeff - *dyn) + 66] = dyn; +} + +void __attribute__ ((unused, noinline)) +_dl_start (long * dyn) +{ + elf_get_dynamic_info(&_rtld_local, dyn); +} diff --git a/gcc/testsuite/gcc.target/powerpc/pr69548.c b/gcc/testsuite/gcc.target/powerpc/pr69548.c new file mode 100644 index 00000000000..439f588b874 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr69548.c @@ -0,0 +1,11 @@ +/* { dg-do assemble { target { powerpc*-*-* && lp64 } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ +/* { dg-require-effective-target powerpc_p8vector_ok } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ +/* { dg-options "-mcpu=power8 -Os -mbig" } */ + +__int128 +quad_exchange (__int128 *ptr, __int128 newval) +{ + return __atomic_exchange_n (ptr, newval, __ATOMIC_RELAXED); +} diff --git a/gcc/testsuite/gcc.target/s390/gpr2fprsavecfi.c b/gcc/testsuite/gcc.target/s390/gpr2fprsavecfi.c new file mode 100644 index 00000000000..92a0d3ae29a --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/gpr2fprsavecfi.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -march=z10 -mzarch -fdwarf2-cfi-asm" } */ + +char *gl[100]; + +long +foo () +{ + long r = 0; + char bla[100]; + int i; + + __builtin_memcpy (bla, gl, 100); + + for (i = 0; i < 100; i++) + r += bla[i]; + + return r; +} + +/* { dg-final { scan-assembler-not "cfi_def_cfa_register" } } */ +/* { dg-final { scan-assembler "cfi_register" } } */ +/* { dg-final { scan-assembler "cfi_def_cfa_offset" } } */ diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_3.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_3.f90 new file mode 100644 index 00000000000..c96a4df237b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_3.f90 @@ -0,0 +1,30 @@ +! { dg-do compile } +! { dg-options "-fdump-tree-original" } +! +! Test the fix for PR66082. The original problem was with the first +! call foo_1d. +! +! Reported by Damian Rouson +! + type foo_t + real, allocatable :: bigarr + end type + block + type(foo_t) :: foo + allocate(foo%bigarr) + call foo_1d (1,[foo]) ! was lost + call foo_1d (1,bar_1d()) ! Check that this is OK + end block +contains + subroutine foo_1d (n,foo) + integer n + type(foo_t) :: foo(n) + end subroutine + function bar_1d () result (array) + type(foo_t) :: array(1) + allocate (array(1)%bigarr) + end function +end +! { dg-final { scan-tree-dump-times "builtin_malloc" 4 "original" } } +! { dg-final { scan-tree-dump-times "builtin_free" 4 "original" } } +! { dg-final { scan-tree-dump-times "while \\(1\\)" 4 "original" } } diff --git a/gcc/testsuite/gfortran.dg/allocatable_scalar_13.f90 b/gcc/testsuite/gfortran.dg/allocatable_scalar_13.f90 index 67a8641637d..09113018373 100644 --- a/gcc/testsuite/gfortran.dg/allocatable_scalar_13.f90 +++ b/gcc/testsuite/gfortran.dg/allocatable_scalar_13.f90 @@ -67,5 +67,5 @@ contains ! allocate(res, source = arg) ! Caused an ICE ! end subroutine end -! { dg-final { scan-tree-dump-times "builtin_malloc" 15 "original" } } -! { dg-final { scan-tree-dump-times "builtin_free" 17 "original" } } +! { dg-final { scan-tree-dump-times "builtin_malloc" 16 "original" } } +! { dg-final { scan-tree-dump-times "builtin_free" 16 "original" } } diff --git a/gcc/testsuite/gfortran.dg/allocate_with_source_14.f03 b/gcc/testsuite/gfortran.dg/allocate_with_source_14.f03 index 5ca47a62e83..36c1245ccdd 100644 --- a/gcc/testsuite/gfortran.dg/allocate_with_source_14.f03 +++ b/gcc/testsuite/gfortran.dg/allocate_with_source_14.f03 @@ -210,5 +210,5 @@ program main call v%free() deallocate(av) end program -! { dg-final { scan-tree-dump-times "__builtin_malloc" 21 "original" } } +! { dg-final { scan-tree-dump-times "__builtin_malloc" 23 "original" } } ! { dg-final { scan-tree-dump-times "__builtin_free" 29 "original" } } diff --git a/gcc/testsuite/gfortran.dg/allocate_with_source_16.f90 b/gcc/testsuite/gfortran.dg/allocate_with_source_16.f90 new file mode 100644 index 00000000000..977202d04aa --- /dev/null +++ b/gcc/testsuite/gfortran.dg/allocate_with_source_16.f90 @@ -0,0 +1,26 @@ +!{ dg-do compile } +! PR69268 +! +! Contributed by Rich Townsend + +program test_sourced_alloc + + implicit none + + type :: foo_t + end type foo_t + + class(foo_t), allocatable :: f + + allocate(f, SOURCE=f_func()) + +contains + + function f_func () result (f) + type(foo_t) :: f + integer, save :: c = 0 + c = c + 1 + if (c .gt. 1) call abort() + end function f_func + +end program test_sourced_alloc diff --git a/gcc/testsuite/gfortran.dg/coarray_allocate_2.f08 b/gcc/testsuite/gfortran.dg/coarray_allocate_2.f08 new file mode 100644 index 00000000000..7a712a94203 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_allocate_2.f08 @@ -0,0 +1,26 @@ +! { dg-do run } +! { dg-options "-fcoarray=single" } +! +! Contributed by Ian Harvey +! Extended by Andre Vehreschild +! to test that coarray references in allocate work now +! PR fortran/67451 + + program main + implicit none + type foo + integer :: bar = 99 + end type + class(foo), allocatable :: foobar[:] + class(foo), allocatable :: some_local_object + allocate(foobar[*]) + + allocate(some_local_object, source=foobar) + + if (.not. allocated(foobar)) call abort() + if (.not. allocated(some_local_object)) call abort() + + deallocate(some_local_object) + deallocate(foobar) + end program + diff --git a/gcc/testsuite/gfortran.dg/coarray_allocate_3.f08 b/gcc/testsuite/gfortran.dg/coarray_allocate_3.f08 new file mode 100644 index 00000000000..b9413b6ce4a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_allocate_3.f08 @@ -0,0 +1,28 @@ +! { dg-do run } +! { dg-options "-fcoarray=single" } +! +! Contributed by Ian Harvey +! Extended by Andre Vehreschild +! to test that coarray references in allocate work now +! PR fortran/67451 + + program main + implicit none + type foo + integer :: bar = 99 + end type + class(foo), dimension(:), allocatable :: foobar[:] + class(foo), dimension(:), allocatable :: some_local_object + allocate(foobar(10)[*]) + + allocate(some_local_object(10), source=foobar) + + if (.not. allocated(foobar)) call abort() + if (lbound(foobar, 1) /= 1 .OR. ubound(foobar, 1) /= 10) call abort() + if (.not. allocated(some_local_object)) call abort() + if (any(some_local_object(:)%bar /= [99, 99, 99, 99, 99, 99, 99, 99, 99, 99])) call abort() + + deallocate(some_local_object) + deallocate(foobar) + end program + diff --git a/gcc/testsuite/gfortran.dg/coarray_allocate_4.f08 b/gcc/testsuite/gfortran.dg/coarray_allocate_4.f08 new file mode 100644 index 00000000000..a36d7968b42 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_allocate_4.f08 @@ -0,0 +1,43 @@ +! { dg-do run } +! { dg-options "-fcoarray=single" } +! +! Contributed by Gerhard Steinmetz +! Andre Vehreschild +! Check that PR fortran/69451 is fixed. + +program main + +implicit none + +type foo +end type + +class(foo), allocatable :: p[:] +class(foo), pointer :: r +class(*), allocatable, target :: z + +allocate(p[*]) + +call s(p, z) +select type (z) + class is (foo) + r => z + class default + call abort() +end select + +if (.not. associated(r)) call abort() + +deallocate(r) +deallocate(p) + +contains + +subroutine s(x, z) + class(*) :: x[*] + class(*), allocatable:: z + allocate (z, source=x) +end + +end + diff --git a/gcc/testsuite/gfortran.dg/common_22.f90 b/gcc/testsuite/gfortran.dg/common_22.f90 new file mode 100644 index 00000000000..e2254099d72 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/common_22.f90 @@ -0,0 +1,24 @@ +! { dg-do compile } +! +! PR fortran/59746 +! Check that symbols present in common block are properly cleaned up +! upon error. +! +! Contributed by Bud Davis + + CALL RCCFL (NVE,IR,NU3,VE (1,1,1,I)) + COMMON /CCFILE/ INTG,NT1,NT2,NT3,NVM,NVE,NFRLE,NRESF,NRESL !{ dg-error "Unexpected COMMON" } + COMMON /CCFILE/ INTG,NT1,NT2,NT3,NVM,NVE,NFRLE,NRESF,NRESL !{ dg-error "Unexpected COMMON" } +! the PR only contained the two above. +! success is no segfaults or infinite loops. +! let's check some combinations + CALL ABC (INTG) + COMMON /CCFILE/ INTG,NT1,NT2,NT3,NVM,NVE,NFRLE,NRESF,NRESL !{ dg-error "Unexpected COMMON" } + COMMON /CCFILE/ INTG,NT1,NT2,NT3,NVM,NVE,NFRLE,NRESF,NRESL !{ dg-error "Unexpected COMMON" } + CALL DEF (NT1) + COMMON /CCFILE/ INTG,NT1,NT2,NT3,NVM,NVE,NFRLE,NRESF,NRESL !{ dg-error "Unexpected COMMON" } + COMMON /CCFILE/ INTG,NT1,NT2,NT3,NVM,NVE,NFRLE,NRESF,NRESL !{ dg-error "Unexpected COMMON" } + CALL GHI (NRESL) + COMMON /CCFILE/ INTG,NT1,NT2,NT3,NVM,NVE,NFRLE,NRESF,NRESL !{ dg-error "Unexpected COMMON" } + COMMON /CCFILE/ INTG,NT1,NT2,NT3,NVM,NVE,NFRLE,NRESF,NRESL !{ dg-error "Unexpected COMMON" } + END diff --git a/gcc/testsuite/gfortran.dg/common_23.f90 b/gcc/testsuite/gfortran.dg/common_23.f90 new file mode 100644 index 00000000000..3f1f005db85 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/common_23.f90 @@ -0,0 +1,10 @@ +! { dg-do compile } +! +! PR fortran/66707 +! Check the compilation on wrong usage of common +! Contributed by Gerhard Steinmetz +program p + integer, pointer :: a + common a, a ! { dg-error "is already in a COMMON block" } + common a +end diff --git a/gcc/testsuite/gfortran.dg/derived_constructor_comps_6.f90 b/gcc/testsuite/gfortran.dg/derived_constructor_comps_6.f90 new file mode 100644 index 00000000000..9cdb81ae520 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/derived_constructor_comps_6.f90 @@ -0,0 +1,133 @@ +! { dg-do run } +! { dg-additional-options "-fdump-tree-original" } +! +! PR fortran/61831 +! The deallocation of components of array constructor elements +! used to have the side effect of also deallocating some other +! variable's components from which they were copied. + +program main + implicit none + + integer, parameter :: n = 2 + + type :: string_t + character(LEN=1), dimension(:), allocatable :: chars + end type string_t + + type :: string_container_t + type(string_t) :: comp + end type string_container_t + + type :: string_array_container_t + type(string_t) :: comp(n) + end type string_array_container_t + + type(string_t) :: prt_in, tmp, tmpa(n) + type(string_container_t) :: tmpc, tmpca(n) + type(string_array_container_t) :: tmpac, tmpaca(n) + integer :: i, j, k + + do i=1,16 + + ! Test without intermediary function + prt_in = string_t(["A"]) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "A")) call abort + deallocate (prt_in%chars) + + ! scalar elemental function + prt_in = string_t(["B"]) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "B")) call abort + tmp = new_prt_spec (prt_in) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "B")) call abort + deallocate (prt_in%chars) + deallocate (tmp%chars) + + ! array elemental function with array constructor + prt_in = string_t(["C"]) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "C")) call abort + tmpa = new_prt_spec ([(prt_in, i=1,2)]) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "C")) call abort + deallocate (prt_in%chars) + do j=1,n + deallocate (tmpa(j)%chars) + end do + + ! scalar elemental function with structure constructor + prt_in = string_t(["D"]) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "D")) call abort + tmpc = new_prt_spec2 (string_container_t(prt_in)) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "D")) call abort + deallocate (prt_in%chars) + deallocate(tmpc%comp%chars) + + ! array elemental function of an array constructor of structure constructors + prt_in = string_t(["E"]) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "E")) call abort + tmpca = new_prt_spec2 ([ (string_container_t(prt_in), i=1,2) ]) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "E")) call abort + deallocate (prt_in%chars) + do j=1,n + deallocate (tmpca(j)%comp%chars) + end do + + ! scalar elemental function with a structure constructor and a nested array constructor + prt_in = string_t(["F"]) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "F")) call abort + tmpac = new_prt_spec3 (string_array_container_t([ (prt_in, i=1,2) ])) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "F")) call abort + deallocate (prt_in%chars) + do j=1,n + deallocate (tmpac%comp(j)%chars) + end do + + ! array elemental function with an array constructor nested inside + ! a structure constructor nested inside an array constructor + prt_in = string_t(["G"]) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "G")) call abort + tmpaca = new_prt_spec3 ([ (string_array_container_t([ (prt_in, i=1,2) ]), j=1,2) ]) + if (.not. allocated(prt_in%chars)) call abort + if (any(prt_in%chars .ne. "G")) call abort + deallocate (prt_in%chars) + do j=1,n + do k=1,n + deallocate (tmpaca(j)%comp(k)%chars) + end do + end do + + end do + +contains + + elemental function new_prt_spec (name) result (prt_spec) + type(string_t), intent(in) :: name + type(string_t) :: prt_spec + prt_spec = name + end function new_prt_spec + + elemental function new_prt_spec2 (name) result (prt_spec) + type(string_container_t), intent(in) :: name + type(string_container_t) :: prt_spec + prt_spec = name + end function new_prt_spec2 + + elemental function new_prt_spec3 (name) result (prt_spec) + type(string_array_container_t), intent(in) :: name + type(string_array_container_t) :: prt_spec + prt_spec = name + end function new_prt_spec3 +end program main +! { dg-final { scan-tree-dump-times "__builtin_malloc" 15 "original" } } +! { dg-final { scan-tree-dump-times "__builtin_free" 33 "original" } } diff --git a/gcc/testsuite/gfortran.dg/pr68283.f90 b/gcc/testsuite/gfortran.dg/pr68283.f90 new file mode 100644 index 00000000000..81f74129fe9 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr68283.f90 @@ -0,0 +1,15 @@ +! { dg-do compile } +MODULE neb_utils + IMPLICIT NONE + INTEGER, PARAMETER :: dp=8 + TYPE neb_var_type + REAL(KIND=dp), DIMENSION(:, :), POINTER :: xyz, int, wrk + END TYPE neb_var_type +CONTAINS + SUBROUTINE get_neb_force() + INTEGER :: i + TYPE(neb_var_type), POINTER :: forces + REAL(KIND=dp), ALLOCATABLE, DIMENSION(:) :: dtmp1, wrk + dtmp1 = forces%wrk(:,i)-dot_product_band ! { dg-error "Symbol 'dot_product_band' at .1. has no IMPLICIT type" } + END SUBROUTINE get_neb_force +END MODULE neb_utils diff --git a/gcc/testsuite/gnat.dg/inline12.adb b/gcc/testsuite/gnat.dg/inline12.adb new file mode 100644 index 00000000000..e73f3c1aeb6 --- /dev/null +++ b/gcc/testsuite/gnat.dg/inline12.adb @@ -0,0 +1,23 @@ +-- PR ada/69219 +-- Testcae by yuta tomino */ + +-- { dg-do compile } + +procedure Inline12 is + + procedure NI; + + procedure IA; + pragma Convention (Intrinsic, IA); + pragma Inline_Always (IA); + + procedure IA is + begin + NI; + end; + + procedure NI is null; + +begin + IA; +end; diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 57e26d1d951..410fd53a277 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -1534,13 +1534,14 @@ initialize_data_dependence_relation (struct data_reference *a, /* The case where the references are exactly the same. */ if (operand_equal_p (DR_REF (a), DR_REF (b), 0)) { - if (loop_nest.exists () - && !object_address_invariant_in_loop_p (loop_nest[0], - DR_BASE_OBJECT (a))) - { - DDR_ARE_DEPENDENT (res) = chrec_dont_know; - return res; - } + if ((loop_nest.exists () + && !object_address_invariant_in_loop_p (loop_nest[0], + DR_BASE_OBJECT (a))) + || DR_NUM_DIMENSIONS (a) == 0) + { + DDR_ARE_DEPENDENT (res) = chrec_dont_know; + return res; + } DDR_AFFINE_P (res) = true; DDR_ARE_DEPENDENT (res) = NULL_TREE; DDR_SUBSCRIPTS (res).create (DR_NUM_DIMENSIONS (a)); @@ -1572,9 +1573,9 @@ initialize_data_dependence_relation (struct data_reference *a, /* If the base of the object is not invariant in the loop nest, we cannot analyze it. TODO -- in fact, it would suffice to record that there may be arbitrary dependences in the loops where the base object varies. */ - if (loop_nest.exists () - && !object_address_invariant_in_loop_p (loop_nest[0], - DR_BASE_OBJECT (a))) + if ((loop_nest.exists () + && !object_address_invariant_in_loop_p (loop_nest[0], DR_BASE_OBJECT (a))) + || DR_NUM_DIMENSIONS (a) == 0) { DDR_ARE_DEPENDENT (res) = chrec_dont_know; return res; diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c index 62a6444e66b..c3929a1244a 100644 --- a/gcc/tree-parloops.c +++ b/gcc/tree-parloops.c @@ -741,6 +741,7 @@ eliminate_local_variables_stmt (edge entry, gimple_stmt_iterator *gsi, } else if (gimple_clobber_p (stmt)) { + unlink_stmt_vdef (stmt); stmt = gimple_build_nop (); gsi_replace (gsi, stmt, false); dta.changed = true; diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 7d713c60344..145a07c6d33 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -2329,7 +2329,7 @@ analyze_access_subtree (struct access *root, struct access *parent, if (covered_to < limit) hole = true; - if (scalar) + if (scalar || !allow_replacements) root->grp_total_scalarization = 0; } diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index 610e80792d3..72fc5f897ad 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -254,6 +254,11 @@ struct ssa_local_info_t /* Blocks duplicated for the thread. */ bitmap duplicate_blocks; + + /* When we have multiple paths through a joiner which reach different + final destinations, then we may need to correct for potential + profile insanities. */ + bool need_profile_correction; }; /* Passes which use the jump threading code register jump threading @@ -827,7 +832,8 @@ compute_path_counts (struct redirection_data *rd, So ensure that this path's path_out_count is at least the difference between elast->count and nonpath_count. Otherwise the edge counts after threading will not be sane. */ - if (has_joiner && path_out_count < elast->count - nonpath_count) + if (local_info->need_profile_correction + && has_joiner && path_out_count < elast->count - nonpath_count) { path_out_count = elast->count - nonpath_count; /* But neither can we go above the minimum count along the path @@ -1496,6 +1502,7 @@ thread_block_1 (basic_block bb, bool noloop_only, bool joiners) ssa_local_info_t local_info; local_info.duplicate_blocks = BITMAP_ALLOC (NULL); + local_info.need_profile_correction = false; /* To avoid scanning a linear array for the element we need we instead use a hash table. For normal code there should be no noticeable @@ -1506,6 +1513,7 @@ thread_block_1 (basic_block bb, bool noloop_only, bool joiners) /* Record each unique threaded destination into a hash table for efficient lookups. */ + edge last = NULL; FOR_EACH_EDGE (e, ei, bb->preds) { if (e->aux == NULL) @@ -1559,6 +1567,17 @@ thread_block_1 (basic_block bb, bool noloop_only, bool joiners) /* Insert the outgoing edge into the hash table if it is not already in the hash table. */ lookup_redirection_data (e, INSERT); + + /* When we have thread paths through a common joiner with different + final destinations, then we may need corrections to deal with + profile insanities. See the big comment before compute_path_counts. */ + if ((*path)[1]->type == EDGE_COPY_SRC_JOINER_BLOCK) + { + if (!last) + last = e2; + else if (e2 != last) + local_info.need_profile_correction = true; + } } /* We do not update dominance info. */ diff --git a/libcpp/po/ChangeLog b/libcpp/po/ChangeLog index 469915425e1..0e70b57a336 100644 --- a/libcpp/po/ChangeLog +++ b/libcpp/po/ChangeLog @@ -1,3 +1,7 @@ +2016-01-31 Joseph Myers + + * fi.po: Update. + 2015-12-04 Release Manager * GCC 5.3.0 released. diff --git a/libcpp/po/fi.po b/libcpp/po/fi.po index c1614fe5516..c4d27fd35d9 100644 --- a/libcpp/po/fi.po +++ b/libcpp/po/fi.po @@ -1,26 +1,28 @@ # Finnish messages for cpplib. -# Copyright © 2010, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. +# Copyright © 2010, 2012, 2013, 2014, 2015, 2016 Free Software Foundation, Inc. # This file is distributed under the same license as the gcc package. # Jorma Karvonen , 2010, 2012-2015. +# Lauri Nurmi , 2016. # msgid "" msgstr "" -"Project-Id-Version: cpplib 5.1-b20150208\n" +"Project-Id-Version: cpplib 5.2.0\n" "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n" "POT-Creation-Date: 2015-04-13 20:12+0000\n" -"PO-Revision-Date: 2015-02-10 00:32+0200\n" -"Last-Translator: Jorma Karvonen \n" +"PO-Revision-Date: 2016-01-30 23:09+0200\n" +"Last-Translator: Lauri Nurmi \n" "Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.8.6\n" #: charset.c:674 #, c-format msgid "conversion from %s to %s not supported by iconv" -msgstr "iconv ei tue muunnosta kohteesta %s kohteeseen %s" +msgstr "iconv ei tue muunnosta %s -> %s" #: charset.c:677 msgid "iconv_open" @@ -29,118 +31,118 @@ msgstr "iconv_open" #: charset.c:685 #, c-format msgid "no iconv implementation, cannot convert from %s to %s" -msgstr "ei iconv-toteutusta, muuntaminen kohteesta %s kohteeseen %s epäonnistui" +msgstr "ei iconv-toteutusta, muunnosta %s -> %s ei voida suorittaa" #: charset.c:781 #, c-format msgid "character 0x%lx is not in the basic source character set\n" -msgstr "merkki 0x%lx ei ole peruslähdemerkkien joukossa\n" +msgstr "merkki 0x%lx ei ole peruslähdemerkistössä\n" #: charset.c:798 charset.c:1452 msgid "converting to execution character set" -msgstr "muunnetaan suoritusmerkkijoukkoon" +msgstr "muunnetaan suoritusmerkistöön" #: charset.c:804 #, c-format msgid "character 0x%lx is not unibyte in execution character set" -msgstr "merkki 0x%lx ei ole yksitavumerkki suoritusmerkkijoukossa" +msgstr "merkki 0x%lx ei ole yksitavuinen suoritusmerkistössä" #: charset.c:998 msgid "universal character names are only valid in C++ and C99" -msgstr "yleispätevät merkkinimet ovat kelvollisia vai C++:ssa ja C99:ssä" +msgstr "universaalit merkkinimet ovat kelvollisia vai C++:ssa ja C99:ssä" #: charset.c:1002 msgid "C99's universal character names are incompatible with C90" -msgstr "C99:n yleispätevät merkkinimet eivät ole yhteensopivia C90:n kanssa" +msgstr "C99:n universaalit merkkinimet ovat epäyhteensopivia C90:n kanssa" #: charset.c:1005 #, c-format msgid "the meaning of '\\%c' is different in traditional C" -msgstr "’\\%c’-merkitys on erilainen perinteisessä C:ssä" +msgstr "’\\%c’:lla on eri merkitys perinteisessä C:ssä" # UCN tarkoittaa Universal Character Names ja se sallii minkä tahansa kirjaimen käyttämisen C-lähdekielessä, ei vain englanninkielen kirjainten käytön. Merkki voidaan ilmaista joko kenoviivalla, sitä seuraavalla pienellä u-kirjaimella ja nelinumeroisella heksadesimaaliluvulla tai kenoviivaa seuraavalla suurella U-kirjaimella ja kahdeksannumeroisella heksadesimaaliluvulla. #: charset.c:1014 msgid "In _cpp_valid_ucn but not a UCN" -msgstr "Kohteessa _cpp_valid_ucn mutta ei UCN" +msgstr "Funktiossa _cpp_valid_ucn mutta ei ole UCN" #: charset.c:1039 #, c-format msgid "incomplete universal character name %.*s" -msgstr "vaillinainen yleispätevä merkkinimi %.*s" +msgstr "vaillinainen universaali merkkinimi %.*s" #: charset.c:1054 #, c-format msgid "%.*s is not a valid universal character" -msgstr "%.*s ei ole kelvollinen yleispätevä merkki" +msgstr "%.*s ei ole kelvollinen universaali merkki" #: charset.c:1064 lex.c:1218 msgid "'$' in identifier or number" -msgstr "’$’ tunnisteessa tai numerossa" +msgstr "’$’ tunnisteessa tai lukuarvossa" #: charset.c:1074 #, c-format msgid "universal character %.*s is not valid in an identifier" -msgstr "yleispätevä merkki %.*s ei ole kelvollinen tunniste" +msgstr "universaali merkki %.*s ei ole kelvollinen tunniste" #: charset.c:1078 #, c-format msgid "universal character %.*s is not valid at the start of an identifier" -msgstr "yleispätevä merkki %.*s ei ole kelvollien tunnisteen alussa" +msgstr "universaali merkki %.*s ei ole kelvollinen tunnisteen alussa" #: charset.c:1110 charset.c:1682 msgid "converting UCN to source character set" -msgstr "muunnetaan UCN lähdemerkkijoukoksi" +msgstr "muunnetaan UCN lähdemerkistöön" #: charset.c:1114 msgid "converting UCN to execution character set" -msgstr "muunnetaan UCN suoritusmerkkijoukoksi" +msgstr "muunnetaan UCN suoritusmerkistöön" #: charset.c:1186 msgid "the meaning of '\\x' is different in traditional C" -msgstr "merkin ’\\x’ merkitys on erilainen perinteisessä C:ssä" +msgstr "’\\%x’:lla on eri merkitys perinteisessä C:ssä" #: charset.c:1203 msgid "\\x used with no following hex digits" -msgstr "\\x käytetty ilman seuraavia heksadesimaalinumeroita" +msgstr "\\x:ää käytetty ilman seuraavia heksenumeroita" #: charset.c:1210 msgid "hex escape sequence out of range" -msgstr "heksadesimaali koodinvaihtosekvenssi lukualueen ulkopuolella" +msgstr "heksadesimaalinen ohjaussaraj sallitun välin ulkopuolella" #: charset.c:1248 msgid "octal escape sequence out of range" -msgstr "oktaaliluku koodinvaihtosekvenssi lukualueen ulkopuolella" +msgstr "oktaalinen ohjaussarja sallitun välin ulkopuolella" #: charset.c:1314 msgid "the meaning of '\\a' is different in traditional C" -msgstr "merkin ’\\a’ merkitys on erilainen perinteisessä C:ssä" +msgstr "’\\a’:lla on eri merkitys perinteisessä C:ssä" #: charset.c:1321 #, c-format msgid "non-ISO-standard escape sequence, '\\%c'" -msgstr "ei-ISO-standardi koodinvaihtosekvenssi ’\\%c’" +msgstr "ISO-standardiin kuulumaton ohjaussarja ’\\%c’" #: charset.c:1329 #, c-format msgid "unknown escape sequence: '\\%c'" -msgstr "tuntematon koodinvaihtosekvenssi ’\\%c’" +msgstr "tuntematon ohjaussarja ’\\%c’" #: charset.c:1337 #, c-format msgid "unknown escape sequence: '\\%s'" -msgstr "tuntematon koodinvaihtosekvenssi ’\\%s’" +msgstr "tuntematon ohjaussarja ’\\%s’" #: charset.c:1344 msgid "converting escape sequence to execution character set" -msgstr "muunnetaan koodinvaihtosekvenssi suoritusmerkkijoukoksi" +msgstr "muunnetaan ohjaussarja suoritusmerkistöön" #: charset.c:1517 charset.c:1581 msgid "character constant too long for its type" -msgstr "merkkivakio on liian pitkä tälle tyypille" +msgstr "merkkivakio on liian pitkä tyypilleen" #: charset.c:1520 msgid "multi-character character constant" -msgstr "monimerkkikirjainvakio" +msgstr "monimerkkinen merkkivakio" #: charset.c:1620 msgid "empty character constant" @@ -149,94 +151,94 @@ msgstr "tyhjä merkkivakio" #: charset.c:1729 #, c-format msgid "failure to convert %s to %s" -msgstr "virhe muuntaa kohde %s kohteeksi %s" +msgstr "muunnos %s -> %s epäonnistui" #: directives.c:224 directives.c:267 #, c-format msgid "extra tokens at end of #%s directive" -msgstr "direktiivin #%s lopussa ylimääräisiä merkkejä" +msgstr "ylimääräisiä merkkejä #%s-direktiivin lopussa" #: directives.c:374 #, c-format msgid "#%s is a GCC extension" -msgstr "#%s on GCC-laajennus" +msgstr "#%s on GCC-laajennos" #: directives.c:379 #, c-format msgid "#%s is a deprecated GCC extension" -msgstr "#%s on vanhentunut GCC-laajennus" +msgstr "#%s on vanhentunut GCC-laajennos" #: directives.c:392 msgid "suggest not using #elif in traditional C" -msgstr "ei suositella #elif-käyttöä perinteisessä C:ssä" +msgstr "ehdotetaan #elif:in käytön välttämistä perinteisessä C:ssä" #: directives.c:395 #, c-format msgid "traditional C ignores #%s with the # indented" -msgstr "perinteinen C ohittaa #%s merkillä # sisennettynä" +msgstr "#%s ohitetaan perinteisessä C:ssä, kun # on sisennetty" #: directives.c:399 #, c-format msgid "suggest hiding #%s from traditional C with an indented #" -msgstr "suosittelee piilottamaan #%s perinteisestä C:stä sisennetyllä #-merkillä" +msgstr "ehdotetaan #%s:n piilottamista perinteiseltä C:ltä sisentämällä #" #: directives.c:425 msgid "embedding a directive within macro arguments is not portable" -msgstr "direktiivin upottaminen makroargumenttien sisälle ei ole siirrettävä" +msgstr "direktiivin upottaminen makroargumenttien sisälle ei ole siirrettävää" #: directives.c:445 msgid "style of line directive is a GCC extension" -msgstr "rividirektiivin tyyli on GCC-laajennus" +msgstr "rividirektiivin tyyli on GCC-laajennos" #: directives.c:500 #, c-format msgid "invalid preprocessing directive #%s" -msgstr "virheellinen esikäsittelijädirektiivi #%s" +msgstr "virheellinen esikääntäjän direktiivi #%s" #: directives.c:568 msgid "\"defined\" cannot be used as a macro name" -msgstr "”defined” ei voida käyttää makronimenä" +msgstr "”defined” ei ole kelvollinen makron nimi" #: directives.c:573 msgid "\"__has_include__\" cannot be used as a macro name" -msgstr "”__has_include__” ei voida käyttää makronimenä" +msgstr "”__has_include__” ei ole kelvollinen makron nimi" #: directives.c:579 #, c-format msgid "\"%s\" cannot be used as a macro name as it is an operator in C++" -msgstr "”%s” ei voida käyttää makronimenä, koska se on operaattori C++:ssa" +msgstr "”%s” ei ole kelvollinen makron nimi, sillä se on C++:n operaattori" #: directives.c:582 #, c-format msgid "no macro name given in #%s directive" -msgstr "makronimeä ei ole annettu #%s-direktiivissä" +msgstr "makron nimeä ei ole annettu #%s-direktiivissä" #: directives.c:585 msgid "macro names must be identifiers" -msgstr "makronimien on oltava tunnisteita" +msgstr "makrojen nimien on oltava tunnisteita" #: directives.c:634 directives.c:639 #, c-format msgid "undefining \"%s\"" -msgstr "määrittelemätön ”%s”" +msgstr "kumotaan määrittely ”%s”" #: directives.c:694 msgid "missing terminating > character" -msgstr "puuttuva päättymismerkki >" +msgstr "päättävä >-merkki puuttuu" #: directives.c:753 #, c-format msgid "#%s expects \"FILENAME\" or " -msgstr "#%s odottaa ”TIEDOSTONIMI” tai " +msgstr "#%s odottaa argumenttia \"TIEDOSTONIMI\" tai " #: directives.c:799 #, c-format msgid "empty filename in #%s" -msgstr "tyhjä tiedostonimi kohteessa #%s" +msgstr "tyhjä tiedostonimi direktiivissä #%s" #: directives.c:809 msgid "#include nested too deeply" -msgstr "#include sisäkkäinen liian syvälle" +msgstr "liikaa sisäkkäisiä #include:ja" #: directives.c:850 msgid "#include_next in primary source file" @@ -249,16 +251,16 @@ msgstr "virheellinen lippu ”%s” rividirektiivissä" #: directives.c:936 msgid "unexpected end of file after #line" -msgstr "tiedoston odottamaton loppu #line-direktiivin jälkeen" +msgstr "odottamaton tiedoston loppu #line-direktiivin jälkeen" #: directives.c:939 #, c-format msgid "\"%s\" after #line is not a positive integer" -msgstr "”%s” direktiivin #line jälkeen ei ole positiivinen kokonaisluku" +msgstr "#line:n jälkeinen ”%s” ei ole positiivinen kokonaisluku" #: directives.c:945 directives.c:947 msgid "line number out of range" -msgstr "rivinumero lukualueen ulkopuolella" +msgstr "rivinumero sallitun välin ulkopuolella" #: directives.c:960 directives.c:1040 #, c-format @@ -268,7 +270,7 @@ msgstr "”%s” ei ole kelvollinen tiedostonimi" #: directives.c:1000 #, c-format msgid "\"%s\" after # is not a positive integer" -msgstr "”%s” merkin # jälkeen ei ole positiivinen kokonaisluku" +msgstr "#:n jälkeinen ”%s” ei ole positiivinen kokonaisluku" #: directives.c:1095 directives.c:1097 directives.c:1099 directives.c:1685 #, c-format @@ -283,17 +285,17 @@ msgstr "virheellinen #%s-direktiivi" #: directives.c:1186 #, c-format msgid "registering pragmas in namespace \"%s\" with mismatched name expansion" -msgstr "rekisteröidään pragmat nimiavaruudessa ”%s” täsmäämättömällä nimilaajennuksella" +msgstr "rekisteröidään pragmat nimiavaruudessa ”%s” epäsopivalla nimenlavennuksella" #: directives.c:1195 #, c-format msgid "registering pragma \"%s\" with name expansion and no namespace" -msgstr "rekisteröidään pragma ”%s” nimilaajennuksella ja ilman nimiavaruutta" +msgstr "rekisteröidään pragma ”%s” nimenlavennuksella ja ilman nimiavaruutta" #: directives.c:1213 #, c-format msgid "registering \"%s\" as both a pragma and a pragma namespace" -msgstr "rekisteröidään ”%s” sekä pragmana ja pragma-nimiavaruutena" +msgstr "rekisteröidään ”%s” sekä pragmana että pragma-nimiavaruutena" #: directives.c:1216 #, c-format @@ -311,82 +313,80 @@ msgstr "rekisteröidään pragma NULL-käsittelijällä" #: directives.c:1466 msgid "#pragma once in main file" -msgstr "#pragma once main-tiedostossa" +msgstr "#pragma once päätiedostossa" #: directives.c:1489 msgid "invalid #pragma push_macro directive" -msgstr "virheellinen #pragma push_macro-direktiivi" +msgstr "virheellinen #pragma push_macro -direktiivi" #: directives.c:1544 msgid "invalid #pragma pop_macro directive" -msgstr "virheellinen #pragma pop_macro-direktiivi" +msgstr "virheellinen #pragma pop_macro -direktiivi" # poison tarkoittaa, että makroa tai direktiiviä ei koskaan määritellä tai käytetä #: directives.c:1599 msgid "invalid #pragma GCC poison directive" -msgstr "virheellinen #pragma GCC poison-direktiivi" +msgstr "virheellinen #pragma GCC poison -direktiivi" -# poison tarkoittaa, että makroa tai direktiiviä ei koskaan määritellä tai käytetä #: directives.c:1608 #, c-format msgid "poisoning existing macro \"%s\"" -msgstr "kielletään olemassaoleva makro ”%s”" +msgstr "myrkytetään olemassa oleva makro ”%s”" #: directives.c:1627 msgid "#pragma system_header ignored outside include file" -msgstr "#pragma system_header ohitetaan include-tiedoston ulkopuolella" +msgstr "#pragma system_header ohitetaan otsaketiedoston ulkopuolella" #: directives.c:1652 #, c-format msgid "cannot find source file %s" -msgstr "lähdetiedoston %s löytäminen epäonnistui" +msgstr "lähdetiedostoa %s ei löydy" #: directives.c:1656 #, c-format msgid "current file is older than %s" msgstr "nykyinen tiedosto on vanhempi kuin %s" -# poison tarkoittaa, että makroa tai direktiiviä ei koskaan määritellä tai käytetä #: directives.c:1680 #, c-format msgid "invalid \"#pragma GCC %s\" directive" -msgstr "virheellinen ”#pragma GCC %s”-direktiivi" +msgstr "virheellinen ”#pragma GCC %s” -direktiivi" #: directives.c:1874 msgid "_Pragma takes a parenthesized string literal" -msgstr "_Pragma ottaa sulkumerkkeillä ympäröidyn merkkijonoliteraalin" +msgstr "_Pragma ottaa sulkeilla ympäröidyn merkkijonoliteraalin" #: directives.c:1995 msgid "#else without #if" -msgstr "#else ilman #if" +msgstr "#else ilman #if:iä" #: directives.c:2000 msgid "#else after #else" -msgstr "#else jälkeen #else" +msgstr "#else #else:n jälkeen" #: directives.c:2002 directives.c:2035 msgid "the conditional began here" -msgstr "ehdollinen alkoi tässä" +msgstr "ehtolause alkoi tästä" #: directives.c:2028 msgid "#elif without #if" -msgstr "#elif ilman #if" +msgstr "#elif ilman #if:iä" #: directives.c:2033 msgid "#elif after #else" -msgstr "#elif jälkeen #else" +msgstr "#elif #else:n jälkeen" #: directives.c:2064 msgid "#endif without #if" -msgstr "#endif ilman #if" +msgstr "#endif ilman #if:iä" #: directives.c:2144 msgid "missing '(' after predicate" -msgstr "merkki ’(’ puuttuu predikaatin jälkeen" +msgstr "’(’ puuttuu predikaatin jäljestä" #: directives.c:2159 msgid "missing ')' to complete answer" -msgstr "merkki ’)’ puuttuu täydelliseen vastaukseen" +msgstr "’)’ puuttuu vastauksen täydentämisestä" #: directives.c:2179 msgid "predicate's answer is empty" @@ -394,7 +394,7 @@ msgstr "predikaatin vastaus on tyhjä" #: directives.c:2206 msgid "assertion without predicate" -msgstr "assertion-toiminto ilman predikaattia" +msgstr "väite ilman predikaattia" #: directives.c:2209 msgid "predicate must be an identifier" @@ -403,7 +403,7 @@ msgstr "predikaatin on oltava tunniste" #: directives.c:2295 #, c-format msgid "\"%s\" re-asserted" -msgstr "”%s” uudelleen assert-toimintoon" +msgstr "”%s” väitetty uudelleen" #: directives.c:2587 #, c-format @@ -425,7 +425,7 @@ msgstr "%s: %s" #: expr.c:512 expr.c:629 msgid "fixed-point constants are a GCC extension" -msgstr "kiintopistevakiot ovat GCC-laajennus" +msgstr "kiintopistevakiot ovat GCC-laajennos" #: expr.c:537 msgid "invalid prefix \"0b\" for floating constant" @@ -433,71 +433,71 @@ msgstr "virheellinen etuliite ”0b” liukulukuvakiolle" #: expr.c:550 msgid "use of C++11 hexadecimal floating constant" -msgstr "käytä C++11 heksadesimaaliliukulukuvakiota" +msgstr "C++11:n heksadesimaaliliukulukuvakion käyttö" #: expr.c:553 msgid "use of C99 hexadecimal floating constant" -msgstr "käytä C99 heksadesimaaliliukulukuvakiota" +msgstr "C99:n heksadesimaaliliukulukuvakion käyttö" #: expr.c:597 #, c-format msgid "invalid suffix \"%.*s\" on floating constant" -msgstr "virheellinen loppuliite ”%.*s” liukulukuvakiossa" +msgstr "virheellinen loppuliite ”%.*s” liukulukuvakiolla" #: expr.c:608 expr.c:668 #, c-format msgid "traditional C rejects the \"%.*s\" suffix" -msgstr "perinteinen C hylkää ”%.*s”-loppuliitteen" +msgstr "perinteinen C ei salli ”%.*s”-loppuliitettä" #: expr.c:616 msgid "suffix for double constant is a GCC extension" -msgstr "loppuliite double-vakiolle on GCC-laajennus" +msgstr "loppuliite double-vakiolle on GCC-laajennos" #: expr.c:622 #, c-format msgid "invalid suffix \"%.*s\" with hexadecimal floating constant" -msgstr "virheellinen loppuliite ”%.*s” heksadesimaalisessa liukulukuvakiossa" +msgstr "virheellinen loppuliite ”%.*s” heksadesimaalisella liukulukuvakiolla" #: expr.c:633 msgid "decimal float constants are a GCC extension" -msgstr "desimaaliliukulukuvakiot ovat GCC-laajennus" +msgstr "desimaali-float-vakiot ovat GCC-laajennos" #: expr.c:651 #, c-format msgid "invalid suffix \"%.*s\" on integer constant" -msgstr "virheellinen loppuliite ”%.*s” kokonaislukuvakiossa" +msgstr "virheellinen loppuliite ”%.*s” kokonaislukuvakiolla" #: expr.c:676 msgid "use of C++11 long long integer constant" -msgstr "käytä ”C++11 long long”-kokonaislukuvakiota" +msgstr "C++11:n long long -kokonaislukuvakion käyttö" #: expr.c:677 msgid "use of C99 long long integer constant" -msgstr "käytä ”C99 long long”-kokonaislukuvakiota" +msgstr "C99:n long long -kokonaislukuvakion käyttö" #: expr.c:693 msgid "imaginary constants are a GCC extension" -msgstr "imaginaarivakiot ovat GCC-laajennus" +msgstr "imaginäärivakiot ovat GCC-laajennos" #: expr.c:699 msgid "binary constants are a C++14 feature or GCC extension" -msgstr "binäärivakiot ovat C++14-ominaisuus tai GCC-laajennus" +msgstr "binäärivakiot ovat C++14-ominaisuus tai GCC-laajennos" #: expr.c:701 msgid "binary constants are a GCC extension" -msgstr "binäärivakiot ovat GCC-laajennus" +msgstr "binäärivakiot ovat GCC-laajennos" #: expr.c:796 msgid "integer constant is too large for its type" -msgstr "kokonaislukuvakio on liian iso sen tyypiksi" +msgstr "kokonaislukuvakio on liian suuri tyypilleen" #: expr.c:827 msgid "integer constant is so large that it is unsigned" -msgstr "kokonaislukuvakio on niin iso, että se on etumerkitön" +msgstr "kokonaislukuvakio on niin suuri, että se on etumerkitön" #: expr.c:922 msgid "missing ')' after \"defined\"" -msgstr "merkki ’)’ puuttuu ”defined”-merkkijonon jäljestä" +msgstr "’)’ puuttuu ”defined”-sanan jäljestä" #: expr.c:929 msgid "operator \"defined\" requires an identifier" @@ -506,41 +506,42 @@ msgstr "operaattori ”defined” vaatii tunnisteen" #: expr.c:937 #, c-format msgid "(\"%s\" is an alternative token for \"%s\" in C++)" -msgstr "(”%s” on vaihtoehtoinen merkkijono ”%s” C++:ssa)" +msgstr "(”%s” on vaihtoehtoinen symboli ”%s”:lle C++:ssa)" #: expr.c:947 msgid "this use of \"defined\" may not be portable" -msgstr "tämä ”defined”-käyttö ei ehkä ole siirrettävä" +msgstr "tämä ”defined”-sanan käyttö ei ehkä ole siirrettävää" #: expr.c:1007 msgid "user-defined literal in preprocessor expression" -msgstr "käyttäjämääritelty literaali esikääntäjälausekkeessa" +msgstr "käyttäjän määrittelemä literaali esikääntäjän lausekkeessa" #: expr.c:1012 msgid "floating constant in preprocessor expression" -msgstr "liukulukuvakio esikäsittelijälausekkeessa" +msgstr "liukulukuvakio esikääntäjän lausekkeessa" #: expr.c:1018 msgid "imaginary number in preprocessor expression" -msgstr "imaginaariluku esikääntäjälausekkeessa" +msgstr "imaginääriluku esikääntäjän lausekkeessa" #: expr.c:1070 #, c-format msgid "\"%s\" is not defined" -msgstr "”%s” ei ole määritelty" +msgstr "”%s” on määrittelemättä" #: expr.c:1083 msgid "assertions are a GCC extension" -msgstr "assertion-toiminnot ovat GCC-laajennus" +msgstr "väitteet ovat GCC-laajennos" #: expr.c:1086 msgid "assertions are a deprecated extension" -msgstr "assertion-toiminnot ovat vanhentunut laajennus" +msgstr "väitteet ovat vanhentunut laajennos" +# %s on #if tai #elif #: expr.c:1331 #, c-format msgid "unbalanced stack in %s" -msgstr "tasapainoton pino kohteessa %s" +msgstr "tasapainoton pino %s:ssä" #: expr.c:1351 #, c-format @@ -549,41 +550,41 @@ msgstr "mahdoton operaattori ’%u’" #: expr.c:1452 msgid "missing ')' in expression" -msgstr "merkki ’)’ puuttuu lausekkeessa" +msgstr "’)’ puuttuu lausekkeesta" #: expr.c:1481 msgid "'?' without following ':'" -msgstr "’?’ ilman seuraavaa ’:’" +msgstr "’?’ ilman sitä seuraavaa ’:’-merkkiä" #: expr.c:1491 msgid "integer overflow in preprocessor expression" -msgstr "kokonaislukuylivuoto esikääntäjälausekkeessa" +msgstr "kokonaislukuylivuoto esikääntäjän lausekkeessa" #: expr.c:1496 msgid "missing '(' in expression" -msgstr "merkki ’(’ puuttuu lausekkeessa" +msgstr "’(’ puuttuu lausekkeesta" #: expr.c:1528 #, c-format msgid "the left operand of \"%s\" changes sign when promoted" -msgstr "vasen ”%s”-operandi vaihtaa merkkiä, kun korotettiin" +msgstr "”%s”:n vasen operandi vaihtaa ylennettäessä etumerkkiään" #: expr.c:1533 #, c-format msgid "the right operand of \"%s\" changes sign when promoted" -msgstr "oikea ”%s”-operandi vaihtaa merkkiä, kun korotettiin" +msgstr "”%s”:n oikea operandi vaihtaa ylennettäessä etumerkkiään" #: expr.c:1792 msgid "traditional C rejects the unary plus operator" -msgstr "perinteinen C hylkää unaariplus-operaattorin" +msgstr "perinteinen C ei salli unaarista plus-operaattoria" #: expr.c:1890 msgid "comma operator in operand of #if" -msgstr "pilkkuoperaattori #if-operandissa" +msgstr "pilkkuoperaattori #if:in operandissa" #: expr.c:2026 msgid "division by zero in #if" -msgstr "jako nollalla #if-lauseessa" +msgstr "jako nollalla #if-ehdossa" #: expr.c:2123 msgid "operator \"__has_include__\" requires a header string" @@ -591,11 +592,11 @@ msgstr "operaattori ”__has_include__” vaatii otsakemerkkijonon" #: expr.c:2139 msgid "missing ')' after \"__has_include__\"" -msgstr "merkki ’)’ puuttuu ”__has_include__”-merkkijonon jäljestä" +msgstr "’)’ puuttuu ”__has_include__”-sanan jäljestä" #: files.c:513 msgid "NULL directory in find_file" -msgstr "NULL-hakemistto kohteessa find_file" +msgstr "NULL-hakemisto funktiossa find_file" #: files.c:561 msgid "one or more PCH files were found, but they were invalid" @@ -603,7 +604,7 @@ msgstr "yksi tai useampia PCH-tiedostoja löytyi, mutta ne olivat virheellisiä" #: files.c:564 msgid "use -Winvalid-pch for more information" -msgstr "käytä lisätietoja varten valitsinta -Winvalid-pch" +msgstr "käytä -Winvalid-pch saadaksesi lisätietoja" #: files.c:668 #, c-format @@ -613,38 +614,38 @@ msgstr "%s on lohkolaite" #: files.c:685 #, c-format msgid "%s is too large" -msgstr "%s on liian laaja" +msgstr "%s on liian suuri" #: files.c:725 #, c-format msgid "%s is shorter than expected" -msgstr "%s on lyhyempi kuin otaksuttiin" +msgstr "%s on odotettua lyhyempi" #: files.c:961 #, c-format msgid "no include path in which to search for %s" -msgstr "ei include-polkua, jossa etsiä kohdetta %s" +msgstr "ei include-polkua, josta etsiä tiedostoa %s" #: files.c:1411 msgid "Multiple include guards may be useful for:\n" -msgstr "Useat include-vartijat saattavat olla hyödyllisiä kohteelle:\n" +msgstr "Monen includen estimet voivat olla hyödyllisiä tiedostoille:\n" #: init.c:546 msgid "cppchar_t must be an unsigned type" -msgstr "cppchar_t on oltava etumerkitön tyyppi" +msgstr "cppchar_t:n on oltava etumerkitön tyyppi" #: init.c:550 #, c-format msgid "preprocessor arithmetic has maximum precision of %lu bits; target requires %lu bits" -msgstr "esikääntäjäaritmetiikan maksimitarkkuus on %lu bittiä; kohde vaatii %lu bittiä" +msgstr "esikääntäjäaritmetiikan enimmäistarkkuus on %lu bittiä; kohde vaatii %lu bittiä" #: init.c:557 msgid "CPP arithmetic must be at least as precise as a target int" -msgstr "CPP-aritmetiikan on oltava vähintään yhtä tarkkaa kuin kohteen int-tyypin" +msgstr "CPP-aritmetiikan on oltava vähintään yhtä tarkka kuin kohteen int-tyypin" #: init.c:560 msgid "target char is less than 8 bits wide" -msgstr "kohdemerkki on pienempi kuin 8 bittiä leveä" +msgstr "kohteen char-tyyppi on alle 8 bittiä leveä" #: init.c:564 msgid "target wchar_t is narrower than target char" @@ -652,7 +653,7 @@ msgstr "kohteen wchar_t-tyyppi on kapeampi kuin kohteen char-tyyppi" #: init.c:568 msgid "target int is narrower than target char" -msgstr "kohteen kokonaislukutyyppi on kapeampi kuin kohteen char-tyyppi" +msgstr "kohteen int-tyyppi on kapeampi kuin kohteen char-tyyppi" #: init.c:573 msgid "CPP half-integer narrower than CPP character" @@ -661,11 +662,11 @@ msgstr "CPP-puolikokonaisluku on kapeampi kuin CPP-merkki" #: init.c:577 #, c-format msgid "CPP on this host cannot handle wide character constants over %lu bits, but the target requires %lu bits" -msgstr "CPP tällä tietokoneella ei voi käsitellä wide-merkkivakioita, jotka ovat yli %lu bittiä, mutta kohde vaatii %lu bittiä" +msgstr "CPP tällä koneella ei pysty käsittelemään yli %lu-bittisiä leveämerkkivakioita, mutta kohde vaatii %lu bittiä" #: lex.c:1011 msgid "backslash and newline separated by space" -msgstr "kenoviiva ja rivinvaihtomerkki eroteltu välilyönnillä" +msgstr "kenoviiva ja rivinvaihto erotettu välilyönnillä" #: lex.c:1016 msgid "backslash-newline at end of file" @@ -674,75 +675,76 @@ msgstr "kenoviiva-rivinvaihto tiedoston lopussa" #: lex.c:1032 #, c-format msgid "trigraph ??%c converted to %c" -msgstr "trigraph-merkki ??%c muunnettu merkiksi %c" +msgstr "kolmoismerkki ??%c muunnettu merkiksi %c" #: lex.c:1040 #, c-format msgid "trigraph ??%c ignored, use -trigraphs to enable" -msgstr "trigraph-merkki ??%c ohitettiin, käytä valitsinta -trigraphs merkkien käyttöönottamiseksi" +msgstr "kolmoismerkki ??%c ohitettiin, ota käyttöön valitsimella -trigraphs" #: lex.c:1089 msgid "\"/*\" within comment" msgstr "”/*” kommentin sisällä" +# Mahdolliset arvot: "form feed", "vertical tab", eivät käännettäviä. #: lex.c:1147 #, c-format msgid "%s in preprocessing directive" -msgstr "%s esikäsittelijädirektiivissä" +msgstr "%s esikääntäjän direktiivissä" #: lex.c:1156 msgid "null character(s) ignored" -msgstr "null-merkkejä ei oteta huomioon" +msgstr "null-merkit ohitetaan" # NFKC-muodossa Unicode-merkki ilmaistaan nelinumeroisella heksadesimaaliluvulla #: lex.c:1193 #, c-format msgid "`%.*s' is not in NFKC" -msgstr "”%.*s” ei ole Unicode-normalisointimerkkijonomuodossa NFKC" +msgstr "”%.*s” ei ole NFKC-muodossa" # NFC-muodossa Unicode-merkki ilmaistaan nelinumeroisella heksadesimaaliluvulla #: lex.c:1196 #, c-format msgid "`%.*s' is not in NFC" -msgstr "”%.*s” ei ole Unicode-normalisointimerkkijonomuodossa NFC" +msgstr "”%.*s” ei ole NFC-muodossa" # poison tarkoittaa, että makroa tai direktiiviä ei koskaan määritellä tai käytetä #: lex.c:1265 lex.c:1354 #, c-format msgid "attempt to use poisoned \"%s\"" -msgstr "yritys käyttää poison-kiellettyä makroa ”%s”" +msgstr "myrkytetyn makron ”%s” käyttöyritys" # Variadic-makro on sellainen makro, jonka argumenttien lukumäärä voi vaihdella. #: lex.c:1275 lex.c:1364 msgid "__VA_ARGS__ can only appear in the expansion of a C++11 variadic macro" -msgstr "__VA_ARGS__ voi vain esiintyä C++11 variadic-makrolaajennuksessa" +msgstr "__VA_ARGS__ voi vain esiintyä C++11:n variadisen makron lavennoksessa" # Variadic-makro on sellainen makro, jonka argumenttien lukumäärä voi vaihdella. #: lex.c:1279 lex.c:1368 msgid "__VA_ARGS__ can only appear in the expansion of a C99 variadic macro" -msgstr "__VA_ARGS__ voi vain esiintyä C99 variadic-makrolaajennuksessa" +msgstr "__VA_ARGS__ voi vain esiintyä C99:n variadisen makron lavennoksessa" #: lex.c:1286 lex.c:1375 #, c-format msgid "identifier \"%s\" is a special operator name in C++" -msgstr "tunniste ”%s” on erikoisoperaattorinimi C++:ssa" +msgstr "tunniste ”%s” on operaattorin nimi C++:ssa" #: lex.c:1665 msgid "raw string delimiter longer than 16 characters" -msgstr "raakamerkkijonoerotin pitempi kuin 16 merkkiä" +msgstr "raa’an merkkijonon erotin pitempi kuin 16 merkkiä" #: lex.c:1669 msgid "invalid new-line in raw string delimiter" -msgstr "virheellinen rivinvaihtomerkki raakamerkkijonoerottimessa" +msgstr "virheellinen rivinvaihto raa’an merkkijonon erottimessa" #: lex.c:1673 #, c-format msgid "invalid character '%c' in raw string delimiter" -msgstr "virheellinen merkki ’%c’ raakamerkkijonoerottimessa" +msgstr "virheellinen merkki ’%c’ raa’an merkkijonon erottimessa" #: lex.c:1722 lex.c:1744 msgid "unterminated raw string" -msgstr "päättämätön raakamerkkijono" +msgstr "päättämätön raaka merkkijono" #: lex.c:1765 lex.c:1894 msgid "invalid suffix on literal; C++11 requires a space between literal and string macro" @@ -750,24 +752,24 @@ msgstr "literaalissa virheellinen loppuliite; C++11 vaatii välilyönnin literaa #: lex.c:1876 msgid "null character(s) preserved in literal" -msgstr "null-merkit säilytetään literaaleissa" +msgstr "null-merkit säilytetään literaalissa" #: lex.c:1879 #, c-format msgid "missing terminating %c character" -msgstr "puuttuva päättymismerkki %c" +msgstr "päättävä merkki %c puuttuu" #: lex.c:2447 lex.c:2481 msgid "C++ style comments are not allowed in ISO C90" -msgstr "C++-tyyliset kommentit eivät ole sallittuja ISO C90-standardissa" +msgstr "C++-tyyliset kommentit eivät ole sallittuja ISO C90:ssä" #: lex.c:2449 lex.c:2460 lex.c:2483 msgid "(this will be reported only once per input file)" -msgstr "(tästä ilmoitetaan vain kerran per syötetiedosto)" +msgstr "(tästä ilmoitetaan vain kerran syötetiedostoa kohden)" #: lex.c:2458 msgid "C++ style comments are incompatible with C90" -msgstr "C++-tyyliset kommentit ovat yhteensopimattomia C90:n kanssa" +msgstr "C++-tyyliset kommentit ovat epäyhteensopivia C90:n kanssa" #: lex.c:2489 msgid "multi-line comment" @@ -776,12 +778,12 @@ msgstr "monirivinen kommentti" #: lex.c:2833 #, c-format msgid "unspellable token %s" -msgstr "tavaamaton merkkijono %s" +msgstr "kirjoitusasuton symboli %s" #: macro.c:200 #, c-format msgid "macro \"%s\" is not used" -msgstr "makroa ”%s” ei ole käytetty" +msgstr "makroa ”%s” ei käytetä" #: macro.c:238 macro.c:470 #, c-format @@ -791,38 +793,38 @@ msgstr "virheellinen sisäinen makro ”%s”" #: macro.c:245 macro.c:342 #, c-format msgid "macro \"%s\" might prevent reproducible builds" -msgstr "makro ”%s” saattaisi estää toistettavat rakentamiset" +msgstr "makro ”%s” saattaa estää toistettavat käännökset" #: macro.c:276 msgid "could not determine file timestamp" -msgstr "ei voitu ottaa selvää tiedoston aikaleimasta" +msgstr "ei voitu selvittää tiedoston aikaleimaa" #: macro.c:377 msgid "could not determine date and time" -msgstr "ei voitu ottaa selvää päivämäärästä ja ajasta" +msgstr "ei voitu selvittää päivämäärää ja aikaa" #: macro.c:393 msgid "__COUNTER__ expanded inside directive with -fdirectives-only" -msgstr "__COUNTER__ laajennettu direktiivin sisällä valitsimella -fdirectives-only" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: macro.c:581 msgid "invalid string literal, ignoring final '\\'" -msgstr "virheellinen merkijonoliteraali, ei oteta huomioon lopun ’\\’ merkkejä" +msgstr "virheellinen merkijonoliteraali, ohitetaan viimeinen ’\\’" #: macro.c:643 #, c-format msgid "pasting \"%s\" and \"%s\" does not give a valid preprocessing token" -msgstr "liittämällä ”%s” ja ”%s” ei anneta kelvollista esikääntäjämerkkijonoa" +msgstr "liittämällä ”%s” ja ”%s” ei saada kelvollista esikääntäjän symbolia" # Variadic-makro on sellainen makro, jonka argumenttien lukumäärä voi vaihdella. #: macro.c:767 msgid "ISO C++11 requires at least one argument for the \"...\" in a variadic macro" -msgstr "ISO C++11 vaatii vähintään yhden argumentin kohteelle ”...” variadic-makrossa" +msgstr "ISO C++11 vaatii vähintään yhden argumentin variadisen makron ”...”:lle" # Variadic-makro on sellainen makro, jonka argumenttien lukumäärä voi vaihdella. #: macro.c:771 msgid "ISO C99 requires at least one argument for the \"...\" in a variadic macro" -msgstr "ISO C99 vaatii vähintään yhden argumentin kohteelle ”...” variadic-makrossa" +msgstr "ISO C99 vaatii vähintään yhden argumentin variadisen makron ”...”:lle" #: macro.c:778 #, c-format @@ -832,17 +834,17 @@ msgstr "makro ”%s” vaatii %u argumenttia, mutta vain %u on annettu" #: macro.c:783 #, c-format msgid "macro \"%s\" passed %u arguments, but takes just %u" -msgstr "makrolle ”%s” välitetty %u argumenttia, mutta se ottaa vain %u" +msgstr "makrolle ”%s” annettu %u argumenttia, mutta se ottaa vain %u" #: macro.c:977 traditional.c:819 #, c-format msgid "unterminated argument list invoking macro \"%s\"" -msgstr "päättämätön argumenttiluettelo kutsuttaessa makroa ”%s”" +msgstr "päättämätön argumenttiluettelo kutsuttaessa ”%s”-makroa" #: macro.c:1128 #, c-format msgid "function-like macro \"%s\" must be used with arguments in traditional C" -msgstr "funktion kaltaista makroa ”%s” on käytettävä argumenteilla perinteisessä C:ssä" +msgstr "funktion kaltaista makroa ”%s” on käytettävä argumenttien kanssa perinteisessä C:ssä" #: macro.c:1814 #, c-format @@ -857,69 +859,66 @@ msgstr "kutsutaan makron %s argumenttia %d: tyhjät makroargumentit ovat määri #: macro.c:2800 #, c-format msgid "duplicate macro parameter \"%s\"" -msgstr "kaksoiskappale makroparametri ”%s”" +msgstr "kahdenkertainen makroparametri ”%s”" #: macro.c:2849 #, c-format msgid "\"%s\" may not appear in macro parameter list" -msgstr "”%s” ei ehkä ilmene makroparametriluettelossa" +msgstr "”%s” ei saa esiintyä makron parametriluettelossa" #: macro.c:2857 msgid "macro parameters must be comma-separated" -msgstr "makroparametrien on oltava pilkulla eroteltuja" +msgstr "makron parametrien on oltava pilkuin eroteltuja" #: macro.c:2875 msgid "parameter name missing" -msgstr "parametrinimi puuttuu" +msgstr "parametrin nimi puuttuu" -# Variadic-makro on sellainen makro, jonka argumenttien lukumäärä voi vaihdella. #: macro.c:2896 msgid "anonymous variadic macros were introduced in C++11" -msgstr "anonyymit variadic-makrot esiteltiin C++11:ssä" +msgstr "anonyymit variadiset makrot esiteltiin C++11:ssä" # Variadic-makro on sellainen makro, jonka argumenttien lukumäärä voi vaihdella. #: macro.c:2900 macro.c:2905 msgid "anonymous variadic macros were introduced in C99" -msgstr "anonyymit variadic-makrot esiteltiin C99:ssä" +msgstr "anonyymit variadiset makrot esiteltiin C99:ssä" -# Variadic-makro on sellainen makro, joka hyväksyy vaihtelevan määrän argumentteja. #: macro.c:2912 msgid "ISO C++ does not permit named variadic macros" -msgstr "ISO C++ ei salli nimettyjä variadic-makroja" +msgstr "ISO C++ ei salli nimettyjä variadisia makroja" -# Variadic-makro on sellainen makro, joka hyväksyy vaihtelevan määrän argumentteja. #: macro.c:2915 msgid "ISO C does not permit named variadic macros" -msgstr "ISO C ei salli nimettyjä variadic-makroja" +msgstr "ISO C ei salli nimettyjä variadisia makroja" #: macro.c:2925 msgid "missing ')' in macro parameter list" -msgstr "puuttuu ’)’ makroparametriluettelosta" +msgstr "’)’ puuttuu makron parametriluettelosta" #: macro.c:2976 msgid "'##' cannot appear at either end of a macro expansion" -msgstr "’##’ ei voi esiintyä makrolaajennuksen kummassakaan päässä" +msgstr "’##’ ei voi esiintyä makrolavennuksen kummassakaan päässä" #: macro.c:3013 msgid "ISO C++11 requires whitespace after the macro name" -msgstr "ISO C++11 vaatii tyhjemerkin makronimen jälkeen" +msgstr "ISO C++11 vaatii tyhjemerkin makron nimen jälkeen" #: macro.c:3016 msgid "ISO C99 requires whitespace after the macro name" -msgstr "ISO C99 vaatii tyhjemerkin makronimen jälkeen" +msgstr "ISO C99 vaatii tyhjemerkin makron nimen jälkeen" #: macro.c:3041 msgid "missing whitespace after the macro name" -msgstr "puuttuu tyhjemerkki makronimen jälkeen" +msgstr "tyhjemerkki puuttuu makron nimen jäljestä" #: macro.c:3075 msgid "'#' is not followed by a macro parameter" -msgstr "’#’-merkkiä seuraa makroparametri" +msgstr "’#’ ilman sitä seuraavaa makroparametria" #: macro.c:3236 #, c-format msgid "\"%s\" redefined" -msgstr "”%s” on määritelty uudelleen" +msgstr "”%s” määritelty uudelleen" #: macro.c:3241 msgid "this is the location of the previous definition" @@ -928,32 +927,31 @@ msgstr "tämä on edellisen määrittelyn sijainti" #: macro.c:3302 #, c-format msgid "macro argument \"%s\" would be stringified in traditional C" -msgstr "makroargumentti ”%s” muunnettaisiin merkkijonoksi perinteisessä C:ssä" +msgstr "makron argumentti ”%s” merkkijonostettaisiin perinteisessä C:ssä" #: macro.c:3329 #, c-format msgid "invalid hash type %d in cpp_macro_definition" -msgstr "virheellinen hash-tyyppi %d kohteessa cpp_macro_definition" +msgstr "virheellinen hash-tyyppi %d funktiossa cpp_macro_definition" #: pch.c:87 pch.c:345 pch.c:359 pch.c:377 pch.c:383 pch.c:392 pch.c:399 msgid "while writing precompiled header" -msgstr "kirjoitettaessa esikäännettyjä otsaketiedostoja" +msgstr "kirjoitettaessa esikäännettyä otsaketiedostoa" -# poison tarkoittaa, että makroa tai direktiiviä ei koskaan määritellä tai käytetä #: pch.c:619 #, c-format msgid "%s: not used because `%.*s' is poisoned" -msgstr "%s: ei käytetä, koska ”%.*s” on poison-kielletty" +msgstr "%s: ei käytetä, koska ”%.*s” on myrkytetty" #: pch.c:641 #, c-format msgid "%s: not used because `%.*s' not defined" -msgstr "%s: ei käytetä, koska ”%.*s” ei ole määritelty" +msgstr "%s: ei käytetä, koska ”%.*s” on määrittelemättä" #: pch.c:653 #, c-format msgid "%s: not used because `%.*s' defined as `%s' not `%.*s'" -msgstr "%s: ei käytetä, koska ”%.*s” on määritelty nimellä ”%s” ei nimellä ”%.*s”" +msgstr "%s: ei käytetä, koska ”%.*s” on määritelty arvoon ”%s” eikä ”%.*s”" #: pch.c:694 #, c-format @@ -963,20 +961,20 @@ msgstr "%s: ei käytetä, koska ”%s” on määritelty" #: pch.c:714 #, c-format msgid "%s: not used because `__COUNTER__' is invalid" -msgstr "%s: ei käytetty, koska ”__COUNTER__” on virheellinen" +msgstr "%s: ei käytetä, koska ”__COUNTER__” on virheellinen" #: pch.c:723 pch.c:900 msgid "while reading precompiled header" -msgstr "luettaessa esikäännettyjä otsaketiedostoja" +msgstr "luettaessa esikäännettyä otsaketiedostoa" #: traditional.c:889 #, c-format msgid "detected recursion whilst expanding macro \"%s\"" -msgstr "havaittu rekursio laajennettaessa makroa ”%s”" +msgstr "havaittiin rekursio lavennettaessa makroa ”%s”" #: traditional.c:1108 msgid "syntax error in macro parameter list" -msgstr "syntaksivirhe makroparameteriluettelossa" +msgstr "syntaksivirhe makron parameteriluettelossa" # NFKC-muodossa Unicode-merkki ilmaistaan nelinumeroisella heksadesimaaliluvulla #~ msgid "Character %x might not be NFKC" diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index 57d4a038e76..9062c2c9236 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -183,6 +183,12 @@ enum { #ifdef TIOCSCTTY TIOCSCTTY_val = TIOCSCTTY, #endif +#ifdef TIOCGPGRP + TIOCGPGRP_val = TIOCGPGRP, +#endif +#ifdef TIOCSPGRP + TIOCSPGRP_val = TIOCSPGRP, +#endif #ifdef TIOCGPTN TIOCGPTN_val = TIOCGPTN, #endif @@ -534,7 +540,7 @@ upcase_fields () { # GNU/Linux specific; it should do no harm if there is no # _user_regs_struct. regs=`grep '^type _user_regs_struct struct' gen-sysinfo.go || true` -if test "$regs" == ""; then +if test "$regs" = ""; then # s390 regs=`grep '^type __user_regs_struct struct' gen-sysinfo.go || true` if test "$regs" != ""; then @@ -878,11 +884,13 @@ grep '^type _addrinfo ' gen-sysinfo.go | \ -e 's/ ai_/ Ai_/g' \ >> ${OUT} -# The addrinfo flags and errors. +# The addrinfo and nameinfo flags and errors. grep '^const _AI_' gen-sysinfo.go | \ sed -e 's/^\(const \)_\(AI_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} grep '^const _EAI_' gen-sysinfo.go | \ sed -e 's/^\(const \)_\(EAI_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} +grep '^const _NI_' gen-sysinfo.go | \ + sed -e 's/^\(const \)_\(NI_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} # The passwd struct. grep '^type _passwd ' gen-sysinfo.go | \ @@ -918,6 +926,16 @@ if ! grep '^const TIOCSCTTY' ${OUT} >/dev/null 2>&1; then echo 'const TIOCSCTTY = _TIOCSCTTY_val' >> ${OUT} fi fi +if ! grep '^const TIOCGPGRP' ${OUT} >/dev/null 2>&1; then + if grep '^const _TIOCGPGRP_val' ${OUT} >/dev/null 2>&1; then + echo 'const TIOCGPGRP = _TIOCGPGRP_val' >> ${OUT} + fi +fi +if ! grep '^const TIOCSPGRP' ${OUT} >/dev/null 2>&1; then + if grep '^const _TIOCSPGRP_val' ${OUT} >/dev/null 2>&1; then + echo 'const TIOCSPGRP = _TIOCSPGRP_val' >> ${OUT} + fi +fi if ! grep '^const TIOCGPTN' ${OUT} >/dev/null 2>&1; then if grep '^const _TIOCGPTN_val' ${OUT} >/dev/null 2>&1; then echo 'const TIOCGPTN = _TIOCGPTN_val' >> ${OUT} @@ -1433,6 +1451,11 @@ grep '^type _inotify_event ' gen-sysinfo.go | \ # The GNU/Linux CLONE flags. grep '^const _CLONE_' gen-sysinfo.go | \ sed -e 's/^\(const \)_\(CLONE_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} +# We need some CLONE constants that are not defined in older versions +# of glibc. +if ! grep '^const CLONE_NEWUSER ' ${OUT} > /dev/null 2>&1; then + echo "const CLONE_NEWUSER = 0x10000000" >> ${OUT} +fi # Struct sizes. set cmsghdr Cmsghdr ip_mreq IPMreq ip_mreqn IPMreqn ipv6_mreq IPv6Mreq \ diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index d04cd8e8cd4..79d66b0ed12 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,13 @@ +2016-01-26 Tom de Vries + + PR tree-optimization/69110 + * testsuite/libgomp.c/pr69110.c: New test. + +2016-01-14 Dominique d'Humieres + + PR fortran/66680 + * testsuite/libgomp.fortran/pr66680.f90: New test. + 2015-12-04 Release Manager * GCC 5.3.0 released. diff --git a/libgomp/testsuite/libgomp.c/pr69110.c b/libgomp/testsuite/libgomp.c/pr69110.c new file mode 100644 index 00000000000..0d9e5ca5c3c --- /dev/null +++ b/libgomp/testsuite/libgomp.c/pr69110.c @@ -0,0 +1,26 @@ +/* { dg-do run } */ +/* { dg-options "-ftree-parallelize-loops=2 -O1 -fno-tree-loop-im" } */ + +#define N 1000 + +unsigned int i = 0; + +static void __attribute__((noinline, noclone)) +foo (void) +{ + unsigned int z; + for (z = 0; z < N; ++z) + ++i; +} + +extern void abort (void); + +int +main (void) +{ + foo (); + if (i != N) + abort (); + + return 0; +} diff --git a/libgomp/testsuite/libgomp.fortran/pr66680.f90 b/libgomp/testsuite/libgomp.fortran/pr66680.f90 new file mode 100644 index 00000000000..b068cb3e890 --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/pr66680.f90 @@ -0,0 +1,46 @@ +! { dg-do run } +! PR 66680: ICE with openmp, a loop and a type bound procedure +! Contributed by Miha Polajnar +! +module m1 + implicit none + integer :: n = 5 + type :: t1 + contains + procedure :: s => s1 + end type t1 +contains + pure subroutine s1(self,p,esta) + class(t1), intent(in) :: self + integer, optional, intent(in) :: p + integer, intent(out) :: esta + end subroutine s1 +end module m1 +module m2 + use m1, only: t1, n + implicit none + type(t1), allocatable :: test(:) +contains + pure subroutine s2(test1,esta) + type(t1), intent(in) :: test1 + integer, intent(out) :: esta + integer :: p, i + do p = 1, n + i = p ! using i instead of p works + call test1%s(p=p,esta=esta) + if ( esta /= 0 ) return + end do + end subroutine s2 + subroutine s3() + integer :: i, esta + !$omp parallel do & + !$omp private(i) + do i = 1, n + call s2(test(i),esta) + end do + !$omp end parallel do + end subroutine s3 +end module m2 +program main + implicit none +end program main diff --git a/libmpx/ChangeLog b/libmpx/ChangeLog index 4f8f401c623..89d88cc19fb 100644 --- a/libmpx/ChangeLog +++ b/libmpx/ChangeLog @@ -1,3 +1,11 @@ +2016-01-20 Ilya Enkovich + + Backport from mainline r232619. + 2016-01-20 Ilya Enkovich + + * mpxrt/mpxrt.c (handler): Fix verbosity for + error message. + 2015-12-04 Release Manager * GCC 5.3.0 released. diff --git a/libmpx/mpxrt/mpxrt.c b/libmpx/mpxrt/mpxrt.c index 0eff87e7cc6..64ee260ef39 100644 --- a/libmpx/mpxrt/mpxrt.c +++ b/libmpx/mpxrt/mpxrt.c @@ -296,7 +296,7 @@ handler (int sig __attribute__ ((unused)), __mpxrt_write_uint (VERB_ERROR, trapno, 10); __mpxrt_write (VERB_ERROR, ", ip = 0x"); __mpxrt_write_uint (VERB_ERROR, ip, 16); - __mpxrt_write (VERB_BR, "\n"); + __mpxrt_write (VERB_ERROR, "\n"); exit (255); } else @@ -305,7 +305,7 @@ handler (int sig __attribute__ ((unused)), __mpxrt_write_uint (VERB_ERROR, trapno, 10); __mpxrt_write (VERB_ERROR, "! at 0x"); __mpxrt_write_uint (VERB_ERROR, ip, 16); - __mpxrt_write (VERB_BR, "\n"); + __mpxrt_write (VERB_ERROR, "\n"); exit (255); } } diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c52bafa3533..62450855d12 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,16 @@ +2016-01-18 Jonathan Wakely + + PR libstdc++/60637 + * include/c_global/cmath (signbit) [__cplusplus < 201103L]: Use + __builtin_signbitf or __builtin_signbitl as appropriate. + * testsuite/26_numerics/headers/cmath/60637.cc: New. + +2016-01-16 H.J. Lu + + Backport from mainline + * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Add + __int128 symbols. + 2016-01-12 Jonathan Wakely PR libstdc++/69092 diff --git a/libstdc++-v3/config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt b/libstdc++-v3/config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt index 67b1f3e5c4f..6bc4a4b10c8 100644 --- a/libstdc++-v3/config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt @@ -4618,6 +4618,8 @@ OBJECT:2:_ZTSi@@CXXABI_1.3 OBJECT:2:_ZTSj@@CXXABI_1.3 OBJECT:2:_ZTSl@@CXXABI_1.3 OBJECT:2:_ZTSm@@CXXABI_1.3 +OBJECT:2:_ZTSn@@CXXABI_1.3.9 +OBJECT:2:_ZTSo@@CXXABI_1.3.9 OBJECT:2:_ZTSs@@CXXABI_1.3 OBJECT:2:_ZTSt@@CXXABI_1.3 OBJECT:2:_ZTSv@@CXXABI_1.3 @@ -4711,6 +4713,8 @@ OBJECT:3:_ZTSPi@@CXXABI_1.3 OBJECT:3:_ZTSPj@@CXXABI_1.3 OBJECT:3:_ZTSPl@@CXXABI_1.3 OBJECT:3:_ZTSPm@@CXXABI_1.3 +OBJECT:3:_ZTSPn@@CXXABI_1.3.9 +OBJECT:3:_ZTSPo@@CXXABI_1.3.9 OBJECT:3:_ZTSPs@@CXXABI_1.3 OBJECT:3:_ZTSPt@@CXXABI_1.3 OBJECT:3:_ZTSPv@@CXXABI_1.3 @@ -5116,6 +5120,8 @@ OBJECT:4:_ZTSPKi@@CXXABI_1.3 OBJECT:4:_ZTSPKj@@CXXABI_1.3 OBJECT:4:_ZTSPKl@@CXXABI_1.3 OBJECT:4:_ZTSPKm@@CXXABI_1.3 +OBJECT:4:_ZTSPKn@@CXXABI_1.3.9 +OBJECT:4:_ZTSPKo@@CXXABI_1.3.9 OBJECT:4:_ZTSPKs@@CXXABI_1.3 OBJECT:4:_ZTSPKt@@CXXABI_1.3 OBJECT:4:_ZTSPKv@@CXXABI_1.3 diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath index 4cafe5f7fe3..d3fc8b7f39c 100644 --- a/libstdc++-v3/include/c_global/cmath +++ b/libstdc++-v3/include/c_global/cmath @@ -880,7 +880,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION signbit(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __builtin_signbit(__type(__f)); + return sizeof(__type) == sizeof(float) + ? __builtin_signbitf(__type(__f)) + : sizeof(__type) == sizeof(double) + ? __builtin_signbit(__type(__f)) + : __builtin_signbitl(__type(__f)); } template diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/60637.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/60637.cc new file mode 100644 index 00000000000..16a78963e6c --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/60637.cc @@ -0,0 +1,35 @@ +// Copyright (C) 2016 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-options "-std=gnu++98 -ffast-math" } +// { dg-do run { target i?86-*-* x86_64-*-* } } + +#include +#include + +void +test01() +{ + long double ld = -5.3165867831218916301793863361917824e-2467L; + VERIFY( std::signbit(ld) == 1 ); +} + +int +main() +{ + test01(); +} -- cgit v1.2.3