Commit Graph

168980 Commits

Author SHA1 Message Date
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
GCC Administrator
2d61a97d28 Daily bump.
From-SVN: r279329
2019-12-13 00:16:09 +00:00
Harald Anlauf
70e28f6c4a backport: re PR fortran/92898 (ICE in gfc_check_is_contiguous, at fortran/check.c:7157)
2019-12-12  Harald Anlauf  <anlauf@gmx.de>

	Backport from mainline
	PR fortran/92898
	* check.c (gfc_check_is_contiguous): Simplify check to handle
	arbitrary NULL() argument.

	PR fortran/92898
	* gfortran.dg/pr92898.f90: New test.

From-SVN: r279315
2019-12-12 20:46:03 +00:00
Claudiu Zissulescu
555e4a0539 [ARC] Enable using DCMPF for hard float comparisons (backports)
From-SVN: r279275
2019-12-12 10:31:56 +01:00
GCC Administrator
a747ba6c36 Daily bump.
From-SVN: r279269
2019-12-12 00:16:17 +00:00
Steven G. Kargl
4ee5bc8d52 re PR fortran/92897 ([Coarray] ICE in gfc_set_array_spec, at fortran/array.c:864)
2019-12-11 Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/92897
	* array.c (gfc_set_array_spec):  Remove invalid assert() triggered
	by invalid Fortran code.
 
2019-12-11 Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/92897
	* gfortran.dg/pr92897.f90: New test.

From-SVN: r279249
2019-12-11 20:18:17 +00:00
Thomas Schwinge
d2174a8554 [OpenACC, libgomp] Initialize 'dynamic_refcount' whenever we initialize 'refcount'
Cases missed in r261813 "Update OpenACC data clause semantics to the 2.5
behavior".

	libgomp/
	* target.c (gomp_load_image_to_device, omp_target_associate_ptr):
	Initialize 'dynamic_refcount' whenever we initialize 'refcount'.

Backport trunk r279230.

Co-Authored-By: Julian Brown <julian@codesourcery.com>

From-SVN: r279238
2019-12-11 17:51:31 +01:00
Jonathan Wakely
0a0a04b446 libstdc++: Fix whitepace in changelog
From-SVN: r279224
2019-12-11 13:46:02 +00:00
Jonathan Wakely
5765ed7aaa PR libstdc++/91786 fix compilation error with Clang
Backport from mainline
2019-11-25  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/91786
	* include/bits/fs_path.h (filesystem_error): Move definition before
	the use in u8path.

From-SVN: r279223
2019-12-11 13:45:56 +00:00
Tobias Burnus
a317399178 libgomp – spelling fixes, incl. omp_lib.h.in
Backported from mainline
        2019-12-11  Tobias Burnus  <tobias@codesourcery.com>

        * omp_lib.h.in: Fix spelling of function declaration
        omp_get_cancell(l)ation.

From-SVN: r279221
2019-12-11 14:36:02 +01:00
Thomas Rodgers
2f2585ed25 Restore enable_if lost during original import of pstl
* include/pstl/glue_numeric_defs.h: Restore enable_if lost during original
	import of pstl.
	* include/pstl/glue_numeric_impl.h: Likewise.

From-SVN: r279213
2019-12-11 03:38:53 +00:00
GCC Administrator
8a0fd542b7 Daily bump.
From-SVN: r279209
2019-12-11 00:16:15 +00:00
Kewen Lin
fdfcc35d8a [PATCH] Fix PR91790 by considering different first_stmt_info for realign
As PR91790 exposed, when we have one slp node whose first_stmt_info_for_drptr
is different from first_stmt_info, it's possible that the first_stmt DR isn't
initialized yet before stmt SLP_TREE_SCALAR_STMTS[0] of slp node. So we
shouldn't use first_stmt_info for vect_setup_realignment, instead we can use
the one based on first_stmt_info_for_drptr DR with additional adjustment by
bumping the distance from first_stmt DR.

2019-12-10  Kewen Lin  <linkw@gcc.gnu.org>

  Backport from mainline
  2019-11-27  Kewen Lin  <linkw@gcc.gnu.org>

  PR tree-optimization/91790
  * gcc/tree-vect-stmts.c (vectorizable_load): Use the adjusted DR for
  vect_setup_realignment when first_stmt_info is different from
  first_stmt_info_for_drptr.

From-SVN: r279166
2019-12-10 12:54:21 +00:00
GCC Administrator
92df45de27 Daily bump.
From-SVN: r279149
2019-12-10 00:16:08 +00:00
Eric Botcazou
5348038186 tree.c (build_array_type_1): Add SET_CANONICAL parameter and compute TYPE_CANONICAL from the element type...
* tree.c (build_array_type_1): Add SET_CANONICAL parameter and compute
	TYPE_CANONICAL from the element type only if it is true.  Remove a few
	obsolete lines and adjust recursive call.
	(fld_process_array_type): Adjust call to build_array_type_1.
	(build_array_type): Likewise.
	(build_nonshared_array_type): Likewise.

