Commit Graph

169106 Commits

Author SHA1 Message Date
GCC Administrator
db409b7264 Daily bump.
From-SVN: r279745
2019-12-28 00:16:27 +00:00
GCC Administrator
e774308387 Daily bump.
From-SVN: r279738
2019-12-27 00:16:29 +00:00
GCC Administrator
0de6397130 Daily bump.
From-SVN: r279734
2019-12-26 00:16:32 +00:00
Iain Sandoe
286b9428fe [Darwin, PPC] Use Darwin9 bundle header for Rosetta builds.
On Darwin10 it's possible to make a 32b PPC build using the
'Rosetta' emulator. However, these builds need to make use of
Darwin9 crts (for exes, dylibs and bundles). This adds the
change to cater for bundles.

gcc/ChangeLog:

	Backport from mainline.
	2019-12-14 Iain Sandoe <iain@sandoe.co.uk>

	* config/darwin.h (DARWIN_EXTRA_SPECS): Add new
	bundle spec. (DARWIN_BUNDLE1_SPEC): New.
	(STARTFILE_SPEC): Use darwin bundle spec.
	* config/rs6000/darwin.h (DARWIN_BUNDLE1_SPEC): New.
	(DARWIN_DYLIB1_SPEC): Delete duplicate.

From-SVN: r279732
2019-12-25 20:31:04 +00:00
GCC Administrator
47e35d17d3 Daily bump.
From-SVN: r279729
2019-12-25 00:16:11 +00:00
GCC Administrator
39c83f55a6 Daily bump.
From-SVN: r279722
2019-12-24 00:16:12 +00:00
GCC Administrator
3aa0d80870 Daily bump.
From-SVN: r279714
2019-12-23 00:16:10 +00:00
GCC Administrator
2cbeb96ebc Daily bump.
From-SVN: r279704
2019-12-22 00:16:11 +00:00
Paul Thomas
9c7b124504 re PR fortran/92753 (ICE in gfc_trans_call, at fortran/trans-stmt.c:392)
2019-12-21  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/92753
	* expr.c (find_inquiry_ref): Catch INQUIRY_LEN case, where the
	temporary expression has been converted to a constant and make
	the new expression accordingly. Correct the error in INQUIRY_RE
	and INQUIRY_IM cases. The original rather than the resolved
	expression was being used as the source in mpfr_set.

2019-12-21  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/92753
	* gfortran.dg/inquiry_type_ref_5.f90 : New test.

From-SVN: r279697
2019-12-21 18:21:21 +00:00
GCC Administrator
39f5d29e78 Daily bump.
From-SVN: r279689
2019-12-21 00:16:12 +00:00
Jakub Jelinek
a0d677eac5 backport: re PR fortran/92977 (ICE in gfc_trans_omp_atomic, at fortran/trans-openmp.c:3526)
Backported from mainline
	2019-12-19  Jakub Jelinek  <jakub@redhat.com>

 	PR fortran/92977
	* frontend-passes.c (call_external_blas): Use || instead of |.

	PR fortran/92977
	* frontend-passes.c (in_omp_atomic): New variable.
	(cfe_expr_0, matmul_to_var_expr, matmul_temp_args,
	inline_matmul_assign, call_external_blas): Don't optimize in
	EXEC_OMP_ATOMIC.
	(optimize_namespace): Clear in_omp_atomic.
	(gfc_code_walker): Set in_omp_atomic for EXEC_OMP_ATOMIC, save/restore
	it around.

	* gfortran.dg/gomp/pr92977.f90: New test.

From-SVN: r279676
2019-12-20 18:45:56 +01:00
Jakub Jelinek
0d2440755c backport: re PR ipa/92357 (ICE in IPA pass fnsummary in openmp offload)
Backported from mainline
	2019-12-14  Jakub Jelinek  <jakub@redhat.com>

	PR ipa/92357
	* ipa-fnsummary.c (ipa_fn_summary_write): Use
	lto_symtab_encoder_iterator with lsei_start_function_in_partition and
	lsei_next_function_in_partition instead of walking all cgraph nodes
	in encoder.

