Commit Graph

168365 Commits

Author SHA1 Message Date
Iain Sandoe
ef5eb79dfd darwin, powerpc - set .machine in an asm file.
The asm file fails to build if we use a modern assembler
which checks that the machine is consistent with the 
filetype.  Fixed by adjusting in a similar manner to 
other assembler.

libgcc/

2019-05-12  Iain Sandoe  <iain@sandoe.co.uk>

	* config/rs6000/darwin-vecsave.S: Set .machine appropriately.

From-SVN: r271111
2019-05-12 19:26:16 +00:00
Iain Sandoe
0f8768f734 x86 - fix pr82920
The various thunks output codes have inconsisten output
mechanisms. The patch factors out some common code that
writes out the jumps and uses the regular output scheme
that accounts for __USER_LABEL_PREFIX__.

The testsuite changes are largely mechanical compensation
for the revised output (and the fact that Darwin doesn't
use non-PIC by default).

gcc/

2019-05-12  Iain Sandoe  <iain@sandoe.co.uk>

	PR target/82920
	* config/i386/i386.c (ix86_output_jmp_thunk_or_indirect): New.
	(ix86_output_indirect_branch_via_reg): Use output mechanism
	accounting for __USER_LABEL_PREFIX__.
	(ix86_output_indirect_branch_via_push): Likewise.
	(ix86_output_function_return): Likewise.
	(ix86_output_indirect_function_return): Likewise.

gcc/testsuite/

2019-05-12  Iain Sandoe  <iain@sandoe.co.uk>
	    Dominique d'Humieres  <dominiq@gcc.gnu.org>

	PR target/82920
	* gcc.target/i386/indirect-thunk-1.c: Adjust scan-asms for Darwin,
	do not use -fno-pic on Darwin.
	* gcc.target/i386/indirect-thunk-2.c: Likewise.
	* gcc.target/i386/indirect-thunk-3.c: Likewise.
	* gcc.target/i386/indirect-thunk-4.c: Likewise.
	* gcc.target/i386/indirect-thunk-7.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
	* gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
	* gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
	* gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
	* gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
	* gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
	* gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
	* gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
	* gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
	* gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
	* gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
	* gcc.target/i386/indirect-thunk-register-1.c: Likewise.
	* gcc.target/i386/indirect-thunk-register-2.c: Likewise.
	* gcc.target/i386/indirect-thunk-register-3.c: Likewise.
	* gcc.target/i386/indirect-thunk-register-4.c: Likewise.
	* gcc.target/i386/ret-thunk-1.c: Likewise.
	* gcc.target/i386/ret-thunk-10.c: Likewise.
	* gcc.target/i386/ret-thunk-11.c: Likewise.
	* gcc.target/i386/ret-thunk-12.c: Likewise.
	* gcc.target/i386/ret-thunk-13.c: Likewise.
	* gcc.target/i386/ret-thunk-14.c: Likewise.
	* gcc.target/i386/ret-thunk-15.c: Likewise.
	* gcc.target/i386/ret-thunk-16.c: Likewise.
	* gcc.target/i386/ret-thunk-2.c: Likewise.
	* gcc.target/i386/ret-thunk-22.c: Likewise.
	* gcc.target/i386/ret-thunk-23.c: Likewise.
	* gcc.target/i386/ret-thunk-24.c: Likewise.
	* gcc.target/i386/ret-thunk-3.c: Likewise.
	* gcc.target/i386/ret-thunk-4.c: Likewise.
	* gcc.target/i386/ret-thunk-5.c: Likewise.
	* gcc.target/i386/ret-thunk-6.c: Likewise.
	* gcc.target/i386/ret-thunk-7.c: Likewise.
	* gcc.target/i386/ret-thunk-8.c: Likewise.
	* gcc.target/i386/ret-thunk-9.c: Likewise.




Co-Authored-By: Dominique d'Humieres <dominiq@gcc.gnu.org>

