Commit Graph

164936 Commits

Author SHA1 Message Date
Jonathan Wakely d5cc6de1be PR libstdc++/87963 fix build for 64-bit mingw
PR libstdc++/87963
	* src/c++17/memory_resource.cc (chunk::_M_bytes): Change type from
	unsigned to uint32_t.
	(chunk): Fix static assertion for 64-bit targets that aren't LP64.
	(bigblock::all_ones): Fix undefined shift.

From-SVN: r266032
2018-11-12 15:25:40 +00:00
Sudakshina Das ae78a89f52 [GCC, ARM] Enable armv8.5-a and add +sb and +predres for previous ARMv8-a in ARM
This patch adds -march=armv8.5-a to the Arm backend.
Armv8.5-A also adds two new security features:
- Speculation Barrier instruction
- Execution and Data Prediction Restriction Instructions
These are made optional to all older Armv8-A versions. Thus we are adding two
new options "+sb" and "+predres" to all older Armv8-A. These are passed on to
the assembler and have no code generation effects and have already gone in the
trunk of binutils.

*** gcc/ChangeLog ***

2018-11-12  Sudakshina Das  <sudi.das@arm.com>

	* config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
	(ARMv8_5a): New fgroup.
	(armv8.5-a): New arch.
	(armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
	sb and predres.
	* config/arm/arm-tables.opt: Regenerate.
	* config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
	* config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
	* config/arm/t-multilib (v8_5_a_simd_variants): New variable.
	Add matching rules for -march=armv8.5-a and extensions.
	* doc/invoke.texi (ARM options): Document -march=armv8.5-a.
	Add sb and predres to all armv8-a except armv8.5-a.

*** gcc/testsuite/ChangeLog ***

2018-11-12  Sudakshina Das  <sudi.das@arm.com>

	* gcc.target/arm/multilib.exp: Add some -march=armv8.5-a
	combination tests.

From-SVN: r266031
2018-11-12 14:58:39 +00:00
Richard Biener 27922d518d 2018-11=12 Richard Biener <rguenther@suse.de>
* tree-vrp.h (value_range[_base]::set): Make public.  Provide
	overload for single value.
	(value_range[_base]::set_nonnull): New.
	(value_range[_base]::set_null): Likewise.
	(value_range): Document bitmap copying behavior, mark
	copy constructor and assignment operator deleted.
	(value_range::move): New.
	(value_range::set_and_canonicalize): Default bitmap to zero.
	(set_value_range_to_nonnull): Remove.
	(set_value_range_to_null): Likewise.
	(set_value_range): Likewise.
	(set_value_range_to_value): Likewise.
	(extract_range_from_unary_expr): Work on value_range_base.
	(extract_range_from_binary_expr_1): Likewise.  Rename to...
	(extract_range_from_binary_expr): ... this.
	* tree-vrp.c (value_range::update): Clear equiv bitmap
	if required.
	(value_range::move): New, move equiv bitmap.
	(value_range_base::set_undefined): Avoid assignment.
	(value_range::set_undefined): Likewise.
	(value_range_base::set_varying): Likewise.
	(value_range::set_varying): Likewise.
	(set_value_range): Remove.
	(value_range_base::set): New overload for value.
	(value_range::set): Likewise.
	(set_value_range_to_nonnull): Remove.
	(value_range_base::set_nonnull): New.
	(value_range::set_nonnull): Likewise.
	(set_value_range_to_null): Remove.
	(value_range_base::set_null): New.
	(value_range::set_null): Likewise.
	(range_is_null): Work on value_range_base.
	(range_is_nonnull): Likewise.
	(ranges_from_anti_range): Likewise.
	(extract_range_into_wide_ints): Likewise.
	(extract_range_from_multiplicative_op): Likewise.
	(extract_range_from_binary_expr): Likewise.  Update for API changes.
	(extract_range_from_unary_expr): Likewise.  Remove OBJ_TYPE_REF
	handling.
	(value_range::intersect_helper): Avoid copy and assignment.
	(value_range::union_helper): Likewise.
	(determine_value_range_1): Adjust.
	* gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
	Avoid assignment by using move.
	(evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
	* tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
	Likewise.
	* tree-ssanames.c (get_range_info): Likewise.
	* vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
	* vr-values.c (vr_values::get_value_range): Adjust.
	(vr_values::update_value_range): Likewise.
	(symbolic_range_based_on_p): Work on value_range_base.
	(vr_values::extract_range_from_binary_expr): Use value_range_base.
	(vr_values::extract_range_from_unary_expr): Likewise.
	(vr_values::extract_range_from_cond_expr): Avoid assignment.
	(vr_values::extract_range_from_comparison): Adjust.
	(vr_values::check_for_binary_op_overflow): Use value_range_base.
	(vr_values::extract_range_basic): Adjust.
	(vr_values::adjust_range_with_scev): Likewise.
	(vr_values::vrp_visit_assignment_or_call): Likewise.
	(vr_values::get_vr_for_comparison): Change API to avoid
	assignment and copy construction.
	(vr_values::compare_name_with_value): Adjust accordingly.
	(vr_values::compare_names): Likewise.
	(vr_values::extract_range_from_phi_node): Avoid assignment and
	bogus in-place modify of equiv bitmap.
	(vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
	* ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
	for extract_range_from_unary_expr API change.
	* ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.

From-SVN: r266030
2018-11-12 14:53:36 +00:00
Eric Botcazou 03564d3f6e * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
From-SVN: r266029
2018-11-12 12:00:37 +00:00
Richard Biener c49eeac355 tree-vrp.h (value_range_base::symbolic_p, [...]): Move from value_range.
2018-11-12  Richard Biener  <rguenther@suse.de>

	* tree-vrp.h (value_range_base::symbolic_p,
	value_range_base::constant_p, value_range_base::zero_p,
	value_range_base::singleton_p): Move from value_range.
	(value_range::dump): Add.
	* gimple-ssa-evrp-analyze.c
	(evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
	* ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
	* tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
	Use set_varying.
	* tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
	(value_range::constant_p): Likewise.
	(value_range::singleton_p): Likewise.
	(value_range_base::dump): Add.
	(set_value_range_to_undefined): Remove.
	(set_value_range_to_varying): Likewise.
	(range_int_cst_p): Take value_range_base argument.
	(range_int_cst_singleton_p): Likewise.
	(value_range_constant_singleton): Likewise.
	(vrp_set_zero_nonzero_bits): Likewise.
	(extract_range_from_multiplicative_op): Use set_varying.
	(extract_range_from_binary_expr_1): Likewise. Use set_undefined.
	(extract_range_from_unary_expr): Likewise.
	(dump_value_range_base): Change to overload of dump_value_range.
	(vrp_prop::vrp_initialize): Use set_varying and set_undefined.
	(vrp_prop::visit_stmt): Likewise.
	(value_range::intersect_helper): Likewise.
	(value_range::union_helper): Likewise.
	(determine_value_range_1): Likewise.

From-SVN: r266028
2018-11-12 11:59:32 +00:00
Richard Biener bdfac905da tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
2018-11-12  Richard Biener  <rguenther@suse.de>

	* tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
	(set_value_range_to_null): Likewise.
	* vr-values.c (vr_values::extract_range_from_comparison):
	Clear equiv for constant singleton ranges.

From-SVN: r266027
2018-11-12 11:16:36 +00:00
Wei Xiao 682abf8d15 sse.md: Combine VFIXUPIMM* patterns
2018-11-12 Wei Xiao <wei3.xiao@intel.com>

        * config/i386/sse.md: Combine VFIXUPIMM* patterns
        (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
        (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
        (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
        (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
        (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
        (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.

From-SVN: r266026
2018-11-12 08:52:37 +00:00
Sandra Loosemore 8f64958b76 re PR c/69502 (attribute aligned reduces alignment contrary to documentation)
2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>

	PR c/69502

	gcc/
	* doc/extend.texi (Common Type Attributes): For the align type
	attribute, copy language about decreasing alignment from the
	corresponding variable attribute.

From-SVN: r266025
2018-11-12 01:23:16 -05:00
Xianmiao Qu 31fad58fbb csky.md (*fpuv2_nmulsf3_1, [...]): Handle -frounding-math.
2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>

	gcc/
	* config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
	-frounding-math.

	gcc/testsuite
	* gcc.target/csky/fnmul-1.c: New.
	* gcc.target/csky/fnmul-2.c: New.
	* gcc.target/csky/fnmul-3.c: New.
	* gcc.target/csky/fnmul-4.c: New.

From-SVN: r266024
2018-11-12 02:36:45 +00:00
GCC Administrator 9510b56378 Daily bump.
From-SVN: r266023
2018-11-12 00:16:28 +00:00
Sandra Loosemore 2dda36f93d re PR c++/43105 (Document restrictions on mixing -fno-rtti and -frtti)
2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>

	PR c++/43105

	gcc/
	* doc/invoke.texi (C++ Dialect Options): Add warning about mixing
	-frtti and -fno-rtti code.

From-SVN: r266020
2018-11-11 17:46:00 -05:00
Hans-Peter Nilsson b5dda6c13b Fix copypasto in las ChangeLog.
From-SVN: r266019
2018-11-11 22:21:28 +00:00
Hans-Peter Nilsson 63100c5433 re PR libstdc++/54005 (Use __atomic_always_lock_free in libstdc++ is_lock_free instead of __atomic_is_lock_free)
PR libstdc++-v3/54005
	* include/bits/atomic_base.h (__atomic_base<_TTp>::is_lock_free(),
	__atomic_base<_PTp*>::is_lock_free()): Call __atomic_always_lock_free
	with the type-derived _S_alignment instead of __alignof the object.
	* include/std/atomic (atomic<T>::is_lock_free()): Likewise.

From-SVN: r266018
2018-11-11 22:20:19 +00:00
Sandra Loosemore 6157c37500 re PR c/26366 (__builtin_expect needs better documentation)
2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>

	PR c/26366

	gcc/
	* doc/extend.texi (Other Builtins): Document probability associated
	with __builtin_expect.

From-SVN: r266017
2018-11-11 13:39:10 -05:00
Uros Bizjak bd5d396157 re PR target/87928 (ICE in ix86_compute_frame_layout, at config/i386/i386.c:11161 since r228607)
PR target/87928
	* config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
	instead of (TARGET_64BIT && ix86_abi == MS_ABI).
	* config/i386/darwin.h (STACK_BOUNDARY): Ditto.
	* config/i386/cygming.h (STACK_BOUNDARY): Remove.

testsuite /Changelog:

	PR target/87928
	* gcc.target/i386/pr87928.c: New test.

From-SVN: r266016
2018-11-11 18:49:33 +01:00
Xianmiao Qu 6d6fbec5f3 csky-linux-elf.h (CC1_SPEC): Support -profile.
2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>

	* config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.

From-SVN: r266013
2018-11-11 14:56:23 +00:00
Xianmiao Qu 917ecacc5b csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>

	* config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.

From-SVN: r266012
2018-11-11 13:44:01 +00:00
Richard Biener 2506b92c56 tree-vrp.h (class value_range_base): New base class for value_range containing all but the m_equiv member.
2018-11-11  Richard Biener  <rguenther@suse.de>

	* tree-vrp.h (class value_range_base): New base class for
	value_range containing all but the m_equiv member.
	(dump_value_range_base): Add.
	(range_includes_zero_p): Work on value_range_base.
	* tree-vrp.c (value_range_base::set): Split out base handling
	from...
	(value_range::set): this.
	(value_range::set_equiv): New.
	(value_range_base::value_range_base): New constructors.
	(value_range_base::check): Split out base handling from...
	(value_range::check): this.
	(value_range::equal_p): Refactor in terms of
	ignore_equivs_equal_p which is now member of the base.
	(value_range_base::set_undefined): New.
	(value_range_base::set_varying): Likewise.
	(value_range_base::dump):Split out base handling from...
	(value_range::dump): this.
	(value_range_base::set_and_canonicalize): Split out base handling
	from...
	(value_range::set_and_canonicalize): this.
	(value_range_base::union_): New.
	* ipa-prop.h (struct ipa_jump_func): Use value_range_base *
	for m_vr.
	* ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
	instead of value_range everywhere.
	(ipcp_vr_lattice::print): Use dump_value_range_base.
	(ipcp_vr_lattice::meet_with): Adjust.
	(ipcp_vr_lattice::meet_with_1): Likewise.
	(ipa_vr_operation_and_type_effects): Likewise.
	(propagate_vr_across_jump_function): Likewise.
	* ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
	(ipa_get_value_range): Likewise.
	(ipa_set_jfunc_vr): Likewise.
	(ipa_compute_jump_functions_for_edge): Likewise.

From-SVN: r266011
2018-11-11 08:51:34 +00:00
Jonathan Wakely 3d18dc9db0 Implement P0318R1 unwrap_ref_decay and unwrap_reference
Implement P0318R1 unwrap_ref_decay and unwrap_reference
	* include/std/type_traits (unwrap_reference, unwrap_reference_t)
	(unwrap_ref_decay, unwrap_ref_decay_t): New traits and aliases.
	* testsuite/20_util/unwrap_reference/1.cc: New test.
	* testsuite/20_util/unwrap_reference/2.cc: New test.

From-SVN: r266010
2018-11-11 05:17:03 +00:00
Jonathan Wakely 37b736f6bd Implement P1007R3 std::assume_aligned
Implement P1007R3 std::assume_aligned
	* include/std/memory (assume_aligned): Implement for C++17.
	* testsuite/20_util/assume_aligned/1.cc: New test.
	* testsuite/20_util/assume_aligned/2_neg.cc: New test.
	* testsuite/20_util/assume_aligned/3.cc: New test.

From-SVN: r266009
2018-11-11 05:16:51 +00:00
Sandra Loosemore 47d591cf00 re PR middle-end/65703 (-fdefer-pop documentation is confusing)
2018-11-10  Sandra Loosemore  <sandra@codesourcery.com>

	PR middle-end/65703

	gcc/
	* doc/invoke.texi (Optimize Options): Add @opindex entries
	for the positive forms of -fno-xxx and -mno-xxx options
	that were lacking them.

From-SVN: r266008
2018-11-10 20:33:53 -05:00
GCC Administrator 9b20345393 Daily bump.
From-SVN: r266007
2018-11-11 00:16:47 +00:00
Segher Boessenkool 16ac6fa5a0 combine: More make_more_copies
This makes make_more_copies do what its documentation says, that is,
only make an intermediate pseudo if copying to a pseudo.

This regressed generated code quality when we didn't keep the original
notes that were on the copy, but since r265582 we do, and only allowing
pseudos now is a win.  It also simplifies the code.


	* combine.c (make_more_copies): Only make an intermediate copy if the
	dest of a move is a pseudo.

From-SVN: r266004
2018-11-11 00:12:48 +01:00
GCC Administrator babe0c748d Daily bump.
From-SVN: r266001
2018-11-10 00:16:45 +00:00
Martin Sebor 397fd63d80 re PR testsuite/87965 (Test cases c-c++-common/pr60226.c and gcc.dg/pr39323-1.c fail starting with r265977)
gcc/testsuite/ChangeLog:

	PR testsuite/87965
	* c-c++-common/pr60226.c: Adjust text of expected diagnostic.
	* gcc.dg/pr39323-1.c: Ditto.

From-SVN: r265998
2018-11-09 16:15:59 -07:00
Stafford Horne 1dbff00c02 MAINTAINERS: add myself as or1k maintainer
ChangeLog:

yyyy-mm-dd  Stafford Horne  <shorne@gmail.com>

	* MAINTAINERS (CPU Port Maintainers): Add myself for or1k.
	(Write After Approval): Remove myself.

From-SVN: r265996
2018-11-09 21:22:20 +00:00
Paul Koning 4476242b85 Walloca-16.c: Ignore conflicting types for built-in warnings.
* gcc.dg/Walloca-16.c: Ignore conflicting types for built-in
	warnings.
	* gcc.dg/Wrestrict-4.c: Ditto.
	* gcc.dg/Wrestrict-5.c: Ditto.
	* gcc.dg/pr83463.c: Ditto.
	* gcc.dg/torture/pr55890-2.c: Ditto.
	* gcc.dg/torture/pr55890-3.c: Ditto.
	* gcc.dg/torture/pr71816.c: Ditto.

From-SVN: r265995
2018-11-09 16:08:32 -05:00
Maya Rashish a0f503a0f4 re PR target/87221 (cannot build with -pie)
PR target/87221
	* config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
	(NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.

From-SVN: r265994
2018-11-09 13:55:39 -07:00
Sandra Loosemore e602e1f79b re PR driver/41179 (Documentation for "-fno-toplevel-reorder" is confusing (and wrong))
2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>

	PR driver/41179
	PR middle-end/65703

	gcc/
	* doc/invoke.texi (Optimize Options): Clarify default behavior
	for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.

From-SVN: r265993
2018-11-09 15:45:06 -05:00
Bernd Edlinger ab386758ef re PR tree-optimization/87940 (FAIL: gcc.dg/warn-strlen-no-nul.c)
2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR tree-optimization/87940
        * expr.c (string_constant): Don't strip NOPS in subexpressions.
        Fold PLUS_EXPR correctly.

From-SVN: r265992
2018-11-09 20:38:07 +00:00
Ilya Leoshkevich 340e0dd664 S/390: Allow relative addressing of literal pool entries
r265490 allowed the compiler to choose in a more flexible way whether to
use load or load-address-relative-long (LARL) instruction.  When it
chose LARL for literal pool references, the latter ones were rewritten
by pass_s390_early_mach to use UNSPEC_LTREF, which assumes base register
usage, which in turn is not compatible with LARL.  The end result was an
ICE because of unrecognizable insn.

UNSPEC_LTREF and friends are necessary in order to communicate the
dependency on the base register to pass_sched2.  When relative
addressing is used, no base register is necessary, so in such cases the
rewrite must be avoided.

gcc/ChangeLog:

2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>

	PR target/87762
	* config/s390/s390.c (s390_safe_relative_long_p): New function.
	(annotate_constant_pool_refs): Skip insns which support
	relative addressing.
	(annotate_constant_pool_refs_1): New helper function.
	(find_constant_pool_ref): Skip insns which support relative
	addression.
	(find_constant_pool_ref_1): New helper function.
	(replace_constant_pool_ref): Skip insns which support
	relative addressing.
	(replace_constant_pool_ref_1): New helper function.
	(s390_mainpool_start): Adapt to the new signature.
	(s390_mainpool_finish): Likewise.
	(s390_chunkify_start): Likewise.
	(s390_chunkify_finish): Likewise.
	(pass_s390_early_mach::execute): Likewise.
	(s390_prologue_plus_offset): Likewise.
	(s390_emit_prologue): Likewise.
	(s390_emit_epilogue): Likewise.

From-SVN: r265991
2018-11-09 20:33:19 +00:00
Jakub Jelinek 81a227c605 c-parser.c (c_parser_omp_clause_final): Use c_parser_expr_no_commas...
c/
	* c-parser.c (c_parser_omp_clause_final): Use
	c_parser_expr_no_commas, convert_lvalue_to_rvalue,
	c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
	parsing instead of c_parser_paren_condition.
	(c_parser_omp_clause_if): Use c_parser_expr_no_commas,
	convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
	c_fully_fold instead of c_parser_condition.
	(c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
	c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
	c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
	c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
	c_parser_expr_no_commas instead of c_parser_expression.
cp/
	* parser.c (cp_parser_omp_clause_final, cp_parser_omp_clause_if): Use
	cp_parser_assignment_expression instead of cp_parser_condition.
	(cp_parser_omp_clause_num_threads, cp_parser_omp_clause_num_tasks,
	cp_parser_omp_clause_grainsize, cp_parser_omp_clause_priority,
	cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
	cp_parser_omp_clause_linear, cp_parser_omp_clause_device): Use
	cp_parser_assignment_expression instead of cp_parser_expression.
	(cp_parser_omp_clause_hint): Likewise.  Formatting fix.
testsuite/
	* c-c++-common/gomp/clauses-5.c: New test.

From-SVN: r265990
2018-11-09 21:22:48 +01:00
Jakub Jelinek 98c91c56bb c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on reduction clause with inscan modifier.
* c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
	reduction clause with inscan modifier.

	* parser.c (cp_parser_omp_clause_reduction): Call sorry_at on
	reduction clause with inscan modifier.

From-SVN: r265989
2018-11-09 21:21:41 +01:00
Jakub Jelinek 3179ebaeac c-parser.c (c_parser_omp_requires): Call sorry_at on requires clauses other than atomic_default_mem_order.
* c-parser.c (c_parser_omp_requires): Call sorry_at on requires
	clauses other than atomic_default_mem_order.

	* parser.c (cp_parser_omp_requires): Call sorry_at on requires
	clauses other than atomic_default_mem_order.

	* c-c++-common/gomp/requires-1.c: Prune not supported yet messages.
	* c-c++-common/gomp/requires-2.c: Likewise.
	* c-c++-common/gomp/requires-4.c: Likewise.

From-SVN: r265988
2018-11-09 21:20:53 +01:00
Jakub Jelinek 4302dd3dff gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid but unsupported lastprivate with conditional modifier.
* gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
	but unsupported lastprivate with conditional modifier.

	* c-c++-common/gomp/lastprivate-conditional-1.c: New test.
	* c-c++-common/gomp/lastprivate-conditional-2.c: New test.

From-SVN: r265987
2018-11-09 21:19:58 +01:00
Jeff Law c4c44802ab mips.c (mips_loongson_ext2_prefetch_cookie): Handle unused argument better.
* config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
	unused argument better.  Add gcc_unreachable to silence warning.

From-SVN: r265986
2018-11-09 13:17:52 -07:00
Jakub Jelinek 9666c52203 affinity-fmt.c: Include inttypes.h if HAVE_INTTYPES_H.
* affinity-fmt.c: Include inttypes.h if HAVE_INTTYPES_H.
	(gomp_display_affinity): Use __builtin_choose_expr to handle
	properly handle argument having integral, or pointer or some other
	type.  If inttypes.h is available and PRIx64 is defined, use PRIx64
	with uint64_t type instead of %llx and unsigned long long.

From-SVN: r265985
2018-11-09 21:17:40 +01:00
Jonathan Wakely 213fd71709 PR libstdc++/87787 fix UBsan error in std::vector
PR libstdc++/87787
	* include/bits/stl_uninitialized.h (__relocate_a_1): Do not call
	memmove when there's nothing to copy (and pointers could be null).

From-SVN: r265984
2018-11-09 20:14:07 +00:00
Jonathan Wakely fcc499722b Fix whitespace in ChangeLog
From-SVN: r265983
2018-11-09 20:13:58 +00:00
Jeff Law fb9289bed1 gcc.dg/torture/stackalign/builtin-apply-2.c: Skip on v850.
From-SVN: r265982
2018-11-09 13:08:20 -07:00
Ian Lance Taylor 0d26cdf1cf cmd/cgo: fix typo in gccgo name mangling recipe
The code to implement new-style gccgo name mangling had a recipe that
    didn't quite match the one in the compiler (incorrect handling for
    '.'). This showed up as a failure in the gotools cgo test if the
    directory containing the test run included a "." character.
    
    Reviewed-on: https://go-review.googlesource.com/c/147917

From-SVN: r265981
2018-11-09 19:03:59 +00:00
Martin Sebor 79a2c4281c PR middle-end/81824 - Warn for missing attributes with function aliases
gcc/c-family/ChangeLog:

	PR middle-end/81824
	* c-attribs.c (handle_copy_attribute): New function.

gcc/cp/ChangeLog:

	PR middle-end/81824
	* pt.c (warn_spec_missing_attributes): Move code to attribs.c.
	Call decls_mismatched_attributes.

gcc/ChangeLog:

	PR middle-end/81824
	* attribs.c (has_attribute): New helper function.
	(decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
	* attribs.h (decls_mismatched_attributes): Declare.
	* cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
	(maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
	* common.opt (-Wattribute-alias): Take an argument.
	(-Wno-attribute-alias): New option.
	* doc/extend.texi (Common Function Attributes): Document copy.
	(Common Variable Attributes): Same.
	* doc/invoke.texi (-Wmissing-attributes): Document enhancement.
	(-Wattribute-alias): Document new option argument.

gcc/testsuite/ChangeLog:

	PR middle-end/81824
	* gcc.dg/Wattribute-alias.c: New test.
	* gcc.dg/Wmissing-attributes.c: New test.
	* gcc.dg/attr-copy.c: New test.
	* gcc.dg/attr-copy-2.c: New test.
	* gcc.dg/attr-copy-3.c: New test.
	* gcc.dg/attr-copy-4.c: New test.

From-SVN: r265980
2018-11-09 10:32:52 -07:00
Jerry DeLisle 900dab1338 re PR fortran/78351 (comma not terminating READ of formatted input field - ok in 4.1.7, not 4.4.7- maybe related to 25419?)
2018-11-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/78351
	* io/transfer.c (read_sf_internal): Delete leftover
	debug code.

From-SVN: r265979
2018-11-09 17:29:33 +00:00
Richard Earnshaw e82cb04297 arm - minor cleanups for CPU alias support
A couple of very minor issues with the new support for CPU
aliases.

	* config/arm/parsecpu.awk (/alias/): Tighten invisible alias
	matching criteria.  Remove unused array initializer.

From-SVN: r265978
2018-11-09 17:28:57 +00:00
Martin Sebor 4c7bd36194 PR c/87795 - Excessive alignment permitted for functions and labels
gcc/c-family/ChangeLog:

	PR c/87795
	* c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.

gcc/testsuite/ChangeLog:

	PR c/87795
	* gcc.dg/attr-aligned.c: New test.

From-SVN: r265977
2018-11-09 10:17:47 -07:00
Bill Schmidt 32999d87d6 xmmintrin.h (_mm_cvtss_si32): Fix incorrect constraints by introducing a new temporary.
2018-11-09  Bill Schmidt  <wschmidt@linux.ibm.com>
	    Jinsong Ji  <jji@us.ibm.com>

	* config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
	constraints by introducing a new temporary.
	(_mm_cvtss_si64): Likewise.


Co-Authored-By: Jinsong Ji <jji@us.ibm.com>

From-SVN: r265975
2018-11-09 16:35:23 +00:00
Ian Lance Taylor 71caffb725 syscall: change RLIM_INFINITY from 0xffffffffffffffff to -1
For compatibility with the gc toolchain's syscall package.
    
    Fixes golang/go#28665
    
    Reviewed-on: https://go-review.googlesource.com/c/148697

From-SVN: r265974
2018-11-09 15:30:51 +00:00
Peter Bergner 0b58e8b8ce Update ChangeLog entry
From-SVN: r265971
2018-11-09 09:17:46 -06:00
Martin Liska 47b840eb39 Come up with the flag -fipa-stack-alignment.
2018-11-09  Martin Liska  <mliska@suse.cz>

	* common.opt: Add -fipa-stack-alignment flag.
	* doc/invoke.texi: Document it.
	* final.c (rest_of_clean_state): Guard stack
	shrinking with flag.
2018-11-09  Martin Liska  <mliska@suse.cz>

	* gcc.target/i386/ipa-stack-alignment.c: New test.

From-SVN: r265970
2018-11-09 15:05:40 +00:00
Martin Liska 2e14744fcd Come up with -fipa-reference-addressable flag.
2018-11-09  Martin Liska  <mliska@suse.cz>

	* cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
	to ...
	(ipa_discover_variable_flags): ... this.
	* common.opt: Come up with new flag -fipa-reference-addressable.
	* doc/invoke.texi: Document it.
	* ipa-reference.c (propagate): Call the renamed fn.
	* ipa-visibility.c (whole_program_function_and_variable_visibility):
	Likewise.
	* ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
	...
	(ipa_discover_variable_flags): ... this.  Discover
	non-addressable variables only with the newly added flag.
	* opts.c: Enable the newly added flag with -O1 and higher
	optimization level.
2018-11-09  Martin Liska  <mliska@suse.cz>

	* gcc.dg/tree-ssa/writeonly-2.c: New test.

From-SVN: r265969
2018-11-09 15:04:52 +00:00