From-SVN: r279675
2019-12-20 18:44:50 +01:00
Jakub Jelinek
6a6bf672cd backport: re PR tree-optimization/92930 (GCC incorrectly optimizes away __builtin_apply() calls)
Backported from mainline
	2019-12-14  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/92930
	* ipa-pure-const.c (special_builtin_state): Don't handle
	BUILT_IN_APPLY.

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

From-SVN: r279674
2019-12-20 18:44:16 +01:00
Jakub Jelinek
0cd9466156 backport: re PR target/92904 (varargs for __int128 is placed at an unaligned location and uses movdqa for the load)
Backported from mainline
	2019-12-12  Jakub Jelinek  <jakub@redhat.com>

	PR target/92904
	* config/i386/i386.c (ix86_gimplify_va_arg): If need_intregs and
	not need_temp, decrease alignment of the read because the GPR save
	area only guarantees 8-byte alignment.

	* gcc.c-torture/execute/pr92904.c: New test.

From-SVN: r279673
2019-12-20 18:43:23 +01:00
Jakub Jelinek
a4606f7f03 backport: re PR fortran/92899 ([OpenMP] ICE in gfc_trans_omp_atomic, at fortran/trans-openmp.c:3769)
Backported from mainline
	2019-12-11  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/92899
	* trans-openmp.c (gfc_trans_omp_atomic): For GFC_OMP_ATOMIC_SWAP,
	do look through conversion on expr2 if any.

	* testsuite/libgomp.fortran/atomic1.f90: New test.

From-SVN: r279672
2019-12-20 18:42:22 +01:00
Jakub Jelinek
86a5b74ed4 backport: re PR target/92723 (ICE in expand_shift_1, at expmed.c:2635)
Backported from mainline
	2019-12-11  Jakub Jelinek  <jakub@redhat.com>

	PR target/92723
	* tree-vect-patterns.c (vect_recog_rotate_pattern): If dt is not
	vect_internal_def, use oprnd1 as is, without trying to cast it.
	Formatting fix.

	* gcc.dg/vect/pr92723.c: New test.

From-SVN: r279671
2019-12-20 18:41:17 +01:00
Jakub Jelinek
e8b31b2389 backport: PR c++/92831 - CWG 1299, not extending temporary lifetime for ?:
Backported from mainline
	2019-12-06  Jakub Jelinek  <jakub@redhat.com>

	PR c++/92831 - CWG 1299, not extending temporary lifetime for ?:
	* cp-tree.h (extend_ref_init_temps): Add a new argument with NULL
	default arg.
	* call.c (set_up_extended_ref_temp): Add COND_GUARD argument, pass it
	down to extend_ref_init_temps.  Before pushing cleanup, if COND_GUARD
	is non-NULL, create a bool temporary if needed, initialize to false
	and guard the cleanup with the temporary being true.
	(extend_ref_init_temps_1): Add COND_GUARD argument, pass it down
	to recursive calls and set_up_extended_ref_temp.  Handle COND_EXPR.
	(extend_ref_init_temps): Add COND_GUARD argument, pass it down to
	recursive calls and to extend_ref_init_temps_1.

	* g++.dg/cpp0x/temp-extend2.C: New test.

From-SVN: r279669
2019-12-20 18:37:45 +01:00
Jakub Jelinek
bbd83540e0 backport: re PR fortran/92775 (Incorrect expression in DW_AT_byte_stride on an array)
Backported from mainline
	2019-12-06  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/92775
	* trans.h (struct lang_type, struct lang_decl): Remove span member.
	(GFC_DECL_SPAN, GFC_TYPE_ARRAY_SPAN): Remove macros.
	* trans-array.h (gfc_get_descriptor_offsets_for_info): Add another
	argument.
	* trans-array.c (gfc_get_descriptor_offsets_for_info): Add SPAN_OFF
	argument and initialize *SPAN_OFF to the offset of span field.
	* trans-types.c (gfc_get_array_descr_info): Adjust
	gfc_get_descriptor_offsets_for_info caller.  Compute elem_size
	as base->span instead of TYPE_SIZE_UNIT (etype) constant.