From-SVN: r279134
2019-12-09 16:43:52 +00:00
Jonathan Wakely
591185df09 libstdc++: fix buffer overflow in path::operator+= (PR92853)
When concatenating a path ending in a root-directory onto another path,
we added an empty filename to the end of the path twice, but only
reserved space for one. That meant the second write went past the end of
the allocated buffer.

	PR libstdc++/92853
	* src/c++17/fs_path.cc (filesystem::path::operator+=(const path&)):
	Do not process a trailing directory separator twice.
	* testsuite/27_io/filesystem/path/concat/92853.cc: New test.
	* testsuite/27_io/filesystem/path/concat/path.cc: Test more cases.
	* testsuite/27_io/filesystem/path/concat/strings.cc: Test more cases.

From-SVN: r279115
2019-12-09 11:16:29 +00:00
GCC Administrator
56588b1de5 Daily bump.
From-SVN: r279103
2019-12-09 00:16:09 +00:00
GCC Administrator
282d6eaca4 Daily bump.
From-SVN: r279083
2019-12-08 00:16:17 +00:00
GCC Administrator
76740e6586 Daily bump.
From-SVN: r279071
2019-12-07 00:16:15 +00:00
GCC Administrator
2ffdbc52b6 Daily bump.
From-SVN: r279027
2019-12-06 00:16:39 +00:00
GCC Administrator
e0d96e9bdb Daily bump.
From-SVN: r278979
2019-12-05 00:16:33 +00:00
GCC Administrator
10ab67a6bb Daily bump.
From-SVN: r278953
2019-12-04 00:16:36 +00:00
Sandra Loosemore
0684d63788 Fix bugs relating to flexibly-sized objects in nios2 backend.
2019-12-02  Sandra Loosemore  <sandra@codesourcery.com>

	Fix bugs relating to flexibly-sized objects in nios2 backend.
	
	PR target/92499

	gcc/c/
	* c-decl.c (flexible_array_type_p): Move to common code.

	gcc/
	* config/nios2/nios2.c (nios2_in_small_data_p): Do not consider
	objects of flexible types to be small if they have internal linkage
	or are declared extern.
	* config/nios2/nios2.h (ASM_OUTPUT_ALIGNED_LOCAL): Replace with...
	(ASM_OUTPUT_ALIGNED_DECL_LOCAL): ...this.  Use targetm.in_small_data_p
	instead of the size of the object initializer.
	* tree.c (flexible_array_type_p): Move from C front end, and
	generalize to handle fields in non-C structures.
	* tree.h (flexible_array_type_p): Declare.

	gcc/testsuite/
	* gcc.target/nios2/pr92499-1.c: New.
	* gcc.target/nios2/pr92499-2.c: New.
	* gcc.target/nios2/pr92499-3.c: New.

From-SVN: r278919
2019-12-02 21:44:41 -05:00
GCC Administrator
518db23288 Daily bump.
From-SVN: r278914
2019-12-03 00:16:08 +00:00
Li Jia He
417111c754 [rs6000]Fix PR92098 by backporting vec_cmp and vcond_mask supports to gcc-9-branch
As PR92132 added vec_cmp_* and vcond_mask_* supports on trunk.  This is a
partial backport of vec_{cmp,cmpu}<mode><mode> interface and related expand
to gcc-9-branch to fix PR92098.

gcc/ChangeLog

2019-12-02  Li Jia He  <helijia@linux.ibm.com>

	Partial backport from mainline
	PR target/92098
	2019-11-08  Kewen Lin  <linkw@gcc.gnu.org>

	PR target/92132
	* config/rs6000/predicates.md
	(signed_or_equality_comparison_operator): New predicate.
	(unsigned_or_equality_comparison_operator): Likewise.
	* config/rs6000/rs6000.md (one_cmpl<mode>2): Remove expand.
	(one_cmpl<mode>3_internal): Rename to one_cmpl<mode>2.
	* config/rs6000/vector.md
	(vcond_mask_<mode><mode> for VEC_I and VEC_I): New expand.
	(vec_cmp<mode><mode> for VEC_I and VEC_I): Likewise.
	(vec_cmpu<mode><mode> for VEC_I and VEC_I): Likewise.

gcc/testsuite/ChangeLog

2019-12-02  Li Jia He  <helijia@linux.ibm.com>

	Partial backport from trunk
	PR target/92098
	2019-11-08  Kewen Lin  <linkw@gcc.gnu.org>

	PR target/92132
	* gcc.target/powerpc/pr92132-fp-1.c: New test.
	* gcc.target/powerpc/pr92132-fp-2.c: New test.

From-SVN: r278892
2019-12-02 06:23:56 +00:00
GCC Administrator
036ffad65d Daily bump.
From-SVN: r278888
2019-12-02 00:16:09 +00:00
GCC Administrator
49947e9ee5 Daily bump.
From-SVN: r278882
2019-12-01 00:16:21 +00:00