Commit Graph

159973 Commits

Author SHA1 Message Date
Marek Polacek
019e0ae8e0 re PR c++/84192 (ICE with statement expression)
PR c++/84192
	* constexpr.c (cxx_eval_constant_expression) <case RETURN_EXPR>: Don't
	set *jump_target to anything if jump_target is NULL.

	* g++.dg/cpp1y/constexpr-84192.C: New test.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r257770
2018-02-16 23:38:53 +01:00
Martin Sebor
28f247e6e0 re PR c++/79064 (Cannot overload member function templates on type of literal)
gcc/testsuite/ChangeLog:

	PR c++/79064
	* g++.dg/overload15.C: New test.

From-SVN: r257769
2018-02-16 15:36:53 -07:00
Jason Merrill
18afe4c9fc PR c++/84151 - unnecessary volatile load with static member.
* call.c (build_new_method_call_1): Avoid loading from a volatile
	lvalue used as the object argument for a static member function.

From-SVN: r257763
2018-02-16 16:03:02 -05:00
Jason Merrill
3664e317b8 PR c++/81853 - using-directive and constexpr.
* constexpr.c (cxx_eval_constant_expression): Handle USING_STMT.

From-SVN: r257762
2018-02-16 16:02:55 -05:00
Jason Merrill
6f58bc5825 PR c++/84420 - ICE with structured binding in lambda.
* lambda.c (is_capture_proxy): Check DECL_DECOMPOSITION_P.

From-SVN: r257761
2018-02-16 16:02:50 -05:00
Yury Gribov
e1617c1d38 Fix PowerPC tests in PR 81535.
gcc/testsuite/

2018-02-16  Yury Gribov  <tetra2005@gmail.com>

	PR target/81535
	* gcc.dg/pr56727-1.c: Prevent tailcalls and update for powerpc*-*-*.
	* gcc.dg/pr56727-2.c: Ditto.
	* gcc.target/powerpc/pr79439.c: Renamed to...
	* gcc.target/powerpc/pr79439-1.c: ...this.
	* gcc.target/powerpc/pr79439-2.c: New test.
	* gcc.target/powerpc/pr79439-3.c: New test.

From-SVN: r257760
2018-02-16 20:38:14 +00:00
Will Schmidt
023e7b5526 builtins-3-p8.c: Update stanzas.
[testsuite]
2018-02-16  Will Schmidt  <will_schmidt@vnet.ibm.com>

	target/pr84371
	* gcc.target/powerpc/builtins-3-p8.c: Update stanzas.
	* gcc.target/powerpc/builtins-3-p9.c: Update stanzas, Enhance test.
	* gcc.target/powerpc/builtins-3-runnable.c: Update stanzas.
	* gcc.target/powerpc/builtins-3-vec_reve_runnable.c: Same.
	* gcc.target/powerpc/builtins-3.c: Same.

From-SVN: r257758
2018-02-16 20:33:09 +00:00
Jason Merrill
b76f3abcd6 PR c++/83835 - C++17 error with constructor ctors.
* call.c (build_special_member_call): Set TARGET_EXPR_DIRECT_INIT_P.

From-SVN: r257757
2018-02-16 15:05:28 -05:00
Nathan Sidwell
f7f77b9d7e [C++ PATCH] Deprecate -ffriend-injection
https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01022.html
	* g++.old-deja/g++.jason/scoping15.C: Fix dg-warning.

From-SVN: r257756
2018-02-16 19:33:18 +00:00
Nathan Sidwell
5b2b92c563 [C++ PATCH] Deprecate -ffriend-injection
https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01020.html
	* doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.

From-SVN: r257755
2018-02-16 19:08:07 +00:00
Jason Merrill
aaec81f10f PR c++/82664 - ICE with reference to function template parm.
* pt.c (convert_nontype_argument_function): Avoid obfuscationg
	NOP_EXPRs.

From-SVN: r257753
2018-02-16 14:06:34 -05:00
Carl Love
dec5af9f2b rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
gcc/ChangeLog:

2018-02-16  Carl Love  <cel@us.ibm.com>

	* config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
	Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
	from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
	* config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
	expansion to P8V_BUILTIN_VEC_FLOAT2.

From-SVN: r257752
2018-02-16 18:36:55 +00:00
Vladimir Makarov
16ba97b9eb re PR rtl-optimization/70023 (ICE: in assign_by_spills, at lra-assigns.c:1417/8 with -fschedule-insns)
2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70023
	* lra-constraints.c (inherit_in_ebb): Take hard reg mode of
	src_regno into account.

2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70023
	* gcc.target/i386/pr70023.c: New.