From-SVN: r279668
2019-12-20 18:36:48 +01:00
Jakub Jelinek
ec2894778c backport: re PR fortran/92781 (ICE in convert_nonlocal_reference_op, at tree-nested.c:1065)
Backported from mainline
	2019-12-05  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/92781
	* trans-decl.c (gfc_get_symbol_decl): If sym->backend_decl is
	current_function_decl, add length to current rather than parent
	function and expect DECL_CONTEXT (length) to be current_function_decl.

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

From-SVN: r279667
2019-12-20 18:36:08 +01:00
Jakub Jelinek
4833bc1522 re PR fortran/92756 (ICE in lower_omp, at omp-low.c:12988)
PR fortran/92756
	* omp-low.c (check_omp_nesting_restrictions): If lang_GNU_Fortran,
	diagnose teams not closely nested inside of target.

	Backported from mainline
	2019-12-04  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/92756
	* gfortran.dg/gomp/teams1.f90: New test.

From-SVN: r279666
2019-12-20 18:35:18 +01:00
Jakub Jelinek
d4a646993d backport: re PR c++/92732 (Bit-field of scoped enumeration type cannot be initialized)
Backported from mainline
	2019-12-03  Jakub Jelinek  <jakub@redhat.com>

	PR c++/92732
	* typeck2.c (digest_nsdmi_init): For bitfields, use
	DECL_BIT_FIELD_TYPE instead of TREE_TYPE.

	* g++.dg/cpp2a/bitfield3.C: Don't expect narrowing conversion
	warnings.
	* g++.dg/cpp2a/bitfield4.C: New test.

From-SVN: r279665
2019-12-20 18:34:14 +01:00
Jakub Jelinek
ae1b211b58 backport: re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from array)
Backported from mainline
	2019-12-03  Jakub Jelinek  <jakub@redhat.com>

	PR c++/92695
	* constexpr.c (cxx_bind_parameters_in_call): For virtual calls,
	adjust the first argument to point to the derived object rather
	than its base.

	* g++.dg/cpp2a/constexpr-virtual14.C: New test.

From-SVN: r279664
2019-12-20 18:33:13 +01:00
Jakub Jelinek
d9c7be4ce3 backport: re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from array)
Backported from mainline
	2019-12-02  Jakub Jelinek  <jakub@redhat.com>

	PR c++/92695
	* constexpr.c (cxx_eval_constant_expression) <case OBJ_TYPE_REF>: Use
	STRIP_NOPS before checking for ADDR_EXPR.

	* g++.dg/cpp2a/constexpr-virtual15.C: New test.

