Richard Biener [Tue, 8 May 2018 07:55:24 +0000 (07:55 +0000)]
re PR tree-optimization/85588 (-fwrapv miscompilation)
2018-05-08 Richard Biener <rguenther@suse.de>
PR middle-end/85588
* gcc.dg/torture/pr85574.c: Rename to...
* gcc.dg/torture/pr85588.c: ... this.
From-SVN: r260024
Thomas Koenig [Tue, 8 May 2018 07:47:19 +0000 (07:47 +0000)]
re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)
2018-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/54613
* check.c (gfc_check_minmaxloc): Remove error for BACK not being
implemented. Use gfc_logical_4_kind for BACK.
* simplify.c (min_max_choose): Add optional argument back_val.
Handle it.
(simplify_minmaxloc_to_scalar): Add argument back_val. Pass
back_val to min_max_choose.
(simplify_minmaxloc_to_nodim): Likewise.
(simplify_minmaxloc_to_array): Likewise.
(gfc_simplify_minmaxloc): Add argument back, handle it.
Pass back_val to specific simplification functions.
(gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
pass it on to gfc_simplify_minmaxloc.
(gfc_simplify_maxloc): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
comment. If BACK is true, use greater or equal (or lesser or
equal) insteal of greater (or lesser). Mark the condition of
having found a value which exceeds the limit as unlikely.
2018-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/54613
* m4/iforeach-s.m4: Remove assertion that back is zero.
* m4/iforeach.m4: Likewise. Remove leading 'do'
before implementation start.
* m4/ifunction-s.m4: Remove assertion that back is zero.
* m4/ifunction.m4: Likewise. Remove for loop if HAVE_BACK_ARG
is defined.
* m4/maxloc0.m4: Reorganize loops. Split loops between >= and =,
depending if back is true. Mark the condition of having
found a value which exceeds the limit as unlikely.
* m4/minloc0.m4: Likewise.
* m4/maxloc1.m4: Likewise.
* m4/minloc1.m4: Likewise.
* m4/maxloc1s.m4: Handle back argument.
* m4/minloc1s.m4: Likewise.
* m4/maxloc2s.m4: Remove assertion that back is zero.
Remove special handling of loop start. Handle back argument.
* m4/minloc2s.m4: Likewise.
* generated/iall_i1.c: Regenerated.
* generated/iall_i16.c: Regenerated.
* generated/iall_i2.c: Regenerated.
* generated/iall_i4.c: Regenerated.
* generated/iall_i8.c: Regenerated.
* generated/iany_i1.c: Regenerated.
* generated/iany_i16.c: Regenerated.
* generated/iany_i2.c: Regenerated.
* generated/iany_i4.c: Regenerated.
* generated/iany_i8.c: Regenerated.
* generated/iparity_i1.c: Regenerated.
* generated/iparity_i16.c: Regenerated.
* generated/iparity_i2.c: Regenerated.
* generated/iparity_i4.c: Regenerated.
* generated/iparity_i8.c: Regenerated.
* generated/maxloc0_16_i1.c: Regenerated.
* generated/maxloc0_16_i16.c: Regenerated.
* generated/maxloc0_16_i2.c: Regenerated.
* generated/maxloc0_16_i4.c: Regenerated.
* generated/maxloc0_16_i8.c: Regenerated.
* generated/maxloc0_16_r10.c: Regenerated.
* generated/maxloc0_16_r16.c: Regenerated.
* generated/maxloc0_16_r4.c: Regenerated.
* generated/maxloc0_16_r8.c: Regenerated.
* generated/maxloc0_16_s1.c: Regenerated.
* generated/maxloc0_16_s4.c: Regenerated.
* generated/maxloc0_4_i1.c: Regenerated.
* generated/maxloc0_4_i16.c: Regenerated.
* generated/maxloc0_4_i2.c: Regenerated.
* generated/maxloc0_4_i4.c: Regenerated.
* generated/maxloc0_4_i8.c: Regenerated.
* generated/maxloc0_4_r10.c: Regenerated.
* generated/maxloc0_4_r16.c: Regenerated.
* generated/maxloc0_4_r4.c: Regenerated.
* generated/maxloc0_4_r8.c: Regenerated.
* generated/maxloc0_4_s1.c: Regenerated.
* generated/maxloc0_4_s4.c: Regenerated.
* generated/maxloc0_8_i1.c: Regenerated.
* generated/maxloc0_8_i16.c: Regenerated.
* generated/maxloc0_8_i2.c: Regenerated.
* generated/maxloc0_8_i4.c: Regenerated.
* generated/maxloc0_8_i8.c: Regenerated.
* generated/maxloc0_8_r10.c: Regenerated.
* generated/maxloc0_8_r16.c: Regenerated.
* generated/maxloc0_8_r4.c: Regenerated.
* generated/maxloc0_8_r8.c: Regenerated.
* generated/maxloc0_8_s1.c: Regenerated.
* generated/maxloc0_8_s4.c: Regenerated.
* generated/maxloc1_16_i1.c: Regenerated.
* generated/maxloc1_16_i16.c: Regenerated.
* generated/maxloc1_16_i2.c: Regenerated.
* generated/maxloc1_16_i4.c: Regenerated.
* generated/maxloc1_16_i8.c: Regenerated.
* generated/maxloc1_16_r10.c: Regenerated.
* generated/maxloc1_16_r16.c: Regenerated.
* generated/maxloc1_16_r4.c: Regenerated.
* generated/maxloc1_16_r8.c: Regenerated.
* generated/maxloc1_16_s1.c: Regenerated.
* generated/maxloc1_16_s4.c: Regenerated.
* generated/maxloc1_4_i1.c: Regenerated.
* generated/maxloc1_4_i16.c: Regenerated.
* generated/maxloc1_4_i2.c: Regenerated.
* generated/maxloc1_4_i4.c: Regenerated.
* generated/maxloc1_4_i8.c: Regenerated.
* generated/maxloc1_4_r10.c: Regenerated.
* generated/maxloc1_4_r16.c: Regenerated.
* generated/maxloc1_4_r4.c: Regenerated.
* generated/maxloc1_4_r8.c: Regenerated.
* generated/maxloc1_4_s1.c: Regenerated.
* generated/maxloc1_4_s4.c: Regenerated.
* generated/maxloc1_8_i1.c: Regenerated.
* generated/maxloc1_8_i16.c: Regenerated.
* generated/maxloc1_8_i2.c: Regenerated.
* generated/maxloc1_8_i4.c: Regenerated.
* generated/maxloc1_8_i8.c: Regenerated.
* generated/maxloc1_8_r10.c: Regenerated.
* generated/maxloc1_8_r16.c: Regenerated.
* generated/maxloc1_8_r4.c: Regenerated.
* generated/maxloc1_8_r8.c: Regenerated.
* generated/maxloc1_8_s1.c: Regenerated.
* generated/maxloc1_8_s4.c: Regenerated.
* generated/maxloc2_16_s1.c: Regenerated.
* generated/maxloc2_16_s4.c: Regenerated.
* generated/maxloc2_4_s1.c: Regenerated.
* generated/maxloc2_4_s4.c: Regenerated.
* generated/maxloc2_8_s1.c: Regenerated.
* generated/maxloc2_8_s4.c: Regenerated.
* generated/maxval_i1.c: Regenerated.
* generated/maxval_i16.c: Regenerated.
* generated/maxval_i2.c: Regenerated.
* generated/maxval_i4.c: Regenerated.
* generated/maxval_i8.c: Regenerated.
* generated/maxval_r10.c: Regenerated.
* generated/maxval_r16.c: Regenerated.
* generated/maxval_r4.c: Regenerated.
* generated/maxval_r8.c: Regenerated.
* generated/minloc0_16_i1.c: Regenerated.
* generated/minloc0_16_i16.c: Regenerated.
* generated/minloc0_16_i2.c: Regenerated.
* generated/minloc0_16_i4.c: Regenerated.
* generated/minloc0_16_i8.c: Regenerated.
* generated/minloc0_16_r10.c: Regenerated.
* generated/minloc0_16_r16.c: Regenerated.
* generated/minloc0_16_r4.c: Regenerated.
* generated/minloc0_16_r8.c: Regenerated.
* generated/minloc0_16_s1.c: Regenerated.
* generated/minloc0_16_s4.c: Regenerated.
* generated/minloc0_4_i1.c: Regenerated.
* generated/minloc0_4_i16.c: Regenerated.
* generated/minloc0_4_i2.c: Regenerated.
* generated/minloc0_4_i4.c: Regenerated.
* generated/minloc0_4_i8.c: Regenerated.
* generated/minloc0_4_r10.c: Regenerated.
* generated/minloc0_4_r16.c: Regenerated.
* generated/minloc0_4_r4.c: Regenerated.
* generated/minloc0_4_r8.c: Regenerated.
* generated/minloc0_4_s1.c: Regenerated.
* generated/minloc0_4_s4.c: Regenerated.
* generated/minloc0_8_i1.c: Regenerated.
* generated/minloc0_8_i16.c: Regenerated.
* generated/minloc0_8_i2.c: Regenerated.
* generated/minloc0_8_i4.c: Regenerated.
* generated/minloc0_8_i8.c: Regenerated.
* generated/minloc0_8_r10.c: Regenerated.
* generated/minloc0_8_r16.c: Regenerated.
* generated/minloc0_8_r4.c: Regenerated.
* generated/minloc0_8_r8.c: Regenerated.
* generated/minloc0_8_s1.c: Regenerated.
* generated/minloc0_8_s4.c: Regenerated.
* generated/minloc1_16_i1.c: Regenerated.
* generated/minloc1_16_i16.c: Regenerated.
* generated/minloc1_16_i2.c: Regenerated.
* generated/minloc1_16_i4.c: Regenerated.
* generated/minloc1_16_i8.c: Regenerated.
* generated/minloc1_16_r10.c: Regenerated.
* generated/minloc1_16_r16.c: Regenerated.
* generated/minloc1_16_r4.c: Regenerated.
* generated/minloc1_16_r8.c: Regenerated.
* generated/minloc1_16_s1.c: Regenerated.
* generated/minloc1_16_s4.c: Regenerated.
* generated/minloc1_4_i1.c: Regenerated.
* generated/minloc1_4_i16.c: Regenerated.
* generated/minloc1_4_i2.c: Regenerated.
* generated/minloc1_4_i4.c: Regenerated.
* generated/minloc1_4_i8.c: Regenerated.
* generated/minloc1_4_r10.c: Regenerated.
* generated/minloc1_4_r16.c: Regenerated.
* generated/minloc1_4_r4.c: Regenerated.
* generated/minloc1_4_r8.c: Regenerated.
* generated/minloc1_4_s1.c: Regenerated.
* generated/minloc1_4_s4.c: Regenerated.
* generated/minloc1_8_i1.c: Regenerated.
* generated/minloc1_8_i16.c: Regenerated.
* generated/minloc1_8_i2.c: Regenerated.
* generated/minloc1_8_i4.c: Regenerated.
* generated/minloc1_8_i8.c: Regenerated.
* generated/minloc1_8_r10.c: Regenerated.
* generated/minloc1_8_r16.c: Regenerated.
* generated/minloc1_8_r4.c: Regenerated.
* generated/minloc1_8_r8.c: Regenerated.
* generated/minloc1_8_s1.c: Regenerated.
* generated/minloc1_8_s4.c: Regenerated.
* generated/minloc2_16_s1.c: Regenerated.
* generated/minloc2_16_s4.c: Regenerated.
* generated/minloc2_4_s1.c: Regenerated.
* generated/minloc2_4_s4.c: Regenerated.
* generated/minloc2_8_s1.c: Regenerated.
* generated/minloc2_8_s4.c: Regenerated.
* generated/minval_i1.c: Regenerated.
* generated/minval_i16.c: Regenerated.
* generated/minval_i2.c: Regenerated.
* generated/minval_i4.c: Regenerated.
* generated/minval_i8.c: Regenerated.
* generated/minval_r10.c: Regenerated.
* generated/minval_r16.c: Regenerated.
* generated/minval_r4.c: Regenerated.
* generated/minval_r8.c: Regenerated.
* generated/norm2_r10.c: Regenerated.
* generated/norm2_r16.c: Regenerated.
* generated/norm2_r4.c: Regenerated.
* generated/norm2_r8.c: Regenerated.
* generated/parity_l1.c: Regenerated.
* generated/parity_l16.c: Regenerated.
* generated/parity_l2.c: Regenerated.
* generated/parity_l4.c: Regenerated.
* generated/parity_l8.c: Regenerated.
* generated/product_c10.c: Regenerated.
* generated/product_c16.c: Regenerated.
* generated/product_c4.c: Regenerated.
* generated/product_c8.c: Regenerated.
* generated/product_i1.c: Regenerated.
* generated/product_i16.c: Regenerated.
* generated/product_i2.c: Regenerated.
* generated/product_i4.c: Regenerated.
* generated/product_i8.c: Regenerated.
* generated/product_r10.c: Regenerated.
* generated/product_r16.c: Regenerated.
* generated/product_r4.c: Regenerated.
* generated/product_r8.c: Regenerated.
* generated/sum_c10.c: Regenerated.
* generated/sum_c16.c: Regenerated.
* generated/sum_c4.c: Regenerated.
* generated/sum_c8.c: Regenerated.
* generated/sum_i1.c: Regenerated.
* generated/sum_i16.c: Regenerated.
* generated/sum_i2.c: Regenerated.
* generated/sum_i4.c: Regenerated.
* generated/sum_i8.c: Regenerated.
* generated/sum_r10.c: Regenerated.
* generated/sum_r16.c: Regenerated.
* generated/sum_r4.c: Regenerated.
* generated/sum_r8.c: Regenerated.
2018-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/54613
* gfortran.dg/minmaxloc_12.f90: New test case.
* gfortran.dg/minmaxloc_13.f90: New test case.
From-SVN: r260023
GCC Administrator [Tue, 8 May 2018 00:16:36 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r260021
Jason Merrill [Mon, 7 May 2018 23:50:16 +0000 (19:50 -0400)]
PR c++/85646 - lambda visibility.
* decl2.c (determine_visibility): Don't mess with template arguments
from the containing scope.
(vague_linkage_p): Check DECL_ABSTRACT_P before looking at a 'tor
thunk.
From-SVN: r260017
Nathan Sidwell [Mon, 7 May 2018 23:04:22 +0000 (23:04 +0000)]
[C++ PATCH] Kill -fno-for-scope
https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00299.html
gcc/cp/
Remove fno-for-scope
* cp-tree.h (DECL_ERROR_REPORTED, DECL_DEAD_FOR_LOCAL)
(DECL_HAS_SHADOWED_FOR_VAR_P, DECL_SHADOWED_FOR_VAR)
(SET_DECL_SHADOWED_FOR_VAR): Delete.
(decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert)
(check_for_out_of_scope_variable, init_shadowed_var_for_decl):
Don't declare.
* name-lookup.h (struct cp_binding_level): Remove
dead_vars_from_for field.
* cp-lang.c (cp_init_ts): Delete.
(LANG_HOOKS_INIT_TS): Override to cp_common_init_ts.
* cp-objcp-common.c (shadowed_var_for_decl): Delete.
(decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert)
(init_shadowed_var_for_decl): Delete.
* decl.c (poplevel): Remove shadowed for var handling.
(cxx_init_decl_processing): Remove -ffor-scope deprecation.
* name-lookup.c (find_local_binding): Remove shadowed for var
handling.
(check_local_shadow): Likewise.
(check_for_out_of_scope_variable): Delete.
* parser.c (cp_parser_primary_expression): Remove shadowed for var
handling.
* pt.c (tsubst_decl): Remove DECL_DEAD_FOR_LOCAL setting.
* semantics.c (begin_for_scope): Always have a scope.
(begin_for_stmt, finish_for_stmt): Remove ARM-for scope handling.
(begin_range_for_stmt, finish_id_expression): Likewise.
gcc/
* doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
* doc/extend.texi (Deprecated Features): Remove -fno-for-scope
(Backwards Compatibility): Likewise.
c-family/
* c.opt (ffor-scope): Remove functionality, issue warning.
gcc/objcp/
* objcp-lang.c (objcxx_init_ts): Don't call init_shadowed_var_for_decl.
gcc/testsuite/
* g++.dg/cpp0x/range-for10.C: Delete.
* g++.dg/ext/forscope1.C: Delete.
* g++.dg/ext/forscope2.C: Delete.
* g++.dg/template/for1.C: Delete.
From-SVN: r260015
Jason Merrill [Mon, 7 May 2018 19:22:35 +0000 (15:22 -0400)]
PR c++/85618 - ICE with initialized VLA.
* tree.c (vla_type_p): New.
* typeck2.c (store_init_value, split_nonconstant_init_1): Check it
rather than array_of_runtime_bound_p.
From-SVN: r260012
Jonathan Wakely [Mon, 7 May 2018 19:17:16 +0000 (20:17 +0100)]
Document -lstdc++fs requirement for std::filesystem
* doc/xml/manual/using.xml (table.cmd_options): Document that the
C++17 Filesystem implementation also needs -lstdc++fs.
From-SVN: r260011
Jeff Law [Mon, 7 May 2018 18:24:59 +0000 (12:24 -0600)]
scanner.c (preprocessor_line): Call linemap_add after a line directive that changes the current filename.
* scanner.c (preprocessor_line): Call linemap_add after a line
directive that changes the current filename.
* gfortran.dg/linefile.f90: New test.
From-SVN: r260010
Jonathan Wakely [Mon, 7 May 2018 17:26:28 +0000 (18:26 +0100)]
PR libstdc++/85671 allow copy elision in path concatenation
By performing the /= operation on a named local variable instead of a
temporary the copy made for the return value can be elided.
PR libstdc++/85671
* include/bits/fs_path.h (operator/): Permit copy elision.
* include/experimental/bits/fs_path.h (operator/): Likewise.
From-SVN: r260009
Edward Smith-Rowland [Mon, 7 May 2018 16:59:08 +0000 (16:59 +0000)]
Moar PR libstdc++/80506
2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
Moar PR libstdc++/80506
* include/bits/random.tcc (gamma_distribution::__generate_impl()):
Fix magic number used in loop condition.
Actually put the file in.
Don't know what my problem is today...
From-SVN: r260008
Amaan Cheval [Mon, 7 May 2018 16:32:09 +0000 (16:32 +0000)]
config.host (x86_64-*-rtems*): Build crti.o and crtn.o.
2018-05-07 Amaan Cheval <amaan.cheval@gmail.com>
* config.host (x86_64-*-rtems*): Build crti.o and crtn.o.
From-SVN: r260007
Edward Smith-Rowland [Mon, 7 May 2018 16:17:32 +0000 (16:17 +0000)]
Moar PR libstdc++/80506
2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
Moar PR libstdc++/80506
* include/bits/random.tcc (gamma_distribution::__generate_impl()):
Fix magic number used in loop condition.
From-SVN: r260004
Edward Smith-Rowland [Mon, 7 May 2018 16:13:48 +0000 (16:13 +0000)]
Rollback bad commits! Sorry!
From-SVN: r260003
Edward Smith-Rowland [Mon, 7 May 2018 16:02:46 +0000 (16:02 +0000)]
Revert 20001.
From-SVN: r260002
Edward Smith-Rowland [Mon, 7 May 2018 15:55:11 +0000 (15:55 +0000)]
Moar PR libstdc++/80506
2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
Moar PR libstdc++/80506
* include/bits/random.tcc (gamma_distribution::__generate_impl()):
Fix magic number used in loop condition.
From-SVN: r260001
Luis Machado [Mon, 7 May 2018 15:47:14 +0000 (15:47 +0000)]
re PR bootstrap/85681 (r259995 breaks bootstrap on x86_64-*-freebsd)
2018-05-07 Luis Machado <luis.machado@linaro.org>
PR bootstrap/85681
Revert:
2018-05-07 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
<prefetch_dynamic_strides>: New const bool field.
* config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
prefetch_dynamic_strides.
(exynosm1_prefetch_tune): Likewise.
(thunderxt88_prefetch_tune): Likewise.
(thunderx_prefetch_tune): Likewise.
(thunderx2t99_prefetch_tune): Likewise.
(qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
(aarch64_override_options_internal): Update to set
PARAM_PREFETCH_DYNAMIC_STRIDES.
* doc/invoke.texi (prefetch-dynamic-strides): Document new option.
* params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
* params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
* tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
prefetch-dynamic-strides setting.
2018-05-07 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
<minimum_stride>: New const int field.
* config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
minimum_stride field.
(exynosm1_prefetch_tune): Likewise.
(thunderxt88_prefetch_tune): Likewise.
(thunderx_prefetch_tune): Likewise.
(thunderx2t99_prefetch_tune): Likewise.
(qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
(aarch64_override_options_internal): Update to set
PARAM_PREFETCH_MINIMUM_STRIDE.
* doc/invoke.texi (prefetch-minimum-stride): Document new option.
* params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
* params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
* tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
stride is constant and is below the minimum stride threshold.
From-SVN: r260000
Luis Machado [Mon, 7 May 2018 14:36:39 +0000 (14:36 +0000)]
Fix gcc/ChangeLog.
From-SVN: r259999
Luis Machado [Mon, 7 May 2018 14:34:46 +0000 (14:34 +0000)]
aarch64.c (qdf24xx_prefetch_tune): Set to 512.
2018-05-07 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
to 512.
From-SVN: r259998
Luis Machado [Mon, 7 May 2018 14:12:54 +0000 (14:12 +0000)]
Introduce prefetch-dynamic-strides option.
The following patch adds an option to control software prefetching of memory
references with non-constant/unknown strides.
Currently we prefetch these references if the pass thinks there is benefit to
doing so. But, since this is all based on heuristics, it's not always the case
that we end up with better performance.
For Falkor there is also the problem of conflicts with the hardware prefetcher,
so we need to be more conservative in terms of what we issue software prefetch
hints for.
This also aligns GCC with what LLVM does for Falkor.
Similarly to the previous patch, the defaults guarantee no change in behavior
for other targets and architectures.
2018-05-07 Luis Machado <luis.machado@linaro.org>
gcc/
* config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
<prefetch_dynamic_strides>: New const bool field.
* config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
prefetch_dynamic_strides.
(exynosm1_prefetch_tune): Likewise.
(thunderxt88_prefetch_tune): Likewise.
(thunderx_prefetch_tune): Likewise.
(thunderx2t99_prefetch_tune): Likewise.
(qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
(aarch64_override_options_internal): Update to set
PARAM_PREFETCH_DYNAMIC_STRIDES.
* doc/invoke.texi (prefetch-dynamic-strides): Document new option.
* params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
* params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
* tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
prefetch-dynamic-strides setting.
From-SVN: r259996
Luis Machado [Mon, 7 May 2018 14:08:55 +0000 (14:08 +0000)]
Introduce prefetch-minimum stride option
This patch adds a new option to control the minimum stride, for a memory
reference, after which the loop prefetch pass may issue software prefetch
hints for. There are two motivations:
* Make the pass less aggressive, only issuing prefetch hints for bigger strides
that are more likely to benefit from prefetching. I've noticed a case in cpu2017
where we were issuing thousands of hints, for example.
* For processors that have a hardware prefetcher, like Falkor, it allows the
loop prefetch pass to defer prefetching of smaller (less than the threshold)
strides to the hardware prefetcher instead. This prevents conflicts between
the software prefetcher and the hardware prefetcher.
I've noticed considerable reduction in the number of prefetch hints and
slightly positive performance numbers. This aligns GCC and LLVM in terms of
prefetch behavior for Falkor.
The default settings should guarantee no changes for existing targets. Those
are free to tweak the settings as necessary.
2018-05-07 Luis Machado <luis.machado@linaro.org>
Introduce option to limit software prefetching to known constant
strides above a specific threshold with the goal of preventing
conflicts with a hardware prefetcher.
gcc/
* config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
<minimum_stride>: New const int field.
* config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
minimum_stride field.
(exynosm1_prefetch_tune): Likewise.
(thunderxt88_prefetch_tune): Likewise.
(thunderx_prefetch_tune): Likewise.
(thunderx2t99_prefetch_tune): Likewise.
(qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
(aarch64_override_options_internal): Update to set
PARAM_PREFETCH_MINIMUM_STRIDE.
* doc/invoke.texi (prefetch-minimum-stride): Document new option.
* params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
* params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
* tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
stride is constant and is below the minimum stride threshold.
From-SVN: r259995
Christophe Lyon [Mon, 7 May 2018 13:49:03 +0000 (13:49 +0000)]
[testsuite] gcc.dg/nextafter-2.c: Restrict to c99_runtime
2018-05-07 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.dg/nextafter-2.c: Add c99_runtime effective target
and options.
From-SVN: r259994
Tom de Vries [Mon, 7 May 2018 11:33:45 +0000 (11:33 +0000)]
[openacc, testsuite] Allow installed testing of libgomp to find gomp-constants.h
2018-05-07 Tom de Vries <tom@codesourcery.com>
PR testsuite/85677
* testsuite/lib/libgomp.exp (libgomp_init): Move inclusion of top-level
include directory in ALWAYS_CFLAGS out of $blddir != "" condition.
From-SVN: r259992
GCC Administrator [Mon, 7 May 2018 00:16:17 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r259986
Jakub Jelinek [Sun, 6 May 2018 21:14:35 +0000 (23:14 +0200)]
re PR c++/85659 (ICE with inline assembly inside virtual function)
PR c++/85659
* cfgexpand.c (expand_asm_stmt): Don't create a temporary if
the type is addressable. Don't force op into register if it has
BLKmode.
* g++.dg/ext/asm14.C: New test.
* g++.dg/ext/asm15.C: New test.
* g++.dg/ext/asm16.C: New test.
From-SVN: r259981
Michael Eager [Sun, 6 May 2018 11:46:07 +0000 (11:46 +0000)]
picdtr.c: Correct option -fPIE -mpic-data-is-text-relative.
2018-05-06 Michael Eager <eager@eagercon.com>
* gcc.target/microblaze/others/picdtr.c: Correct option
-fPIE -mpic-data-is-text-relative.
From-SVN: r259976
Andrew Sadek [Sun, 6 May 2018 11:42:06 +0000 (11:42 +0000)]
picdtr.c: Add test for -fPIE -mpic-data-is-text-relative.
2018-05-06 Andrew Sadek <andrew.sadek.se@gmail.com>
* gcc.target/microblaze/others/picdtr.c: Add test for
-fPIE -mpic-data-is-text-relative.
From-SVN: r259975
Andre Vehreschild [Sun, 6 May 2018 11:19:31 +0000 (13:19 +0200)]
re PR fortran/85507 (ICE in gfc_dep_resolver, at fortran/dependency.c:2258)
gcc/fortran/ChangeLog:
2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/85507
* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
introduced by r259385.
* trans-intrinsic.c (conv_caf_send): Always report a dependency for
same variables in coarray assignments.
gcc/testsuite/ChangeLog:
2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/85507
* gfortran.dg/coarray_dependency_1.f90: New test.
* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.
From-SVN: r259974
GCC Administrator [Sun, 6 May 2018 00:16:34 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r259973
Roland McGrath [Sat, 5 May 2018 23:35:25 +0000 (23:35 +0000)]
PR other/77609: Let the assembler choose ELF section types for miscellaneous named sections
gcc/
PR other/77609
* varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
any section for which we don't know a specific type it should have,
regardless of name. Previously this was done only for the exact
names ".init_array", ".fini_array", and ".preinit_array".
(default_elf_asm_named_section): Add comment about
relationship with default_section_type_flags and SECTION_NOTYPE.
(get_section): Don't consider it a type conflict if one side has
SECTION_NOTYPE and the other doesn't, as long as neither has the
SECTION_BSS et al used in the default_section_type_flags logic.
From-SVN: r259969
Tom de Vries [Sat, 5 May 2018 07:56:21 +0000 (07:56 +0000)]
[nvptx] Add workaround for subsequent bar.syncs
2018-05-05 Tom de Vries <tom@codesourcery.com>
PR target/85653
* config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
(workaround_barsyncs): New function.
(nvptx_reorg): Use workaround_barsyncs.
* config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
(define_expand "nvptx_membar_cta"): New define_expand.
(define_insn "*nvptx_membar_cta"): New insn.
From-SVN: r259967
Paolo Carlini [Sat, 5 May 2018 07:39:36 +0000 (07:39 +0000)]
cvt.c (ocp_convert): Early handle the special case of a null_ptr_cst_p expr converted to a...
2018-05-05 Paolo Carlini <paolo.carlini@oracle.com>
* cvt.c (ocp_convert): Early handle the special case of a
null_ptr_cst_p expr converted to a NULLPTR_TYPE_P type.
From-SVN: r259966
GCC Administrator [Sat, 5 May 2018 00:16:34 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r259965
Pekka Jääskeläinen [Fri, 4 May 2018 19:46:16 +0000 (19:46 +0000)]
[BRIGFE] Fix handling of NOPs.
From-SVN: r259958
Pekka Jääskeläinen [Fri, 4 May 2018 19:43:57 +0000 (19:43 +0000)]
[BRIGFE] phsa-specific optimizations
Add flag -fassume-phsa that is on by default. If -fno-assume-phsa
is given, these optimizations are disabled.
With this flag, gccbrig can generate GENERIC that assumes we are
targeting a phsa-runtime based implementation, which allows us
to expose the work-item context accesses to retrieve WI IDs etc.
which helps optimizers.
First optimization that takes advantage of this is to get rid of
the setworkitemid calls whenever we have non-inlined calls that
use IDs internally.
Other optimizations added in this commit:
- expand absoluteid to similar level of simplicity as workitemid.
At the moment absoluteid is the best indexing ID to end up with
WG vectorization.
- propagate ID variables closer to their uses. This is mainly
to avoid known useless casts, which confuse at least scalar
evolution analysis.
- use signed long long for storing IDs. Unsigned integers have
defined wraparound semantics, which confuse at least scalar
evolution analysis, leading to unvectorizable WI loops.
- also refactor some BRIG function generation helpers to brig_function.
- no point in having the wi-loop as a for-loop. It's really
a do...while and SCEV can analyze it just fine still.
- add consts to ptrs etc. in BRIG builtin defs.
Improves optimization opportunities.
- add qualifiers to generated function parameters.
Const and restrict on the hidden local/private pointers,
the arg buffer and the context pointer help some optimizations.
From-SVN: r259957
Pekka Jääskeläinen [Fri, 4 May 2018 18:04:14 +0000 (18:04 +0000)]
[BRIGFE] skip multiple forward declarations of the same function
From-SVN: r259950
Pekka Jääskeläinen [Fri, 4 May 2018 18:01:11 +0000 (18:01 +0000)]
[BRIGFE] do not allow optimizations based on known C builtins
It can break inputs that have similarly named functions.
From-SVN: r259949
Pekka Jääskeläinen [Fri, 4 May 2018 17:58:38 +0000 (17:58 +0000)]
[BRIGFE] allow controlling strict aliasing from cmd line
From-SVN: r259948
Ian Lance Taylor [Fri, 4 May 2018 17:51:46 +0000 (17:51 +0000)]
cmd/go: on AIX, pass -X64 first when invoking ar
Reviewed-on: https://go-review.googlesource.com/111535
From-SVN: r259946
Pekka Jääskeläinen [Fri, 4 May 2018 16:47:34 +0000 (16:47 +0000)]
[BRIGFE] The modulo in ID computation should not be needed.
The case where a dim is greater than the grid size doesn't seem
to be mentioned in the specs nor tested by PRM test suite.
From-SVN: r259944
Pekka Jääskeläinen [Fri, 4 May 2018 16:44:02 +0000 (16:44 +0000)]
[BRIGFE] Enable whole program optimizations
HSA assumes all program scope HSAIL symbols can be queried from
the host runtime API, thus cannot be removed by the IPA.
Getting some inlining happening in the finalized binary required:
* explicitly marking the 'prog' scope functions and the launcher
function "externally_visible" to avoid the inliner removing it
* also the host_def ptr is set to externally visible, otherwise
IPA assumes it's never set
* adding the 'inline' keyword to functions to enable inlining,
otherwise GCC defaults to replaceable functions (one can link
over the previous one) which cannot be inlined
* replacing all calls to declarations with calls to definitions to
enable the inliner to find the definition
* to fix missing hidden argument types in the generated functions.
These were ignored silently until GCC started to be able to
inline calls to such functions.
* do not gimplify before fixing the call targets. Otherwise the
calls get detached and the definitions are not found. The reason
why this happens is not clear, but gimplifying only after call
target decl->def conversion fixes this.
From-SVN: r259943
Pekka Jääskeläinen [Fri, 4 May 2018 16:40:50 +0000 (16:40 +0000)]
[BRIGFE] fix an alloca stack underflow
We didn't preserve additional space for the alloca frame pointers that
are needed to be saved in the alloca space.
Fixes libgomp.c++/target-6.C execution test.
From-SVN: r259942
Joseph Myers [Fri, 4 May 2018 16:27:11 +0000 (17:27 +0100)]
* uk.po: Update.
From-SVN: r259938
Ian Lance Taylor [Fri, 4 May 2018 16:23:51 +0000 (16:23 +0000)]
re PR go/85630 (GCC 8.1.0: Filesystem pollution during build: .cache dir in $HOME)
PR go/85630
* Makefile.am (CHECK_ENV): Set GOCACHE.
(ECHO_ENV): Update for setting of GOCACHE.
* Makefile.in: Rebuild.
From-SVN: r259937
Carl Love [Fri, 4 May 2018 16:17:15 +0000 (16:17 +0000)]
vsx-vector-6.h (foo): Add test for vec_max, vec_trunc.
gcc/testsuite/ChangeLog:
2018-05-04 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/vsx-vector-6.h (foo): Add test for vec_max,
vec_trunc.
* gcc.target/powerpc/vsx-vector-6-le.c (dg-final): Update xvcmpeqdp,
xvcmpgtdp, xvcmpgedp counts. Add xxsel counts.
* gcc.target/powerpc/vsx-vector-6-be.c (dg-final): Update xvcmpgtdp,
xvcmpgedp counts. Add xxsel counts.
From-SVN: r259936
Ian Lance Taylor [Fri, 4 May 2018 14:29:05 +0000 (14:29 +0000)]
libgo: fix for unaligned read in go-unwind.c's read_encoded_value()
Change code to work properly reading unaligned data on architectures
that don't support unaliged reads. This fixes a regression (broke
Solaris/sparc) introduced in https://golang.org/cl/90235.
Reviewed-on: https://go-review.googlesource.com/111296
From-SVN: r259935
Alan Modra [Fri, 4 May 2018 13:47:11 +0000 (23:17 +0930)]
libffi PowerPC64 ELFv1 fp arg fixes
The ELFv1 ABI says: "Single precision floating point values are mapped
to the second word in a single doubleword" and also "Floating point
registers f1 through f13 are used consecutively to pass up to 13
floating point values, one member aggregates passed by value
containing a floating point value, and to pass complex floating point
values".
libffi wasn't expecting float args in the second word, and wasn't
passing one member aggregates in fp registers. This patch fixes those
problems, making use of the existing ELFv2 homogeneous aggregate
support since a one element fp struct is a special case of an
homogeneous aggregate.
I've also set a flag when returning pointers that might be used one
day. This is just a tidy since the ppc64 assembly support code
currently doesn't test FLAG_RETURNS_64BITS for integer types..
* src/powerpc/ffi_linux64.c (discover_homogeneous_aggregate):
Compile for ELFv1 too, handling single element aggregates.
(ffi_prep_cif_linux64_core): Call discover_homogeneous_aggregate
for ELFv1. Set FLAG_RETURNS_64BITS for FFI_TYPE_POINTER return.
(ffi_prep_args64): Call discover_homogeneous_aggregate for ELFv1,
and handle single element structs containing float or double
as if the element wasn't wrapped in a struct. Store floats in
second word of doubleword slot when big-endian.
(ffi_closure_helper_LINUX64): Similarly.
From-SVN: r259934
Richard Biener [Fri, 4 May 2018 13:33:15 +0000 (13:33 +0000)]
bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2018-05-04 Richard Biener <rguenther@suse.de>
* bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
* gimple-ssa-store-merging.c
(imm_store_chain_info::output_merged_store): Remove redundant create,
release split_store vector contents on failure.
* tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
scalar stmt vector on cache hit.
From-SVN: r259932
Segher Boessenkool [Fri, 4 May 2018 09:36:50 +0000 (11:36 +0200)]
rs6000: Remove Xilinx FP
This removes the special Xilinx FP support. It was deprecated in
GCC 8.
After this patch all of TARGET_{DOUBLE,SINGLE}_FLOAT,
TARGET_{DF,SF}_INSN, and TARGET_{DF,SF}_FPR are replaced by
TARGET_HARD_FLOAT. Also the fp_type attribute is deleted.
* common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
Xilinx FP support.
* config.gcc (powerpc-xilinx-eabi*): Remove.
* config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
support.
(fusion_addis_mem_combo_load): Ditto.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
FP support.
(rs6000_cpu_cpp_builtins): Ditto.
* config/rs6000/rs6000-linux.c
(rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
* config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
* config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
support.
(rs6000_setup_reg_addr_masks): Ditto.
(rs6000_init_hard_regno_mode_ok): Ditto.
(rs6000_option_override_internal): Ditto.
(legitimate_lo_sum_address_p): Ditto.
(rs6000_legitimize_address): Ditto.
(rs6000_legitimize_reload_address): Ditto.
(rs6000_legitimate_address_p): Ditto.
(abi_v4_pass_in_fpr): Ditto.
(setup_incoming_varargs): Ditto.
(rs6000_gimplify_va_arg): Ditto.
(rs6000_split_multireg_move): Ditto.
(rs6000_savres_strategy): Ditto.
(rs6000_emit_prologue_components): Ditto.
(rs6000_emit_epilogue_components): Ditto.
(rs6000_emit_prologue): Ditto.
(rs6000_emit_epilogue): Ditto.
(rs6000_elf_file_end): Ditto.
(rs6000_function_value): Ditto.
(rs6000_libcall_value): Ditto.
* config/rs6000/rs6000.h: Ditto.
(TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
(TARGET_MINMAX): ... this. New.
(TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
* config/rs6000/rs6000.md: Remove Xilinx FP support.
(*movsi_internal1_single): Delete.
* config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
mfpu=, mxilinx-fpu): Delete.
* config/rs6000/singlefp.h: Delete.
* config/rs6000/sysv4.h: Remove Xilinx FP support.
* config/rs6000/t-rs6000: Ditto.
* config/rs6000/t-xilinx: Delete.
* gcc/config/rs6000/titan.md: Adjust for fp_type removal.
* gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
(VStype_simple): Delete.
(VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
* config/rs6000/xfpu.h: Delete.
* config/rs6000/xfpu.md: Delete.
* config/rs6000/xilinx.h: Delete.
* config/rs6000/xilinx.opt: Delete.
* gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
-msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
From-SVN: r259929
Jonathan Wakely [Fri, 4 May 2018 08:57:23 +0000 (09:57 +0100)]
PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
Add missing noexcept keyword to default constructor of each
_Optional_payload specialization.
PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
* include/std/optional (_Optional_payload): Add noexcept to default
constructor. Re-indent.
(_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
constructor for copying disengaged payloads.
(_Optional_payload<_Tp, true, false, true>): Likewise.
(_Optional_payload<_Tp, true, true, false>): Likewise.
(_Optional_payload<_Tp, true, false, false>): Likewise.
* testsuite/20_util/optional/cons/85642.cc: New.
* testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
From-SVN: r259928
Tom de Vries [Fri, 4 May 2018 08:29:08 +0000 (08:29 +0000)]
[expand] Handle null target in expand_builtin_goacc_parlevel_id_size
2018-05-04 Tom de Vries <tom@codesourcery.com>
PR libgomp/85639
* builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
if ignore == 0.
From-SVN: r259927
John Marino [Fri, 4 May 2018 07:32:36 +0000 (08:32 +0100)]
re PR ada/85635 (typo in link.c for BSD platforms)
PR ada/85635
* link.c (BSD platforms): Add missing backslash.
From-SVN: r259925
Richard Biener [Fri, 4 May 2018 07:30:50 +0000 (07:30 +0000)]
re PR tree-optimization/85627 (ICE in update_phi_components in tree-complex.c)
2018-05-04 Richard Biener <rguenther@suse.de>
PR middle-end/85627
* tree-complex.c (update_complex_assignment): We are always in SSA form.
(expand_complex_div_wide): Likewise.
(expand_complex_operations_1): Likewise.
(expand_complex_libcall): Preserve EH info of the original stmt.
(tree_lower_complex): Handle removed blocks.
* tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
on complex multiplication and division libcall builtins.
* g++.dg/torture/pr85627.C: New testcase.
From-SVN: r259923
Richard Biener [Fri, 4 May 2018 07:25:54 +0000 (07:25 +0000)]
re PR lto/85574 (LTO bootstapped binaries differ)
2018-05-04 Richard Biener <rguenther@suse.de>
PR middle-end/85574
* fold-const.c (negate_expr_p): Restrict negation of operand
zero of a division to when we know that can happen without
overflow.
(fold_negate_expr_1): Likewise.
* gcc.dg/torture/pr85574.c: New testcase.
* gcc.dg/torture/pr57656.c: Use dg-additional-options.
From-SVN: r259922
Jakub Jelinek [Fri, 4 May 2018 07:19:45 +0000 (09:19 +0200)]
re PR tree-optimization/85466 (Performance is slow when doing 'branchless' conditional style math operations)
PR libstdc++/85466
* real.h (real_nextafter): Declare.
* real.c (real_nextafter): New function.
* fold-const-call.c (fold_const_nextafter): New function.
(fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
CASE_CFN_NEXTTOWARD.
(fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
even when arg1_mode is different from arg0_mode.
* gcc.dg/nextafter-1.c: New test.
* gcc.dg/nextafter-2.c: New test.
* gcc.dg/nextafter-3.c: New test.
* gcc.dg/nextafter-4.c: New test.
From-SVN: r259921
Ian Lance Taylor [Fri, 4 May 2018 01:43:39 +0000 (01:43 +0000)]
cmd/go: update mkalldocs.sh
Update mkalldocs.sh from the current master sources, replacing the old
mkdoc.sh.
Reviewed-on: https://go-review.googlesource.com/111096
From-SVN: r259920
Ian Lance Taylor [Fri, 4 May 2018 01:41:22 +0000 (01:41 +0000)]
cmd/go: enable tests of vet tool
Since gofrontend does have the vet tool now, we can test it.
Reviewed-on: https://go-review.googlesource.com/111095
From-SVN: r259919
Ian Lance Taylor [Fri, 4 May 2018 01:34:30 +0000 (01:34 +0000)]
cmd/go: update to match recent changes to gc
In https://golang.org/cl/111097 the gc version of cmd/go was updated
to include some gofrontend-specific changes. The gofrontend code
already has different versions of those changes; this CL makes the
gofrontend match the upstream code.
Reviewed-on: https://go-review.googlesource.com/111099
From-SVN: r259918
GCC Administrator [Fri, 4 May 2018 00:16:23 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r259917
Jason Merrill [Thu, 3 May 2018 23:35:20 +0000 (19:35 -0400)]
PR c++/85600 - virtual delete failure.
* init.c (build_delete): Always save_expr when deleting.
From-SVN: r259913
Jonathan Wakely [Thu, 3 May 2018 22:58:43 +0000 (23:58 +0100)]
PR libstdc++/82644 define TR1 hypergeometric functions in strict modes
Following a recent change for PR 82644 the non-standard hypergeomtric
functions are not defined by <cmath> when __STRICT_ANSI__ is defined
(e.g. for -std=c++17, or -std=c++14 -D__STDCPP_WANT_MATH_SPEC_FUNCS__).
That caused errors in <tr1/cmath> because the using-declarations for
tr1::hyperg et al are invalid in strict modes.
The solution is to define the TR1 hypergeometric functions inline in
<tr1/cmath> if __STRICT_ANSI__ is defined.
PR libstdc++/82644
* include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
inline definitions instead of using-declarations.
[__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
* testsuite/tr1/5_numerical_facilities/special_functions/
07_conf_hyperg/compile_cxx17.cc: New.
* testsuite/tr1/5_numerical_facilities/special_functions/
17_hyperg/compile_cxx17.cc: New.
From-SVN: r259912
Nathan Sidwell [Thu, 3 May 2018 19:26:38 +0000 (19:26 +0000)]
[C++ Patch] Kill -ffriend-injection
https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00175.html
* doc/extend.texi (Deprecated Features): Remove
-ffriend-injection.
(Backwards Compatibility): Likewise.
* doc/invoke.texi (C++ Language Options): Likewise.
(C++ Dialect Options): Likewise.
c-family/
* c.opt (ffriend-injection): Remove functionality, issue warning.
cp/
* decl.c (cxx_init_decl_processing): Remove flag_friend_injection.
* name-lookup.c (do_pushdecl): Likewise.
testsuite/
Remove -ffriend-injection.
* g++.old-deja/g++.jason/scoping15.C: Delete.
* g++.old-deja/g++.mike/net43.C: Delete.
From-SVN: r259904
Jakub Jelinek [Thu, 3 May 2018 18:59:39 +0000 (20:59 +0200)]
re PR target/85530 ([X86] _mm512_mullox_epi64 and _mm512_mask_mullox_epi64 not implemented)
PR target/85530
* config/i386/avx512fintrin.h (_mm512_mullox_epi64,
_mm512_mask_mullox_epi64): New intrinsics.
* gcc.target/i386/avx512f-vpmullq-1.c: New test.
* gcc.target/i386/avx512f-vpmullq-2.c: New test.
* gcc.target/i386/avx512dq-vpmullq-3.c: New test.
* gcc.target/i386/avx512dq-vpmullq-4.c: New test.
From-SVN: r259903
Jonathan Wakely [Thu, 3 May 2018 18:58:04 +0000 (19:58 +0100)]
PR libstdc++/84769 qualify call to std::get<0>
PR libstdc++/84769
* include/std/variant (visit): Qualify std::get call.
From-SVN: r259902
Jonathan Wakely [Thu, 3 May 2018 18:58:00 +0000 (19:58 +0100)]
PR libstdc++/85632 fix wraparound in filesystem::space
On 32-bit targets any values over 4GB would wrap and produce the wrong
result.
PR libstdc++/85632 use uintmax_t for arithmetic
* src/filesystem/ops.cc (experimental::filesystem::space): Perform
arithmetic in result type.
* src/filesystem/std-ops.cc (filesystem::space): Likewise.
* testsuite/27_io/filesystem/operations/space.cc: Check total capacity
is greater than free space.
* testsuite/experimental/filesystem/operations/space.cc: New.
From-SVN: r259901
Ian Lance Taylor [Thu, 3 May 2018 17:20:44 +0000 (17:20 +0000)]
compiler: avoid crashing on invalid non-integer array length
Tweak the array type checking code to avoid crashing on array types
whose length expressions are explicit non-integer types (for example,
"float64(10)"). If such constructs are seen, issue an "invalid array
bound" error.
Fixes golang/go#13486.
Reviewed-on: https://go-review.googlesource.com/91975
From-SVN: r259900
Joseph Myers [Thu, 3 May 2018 16:10:05 +0000 (17:10 +0100)]
Update .po files.
* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
zh_TW.po: Update.
From-SVN: r259897
Jonathan Wakely [Thu, 3 May 2018 15:12:19 +0000 (16:12 +0100)]
Add tests for std::remove_cvref
* testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
* testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
New.
* testsuite/20_util/remove_cvref/value.cc: New.
* testsuite/20_util/remove_cvref/value_ext.cc: New.
From-SVN: r259896
Jonathan Wakely [Thu, 3 May 2018 15:01:20 +0000 (16:01 +0100)]
PR libstdc++/84087 add default arguments to basic_string members (LWG 2268)
This change was a DR against C++11 and so should have been implemented
years ago.
PR libstdc++/84087 LWG DR 2268 basic_string default arguments
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
(append(const basic_string&, size_type, size_type)
(assign(const basic_string&, size_type, size_type)
(insert(size_type, const basic_string&, size_type, size_type)
(replace(size_type,size_type,const basic_string&,size_type,size_type)
(compare(size_type,size_type,constbasic_string&,size_type,size_type)):
Add default arguments (LWG 2268).
[_GLIBCXX_USE_CXX11_ABI=0]
(append(const basic_string&, size_type, size_type)
(assign(const basic_string&, size_type, size_type)
(insert(size_type, const basic_string&, size_type, size_type)
(replace(size_type,size_type,const basic_string&,size_type,size_type)
(compare(size_type,size_type,constbasic_string&,size_type,size_type)):
Likewise.
* testsuite/21_strings/basic_string/dr2268.cc: New test.
From-SVN: r259895
Jonathan Wakely [Thu, 3 May 2018 14:08:36 +0000 (15:08 +0100)]
PR libstdc++/84535 constrain std::thread constructor
The standard requires that the std::thread constructor is constrained so
it can't be called with a first argument of type std::thread. The
current implementation only meets that requirement if the constructor is
called with one argument, by using deleted overloads. This uses an
enable_if constraint to enforce the requirement for any number of
arguments.
Also add a static assertion to give a more readable error for invalid
arguments that cannot be invoked. Also simplify _Invoker to reduce the
error cascade for ill-formed instantiations with non-invocable
arguments.
PR libstdc++/84535
* include/std/thread (thread::__not_same): New SFINAE helper.
(thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
first argument is not a std::thread. Add static assertion to check
INVOKE expression is valid.
(thread::thread(thread&), thread::thread(const thread&&)): Remove.
(thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
__invoke_result for return types and remove exception specifications.
* testsuite/30_threads/thread/cons/84535.cc: New.
From-SVN: r259893
Tom de Vries [Thu, 3 May 2018 13:47:14 +0000 (13:47 +0000)]
[testsuite] Add scan-offload-tree-dump
2018-05-03 Tom de Vries <tom@codesourcery.com>
PR testsuite/85106
* lib/scanoffloadtree.exp: New file.
* testsuite/lib/libgomp-dg.exp (libgomp-dg-test): Add save-temps to
extra_tool_flags if it contains an -foffload=-fdump-* flag.
* testsuite/lib/libgomp.exp: Include scanoffloadtree.exp.
* testsuite/libgomp.oacc-c/vec.c: Use scan-offload-tree-dump.
* doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
dump files): Add offload-tree.
From-SVN: r259892
Richard Biener [Thu, 3 May 2018 13:20:02 +0000 (13:20 +0000)]
re PR tree-optimization/85615 (ICE at -O2 and above on valid code on x86_64-linux-gnu: in dfs_enumerate_from, at cfganal.c:1197)
2018-05-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/85615
* tree-ssa-threadupdate.c (thread_block_1): Only allow exits
to loops not nested in BBs loop father to avoid creating multi-entry
loops.
* gcc.dg/torture/pr85615.c: New testcase.
From-SVN: r259891
Kyrylo Tkachov [Thu, 3 May 2018 12:59:43 +0000 (12:59 +0000)]
[tree-complex.c] PR tree-optimization/70291: Inline floating-point complex multiplication more aggressively
We can improve the performance of complex floating-point multiplications by inlining the expansion a bit more aggressively.
We can inline complex x = a * b as:
x = (ar*br - ai*bi) + i(ar*bi + br*ai);
if (isunordered (__real__ x, __imag__ x))
x = __muldc3 (a, b); //Or __mulsc3 for single-precision
That way the common case where no NaNs are produced we can avoid the libgcc call and fall back to the
NaN handling stuff in libgcc if either components of the expansion are NaN.
The implementation is done in expand_complex_multiplication in tree-complex.c and the above expansion
will be done when optimising for -O1 and greater and when not optimising for size.
At -O0 and -Os the single call to libgcc will be emitted.
For the code:
__complex double
foo (__complex double a, __complex double b)
{
return a * b;
}
We will now emit at -O2 for aarch64:
foo:
fmul d16, d1, d3
fmul d6, d1, d2
fnmsub d5, d0, d2, d16
fmadd d4, d0, d3, d6
fcmp d5, d4
bvs .L8
fmov d1, d4
fmov d0, d5
ret
.L8:
stp x29, x30, [sp, -16]!
mov x29, sp
bl __muldc3
ldp x29, x30, [sp], 16
ret
Instead of just a branch to __muldc3.
PR tree-optimization/70291
* tree-complex.c (expand_complex_libcall): Add type, inplace_p
arguments. Change return type to tree. Emit libcall as a new
statement rather than replacing existing one when inplace_p is true.
(expand_complex_multiplication_components): New function.
(expand_complex_multiplication): Expand floating-point complex
multiplication using the above.
(expand_complex_division): Rename inner_type parameter to type.
Update expand_complex_libcall call-site.
(expand_complex_operations_1): Update expand_complex_multiplication
and expand_complex_division call-sites.
* gcc.dg/complex-6.c: New test.
* gcc.dg/complex-7.c: Likewise.
From-SVN: r259889
Jonathan Wakely [Thu, 3 May 2018 12:40:15 +0000 (13:40 +0100)]
Use std::invoke_result in std::async instead of std::result_of
* include/std/future (__async_result_of): Use __invoke_result instead
of result_of.
From-SVN: r259888
Jonathan Wakely [Thu, 3 May 2018 12:40:10 +0000 (13:40 +0100)]
Define std::remove_cvref and std::remove_cvref_t for C++2a
Also define __remove_cvref_t for internal use before C++2a.
* include/std/any (any_cast): Use __remove_cvref_t.
* include/std/tuple (__make_tuple): Likewise.
* include/std/type_traits (__remove_cvref_t): Define.
(__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
[__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
* include/std/variant (__erased_hash): Use __remove_cvref_t.
From-SVN: r259887
Jakub Jelinek [Thu, 3 May 2018 09:29:39 +0000 (11:29 +0200)]
re PR other/85622 (gcc-8.1.0/NEWS says it's not released yet)
PR other/85622
* gcc_release: For -f, verify contrib/gennews has the major version
pages listed and both index.html and changes.html have been updated
for the new release.
From-SVN: r259881
Richard Biener [Thu, 3 May 2018 07:33:09 +0000 (07:33 +0000)]
re PR fortran/85579 (accepts invalid fortran test case gfortran.dg/pr51434.f90)
2018-05-03 Richard Biener <rguenther@suse.de>
PR testsuite/85579
* fortran.dg/pr51434.f90: Truncate transfer argument.
From-SVN: r259880
Ian Lance Taylor [Thu, 3 May 2018 03:19:28 +0000 (03:19 +0000)]
cmd/go: run tests that require package build IDs
These tests used to be disabled in the gofrontend since the go tool
didn't support build IDs for the gofrontend. It does now, so enable
the tests again.
Reviewed-on: https://go-review.googlesource.com/111098
From-SVN: r259875
GCC Administrator [Thu, 3 May 2018 00:16:34 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r259874
Ian Lance Taylor [Wed, 2 May 2018 22:32:23 +0000 (22:32 +0000)]
libgo: add type/const references to sysinfo.c
This patch adds explicit references to various types and constants
defined by the header files included by sysinfo.c (used to drive the
generation of gen-sysinfo.go as part of the libgo build via the GCC
"-fdump-go-spec" option).
The intent is to enable clients to gather the same info generated by
"-fdump-go-spec" by instead reading the generated DWARF from a
sysinfo.o object file compiled with "-g". Some compilers (notably
clang) try to omit DWARF records for a given type unless there is an
explicit use of it in the translation unit; the additional references
are to insure that everything we want to see in the DWARF shows up.
Reviewed-on: https://go-review.googlesource.com/99063
From-SVN: r259868
Ian Lance Taylor [Wed, 2 May 2018 22:28:46 +0000 (22:28 +0000)]
libgo: add support for the Nios II architecture
Reviewed-on: https://go-review.googlesource.com/90775
From-SVN: r259866
Ian Lance Taylor [Wed, 2 May 2018 22:01:22 +0000 (22:01 +0000)]
runtime: remove unused stack.go
We're never going to use stack.go for gccgo. Although a build tag
keeps it from being built, even having it around can be confusing.
Remove it.
Reviewed-on: https://go-review.googlesource.com/40774
From-SVN: r259865
Ian Lance Taylor [Wed, 2 May 2018 21:57:35 +0000 (21:57 +0000)]
libgo: refactor code to enumerate stdlib packages
Move the list of libgo, gotool, and check-target packages into
separate files, then read the file contents as part of the build
process on the fly. This is intended to enable other build tooling to
share the canonical list of target packages (avoid duplication).
Reviewed-on: https://go-review.googlesource.com/89515
libgo: revise rules for runtime.inc generation
Refactor code for generating runtime.inc: extract out the relevant
commands and place them in a separate shell script ("mkruntimeinc.sh").
Update rules to avoid generating macros whose names begin with "$",
such as "#define $sinkconst0 0".
Reviewed-on: https://go-review.googlesource.com/85955
From-SVN: r259863
Jakub Jelinek [Wed, 2 May 2018 21:56:17 +0000 (23:56 +0200)]
re PR target/85582 (wrong code at -O1 and above on x86_64-linux-gnu in 32-bit mode)
PR target/85582
* config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
*ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
*<shift_insn><dwi>3_doubleword_mask_1): In condition require that
the highest significant bit of the shift count mask is clear. In
check whether and[sq]i3 is needed verify that all significant bits
of the shift count other than the highest are set.
* gcc.c-torture/execute/pr85582-3.c: New test.
From-SVN: r259862
Ian Lance Taylor [Wed, 2 May 2018 21:53:30 +0000 (21:53 +0000)]
libgo: break dependence on libgcc unwind-pe.h
The C portion of the Go runtime includes the header "unwind-pe.h" from
libgcc, which contains some constants and a few small routines for
decoding pointer values within unwind info. This patch gets rid of
that include and instead adds a re-implementation of that
functionality in the single file that uses it. The intent is to allow
the C runtime portion of libgo to be built without a companion GCC
installation.
Reviewed-on: https://go-review.googlesource.com/90235
From-SVN: r259861
François Dumont [Wed, 2 May 2018 19:51:33 +0000 (19:51 +0000)]
deque.tcc (deque<>::_M_assign_aux): Cast to void to ensure overloaded comma not used.
2018-05-02 François Dumont <fdumont@gcc.gnu.org>
* include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
ensure overloaded comma not used.
* include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
* include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
* include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
* testsuite/23_containers/deque/modifiers/assign/1.cc: New.
* testsuite/23_containers/list/modifiers/assign/1.cc: New.
* testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
* testsuite/23_containers/vector/modifiers/assign/1.cc: New.
From-SVN: r259856
Jonathan Wakely [Wed, 2 May 2018 19:04:55 +0000 (20:04 +0100)]
PR libstdc++/68197 fail on negative iword/pword indices
The suggested resolution of LWG 3083 is to make invalid indices
undefined, but we can fairly easily check for them and treat them as
errors in the same way as allocation failure. This avoids a segfault or
worse, setting an error flag on the stream instead.
PR libstdc++/68197
* include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
indices to unsigned.
* src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
as failure. Refactor error handling.
* testsuite/27_io/ios_base/storage/68197.cc: New.
From-SVN: r259854
Paolo Carlini [Wed, 2 May 2018 18:15:56 +0000 (18:15 +0000)]
re PR c++/68374 (G++ -Wshadow doesn't warn about static member shadowing)
/cp
2018-05-02 Paolo Carlini <paolo.carlini@oracle.com>
Jason Merrill <jason@redhat.com>
PR c++/68374
* name-lookup.c (check_local_shadow): Don't handle static old
declarations in the block handling locals shadowing locals.
/testsuite
2018-05-02 Paolo Carlini <paolo.carlini@oracle.com>
Jason Merrill <jason@redhat.com>
PR c++/68374
* g++.dg/warn/Wshadow-13.C: New.
* g++.dg/warn/Wshadow-14.C: Likewise.
Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r259853
Tom de Vries [Wed, 2 May 2018 17:53:56 +0000 (17:53 +0000)]
[openacc] Move GOMP_OPENACC_DIM parsing out of nvptx plugin
2018-05-02 Tom de Vries <tom@codesourcery.com>
PR libgomp/85411
* plugin/plugin-nvptx.c (nvptx_exec): Move parsing of
GOMP_OPENACC_DIM ...
* env.c (parse_gomp_openacc_dim): ... here. New function.
(initialize_env): Call parse_gomp_openacc_dim.
(goacc_default_dims): Define.
* libgomp.h (goacc_default_dims): Declare.
* oacc-plugin.c (GOMP_PLUGIN_acc_default_dim): New function.
* oacc-plugin.h (GOMP_PLUGIN_acc_default_dim): Declare.
* libgomp.map: New version "GOMP_PLUGIN_1.2". Add
GOMP_PLUGIN_acc_default_dim.
* testsuite/libgomp.oacc-c-c++-common/loop-default-runtime.c: New test.
* testsuite/libgomp.oacc-c-c++-common/loop-default.h: New test.
From-SVN: r259852
Tom de Vries [Wed, 2 May 2018 17:53:43 +0000 (17:53 +0000)]
[libgomp, testsuite] Move tests to libgomp.c-c++-common
2018-05-02 Tom de Vries <tom@codesourcery.com>
PR testsuite/83791
* testsuite/libgomp.c++/udr-9.C: Update.
* testsuite/libgomp.c++/atomic-16.C: Remove.
* testsuite/libgomp.c++/cancel-taskgroup-2.C: Remove.
* testsuite/libgomp.c++/loop-13.C: Remove.
* testsuite/libgomp.c++/loop-14.C: Remove.
* testsuite/libgomp.c++/loop-15.C: Remove.
* testsuite/libgomp.c++/monotonic-1.C: Remove.
* testsuite/libgomp.c++/monotonic-2.C: Remove.
* testsuite/libgomp.c++/nonmonotonic-1.C: Remove.
* testsuite/libgomp.c++/nonmonotonic-2.C: Remove.
* testsuite/libgomp.c++/ordered-1.C: Remove.
* testsuite/libgomp.c++/pr45784.C: Remove.
* testsuite/libgomp.c++/pr64824.C: Remove.
* testsuite/libgomp.c++/pr64868.C: Remove.
* testsuite/libgomp.c++/pr66199-1.C: Remove.
* testsuite/libgomp.c++/pr66199-2.C: Remove.
* testsuite/libgomp.c++/pr66199-3.C: Remove.
* testsuite/libgomp.c++/pr66199-4.C: Remove.
* testsuite/libgomp.c++/pr66199-5.C: Remove.
* testsuite/libgomp.c++/pr66199-6.C: Remove.
* testsuite/libgomp.c++/pr66199-7.C: Remove.
* testsuite/libgomp.c++/pr66199-8.C: Remove.
* testsuite/libgomp.c++/pr66199-9.C: Remove.
* testsuite/libgomp.c++/pr69389.C: Remove.
* testsuite/libgomp.c++/simd10.C: Remove.
* testsuite/libgomp.c++/simd11.C: Remove.
* testsuite/libgomp.c++/simd12.C: Remove.
* testsuite/libgomp.c++/simd13.C: Remove.
* testsuite/libgomp.c++/target-1.C: Remove.
* testsuite/libgomp.c++/target-3.C: Remove.
* testsuite/libgomp.c++/target-4.C: Remove.
* testsuite/libgomp.c++/target-5.C: Remove.
* testsuite/libgomp.c++/taskgroup-1.C: Remove.
* testsuite/libgomp.c++/taskloop-1.C: Remove.
* testsuite/libgomp.c++/taskloop-2.C: Remove.
* testsuite/libgomp.c++/taskloop-3.C: Remove.
* testsuite/libgomp.c++/taskloop-4.C: Remove.
* testsuite/libgomp.c++/udr-9.C: Remove.
* testsuite/libgomp.c++/for-10.C: Remove.
* testsuite/libgomp.c++/for-11.C: Remove.
* testsuite/libgomp.c++/for-12.C: Remove.
* testsuite/libgomp.c++/for-13.C: Remove.
* testsuite/libgomp.c++/for-14.C: Remove.
* testsuite/libgomp.c++/for-9.C: Remove.
* testsuite/libgomp.c/atomic-18.c: Move ...
* testsuite/libgomp.c-c++-common/atomic-18.c: ... here.
* testsuite/libgomp.c/cancel-taskgroup-2.c: Move ...
* testsuite/libgomp.c-c++-common/cancel-taskgroup-2.c: here.
* testsuite/libgomp.c/loop-13.c: Move ...
* testsuite/libgomp.c-c++-common/loop-13.c: ... here.
* testsuite/libgomp.c/loop-14.c: Move ...
* testsuite/libgomp.c-c++-common/loop-14.c: ... here.
* testsuite/libgomp.c/loop-15.c: Remove.
* testsuite/libgomp.c-c++-common/loop-15.c: New test.
* testsuite/libgomp.c/monotonic-1.c: Move ...
* testsuite/libgomp.c-c++-common/monotonic-1.c: ... here.
* testsuite/libgomp.c/monotonic-2.c: Move ...
* testsuite/libgomp.c-c++-common/monotonic-2.c: ... here.
* testsuite/libgomp.c/nonmonotonic-1.c: Move ...
* testsuite/libgomp.c-c++-common/nonmonotonic-1.c: ... here.
* testsuite/libgomp.c/nonmonotonic-2.c: Move ...
* testsuite/libgomp.c-c++-common/nonmonotonic-2.c: ... here.
* testsuite/libgomp.c/ordered-4.c: Move ...
* testsuite/libgomp.c-c++-common/ordered-4.c: ... here.
* testsuite/libgomp.c/pr45784.c: Move ...
* testsuite/libgomp.c-c++-common/pr45784.c: ... here.
* testsuite/libgomp.c/pr64824.c: Move ...
* testsuite/libgomp.c-c++-common/pr64824.c: ... here.
* testsuite/libgomp.c/pr64868.c: Move ...
* testsuite/libgomp.c-c++-common/pr64868.c: ... here.
* testsuite/libgomp.c/pr66199-1.c: Move ...
* testsuite/libgomp.c-c++-common/pr66199-1.c: ... here.
* testsuite/libgomp.c/pr66199-2.c: Move ...
* testsuite/libgomp.c-c++-common/pr66199-2.c: ... here.
* testsuite/libgomp.c/pr66199-3.c: Move ...
* testsuite/libgomp.c-c++-common/pr66199-3.c: ... here.
* testsuite/libgomp.c/pr66199-4.c: Move ...
* testsuite/libgomp.c-c++-common/pr66199-4.c: ... here.
* testsuite/libgomp.c/pr66199-5.c: Move ...
* testsuite/libgomp.c-c++-common/pr66199-5.c: ... here.
* testsuite/libgomp.c/pr66199-6.c: Move ...
* testsuite/libgomp.c-c++-common/pr66199-6.c: ... here.
* testsuite/libgomp.c/pr66199-7.c: Move ...
* testsuite/libgomp.c-c++-common/pr66199-7.c: ... here.
* testsuite/libgomp.c/pr66199-8.c: Move ...
* testsuite/libgomp.c-c++-common/pr66199-8.c: ... here.
* testsuite/libgomp.c/pr66199-9.c: Move ...
* testsuite/libgomp.c-c++-common/pr66199-9.c: ... here.
* testsuite/libgomp.c/pr69389.c: Move ...
* testsuite/libgomp.c-c++-common/pr69389.c: ... here.
* testsuite/libgomp.c/simd-14.c: Move ...
* testsuite/libgomp.c-c++-common/simd-14.c: ... here.
* testsuite/libgomp.c/simd-15.c: Move ...
* testsuite/libgomp.c-c++-common/simd-15.c: ... here.
* testsuite/libgomp.c/simd-16.c: Move ...
* testsuite/libgomp.c-c++-common/simd-16.c: ... here.
* testsuite/libgomp.c/simd-17.c: Move ...
* testsuite/libgomp.c-c++-common/simd-17.c: ... here.
* testsuite/libgomp.c/target-1.c: Move ...
* testsuite/libgomp.c-c++-common/target-1.c: ... here.
* testsuite/libgomp.c/target-10.c: Move ...
* testsuite/libgomp.c-c++-common/target-10.c: ... here.
* testsuite/libgomp.c/target-13.c: Move ...
* testsuite/libgomp.c-c++-common/target-13.c: ... here.
* testsuite/libgomp.c/target-2.c: Move ...
* testsuite/libgomp.c-c++-common/target-2.c: ... here.
* testsuite/libgomp.c/taskgroup-1.c: Move ...
* testsuite/libgomp.c-c++-common/taskgroup-1.c: ... here.
* testsuite/libgomp.c/taskloop-1.c: Move ...
* testsuite/libgomp.c-c++-common/taskloop-1.c: ... here.
* testsuite/libgomp.c/taskloop-2.c: Move ...
* testsuite/libgomp.c-c++-common/taskloop-2.c: ... here.
* testsuite/libgomp.c/taskloop-3.c: Move ...
* testsuite/libgomp.c-c++-common/taskloop-3.c: ... here.
* testsuite/libgomp.c/taskloop-4.c: Move ...
* testsuite/libgomp.c-c++-common/taskloop-4.c: ... here.
* testsuite/libgomp.c/udr-1.c: Move ...
* testsuite/libgomp.c-c++-common/udr-1.c: ... here.
* testsuite/libgomp.c/for-1.c: Move ...
* testsuite/libgomp.c-c++-common/for-1.c: ... here.
* testsuite/libgomp.c/for-1.h: Move ...
* testsuite/libgomp.c-c++-common/for-1.h: ... here.
* testsuite/libgomp.c/for-2.c: Move ...
* testsuite/libgomp.c-c++-common/for-2.c: ... here.
* testsuite/libgomp.c/for-2.h: Move ...
* testsuite/libgomp.c-c++-common/for-2.h: ... here.
* testsuite/libgomp.c/for-3.c: Move ...
* testsuite/libgomp.c-c++-common/for-3.c: ... here.
* testsuite/libgomp.c/for-4.c: Move ...
* testsuite/libgomp.c-c++-common/for-4.c: ... here.
* testsuite/libgomp.c/for-5.c: Move ...
* testsuite/libgomp.c-c++-common/for-5.c: ... here.
* testsuite/libgomp.c/for-6.c: Move ...
* testsuite/libgomp.c-c++-common/for-6.c: ... here.
From-SVN: r259851
Tom de Vries [Wed, 2 May 2018 17:53:29 +0000 (17:53 +0000)]
[openacc] Add __builtin_goacc_parlevel_{id,size}
2018-05-02 Tom de Vries <tom@codesourcery.com>
PR libgomp/82428
* builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
* omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
(BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
* builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
(expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
* doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
__builtin_goacc_parlevel_size.
* f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
* c-c++-common/goacc/builtin-goacc-parlevel-id-size-2.c: New test.
* c-c++-common/goacc/builtin-goacc-parlevel-id-size.c: New test.
* testsuite/libgomp.oacc-c-c++-common/gang-static-2.c: Use
__builtin_goacc_parlevel_{id,size}.
* testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Same.
* testsuite/libgomp.oacc-c-c++-common/tile-1.c: Same.
From-SVN: r259850
David Pagan [Wed, 2 May 2018 17:22:26 +0000 (17:22 +0000)]
re PR c/30552 (gcc crashes when compiling examples with GNU statement expressions in VLAs (also involved: nested functions declared K&R-style))
PR c/30552
* c-decl.c (old_style_parameter_scope): New function.
* c-parser.c (c_parser_postfix_expression): Check for statement
expressions in old-style function parameter list declarations.
* c-parser.h (old_style_parameter_scope): New extern declaration.
PR c/30552
* gcc.dg/noncompile/pr30552-1.c: New test.
* gcc.dg/noncompile/pr30552-2.c: New test.
* gcc.dg/noncompile/pr30552-3.c: New test.
* gcc.dg/noncompile/pr30552-4.c: New test.
From-SVN: r259849
Joseph Myers [Wed, 2 May 2018 17:01:16 +0000 (18:01 +0100)]
* es.po: Update.
From-SVN: r259845
Jonathan Wakely [Wed, 2 May 2018 16:41:46 +0000 (17:41 +0100)]
PR libstdc++/83860 avoid dangling references in valarray closure types
Store nested closures by value not by reference, to prevent holding
invalid references to temporaries that have been destroyed. This
changes the layout of the closure types, so change their linkage names,
but moving them to a different namespace.
PR libstdc++/57997
PR libstdc++/83860
* include/bits/gslice_array.h (gslice_array): Define default
constructor as deleted, as per C++11 standard.
* include/bits/mask_array.h (mask_array): Likewise.
* include/bits/slice_array.h (slice_array): Likewise.
* include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
to namespace __detail.
(_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
members.
* include/bits/valarray_before.h (_ValArrayRef): New helper for type
of data members in closure objects.
(_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
(_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
__detail.
(_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
(_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
(_SBase::_M_expr): Use _ValArrayRef for type of data members.
* include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
(_ValFunClos, _RefFunClos): Move to namespace __detail and add
using-declarations to namespace std.
* testsuite/26_numerics/valarray/83860.cc: New.
From-SVN: r259844
Jonathan Wakely [Wed, 2 May 2018 16:27:01 +0000 (17:27 +0100)]
Remove duplicate function call in test
* testsuite/backward/strstream_move.cc: Remove duplicate function
call.
From-SVN: r259843
Jonathan Wakely [Wed, 2 May 2018 16:25:44 +0000 (17:25 +0100)]
PR libstdc++/69608 Move semantics for strstreambuf
In libstdc++ the deprecated char* streams are non-copyable, as was
required pre-C++11.
Since C++11 the standard implies that those streams should be copyable,
but doesn't specify the effects of copying them. This is surely a
defect, so for consistency with other implementations this change makes
them movable, but not copyable.
PR libstdc++/69608
* include/backward/strstream (strstreambuf): Define move constructor
and move assignment operator.
(istrstream, ostrstream, strstream): Likewise.
* testsuite/backward/strstream_move.cc: New.
From-SVN: r259842
Richard Biener [Wed, 2 May 2018 14:19:51 +0000 (14:19 +0000)]
re PR tree-optimization/85597 (internal compiler error: in compute_live_loop_exits, at tree-ssa-loop-manip.c:229)
2018-05-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/85597
* tree-vect-stmts.c (vectorizable_operation): For ternary SLP
do not use split vect_get_vec_defs call but call vect_get_slp_defs
directly.
* gcc.dg/vect/pr85597.c: New testcase.
From-SVN: r259840
Tom de Vries [Wed, 2 May 2018 12:16:32 +0000 (12:16 +0000)]
[testsuite] Add scan-ltrans-tree-dump
2018-05-02 Tom de Vries <tom@codesourcery.com>
PR testsuite/85106
* gcc.dg/ipa/ipa-icf-38.c: Use scan-ltrans-tree-dump.
* lib/scanltranstree.exp: New file.
* lib/target-supports.exp (scan-ltrans-tree-dump_required_options)
(scan-ltrans-tree-dump-times_required_options)
(scan-ltrans-tree-dump-not_required_options)
(scan-ltrans-tree-dump-dem_required_options)
(scan-ltrans-tree-dump-dem-not_required_options): New proc.
* lib/gcc-dg.exp: Include scanltranstree.exp.
* testsuite/lib/libatomic.exp: Include scanltranstree.exp.
* testsuite/lib/libgomp.exp: Include scanltranstree.exp.
* testsuite/lib/libitm.exp: Include scanltranstree.exp.
* testsuite/lib/libvtv.exp: Include scanltranstree.exp.
* doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
dump files): Add ltrans-tree.
From-SVN: r259838
Tom de Vries [Wed, 2 May 2018 12:16:15 +0000 (12:16 +0000)]
[testsuite] Add scan-wpa-ipa-dump
2018-05-02 Tom de Vries <tom@codesourcery.com>
PR testsuite/85106
* gcc.dg/ipa/ipa-icf-38.c: New test.
* gcc.dg/ipa/ipa-icf-38a.c: New test.
* lib/scandump.exp (dump-base): New proc.
(scan-dump, scan-dump-times, scan-dump-not, scan-dump-dem)
(scan-dump-dem-not): Add and handle parameter for suffix of the dump
base.
* lib/scanipa.exp: Add "" argument to scan-dump calls.
* lib/scanlang.exp: Same.
* lib/scanrtl.exp: Same.
* lib/scantree.exp: Same.
* lib/scanwpaipa.exp: New file.
* lib/gcc-dg.exp: Include scanwpaipa.exp.
* testsuite/lib/libatomic.exp: Include scanwpaipa.exp.
* testsuite/lib/libgomp.exp: Include scanwpaipa.exp.
* testsuite/lib/libitm.exp: Include scanwpaipa.exp.
* testsuite/lib/libvtv.exp: Include scanwpaipa.exp.
* doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
dump files): Add wpa-ipa.
From-SVN: r259837
Segher Boessenkool [Wed, 2 May 2018 10:46:00 +0000 (12:46 +0200)]
rs6000: Remove paired single
This removes paired single (used on the 750CL and friends). It was
deprecated in GCC 8. Removing it means we only have one vector model
to deal with (VMX+VSX, 16-byte vectors).
* config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
powerpc*-*-linux*paired* target.
* config/rs6000/750cl.h: Delete.
* config/rs6000/paired.h: Delete.
* config/rs6000/paired.md: Delete.
* config/rs6000/predicates.md (easy_vector_constant): Remove paired
float support.
* config/rs6000/rs6000-builtin.def: Remove paired float support.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
comment. Remove paired float support.
* config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
* config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
VECTOR_PAIRED.
* config/rs6000/rs6000-protos.h (paired_expand_vector_init,
paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
declarations.
* config/rs6000/rs6000.c: Remove paired float support.
(paired_expand_vector_init, paired_expand_vector_move,
paired_emit_vector_compare, paired_emit_vector_cond_expr,
(paired_expand_lv_builtin, paired_expand_stv_builtin,
paired_expand_builtin, paired_expand_predicate_builtin,
paired_init_builtins): Delete.
* config/rs6000/rs6000.h: Remove paired float support.
* config/rs6000/rs6000.md: Remove paired float support.
(move_from_CR_ov_bit): Delete.
* config/rs6000/rs6000.opt (mpaired): Delete.
* config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
* doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
From-SVN: r259833
Alan Modra [Wed, 2 May 2018 09:51:45 +0000 (19:21 +0930)]
ansidecl.h (ATTRIBUTE_NONSTRING): Define.
ATTRIBUTE_NONSTRING
* ansidecl.h (ATTRIBUTE_NONSTRING): Define.
From-SVN: r259832