From-SVN: r257751
2018-02-16 18:17:09 +00:00
Dominique d'Humieres
71a21b9eac re PR fortran/84354 (Replace '%qs' with %qs in fortran/decl.c)
2018-02-16  Dominique d'Humieres <dominiq@gcc.gnu.org>

	PR fortran/84354
	* decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.

From-SVN: r257750
2018-02-16 19:01:02 +01:00
Carl Love
8e7f98dff6 altivec.h: Remove vec_vextract4b and vec_vinsert4b.
gcc/ChangeLog:

2018-02-16  Carl Love  <cel@us.ibm.com>

	* config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
	* config/rs6000/rs6000-builtin.def: Remove macro expansion for
	VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
	* config/rs6000/rs6000.c: Remove case statements for
	P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
	P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
	and P9V_BUILTIN_VEC_VINSERT4B.
	* config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
	P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
	* config/rs6000/vsx.md:
	* doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
	vec_insert4b.

gcc/testsuite/ChangeLog:

2018-02-16  Carl Love  <cel@us.ibm.com>

	* gcc.target/powerpc/p9-vinsert4b-1.c: Remove test file for non-ABI
	tests.
	* gcc.target/powerpc/p9-vinsert4b-2.c: Remove test file for non-ABI
	tests.

From-SVN: r257748
2018-02-16 17:35:13 +00:00
Carl Love
b8bf56035d altivec.h: Add builtin names vec_extract4b vec_insert4b.
gcc/ChangeLog:

2018-02-16  Carl Love  <cel@us.ibm.com>

	* config/rs6000/altivec.h: Add builtin names vec_extract4b
	vec_insert4b.
	* config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
	definitions.
	* config/rs6000/rs6000-c.c: Add the definitions for
	P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
	* config/rs6000/rs6000.c (altivec_expand_builtin): Add
	P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
	* config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
	definition for insert4b and define insn *insert3b_internal.
	* doc/extend.texi: Add documentation for vec_extract4b.

gcc/testsuite/ChangeLog:

2018-02-16  Carl Love  <cel@us.ibm.com>
	* gcc.target/powerpc/builtins-7-p9-runnable.c: New runnable test file
	for the ABI definitions for vec_extract4b and vec_insert4b.

From-SVN: r257747
2018-02-16 17:30:45 +00:00
Jason Merrill
280fa93e66 PR c++/82764 - C++17 ICE with empty base
* class.c (build_base_field_1): Set DECL_SIZE to zero for empty
	base.

From-SVN: r257745
2018-02-16 11:44:26 -05:00
Jason Merrill
9dc20710e8 PR c++/84421 - type-dependent if constexpr
* semantics.c (finish_if_stmt_cond): Check
	type_dependent_expression_p.

From-SVN: r257744
2018-02-16 11:44:17 -05:00
Ian Lance Taylor
c3ab26e8bb runtime: add some more preemption checks
In particular this lets BenchmarkPingPongHog in runtime/proc_test.go
    complete.
    
    Reviewed-on: https://go-review.googlesource.com/94735

From-SVN: r257743
2018-02-16 16:42:53 +00:00
Nathan Sidwell
3943b16134 [C++ PATCH] Deprecate -ffriend-injection
https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00998.html
	Deprecate -ffriend-injection.
	* decl.c (cxx_init_decl_processing): Emit warning on option.
	* name-lookup.c (do_pushdecl): Emit warning if we push a visible
	friend.

	* doc/extend.texi (Backwards Compatibility): Mention friend
	injection.  Note for-scope is deprecated.
	* doc/invoke.texi (-ffriend-injection): Deprecate.

	* g++.old-deja/g++.jason/scoping15.C: Expect warnings.
	* g++.old-deja/g++.mike/net43.C: Likewise.

From-SVN: r257742
2018-02-16 16:21:36 +00:00
Paolo Carlini
d65da12f2b re PR c++/82468 (ICE with deduction guide template)
/cp
2018-02-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/82468
	* decl.c (check_special_function_return_type): Reject template
	template parameter in deduction guide.

/testsuite
2018-02-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/82468
	* g++.dg/cpp1z/class-deduction48.C: New.

From-SVN: r257740
2018-02-16 15:34:58 +00:00
Nathan Sidwell
b1a7e33d67 [PR c++/84375] Fix ICE after bad friend
https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00987.html
	PR c++/84375
	* name-lookup.c (do_pushdecl): Bail out on bad local friend injection.

	* g++.dg/lookup/pr84375.C: New.

From-SVN: r257739
2018-02-16 14:30:55 +00:00
Segher Boessenkool
08223f7633 combine: Fix problem with RTL checking
As Jakub found, after my recent combine patch at least on x86 problems
show up with RTL checking enabled.  This is because the I2 generated
by a successful instruction combination can write not only a register
but it can also write a paradoxical subreg of one.