From-SVN: r279663
2019-12-20 18:32:23 +01:00
Jakub Jelinek
87b153d0c6 backport: re PR c++/60228 (ICE using lambda in #pragma omp declare reduction)
Backported from mainline
	2019-11-29  Jakub Jelinek  <jakub@redhat.com>

	PR c++/60228
	* parser.c (cp_parser_omp_declare_reduction_exprs): If
	processing_template_decl, wrap the combiner or initializer
	into EXPR_STMT.
	* decl.c (start_preparsed_function): Don't start a lambda scope
	for DECL_OMP_DECLARE_REDUCTION_P functions.
	(finish_function): Don't finish a lambda scope for
	DECL_OMP_DECLARE_REDUCTION_P functions, nor cp_fold_function
	them nor cp_genericize them.
	* mangle.c (decl_mangling_context): Look through
	DECL_OMP_DECLARE_REDUCTION_P functions.
	* semantics.c (expand_or_defer_fn_1): For DECL_OMP_DECLARE_REDUCTION_P
	functions, use tentative linkage, don't keep their bodies with
	-fkeep-inline-functions and return false at the end.

	* g++.dg/gomp/openmp-simd-2.C: Don't expect bodies for
	DECL_OMP_DECLARE_REDUCTION_P functions.

	* testsuite/libgomp.c++/udr-20.C: New test.
	* testsuite/libgomp.c++/udr-21.C: New test.

From-SVN: r279662
2019-12-20 18:30:38 +01:00
Jakub Jelinek
e3edafbca9 backport: re PR c++/92695 (P1064R0 - virtual constexpr fails if object taken from array)
Backported from mainline
	2019-11-28  Jakub Jelinek  <jakub@redhat.com>

	PR c++/92695
	* decl2.c (mark_used): Don't call note_vague_linkage_fn for pure
	virtual functions, even if they are declared inline.

	* g++.dg/warn/inline3.C: New test.

From-SVN: r279661
2019-12-20 18:26:28 +01:00
Jakub Jelinek
70d8957fdc backport: re PR fortran/91944 (ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6156)
Backported from mainline
	2019-11-27  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/91944
	* simplify.c (gfc_simplify_spread): Check gfc_init_expr_flag instead
	of gfc_current_ns->sym_root->n.sym->attr.flavor == FL_PARAMETER.

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

From-SVN: r279660
2019-12-20 18:25:39 +01:00
Jakub Jelinek
f62d72ac70 backport: re PR c++/92524 (ICE in short program with constexpr and std::array)
Backported from mainline
	2019-11-27  Jakub Jelinek  <jakub@redhat.com>

	PR c++/92524
	* tree.c (replace_placeholders_r): Don't walk constructor elts with
	RANGE_EXPR indexes.

	* g++.dg/cpp0x/pr92524.C: New test.

From-SVN: r279659
2019-12-20 18:24:30 +01:00
Jakub Jelinek
92059b60e6 backport: re PR debug/92664 (Wrong .debug_line section information when compiling stdin input with -g3)
Backported from mainline
	2019-11-27  Jakub Jelinek  <jakub@redhat.com>

	PR debug/92664
	* dwarf2out.c (lookup_filename): Use "<stdin>" instead of "".

From-SVN: r279658
2019-12-20 18:23:34 +01:00
Jakub Jelinek
04b2ff5f75 backport: re PR c++/92648 (Handling of unknown attributes)
Backported from mainline
	2019-11-26  Jakub Jelinek  <jakub@redhat.com>

	PR c++/92648
	* parser.c (cp_parser_std_attribute): For unknown attributes,
	skip balanced token seq instead of trying to parse
	attribute-argument-clause as expression list.

	* g++.dg/cpp0x/gen-attrs-71.C: New test.

From-SVN: r279655
2019-12-20 18:01:08 +01:00
Jakub Jelinek
cfd17534ab backport: re PR c++/61414 (enum class bitfield size-checking needs a separate warning flag controlling it)
Backported from mainline
	2019-11-26  Jakub Jelinek  <jakub@redhat.com>

	PR c++/61414
	* c-attribs.c (handle_mode_attribute): Add mode attribute to
	ENUMERAL_TYPEs.

	* class.c (enum_to_min_precision): New hash_map.
	(enum_min_precision): New function.
	(check_bitfield_decl): Use it.

	* g++.dg/cpp0x/enum23.C: Remove xfail.
	* g++.dg/cpp0x/enum28.C: New test.

From-SVN: r279654
2019-12-20 18:00:02 +01:00
Jakub Jelinek
75003cdd23 backport: re PR sanitizer/92154 (new glibc breaks arm bootstrap due to libsanitizer)
Backported from mainline
	2019-11-26  Jakub Jelinek  <jakub@redhat.com>

	PR sanitizer/92154
	* sanitizer_common/sanitizer_platform_limits_posix.h: Cherry-pick
	llvm-project revision 947f9692440836dcb8d88b74b69dd379d85974ce.
	* sanitizer_common/sanitizer_platform_limits_posix.cc: Likewise.

From-SVN: r279653
2019-12-20 17:58:35 +01:00
Jakub Jelinek
3981df84e9 backport: re PR tree-optimization/92644 (ICE in wide_int_to_tree_1, at tree.c:1530)
Backported from mainline
	2019-11-26  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/92644
	* tree-ssa-phiopt.c (minmax_replacement): Add INTEGRAL_TYPE_P check
	next to INTEGER_CST checks.

	* g++.dg/opt/pr92644.C: New test.

From-SVN: r279652
2019-12-20 17:58:07 +01:00
Jakub Jelinek
03830a6fbd backport: re PR inline-asm/92615 (ICE in extract_insn)
Backported from mainline
	2019-11-23  Jakub Jelinek  <jakub@redhat.com>

	PR target/92615
	* config/i386/i386.c (ix86_md_asm_adjust): If dest_mode is
	GET_MODE (dest), is not QImode, using ZERO_EXTEND and dest is not
	register_operand, force x into register before storing it into dest.
	Formatting fix.

	* gcc.target/i386/pr92615.c: New test.

From-SVN: r279651
2019-12-20 17:57:21 +01:00
Jakub Jelinek
275bc23e71 backport: re PR c/90677 (gcc-9.1.0 fails to build __gcc_diag__ souce: error: 'cgraph_node' is not defined as a type)
Backported from mainline
	2019-11-22  Jakub Jelinek  <jakub@redhat.com>

	PR c/90677
	* c-common.h (identifier_global_tag): Declare.
	* c-format.c (get_pointer_to_named_type): Renamed to ...
	(get_named_type): ... this.  Use identifier_global_tag instead of
	identifier_global_value, handle the return value being a TYPE_P.
	(init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
	to call get_named_type instead.  Formatting fixes.

	* c-decl.c (identifier_global_tag): Define.

	* cp-objcp-common.c (identifier_global_tag): Define.

	* c-c++-common/pr90677.c: New test.

From-SVN: r279650
2019-12-20 17:56:30 +01:00
Jakub Jelinek
26f920e0d3 backport: re PR c++/90842 (ICE in poplevel, at cp/decl.c:585)
Backported from mainline
	2019-11-21  Jakub Jelinek  <jakub@redhat.com>
		    Jason Merrill  <jason@redhat.com>

	PR c++/90842
	* parser.c (cp_parser_decl_specifier_seq): For concept or typedef
	break early if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR.
	For type specifiers, set CP_PARSER_FLAGS_NO_TYPE_DEFINITIONS
	if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR is set.

	* g++.dg/cpp1y/lambda-generic-90842.C: New test.

From-SVN: r279649
2019-12-20 17:55:06 +01:00
Roman Zhuykov
79fd3ecf19 Backport: rename tests to reference the correct PR
2019-12-20  Roman Zhuykov  <zhroma@ispras.ru>

	* gcc.dg/pr92951-1.c: Rename to ...
	* gcc.dg/pr92591-1.c: ... this.
	* gcc.dg/pr92951-2.c: Rename to ...
	* gcc.dg/pr92591-2.c: ... this.

From-SVN: r279646
2019-12-20 15:50:44 +00:00
Roman Zhuykov
944838ac15 modulo-sched: backport PR92591 fix from mainline
2019-12-20  Roman Zhuykov  <zhroma@ispras.ru>

modulo-sched: fix branch rescheduling issue (PR92591)

	PR rtl-optimization/92591
	* modulo-sched.c (ps_add_node_check_conflicts): Improve checking
	for history > 0 case.
	* params.def (sms-dfa-history): Limit to 16.

gcc/testsuite:

	PR rtl-optimization/92591
	* gcc.dg/pr92951-1.c: New test.
	* gcc.dg/pr92951-2.c: New test.

From-SVN: r279642
2019-12-20 15:05:12 +00:00
GCC Administrator
d4ba80d153 Daily bump.
From-SVN: r279618
2019-12-20 00:16:23 +00:00
Georg-Johann Lay
30e2de8922 backport: re PR target/92545 (avr: support ATmega devices from the 0-series)
Backport support for some AVR devices from avrxmega3 family
	from SVN trunk r279309, r278387, r278389, r278478.
	PR target/92545
	* config/avr/avr-arch.h (avr_mcu_t) <flash_pm_offset>: New field.
	* config/avr/avr-devices.c (avr_mcu_types): Adjust initializers.
	* config/avr/avr-mcus.def (AVR_MCU): Add respective field.
	* config/avr/gen-avr-mmcu-specs.c (print_mcu)
	<*cpp, *cpp_mcu, *cpp_avrlibc, *link_pm_base_address>: Emit code
	for spec definitions.
	* config/avr/gen-avr-mmcu-texi.c: Rewrite.
	* doc/avr-mmcu.texi: Regenerate.

From-SVN: r279564
2019-12-19 08:59:28 +00:00
GCC Administrator
97027f6148 Daily bump.
From-SVN: r279559
2019-12-19 00:16:10 +00:00
GCC Administrator
bcac6a5306 Daily bump.
From-SVN: r279482
2019-12-18 00:16:24 +00:00
Andreas Krebbel
37950cdce0 Fix PR92950: Wrong code emitted for movv1qi
The backend emits 16 bit memory loads for single element character
vector.  As a result the character will not be right justified in the
GPR.

gcc/ChangeLog:

2019-12-17  Andreas Krebbel  <krebbel@linux.ibm.com>

	Backport from mainline
	2019-12-16  Andreas Krebbel  <krebbel@linux.ibm.com>

	PR target/92950
	* config/s390/vector.md ("mov<mode>" for V_8): Replace lh, lhy,
	and lhrl with llc.

gcc/testsuite/ChangeLog:

2019-12-17  Andreas Krebbel  <krebbel@linux.ibm.com>

	Backport from mainline
	2019-12-16  Andreas Krebbel  <krebbel@linux.ibm.com>

	PR target/92950
	* gcc.target/s390/vector/pr92950.c: New test.

From-SVN: r279453
2019-12-17 08:37:26 +00:00
GCC Administrator
fb22722dc3 Daily bump.
From-SVN: r279449
2019-12-17 00:16:08 +00:00
GCC Administrator
5368e50a4c Daily bump.
From-SVN: r279407
2019-12-16 00:16:16 +00:00
GCC Administrator
378c73e9ea Daily bump.
From-SVN: r279401
2019-12-15 00:16:08 +00:00
GCC Administrator
71e6ff2c90 Daily bump.
From-SVN: r279390
2019-12-14 00:16:34 +00:00
Jason Merrill
0852213266 PR c++/57082 - new X{} and private destructor.
build_new_1 already passes tf_no_cleanup to build_value_init, but in this
testcase we end up calling build_value_init by way of
build_special_member_call, so we need to pass it to that function as well.

	* init.c (build_new_1): Also pass tf_no_cleanup to
	build_special_member_call.

From-SVN: r279335
2019-12-13 00:10:11 -05:00
Jason Merrill
20de63acca PR c++/92859 - ADL and bit-field.
We also need unlowered_expr_type when considering associated types for ADL.

	* name-lookup.c: Use unlowered_expr_type.

From-SVN: r279334
2019-12-13 00:10:06 -05:00
Jason Merrill
d69f32911e PR c++/92446 - deduction of class NTTP.
Another place we need to look through the VIEW_CONVERT_EXPR we add to make a
use of a class NTTP have const type.

	* pt.c (deducible_expression): Look through VIEW_CONVERT_EXPR.

From-SVN: r279333
2019-12-13 00:10:02 -05:00
Jason Merrill
549ab4bd54 PR c++/92150 - partial specialization with class NTTP.
Here unify was getting confused by the VIEW_CONVERT_EXPR we add in
finish_id_expression_1 to make class NTTP const when they're used in an
expression.

Tested x86_64-pc-linux-gnu, applying to trunk.

	* pt.c (unify): Handle VIEW_CONVERT_EXPR.

From-SVN: r279332
2019-12-13 00:09:57 -05:00