From-SVN: r271110
2019-05-12 19:07:49 +00:00
Richard Sandiford
75df257b38 Accept code attributes as rtx codes in .md files
The recent AArch64 absolute difference patterns had to go through
some hoops to pair max/min rtx codes with the same signedness.
I also need to pair signed/unsigned codes with sign/zero extension
for some SVE ACLE patterns.

This patch therefore supports <...> as rtx codes, like we already
do for modes.

2019-05-12  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* doc/md.texi: Document use of code attributes in rtx patterns.
	* read-md.h (rtx_reader::rtx_alloc_for_name): New member function.
	* read-rtl.c (find_code): Split out search loops into...
	(maybe_find_code): ...this new function.
	(check_code_iterator): Make the error message more informative.
	(check_code_attribute): New function.
	(rtx_reader::rtx_alloc_for_name): Likewise.
	(rtx_reader::read_rtx_code): Use rtx_alloc_for_name.
	* config/aarch64/predicates.md (aarch64_smin, aarch64_umin): Delete.
	* config/aarch64/aarch64-simd.md (*aarch64_<su>abd<mode>_3): Use
	<max_opp> directly as an rtx code instead of via a match_operator.
	* config/aarch64/aarch64-sve.md (aarch64_<su>abd<mode>_3): Likewise.
	(<su>abd<mode>_3): Update accordingly.

From-SVN: r271107
2019-05-12 11:28:01 +00:00
Janne Blomqvist
4c0164573e fortran: C++ support for generating C prototypes
When generating C prototypes for Fortran procedures with the
-fc-prototypes and -fc-prototypes-external options, print a snippet
defining macros for complex types, and add C++ support by suppressing
mangling.

fortran/ChangeLog:

2019-05-12  Janne Blomqvist  <jb@gcc.gnu.org>

	* dump-parse-tree.c (get_c_type_name): Use macros for complex type
	names.
	* parse.c (gfc_parse_file): Define complex macros, add CPP support
	when printing C prototypes.

From-SVN: r271106
2019-05-12 11:26:18 +03:00
GCC Administrator
1fa26ccd67 Daily bump.
From-SVN: r271105
2019-05-12 00:16:31 +00:00
Iain Sandoe
65ecff904b darwin, ppc - improve debug for mdebug-stack
Darwin uses an out of line save when complete context
needs to be saved, including the vector regs.

This patch prints the status of that when -mdebug=stack
is given.

gcc/

2019-05-12  Iain Sandoe  <iain@sandoe.co.uk>

	* config/rs6000/rs6000.c (debug_stack_info): When -mdebug=stack
	is given, print the state of the EH "save world" computation for
	Darwin.

From-SVN: r271101
2019-05-11 23:31:56 +00:00
Iain Sandoe
7121b43fd5 fixincludes - fix PR90379
One should not provide test_text for wrap style fixes
this was causing the test to fail.  No change to the
actual fix.

2019-05-11  Iain Sandoe  <iain@sandoe.co.uk>
	PR target/90379
	PR bootstrap/89864
	* inclhack.def (darwin_ucred__Atomic): Do not supply test_text
	for wrap fixes.
	* fixincl.x: Regenerated.

From-SVN: r271098
2019-05-11 20:19:31 +00:00
Iain Sandoe
bd765eed0f testsuite, darwin] Fix PR81058.
The tests fail because Darwin indirects common accesses which causes different
codegen and the mismatch in output. Placing the vars in regular .data section
fixes that.

gcc/testsuite/

2019-05-11  Iain Sandoe  <iain@sandoe.co.uk>

	PR testsuite/81058
	* gcc.target/i386/avx512bw-vpmovswb-1.c: Use regular data section
	for variables on Darwin, rather than common.
	* gcc.target/i386/avx512bw-vpmovuswb-1.c: Likewise.
	* gcc.target/i386/avx512bw-vpmovwb-1.c: Likewise.