This fixes it.


	* combine.c (try_combine): When adjusting LOG_LINKS for the destination
	that moved to I2, also allow destinations that are a paradoxical
	subreg (instead of a normal reg).

From-SVN: r257736
2018-02-16 15:03:17 +01:00
Oleg Endo
d960ab7b8d re PR target/83831 ([RX] Unused bclr,bnot,bset insns)
gcc/
	PR target/83831
	* config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
	to QImode.

gcc/testsuite/
	PR target/83831
	* gcc.target/rx/pr83831.c (test_3, test_6): Adjust test cases.

From-SVN: r257735
2018-02-16 13:52:49 +00:00
Richard Biener
be77ba2a46 re PR tree-optimization/84037 (Speed regression of polyhedron benchmark since r256644)
2018-02-16  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/84037
	PR tree-optimization/84016
	PR target/82862
	* config/i386/i386.c (ix86_builtin_vectorization_cost):
	Adjust vec_construct for the fact we need additional higher latency
	128bit inserts for AVX256 and AVX512 vector builds.
	(ix86_add_stmt_cost): Scale vector construction cost for
	elementwise loads.

From-SVN: r257734
2018-02-16 13:47:25 +00:00
Richard Biener
fe74f9b4ed re PR bootstrap/82939 (genmatch fills up terminal with endless printing of periods)
2018-02-16  Richard Biener  <rguenther@suse.de>

	PR bootstrap/82939
	* line-map.c (linemap_init): Avoid broken value-init when compiling
	with GCC 4.2.

From-SVN: r257732
2018-02-16 12:02:34 +00:00
Richard Biener
5c8cebe7d6 re PR tree-optimization/84417 (internal compiler error: verify_gimple failed)
2018-02-16  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/84417
	* tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
	the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
	(non_rewritable_lvalue_p): Likewise, use poly-ints.

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

From-SVN: r257731
2018-02-16 12:01:23 +00:00
Igor Tsimbalist
95df04335b Additional fix for PR 84239.
PR target/84239
	* libgcc/config/i386/shadow-stack-unwind.h (_Unwind_Frames_Extra):
	Include cetintrin.h not x86intrin.h.

From-SVN: r257730
2018-02-16 11:19:14 +01:00
Martin Liska
d80956bb05 Set proper internal functions fnspec (PR sanitizer/84307).
2018-02-16  Martin Liska  <mliska@suse.cz>

	PR sanitizer/84307
	* internal-fn.def (ASAN_CHECK): Set proper flags.
	(ASAN_MARK): Likewise.

From-SVN: r257729
2018-02-16 10:03:47 +00:00
Julia Koval
59cf684812 Remove CLWB from Cannonlake.
gcc/
	* config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
	from PTA_CANNONLAKE.

