Commit Graph

161088 Commits

Author SHA1 Message Date
Pekka Jääskeläinen
f986735ac5 [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
2018-05-04 16:47:34 +00:00
Pekka Jääskeläinen
637f3cdec3 [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
2018-05-04 16:44:02 +00:00
Pekka Jääskeläinen
1b40975c87 [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
2018-05-04 16:40:50 +00:00
Joseph Myers
534fe82334 * uk.po: Update.
From-SVN: r259938
2018-05-04 17:27:11 +01:00
Ian Lance Taylor
cceec1556e 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
2018-05-04 16:23:51 +00:00
Carl Love
53481a280f 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
2018-05-04 16:17:15 +00:00
Ian Lance Taylor
772455c964 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
2018-05-04 14:29:05 +00:00
Alan Modra
71d372eba9 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
2018-05-04 23:17:11 +09:30
Richard Biener
dd17274465 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
2018-05-04 13:33:15 +00:00
Segher Boessenkool
2c2aa74d1d 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
2018-05-04 11:36:50 +02:00
Jonathan Wakely
d6ed6b074f 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
2018-05-04 09:57:23 +01:00
Tom de Vries
39bc9f83fe [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
2018-05-04 08:29:08 +00:00
John Marino
5759c56db9 re PR ada/85635 (typo in link.c for BSD platforms)
PR ada/85635
	* link.c (BSD platforms): Add missing backslash.

From-SVN: r259925
2018-05-04 07:32:36 +00:00
Richard Biener
7d187fdfdf 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
2018-05-04 07:30:50 +00:00
Richard Biener
9b5713f7ce 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
2018-05-04 07:25:54 +00:00
Jakub Jelinek
047823853d 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
2018-05-04 09:19:45 +02:00
Ian Lance Taylor
105073e1cc 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
2018-05-04 01:43:39 +00:00
Ian Lance Taylor
28fc5502cf 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
2018-05-04 01:41:22 +00:00
Ian Lance Taylor
6522932843 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
2018-05-04 01:34:30 +00:00
GCC Administrator
e7902c2c8f Daily bump.
From-SVN: r259917
2018-05-04 00:16:23 +00:00
Jason Merrill
9cbc7d6571 PR c++/85600 - virtual delete failure.
* init.c (build_delete): Always save_expr when deleting.

From-SVN: r259913
2018-05-03 19:35:20 -04:00
Jonathan Wakely
86f66562b7 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
2018-05-03 23:58:43 +01:00
Nathan Sidwell
6c072e217f [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
2018-05-03 19:26:38 +00:00
Jakub Jelinek
503ac4e037 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
2018-05-03 20:59:39 +02:00
Jonathan Wakely
1ee021f2f3 PR libstdc++/84769 qualify call to std::get<0>
PR libstdc++/84769
	* include/std/variant (visit): Qualify std::get call.

From-SVN: r259902
2018-05-03 19:58:04 +01:00
Jonathan Wakely
2e023647c8 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
2018-05-03 19:58:00 +01:00
Ian Lance Taylor
d18734b5ad 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
2018-05-03 17:20:44 +00:00
Joseph Myers
4e0c5f944e 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
2018-05-03 17:10:05 +01:00
Jonathan Wakely
adba76a391 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
2018-05-03 16:12:19 +01:00
Jonathan Wakely
852ee53c27 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
2018-05-03 16:01:20 +01:00
Jonathan Wakely
d49b342694 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
2018-05-03 15:08:36 +01:00
Tom de Vries
63f122152f [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
2018-05-03 13:47:14 +00:00
Richard Biener
a378f85c54 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
2018-05-03 13:20:02 +00:00
Kyrylo Tkachov
b7244ccba7 [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
2018-05-03 12:59:43 +00:00
Jonathan Wakely
9e3ef54287 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
2018-05-03 13:40:15 +01:00
Jonathan Wakely
6791489ee5 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
2018-05-03 13:40:10 +01:00
Jakub Jelinek
31aac34486 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
2018-05-03 11:29:39 +02:00
Richard Biener
c2901468a9 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
2018-05-03 07:33:09 +00:00
Ian Lance Taylor
5cf052826f 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
2018-05-03 03:19:28 +00:00
GCC Administrator
478025193a Daily bump.
From-SVN: r259874
2018-05-03 00:16:34 +00:00
Ian Lance Taylor
fbf2f198ce 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
2018-05-02 22:32:23 +00:00
Ian Lance Taylor
746d6ed4ad libgo: add support for the Nios II architecture
Reviewed-on: https://go-review.googlesource.com/90775

From-SVN: r259866
2018-05-02 22:28:46 +00:00
Ian Lance Taylor
e1aeb9bc9e 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
2018-05-02 22:01:22 +00:00
Ian Lance Taylor
cec9701b51 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
2018-05-02 21:57:35 +00:00
Jakub Jelinek
31aa23df38 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
2018-05-02 23:56:17 +02:00
Ian Lance Taylor
019808c95c 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
2018-05-02 21:53:30 +00:00
François Dumont
27db01d803 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
2018-05-02 19:51:33 +00:00
Jonathan Wakely
85d0fad469 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
2018-05-02 20:04:55 +01:00
Paolo Carlini
006fbbe952 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
2018-05-02 18:15:56 +00:00
Tom de Vries
ec00d3faf4 [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
2018-05-02 17:53:56 +00:00