From-SVN: r271097
2019-05-11 15:05:58 +00:00
François Dumont
e9c54233f7 stl_bvector.h (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)): Make hidden friend.
2019-05-11  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/stl_bvector.h
	(operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
	Make hidden friend.
	(operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
	Likewise.
	(operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
	Likewise.
	(operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
	Likewise.
	(operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
	Likewise.
	(operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
	Likewise.
	(operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
	Likewise.
	(_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
	copy elision.
	(_Bit_iterator::operator-(difference_type)): Likewise.
	(operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
	(_Bit_const_iterator::operator+(difference_type)): Likewise and allow
	NRVO copy elision.
	(_Bit_const_iterator::operator-(difference_type)): Likewise.
	(operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.

From-SVN: r271096
2019-05-11 13:29:05 +00:00
Jakub Jelinek
b5b9147d35 re PR c++/59813 (tail-call elimination didn't fire for left-shift of char to cout)
PR c++/59813
	* config/aarch64/aarch64.c (aarch64_expand_epilogue): Don't add
	EH_RETURN_STACKADJ_RTX to sp in sibcall epilogues.

From-SVN: r271093
2019-05-11 11:33:22 +02:00
Uros Bizjak
c57cbfe2f7 i386.md (floatdi<X87MODEF:mode>2_i387_with_xmm): Use pinsrd for TARGET_SSE4_1.
* config/i386/i386.md (floatdi<X87MODEF:mode>2_i387_with_xmm):
	Use pinsrd for TARGET_SSE4_1.
	* config/i386/sse.md (movdi_to_sse): Ditto.

From-SVN: r271092
2019-05-11 10:20:21 +02:00
Paolo Carlini
a46695c1cd typeck.c (cp_build_function_call_vec): When mark_used fails unconditionally return error_mark_node.
/cp
2019-05-11  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck.c (cp_build_function_call_vec): When mark_used fails
	unconditionally return error_mark_node.

/testsuite
2019-05-11  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C: New.
	* g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C: Likewise.

From-SVN: r271091
2019-05-11 07:50:22 +00:00
Ian Lance Taylor
c130ab6aad runtime: set up g early
runtime.throw needs a g to work properly. Set up g early, to
    ensure that if something goes wrong in the runtime startup (e.g.
    runtime.check fails), the program terminates in a reasonable way.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176657

From-SVN: r271088
2019-05-11 01:12:37 +00:00
GCC Administrator
d7b9b0805d Daily bump.
From-SVN: r271087
2019-05-11 00:16:18 +00:00
Jonathan Wakely
1a1e427caa PR libstdc++/81266 fix std:🧵:native_handle_type test
The test uses remove_pointer because in most cases native_handle_type is
a pointer to the actual type that the C++ class contains. However, for
std::thread, native_handle_type is the same type as the type contained
in std::thread, and so remove_pointer is not needed. On targets where
pthread_t is a pointer type remove_pointer<native_handle_type> is not a
no-op, instead it transforms pthread_t and causes the test to fail.

The fix is to not apply remove_pointer when testing std::thread.

	PR libstdc++/81266
	* testsuite/util/thread/all.h: Do not use remove_pointer for
	std:🧵:native_handle_type.

From-SVN: r271080
2019-05-10 22:41:23 +01:00
Jonathan Wakely
4b7a3ab82f PR libstdc++/90397 fix std::variant friend declarations
Clang diagnoses the inconsistent noexcept-specifier on the friend
declaration of __get. Add it, and also on __get_storage.

	PR libstdc++/90397
	* include/std/variant (_Variant_storage<false, Types...>::_M_storage())
	(_Variant_storage<true, Types...>::_M_reset()))
	(_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
	(__get_storage): Likewise.
	(variant): Add noexcept to friend declarations for __get and
	__get_storage.

From-SVN: r271079
2019-05-10 22:41:19 +01:00
Jonathan Wakely
7fb65a8759 PR libstdc++/90388 fix std::hash<unique_ptr<T,D>> bugs
A disabled specialization should not be callable, so move the function
call operator into a new base class which correctly implements the
disabled hash semantics. For the versioned namespace configuration do
not derive from __poison_hash in the enabled case, as the empty base
class serves no purpose but potentially increases the object size. For
the default configuration that base class must be kept, to preserve
layout.

An enabled specialization should not be unconditionally noexcept,
because the underlying hash object might throw.

	PR libstdc++/90388
	* include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
	Use _Require for constraints.
	(operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
	per the standard.
	(__uniq_ptr_hash): New base class with conditionally-disabled call
	operator.
	(hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
	* testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
	* testsuite/20_util/unique_ptr/hash/90388.cc: New test.

From-SVN: r271078
2019-05-10 22:41:16 +01:00
Jonathan Wakely
302b699607 Improve API docs for <memory> and <new>
* include/bits/shared_ptr.h: Improve docs.
	* include/bits/shared_ptr_base.h: Likewise.
	* include/bits/stl_uninitialized.h: Likewise.
	* include/bits/unique_ptr.h: Likewise.
	* libsupc++/new: Likewise.

From-SVN: r271077
2019-05-10 22:41:11 +01:00
Thomas Koenig
15e5858fbe re PR fortran/61968 (ICE (assembly failure) due to wrongly generating a vtable for TYPE(*) / BT_ASSUMED_TYPE)
2019-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/61968
    * interface.c (compare_actual_formal): Do not create a vtab if
    the actual argument is assumed type.

2019-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/61968
    * gfortran.dg/assumed_type_10.f90: New test case.
    * gfortran.dg/assumed_type_11.f90: New test case.

From-SVN: r271076
2019-05-10 20:14:22 +00:00
Janne Blomqvist
93fd52fc8c Fix typo in gcc/fortran/ChangeLog
From-SVN: r271075
2019-05-10 23:09:43 +03:00
Ian Lance Taylor
4f3952228a compiler: permit inlining receive expressions
This does not permit any new inlinable functions in the standard library.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176637

From-SVN: r271074
2019-05-10 19:41:55 +00:00
Iain Sandoe
c735deb4fa darwin, testsuite - provide an asm shim for AVX12F tests.
Darwin will build these tests and run them if/when it's 
available on the relevant hardware.

2019-05-10  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.target/x86_64/abi/avx512f/abi-avx512f.exp: Darwin is
	now tested.
	* gcc.target/x86_64/abi/avx512f/asm-support-darwin.s: New.

From-SVN: r271073
2019-05-10 19:14:21 +00:00
Paolo Carlini
67254b50a6 decl.c (grokvardecl): Use an accurate location in error message about main as a global variable.
/cp
2019-05-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (grokvardecl): Use an accurate location in error message
	about main as a global variable.

/testsuite
2019-05-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/diagnostic/main1.C: New.

From-SVN: r271070
2019-05-10 18:00:52 +00:00
Paolo Carlini
7bdc7e0661 call.c (build_call_a): Use FUNC_OR_METHOD_TYPE_P.
2019-05-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* call.c (build_call_a): Use FUNC_OR_METHOD_TYPE_P.
	* cp-gimplify.c (cp_fold): Likewise.
	* cp-objcp-common.c (cp_type_dwarf_attribute): Likewise.
	* cp-tree.h (TYPE_OBJ_P, TYPE_PTROBV_P): Likewise.
	* cvt.c (perform_qualification_conversions): Likewise.
	* decl.c (grokdeclarator): Likewise.
	* decl2.c (build_memfn_type): Likewise.
	* mangle.c (canonicalize_for_substitution, write_type): Likewise.
	* parser.c (cp_parser_omp_declare_reduction): Likewise.
	* pt.c (check_explicit_specialization, uses_deducible_template_parms,
	check_cv_quals_for_unify, dependent_type_p_r): Likewise.
	* rtti.c (ptr_initializer): Likewise.
	* semantics.c (finish_asm_stmt, finish_offsetof,
	cp_check_omp_declare_reduction): Likewise.
	* tree.c (cp_build_qualified_type_real,
	cp_build_type_attribute_variant, cxx_type_hash_eq,
	cxx_copy_lang_qualifiers, cp_free_lang_data): Likewise.
	* typeck.c (structural_comptypes, convert_arguments,
	cp_build_addr_expr_1, unary_complex_lvalue, cp_build_c_cast,
	cp_build_modify_expr, comp_ptr_ttypes_real, type_memfn_rqual):
	Likewise.

From-SVN: r271069
2019-05-10 17:57:27 +00:00
Marek Polacek
d49b251f6d PR c++/78010 - bogus -Wsuggest-override warning on final function.
* class.c (check_for_override): Don't warn for final functions.

	* g++.dg/warn/Wsuggest-override-2.C: New test.

From-SVN: r271065
2019-05-10 14:53:30 +00:00
Ian Lance Taylor
93d2b7038d compiler: permit inlining variable declaration statements
This adds all of two inlinable functions to the standard library:
    crypto/subtle.ConstantTimeLessOrEq, regexp.(*Regexp).Copy.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176378

From-SVN: r271063
2019-05-10 13:44:36 +00:00
Richard Biener
cd6437427d tree-ssa-sccvn.c (visit_reference_op_call): Initialize value-id.
2019-05-10  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (visit_reference_op_call): Initialize value-id.
	(do_rpo_vn): Initialize next_value_id.

From-SVN: r271061
2019-05-10 12:01:04 +00:00
Martin Liska
a9d5227c6c Fix a plural in a param description.
2019-05-10  Martin Liska  <mliska@suse.cz>

	* params.def (PARAM_GIMPLE_FE_COMPUTED_HOT_BB_THRESHOLD):
	Fix plural form.

From-SVN: r271060
2019-05-10 09:22:54 +00:00
Jakub Jelinek
425f5fd4c4 re PR tree-optimization/90385 (ICE: tree check: expected ssa_name, have real_cst in transform_to_exit_first_loop_alt, at tree-parloops.c:1772)
PR tree-optimization/90385
	* tree-parloops.c (try_create_reduction_list): Punt on non-SSA_NAME
	arguments of the exit phis.

	* gfortran.dg/pr90385.f90: New test.

From-SVN: r271059
2019-05-10 10:20:38 +02:00
Jakub Jelinek
b5cbaee240 re PR c++/90383 (GCC generates invalid constexpr copy/move assignment operators for types with trailing padding. (Again))
PR c++/90383
	* tree-inline.h (struct copy_body_data): Add do_not_fold member.
	* tree-inline.c (remap_gimple_op_r): Avoid folding expressions if
	id->do_not_fold.
	(copy_tree_body_r): Likewise.
	(copy_fn): Set id.do_not_fold to true.

	* g++.dg/cpp1y/constexpr-90383-1.C: New test.
	* g++.dg/cpp1y/constexpr-90383-2.C: New test.

From-SVN: r271058
2019-05-10 10:19:44 +02:00
Paul Thomas
0a52429609 re PR fortran/90093 (Extended C interop: optional argument incorrectly identified as PRESENT)
2019-05-10  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/90093
	* trans-decl.c (convert_CFI_desc): Test that the dummy is
	present before doing any of the conversions.

	PR fortran/90352
	* decl.c (gfc_verify_c_interop_param): Restore the error for
	charlen > 1 actual arguments passed to bind(C) procs.
	Clean up trailing white space.

	PR fortran/90355
	* trans-array.c (gfc_trans_create_temp_array): Set the 'span'
	field to the element length for all types.
	(gfc_conv_expr_descriptor): The force_no_tmp flag is used to
	prevent temporary creation, especially for substrings.
	* trans-decl.c (gfc_trans_deferred_vars): Rather than assert
	that the backend decl for the string length is non-null, use it
	as a condition before calling gfc_trans_vla_type_sizes.
	* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp'
	is set before calling gfc_conv_expr_descriptor.
	* trans.c (get_array_span): Move the code for extracting 'span'
	from gfc_build_array_ref to this function. This is specific to
	descriptors that are component and indirect references.
	* trans.h : Add the force_no_tmp flag bitfield to gfc_se.

2019-05-10  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/90093
	* gfortran.dg/ISO_Fortran_binding_12.f90: New test.
	* gfortran.dg/ISO_Fortran_binding_12.c: Supplementary code.

	PR fortran/90352
	* gfortran.dg/iso_c_binding_char_1.f90: New test.

	PR fortran/90355
	* gfortran.dg/ISO_Fortran_binding_4.f90: Add 'substr' to test
	the direct passing of substrings as descriptors to bind(C).
	* gfortran.dg/assign_10.f90: Increase the tree_dump count of
	'atmp' to account for the setting of the 'span' field.
	* gfortran.dg/transpose_optimization_2.f90: Ditto.

From-SVN: r271057
2019-05-10 07:59:42 +00:00
Jakub Jelinek
e965aaf602 re PR tree-optimization/88709 (Improve store-merging)
PR tree-optimization/88709
	PR tree-optimization/90271
	* gcc.dg/store_merging_29.c: Allow 4 stores to replace 6 stores on
	arm*-*-*.

From-SVN: r271056
2019-05-10 09:53:23 +02:00
Jakub Jelinek
8a6c4d31f0 re PR pch/90326 (Using any precompiled header breaks definition of FLT_MAX)
PR pch/90326
cp/
	* config-lang.in (gtfiles): Remove c-family/c-lex.c, add
	c-family/c-cppbuiltin.c.
objc/
	* config-lang.in (gtfiles): Add c-family/c-format.c.
objcp/
	* config-lang.in (gtfiles): Don't add c-family/c-cppbuiltin.c.
testsuite/
	* g++.dg/pch/pr90326.C: New test.
	* g++.dg/pch/pr90326.Hs: New file.

From-SVN: r271055
2019-05-10 09:39:46 +02:00
Martin Liska
ecd71fee44 Reapply r269790 which was missed during rebase.
2019-05-10  Martin Liska  <mliska@suse.cz>

	* config/i386/i386-expand.c (ix86_expand_floorceildf_32):
	Reapply changes from r269790.

From-SVN: r271054
2019-05-10 07:22:31 +00:00
Martin Liska
26f36b50ea Add params for jump-table expansion params (PR middle-end/90340).
2019-05-10  Martin Liska  <mliska@suse.cz>

	PR middle-end/90340
	* doc/invoke.texi: New params.
	* params.def (PARAM_JUMP_TABLE_MAX_GROWTH_RATIO_FOR_SIZE): New.
	(PARAM_JUMP_TABLE_MAX_GROWTH_RATIO_FOR_SPEED): Likewise.
	* tree-switch-conversion.c (jump_table_cluster::can_be_handled):
	Use it.
	* tree-switch-conversion.h (struct jump_table_cluster):
	Likewise.
2019-05-10  Martin Liska  <mliska@suse.cz>

	PR middle-end/90340
	* gcc.dg/tree-ssa/pr90340-2.c: New test.
	* gcc.dg/tree-ssa/pr90340.c: New test.

From-SVN: r271053
2019-05-10 06:32:31 +00:00
Martin Liska
38613b9baa Fix location where lto-dump is installed.
2019-05-10  Martin Liska  <mliska@suse.cz>

	* Make-lang.in: Use program_transform_name for lto-dump.
	* config-lang.in: Do not mark lto-dump compiler as we don't
	want to have it installed at
	lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.

From-SVN: r271052
2019-05-10 06:31:32 +00:00
GCC Administrator
4422618161 Daily bump.
From-SVN: r271051
2019-05-10 00:16:15 +00:00
Segher Boessenkool
ddbb5da519 combine: Don't generate IF_THEN_ELSE
On all targets I managed to test (21) this results in better code.  Only
alpha ends up with slightly bigger code.


	* combine.c (combine_simplify_rtx): Don't make IF_THEN_ELSE RTL.

From-SVN: r271047
2019-05-10 02:08:41 +02:00
Joseph Myers
bd0ea08ef4 * de.po, fr.po: Update.
From-SVN: r271045
2019-05-09 22:41:07 +01:00
Cherry Zhang
8743680541 compiler: avoid copy for string([]byte) conversion used in map keys
If a string([]byte) conversion is used immediately as a key for a
    map read, we don't need to copy the backing store of the byte
    slice, as mapaccess does not keep a reference to it.
    
    The gc compiler does more than this: it also avoids the copy if
    the map key is a composite literal that contains the conversion
    as a field, like, T{ ... { ..., string(b), ... }, ... }. For now,
    we just optimize the simple case, which is probably most common.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176197

	* go.dg/mapstring.go: New test.

From-SVN: r271044
2019-05-09 21:24:56 +00:00
Bill Schmidt
08e113f4ae loop.texi: Remove reference to FOR_EACH_LOOP_BREAK.
2019-05-09  Bill Schmidt  <wschmidt@linux.ibm.com>

	* doc/loop.texi: Remove reference to FOR_EACH_LOOP_BREAK.

From-SVN: r271042
2019-05-09 19:54:39 +00:00
Alexander Monakov
41a4d47581 sel-sched: allow negative insn priority (PR 88879)
PR rtl-optimization/88879
	* sel-sched.c (sel_target_adjust_priority): Remove assert.

From-SVN: r271039
2019-05-09 21:13:28 +03:00
Richard Earnshaw
bf822e194f [arm] PR target/90405 New test.
This time really add the test.

gcc/testsuite:
        PR target/90405
        * gcc.target/arm/pr90405.c: New test.

From-SVN: r271037
2019-05-09 16:35:56 +00:00
Richard Earnshaw
4456525c4e [arm] PR target/90405 fix regression for thumb1 with -mtpcs-leaf-frame
-mtpcs-leaf-frame causes an APCS-style backtrace frame to be created
on the stack.  This should probably be deprecated, but it did reveal
an issue with the patch I committed previously to improve the code
generation when pushing high registers, in that
thumb_find_work_register had a different idea as to which registers
were available as scratch registers.

The new code actually does a better job of finding a viable work
register and doesn't rely so much on assumptions about the ABI, so it
seems better to adapt thumb_find_work_register to the new approach.
This way we can eliminate some rather crufty code.

gcc:
	PR target/90405
	* config/arm/arm.c (callee_saved_reg_p): Move before
	thumb_find_work_register.
	(thumb1_prologue_unused_call_clobbered_lo_regs): Move before
	thumb_find_work_register.  Only call df_get_live_out once.
	(thumb1_epilogue_unused_call_clobbered_lo_regs): Likewise.
	(thumb_find_work_register): Use
	thumb1_prologue_unused_call_clobbered_lo_regs instead of ad hoc
	algorithms to locate a spare call clobbered reg.

gcc/testsuite:
	PR target/90405
	* gcc.target/arm/pr90405.c: New test.

From-SVN: r271036
2019-05-09 16:00:23 +00:00
Martin Liska
fd4485aa04 Support {MIN,MAX}_EXPR in GIMPLE FE.
2019-05-09  Martin Liska  <mliska@suse.cz>

	* gimple-pretty-print.c (dump_binary_rhs): Dump MIN_EXPR
	and MAX_EXPR in GIMPLE FE format.
2019-05-09  Martin Liska  <mliska@suse.cz>

	* gimple-parser.c (c_parser_gimple_statement): Support __MIN and
	__MAX.
	(c_parser_gimple_unary_expression): Parse also binary expression
	__MIN and __MAX.
	(c_parser_gimple_parentized_binary_expression): New function.
2019-05-09  Martin Liska  <mliska@suse.cz>

	* gcc.dg/gimplefe-39.c: New test.

From-SVN: r271035
2019-05-09 13:03:45 +00:00
Martin Liska
d276406ac1 Support profile (BB counts and edge probabilities) in GIMPLE FE.
2019-05-09  Martin Liska  <mliska@suse.cz>

	* tree-cfg.c (dump_function_to_file): Dump entry BB count.
	* gimple-pretty-print.c (dump_gimple_bb_header):
	Dump BB count.
	(pp_cfg_jump): Dump edge probability.
	* profile-count.c (profile_quality_as_string): Simplify
	with a static array.
	(parse_profile_quality): New function.
	(profile_count::dump): Simplify with a static array.
	(profile_count::from_gcov_type): Add new argument.
	* profile-count.h (parse_profile_quality): Likewise.
	* predict.h (set_hot_bb_threshold): New.
	* params.def (PARAM_GIMPLE_FE_COMPUTED_HOT_BB_THRESHOLD):
	New param.
	* predict.c (get_hot_bb_threshold): Set from the new param.
	(set_hot_bb_threshold): New.
2019-05-09  Martin Liska  <mliska@suse.cz>

	* gimple-parser.c (struct gimple_parser): Add probability.
	for gimple_parser_edge.
	(gimple_parser::push_edge): Add new argument probability.
	(c_parser_gimple_parse_bb_spec): Parse also probability
	if present.
	(c_parser_parse_gimple_body): Set edge probability.
	(c_parser_gimple_compound_statement): Consume token
	before calling c_parser_gimple_goto_stmt.
	Parse BB counts.
	(c_parser_gimple_statement): Pass new argument.
	(c_parser_gimple_goto_stmt): Likewise.
	(c_parser_gimple_if_stmt): Likewise.
	(c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
	* c-parser.c (c_parser_declaration_or_fndef): Pass
	hot_bb_threshold argument.
	* c-tree.h (struct c_declspecs): Add hot_bb_threshold
	field.
	(c_parser_gimple_parse_bb_spec_edge_probability): New.
2019-05-09  Martin Liska  <mliska@suse.cz>

	* gcc.dg/gimplefe-37.c: New test.
	* gcc.dg/gimplefe-33.c: Likewise.

From-SVN: r271034
2019-05-09 13:03:28 +00:00
Paolo Carlini
555dbc42b2 2019-05-09 Paolo Carlini <paolo.carlini@oracle.com>
* Fix last ChangeLog entry.

From-SVN: r271033
2019-05-09 10:26:46 +00:00
Paolo Carlini
1ccebd3f73 re PR preprocessor/90382 (ICE in linemap_macro_map_loc_to_exp_point, at libcpp/line-map.c:1061)
/cp
2019-05-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/90382
	Revert:
	2018-04-26  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
	min_location.

/testsuite
2019-05-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/90382
	2018-04-26  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/diagnostic/trailing1.C: New.

From-SVN: r271032
2019-05-09 10:18:23 +00:00
Richard Biener
362e280d10 re PR tree-optimization/90395 (ICE: verify_flow_info failed (error: BB 2 cannot throw but has an EH edge))
2019-05-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/90395
	* tree-ssa-forwprop.c (pass_forwprop::execute): Do not
	rewrite vector stores that throw internally.

	* gcc.dg/torture/pr90395.c: New testcase.

From-SVN: r271031
2019-05-09 10:09:30 +00:00
Thomas Schwinge
8de916aa94 Clean up MPX-related stuff: CIF_CHKP
..., which was forgotten in recent r268844.

	gcc/
	* cif-code.def (CHKP): Remove.

From-SVN: r271029
2019-05-09 11:52:10 +02:00