From-SVN: r257728
2018-02-16 10:31:49 +01:00
Jakub Jelinek
1e6d3b10e3 re PR target/84272 (AddressSanitizer: heap-use-after-free ../../gcc/config/aarch64/cortex-a57-fma-steering.c:519 in fma_node::get_parity())
PR target/84272
	* config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
	Use ++iter rather than iter++ for std::list iterators.
	(func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
	defer deleting them until all nodes in the forest are processed.  Do
	free even leaf nodes.  Change to_process into auto_vec.

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

From-SVN: r257727
2018-02-16 10:26:27 +01:00
Jakub Jelinek
ab67039ccd re PR bootstrap/84405 (Fails to bootstrap with GCC 4.1.2, GCC 4.2.4)
PR bootstrap/84405
	* system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
	* vec.h (vec_default_construct): Use memset instead of placement new
	if BROKEN_VALUE_INITIALIZATION is defined.
	* hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
	memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
	is defined.

From-SVN: r257726
2018-02-16 10:05:35 +01:00
Jakub Jelinek
33006d53fd re PR rtl-optimization/83723 (ICE: in gen_rtx_SUBREG, at emit-rtl.c:1010)
PR rtl-optimization/83723
	* lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
	* lra.c (lra_substitute_pseudo): Likewise.  If true, use
	gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
	recursive calls.
	(lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
	callers.
	* lra-constraints.c (inherit_reload_reg, split_reg): Likewise.

	* gcc.dg/pr83723.c: New test.

From-SVN: r257725
2018-02-16 10:04:00 +01:00
Eric Botcazou
c9b34e397c re PR rtl-optimization/81443 (build/genrecog.o: virtual memory exhausted: Cannot allocate memory)
PR rtl-optimization/81443
	* rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
	from inner REGs to paradoxical SUBREGs.

From-SVN: r257724
2018-02-16 08:20:32 +00:00
Richard Biener
4cf55739fd re PR tree-optimization/84399 ([graphite] ICE in set_codegen_error, at graphite-isl-ast-to-gimple.c:206)
2018-02-16  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/84399
	* graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
	For operands we can analyze at their definition make sure we can
	analyze them at each use as well.

	* gcc.dg/graphite/pr84399.c: New testcase.

From-SVN: r257723
2018-02-16 08:16:17 +00:00
Richard Biener
bd74f4d876 re PR c/84190 (double arithmetic on x86 no longer rounds to nearest)
2018-02-16  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/84190
	* tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
	volatile accesses if the decl isn't volatile.

	* g++.dg/torture/pr84190.C: New testcase.

From-SVN: r257721
2018-02-16 07:56:16 +00:00
Jason Merrill
d78aecf472 PR c++/83227 - C++17 ICE with init-list derived-to-base conversion.
* call.c (convert_like_real): Don't use the copy-list-initialization
	shortcut for ck_base.

From-SVN: r257720
2018-02-15 21:47:19 -05:00
GCC Administrator
d8865b6ed8 Daily bump.
From-SVN: r257718
2018-02-16 00:16:35 +00:00
Martin Sebor
96b3132853 README (dg-lto-warning, [...]): Document new directives.
gcc/testsuite/ChangeLog:

	* gcc.dg/lto/README (dg-lto-warning, dg-lto-message): Document new
	directives.

From-SVN: r257714
2018-02-15 15:28:23 -07:00
Jason Merrill
dd39c7d1cb PR c++/84045 - ICE with typedef and noexcept.
* except.c (build_noexcept_spec): Use strip_typedefs_expr.

From-SVN: r257713
2018-02-15 17:01:33 -05:00
Janus Weil
f3ad8745b0 re PR fortran/84409 ([F03] check DTIO arguments for character len)
2018-02-15  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/84409
	* interface.c (check_dtio_arg_TKR_intent): Add a check for character
	length.


2018-02-15  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/84409
	* gfortran.dg/dtio_21.f03: Add an error message.
	* gfortran.dg/dtio_22.f90: Fix invalid test case.

From-SVN: r257711
2018-02-15 22:16:00 +01:00
Jonathan Wakely
51f174c0ef PR libstdc++/81797 Add .NOTPARALLEL to include/Makefile for darwin
PR libstdc++/81797
	* configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
	* configure: Regenerate.
	* include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
	defined.
	* include/Makefile.in: Regenerate.

From-SVN: r257710
2018-02-15 20:56:41 +00:00
Jason Merrill
117ad0be08 PR c++/84376 - ICE with omitted template arguments.
* pt.c (dguide_name_p): Check for IDENTIFIER_NODE.

From-SVN: r257706
2018-02-15 14:46:13 -05:00
Thomas Koenig
8908fa3a70 re PR fortran/84381 (replace non-std 'call abort' by 'stop 1' in gfortran testsuite)
2018-02-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/84381
	* gfortran.dg/stop_shouldfail.f90: New test.

From-SVN: r257703
2018-02-15 18:46:22 +00:00
Thomas Koenig
2b6bf87a20 2018-02-15 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/stop_shouldfail.f90: New test.

From-SVN: r257702
2018-02-15 18:41:02 +00:00
Jason Merrill
883dfe2aef * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
From-SVN: r257700
2018-02-15 13:16:05 -05:00
Jason Merrill
4912defbcc PR c++/84368 - wrong error with local variable in variadic lambda.
* pt.c (tsubst_pack_expansion): Fix handling of non-packs in
	local_specializations.

From-SVN: r257699
2018-02-15 13:15:32 -05:00
Paolo Carlini
4779063140 re PR c++/84330 ([concepts] ICE with broken constraint)
/cp
2018-02-15  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84330
	* constraint.cc (tsubst_constraint_info): Handle an error_mark_node
	as first argument.

/testsuite
2018-02-15  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84330
	* g++.dg/concepts/pr84330.C: New.

From-SVN: r257698
2018-02-15 18:05:40 +00:00
Jason Merrill
60887f8c2d PR preprocessor/83063 - __VA_OPT__ and ##
PR preprocessor/83708
	* macro.c (vaopt_state): Reorder m_last_was_paste before m_state.
	(vaopt_state::vaopt_state): Adjust.
	(vaopt_state::update_flags): Add BEGIN and END.
	(vaopt_state::update): Return them.
	(copy_paste_flag): Factor out of replace_args.
	(last_token_is): New.
	(replace_args): Handle BEGIN and END.  Avoid padding there.
	(tokens_buff_last_token_ptr): Return NULL if no tokens.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r257696
2018-02-15 12:43:01 -05:00
Jason Merrill
5cedffbc32 PR c++/84314 - ICE with templates and fastcall attribute.
* attribs.c (build_type_attribute_qual_variant): Don't clobber
	TYPE_CANONICAL on an existing type.

From-SVN: r257695
2018-02-15 11:54:12 -05:00