Commit Graph

153000 Commits

Author SHA1 Message Date
Dominik Vogt
03db9ab594 S/390: PR80080: Optimize atomic patterns.
The attached patch optimizes the atomic_exchange and atomic_compare
patterns on s390 and s390x (mostly limited to SImode and DImode).
Among general optimizaation, the changes fix most of the problems
reported in PR 80080:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80080

gcc/ChangeLog:

2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>

	PR target/80080
	* s390-protos.h (s390_expand_cs_hqi): Removed.
	(s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
	* config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
	modes as well as CCZ1mode and CCZmode.
	(s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
	signature of s390_emit_compare_and_swap.
	(s390_expand_cs_hqi): Likewise, make static.
	(s390_expand_cs_tdsi): Generate an explicit compare before trying
	compare-and-swap, in some cases.
	(s390_expand_cs): Wrapper function.
	(s390_expand_atomic_exchange_tdsi): New backend specific expander for
	atomic_exchange.
	(s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
	* config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
	patterns for small and large integers.  Forbid symref memory operands.
	Move expander to s390.c.  Require cc register.
	("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
	("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
	("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
	("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
	symref memory operands.  Remove CC mode and call s390_match_ccmode
	instead.
	("atomic_exchange<mode>"): Allow and implement all integer modes.

gcc/testsuite/ChangeLog:

2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>

	PR target/80080
	* gcc.target/s390/md/atomic_compare_exchange-1.c: New test.
	* gcc.target/s390/md/atomic_compare_exchange-1.inc: New test.
	* gcc.target/s390/md/atomic_exchange-1.inc: New test.

From-SVN: r247132
2017-04-25 07:37:50 +00:00
Dominik Vogt
97160c9b3b S/390: Load and test peephole.
gcc/ChangeLog:

2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>

	* config/s390/s390.md (define_peephole2): New peephole to help
	combining the load-and-test pattern with volatile memory.

From-SVN: r247131
2017-04-25 07:33:05 +00:00
Dominik Vogt
3ea685e75a S/390: Use load-on-condition in cstorecc4
gcc/ChangeLog:

2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>

	* config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
	with CCZmode for TARGET_Z196.

From-SVN: r247130
2017-04-25 07:31:22 +00:00
Jakub Jelinek
ba5d69f3f2 re PR rtl-optimization/80501 (Wrong code w/ a signed char, a shift, and a conversion to int)
PR rtl-optimization/80501
	* combine.c (make_compound_operation_int): Set subreg_code to SET
	even for AND with mask of the sign bit of mode.

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

From-SVN: r247128
2017-04-25 09:28:43 +02:00
Jakub Jelinek
3925946213 re PR rtl-optimization/80500 (ICE: internal consistency failure (error: invalid rtl sharing found in the insn))
PR rtl-optimization/80500
	* loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
	sum's initial value.

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

From-SVN: r247126
2017-04-25 09:27:01 +02:00
Julian Brown
904588d854 thunderx2t99.md (thunderx2t99_crc): New Reservation.
* config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.


Co-Authored-By: Naveen H.S <Naveen.Hurugalawadi@cavium.com>

From-SVN: r247125
2017-04-25 06:58:14 +00:00
Julian Brown
424d5df0bb thunderx2t99.md (thunderx2t99_aes): New Reservation.
* config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
	(thunderx2t99_sha): New Reservation.


Co-Authored-By: Naveen H.S <Naveen.Hurugalawadi@cavium.com>

From-SVN: r247124
2017-04-25 06:55:50 +00:00
Marc Glisse
bb0249cbb7 Let tree_single_nonzero_warnv_p use range information
2017-04-25  Marc Glisse  <marc.glisse@inria.fr>

gcc/
	* fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.

gcc/testsuite/
	* gcc.dg/tree-ssa/cmpmul-1.c: New file.
	* gcc.dg/Wstrict-overflow-18.c: Xfail.

From-SVN: r247123
2017-04-25 06:51:44 +00:00
Julian Brown
452e929aae aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix type for 1-element load.
* config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
	type for 1-element load.


Co-Authored-By: Naveen H.S <Naveen.Hurugalawadi@cavium.com>

From-SVN: r247122
2017-04-25 06:45:49 +00:00
GCC Administrator
e1bd42b9a1 Daily bump.
From-SVN: r247121
2017-04-25 00:16:22 +00:00
Janus Weil
be420eb811 re PR fortran/80121 (Memory leak with derived-type intent(out) argument)
2017-04-22  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/80121
	* gfortran.dg/intent_out_9.f90: Remove deprecated cleanup-tree-dump
	directive.

From-SVN: r247115
2017-04-24 22:44:14 +02:00
Joseph Myers
c1c1c8ea6f Regenerate .pot files.
gcc/po:
	* gcc.pot: Regenerate.

libcpp/po:
	* cpplib.pot: Regenerate.

From-SVN: r247113
2017-04-24 21:37:39 +01:00
David Malcolm
0ebd1f00b8 types.rst (gccjit::type::get_const): Remove comment.
gcc_jit_type_get_aligned

gcc/jit/ChangeLog:
	* docs/cp/topics/types.rst (gccjit::type::get_const): Remove
	comment.
	(gccjit::type::get_aligned): Add.
	* docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
	* docs/topics/types.rst: Add gcc_jit_type_get_aligned.
	* docs/_build/texinfo/libgccjit.texi: Regenerate.
	* jit-playback.c (gcc::jit::playback::type::get_aligned): New
	method.
	* jit-playback.h (gcc::jit::playback::type::get_aligned): New
	method.
	* jit-recording.c: Within namespace gcc::jit::recording...
	(type::get_aligned): New method.
	(memento_of_get_aligned::replay_into): New method.
	(memento_of_get_aligned::make_debug_string): New method.
	(memento_of_get_aligned::write_reproducer): New method.
	* jit-recording.h: Within namespace gcc::jit::recording...
	(type::get_aligned): New method.
	(type::accepts_writes_from): Strip off qualifications from
	this when comparing pointer equality.
	(decorated_type): New subclass of type, subsuming the
	commonality between memento_of_get_const and
	memento_of_get_volatile.
	(memento_of_get_const): Make a subclass of decorated_type,
	rather than type.
	(memento_of_get_volatile): Likewise.
	(memento_of_get_aligned): Likewise.
	* libgccjit++.h: Within namespace gccjit...
	(type::get_const): New method.
	(type::get_aligned): New method.
	* libgccjit.c (gcc_jit_type_get_aligned): New function.
	* libgccjit.h (gcc_jit_type_get_aligned): New decl.
	* libgccjit.map (LIBGCCJIT_ABI_7): New
	(gcc_jit_type_get_aligned): Add.

gcc/testsuite/ChangeLog:
	* jit.dg/all-non-failing-tests.h: Add test-alignment.c.
	* jit.dg/test-alignment.c: New test case.
	* jit.dg/test-alignment.cc: New test case.
	* jit.dg/test-error-gcc_jit_type_get_aligned-non-power-of-two.c:
	New test case.

From-SVN: r247111
2017-04-24 20:33:04 +00:00
Volker Reichelt
761ad35c86 decl.c (grokdeclarator): Use %qT instead of %<%T%> in
* decl.c (grokdeclarator): Use %qT instead of %<%T%> in
        * diagnostics.
        (start_enum): Likewise.
        (build_enumerator): Likewise. Use %qE instead of plain %E.
        * parser.c (cp_parser_mem_initializer_list): Use %qD instead of
        %<%D%> in diagnostics.
        (cp_parser_elaborated_type_specifier): Likewise.
        * pt.c (make_pack_expansion): Use %qT and %qE instead of
        %<%T%> and %<%E%> in diagnostics.
        (tsubst_pack_expansion): Likewise.

From-SVN: r247110
2017-04-24 20:30:29 +00:00
David Malcolm
412f61f0f6 Fix location of sizeof/alignof (PR c++/80016)
PR c++/80016 reports an issue with bizarre underlined range
for a complicated expression.

The root cause for the incorrect *starting* location of that range
is that alignof and sizeof expressions currently have
start == finish == caret at the opening parenthesis of the
expression.

This patch fixes this by generating appropriate start and finish
locations for alignof and sizeof expressions.

gcc/cp/ChangeLog:
	PR c++/80016
	* parser.c (cp_parser_unary_expression):  Generate a location
	range for alignof and sizeof expressions.

gcc/testsuite/ChangeLog:
	PR c++/80016
	* g++.dg/plugin/diagnostic-test-expressions-1.C (test_sizeof): New
	test function.
	(test_alignof): New test function.

From-SVN: r247108
2017-04-24 19:12:52 +00:00
Marc Glisse
a8492d5ec1 X /[ex] 4 < Y /[ex] 4
2017-04-24  Marc Glisse  <marc.glisse@inria.fr>

gcc/
	* match.pd (X/[ex]C CMP Y/[ex]C): New transformation.

gcc/testsuite/
	* gcc.dg/tree-ssa/cmpexactdiv-2.c: New file.

From-SVN: r247107
2017-04-24 19:04:25 +00:00
Volker Reichelt
ec856f5f8b parser.c (cp_parser_cv_qualifier_seq_opt): Add fix-it info to error message.
* parser.c (cp_parser_cv_qualifier_seq_opt): Add fix-it info to
        error message.
        (cp_parser_virt_specifier_seq_opt): Likewise.
        (set_and_check_decl_spec_loc): Likewise twice.

        * g++.dg/diagnostic/duplicate1.C: New test.
        * g++.dg/cpp0x/duplicate1.C: New test.

From-SVN: r247105
2017-04-24 16:43:01 +00:00
Martin Jambor
a753df11b8 [PR 80293] Dont totally-scalarize char arrays
2017-04-24  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/80293
	* tree-sra.c (scalarizable_type_p): New parameter const_decl, make
	char arrays not totally scalarizable if it is false.
	(analyze_all_variable_accesses): Pass correct value in the new
	parameter.  Add a statistics counter.

testsuite/
	* g++.dg/tree-ssa/pr80293.C: New test.

From-SVN: r247104
2017-04-24 17:13:39 +02:00
Jonathan Wakely
957221f551 PR libstdc++/80506 fix constant used in condition
PR libstdc++/80506
	* include/bits/random.tcc (gamma_distribution::operator()): Fix magic
	number used in loop condition.

From-SVN: r247099
2017-04-24 14:43:19 +01:00
Martin Liska
3ebd8e620b Fix (PR middle-end/79931)
2017-04-24  Jan Hubicka  <hubicka@ucw.cz>

	PR middle-end/79931
	* ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
2017-04-24  Martin Liska  <mliska@suse.cz>

	PR middle-end/79931
	* g++.dg/ipa/pr79931.C: New test.

From-SVN: r247097
2017-04-24 13:16:34 +00:00
Richard Biener
f30a1190ff re PR fortran/80494 (ICE in wide_int_to_tree)
2017-04-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80494
	* tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail
	out for complex types.

	* gfortran.dg/pr80494.f90: New testcase.

From-SVN: r247095
2017-04-24 11:57:53 +00:00
Jonathan Wakely
6e2e575a03 PR libstdc++/80504 qualify calls to avoid ADL
PR libstdc++/80504
	* include/bits/refwrap.h (ref, cref): Qualify calls.
	* testsuite/20_util/reference_wrapper/80504.cc: New test.

From-SVN: r247094
2017-04-24 12:40:07 +01:00
Jonathan Wakely
71f257f78e PR libstdc++/80493 fix invalid exception specification
PR libstdc++/80493
	* include/experimental/optional (optional::swap): Fix exception
	specification.

From-SVN: r247093
2017-04-24 12:40:02 +01:00
Richard Biener
24c40f9a2c tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
2017-04-24  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
	* tree-ssa-sccvn.c (print_scc): Print SCC size.
	(extract_and_process_scc_for_name): Never fail but drop SCC to varying.
	(DFS): Adjust and never fail.
	(sccvn_dom_walker::fail): Remove.
	(sccvn_dom_walker::before_dom_children): Adjust.
	(run_scc_vn): Likewise and never fail.
	* tree-ssa-pre.c (pass_pre::execute): Adjust.
	(pass_fre::execute): Likewise.

From-SVN: r247092
2017-04-24 11:27:44 +00:00
Richard Biener
4c7c437cb1 re PR tree-optimization/79725 (Sinking opportunity missed if blocked by dead stmt)
2017-04-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79725
	* tree-ssa-sink.c (statement_sink_location): Return whether
	failure reason was zero uses.  Move that check later.
	(sink_code_in_bb): Deal with zero uses by removing the stmt
	if possible.

	* gcc.dg/tree-ssa/ssa-sink-15.c: New testcase.

From-SVN: r247091
2017-04-24 07:48:47 +00:00
Richard Biener
d21a8e3bc6 re PR c++/2972 (-Wuninitialized could warn about uninitialized member variable usage in constructors)
2017-04-24  Richard Biener  <rguenther@suse.de>

	PR c++/2972
	* tree-ssa-uninit.c (warn_uninitialized_vars): Handle some
	pointer-based references.

	* g++.dg/warn/Wuninitialized-10.C: New testcase.

From-SVN: r247090
2017-04-24 07:34:51 +00:00
Richard Biener
3c5b0ca4c5 re PR bootstrap/79814 (pass-instances.def:36:14: error: ‘*<unknown>.gcc::pass_manager::pass_warn_unused_result_1’ is used uninitialized in this function)
2017-04-24  Richard Biener  <rguenther@suse.de>

	PR bootstrap/79814
	* pass_manager.h (pass_manager::operator new): Remove.
	(pass_manager::operator delete): Likewise.
	* passes.c (pass_manager::operator new): Remove.
	(pass_manager::operator delete): Likewise.
	(pass_manager::pass_manager): Zero individual pass members.

From-SVN: r247089
2017-04-24 07:33:20 +00:00
GCC Administrator
6382992791 Daily bump.
From-SVN: r247088
2017-04-24 00:16:25 +00:00
Jerry DeLisle
c7eb642efa re PR fortran/80484 (Three syntax errors involving derived-type I/O)
2017-04-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/80484
	* io.c (format_lex): Check for '/' and set token to FMT_SLASH.
	(check_format): Move FMT_DT checking code to data_desc section.
	* module.c (gfc_match_use): Include the case of INTERFACE_DTIO.

	PR fortran/80484
	* gfortran.dg/dtio_29.f03: New test.

From-SVN: r247084
2017-04-23 15:49:16 +00:00
Janus Weil
60fc41bd41 re PR fortran/80121 (Memory leak with derived-type intent(out) argument)
2017-04-22  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/80121
	* trans-types.c (gfc_conv_procedure_call): Deallocate the components
	of allocatable intent(out) arguments.

2017-04-22  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/80121
	* gfortran.dg/intent_out_9.f90: New test case.

From-SVN: r247083
2017-04-23 10:26:50 +02:00
Uros Bizjak
2eb8a34363 re PR target/70799 (STV pass does not convert DImode shifts)
PR target/70799
	* config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
	<case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
	Check "XEXP (src, 1)" operand here.
	<case PLUS, case MINUS, case IOR, case XOR, case AND>:
	Check "XEXP (src, 1)" operand here.
	(dimode_scalar_chain::make_vector_copies): Detect count register
	of a shift instruction.  Zero extend count register from QImode
	to DImode to satisfy vector shift pattern count operand predicate.
	Substitute vector shift count operand with a DImode copy.
	(dimode_scalar_chain::convert_reg): Ditto, zero-extend from
	vector register.

testsuite/ChangeLog:

	PR target/70799
	* gcc.target/i186/pr70799-4.c: New test.

From-SVN: r247082
2017-04-23 09:25:30 +02:00
GCC Administrator
a1687c59a1 Daily bump.
From-SVN: r247081
2017-04-23 00:16:28 +00:00
GCC Administrator
78e0561028 Daily bump.
From-SVN: r247075
2017-04-22 00:16:26 +00:00
Janus Weil
fc23d35a75 re PR fortran/80392 ([OOP] ICE with allocatable polymorphic function result in a procedure pointer component)
2017-04-21  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/80392
	* trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
	building a derived type that includes a procedure pointer component
	with a polymorphic result.

2017-04-21  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/80392
	* gfortran.dg/proc_ptr_comp_49.f90: New test case.

From-SVN: r247069
2017-04-21 22:47:12 +02:00
Jason Merrill
176e79b51e PR c++/80179 - ICE with initialized flexible array member.
* constexpr.c (verify_ctor_sanity): Handle flexible array members.

From-SVN: r247067
2017-04-21 15:26:54 -04:00
Uros Bizjak
f2f3e54dec i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
* config/i386/i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
	Remove UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
	(*insvqi_1_mem_rex64): Move above insv<mode>_1.  Remove
	UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
	(UNSPEC_NOREX_MEM): Remove definition.

From-SVN: r247066
2017-04-21 21:17:48 +02:00
Uros Bizjak
7b9efd0304 pr79804.c: Add additional dg-error directive.
* gcc.target/i386/pr79804.c: Add additional dg-error directive.

From-SVN: r247065
2017-04-21 21:09:27 +02:00
Jonathan Wakely
946ecd6ab2 PR libstdc++/80316 make promise::set_value throw no_state error
PR libstdc++/80316
	* include/std/future (_State_baseV2::_Setter::operator()): Remove
	_S_check calls that are done after the pointer to the shared state is
	already dereferenced.
	(_State_baseV2::_Setter<_Res, void>): Define specialization for void
	as partial specialization so it can be defined within the definition
	of _State_baseV2.
	(_State_baseV2::__setter): Call _S_check.
	(_State_baseV2::__setter(promise<void>*)): Add overload for use by
	promise<void>::set_value and promise<void>::set_value_at_thread_exit.
	(promise<T>, promise<T&>, promise<void>): Make _State a friend.
	(_State_baseV2::_Setter<void, void>): Remove explicit specialization.
	(promise<void>::set_value, promise<void>::set_value_at_thread_exit):
	Use new __setter overload.
	* testsuite/30_threads/promise/members/at_thread_exit2.cc: New test.
	* testsuite/30_threads/promise/members/set_exception.cc: Test
	promise<T&> and promise<void> specializations.
	* testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
	Test for no_state error condition.
	* testsuite/30_threads/promise/members/set_value2.cc: Likewise.

From-SVN: r247064
2017-04-21 15:49:19 +01:00
Jonathan Wakely
a2c0a1942c Avoid deprecated warnings about std::auto_ptr in library headers
* include/backward/auto_ptr.h: Ignore deprecated warnings from use
	of auto_ptr.
	* include/bits/shared_ptr.h: Likewise.
	* include/bits/shared_ptr_base.h: Likewise.
	* include/bits/unique_ptr.h: Likewise.
	* libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc: Adjust
	dg-error lineno.
	* libstdc++-v3/testsuite/20_util/default_delete/void_neg.cc: Likewise.
	* libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635_neg.cc:
	Likewise.
	* libstdc++-v3/testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc:
	Likewise.

From-SVN: r247063
2017-04-21 14:08:51 +01:00
Richard Biener
2fd30fbe0d re PR tree-optimization/79547 (duplicate strlen calls with same argument not folded)
2017-04-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79547
	* tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
	Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp,
	bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p
	without any constraints.

	* gcc.dg/tree-ssa/strlen-2.c: New testcase.

From-SVN: r247062
2017-04-21 12:47:02 +00:00
Richard Biener
bb1bc604a8 re PR tree-optimization/78847 (pointer arithmetic from c++ ranged-based for loop not optimized)
2017-04-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/78847
	* fold-const.c (split_tree): Handle POINTER_PLUS_EXPR.

	* g++.dg/tree-ssa/pr78847.C: New testcase.

From-SVN: r247061
2017-04-21 12:09:20 +00:00
Joseph Myers
e1478a0ee9 * es.po, fr.po: Update.
From-SVN: r247059
2017-04-21 11:37:43 +01:00
Mark Wielaard
6b086d35b7 libiberty: Limit demangler maximum d_print_comp recursion call depth.
The fix for PR demangler/70909 and 67264 (endless demangler recursion)
catches when a demangle_component is printed in a cycle. But that doesn't
protect the call stack blowing up from non-cyclic nested types printed
recursively through d_print_comp. This can happen by a (very) long mangled
string that simply creates a very deep pointer or qualifier chain. Limit
the recursive d_print_comp call depth for a d_print_info to 1K nested
types.

libiberty/ChangeLog:

        * cp-demangle.c (MAX_RECURSION_COUNT): New constant.
        (struct d_print_info): Add recursion field.
        (d_print_init): Initialize recursion.
        (d_print_comp): Check and update d_print_info recursion depth.

From-SVN: r247056
2017-04-21 09:02:03 +00:00
Mark Wielaard
13b6ef76dc libiberty: Always return NULL if d_add_substitution fails.
d_add_substitution can fail for various reasons, like when the subs array
is full. If d_add_substitution fails d_substitution should return NULL
early and not try to continue. Every other call of d_add_substitution
is handled in the same way.

libiberty/ChangeLog:

	* cp-demangle.c (d_substitution): Return NULL if d_add_substitution
	fails.

From-SVN: r247055
2017-04-21 09:01:56 +00:00
Mark Wielaard
1240212c6b libiberty: Don't update and remove did_subs field from demangler structs.
The d_info field did_subs was used for estimating the string output
size. It was no longer used when the malloc-less callback interface
was introduced in 2007 (svn r121305). But the field was still updated.
When backtracking was introduced in 2013 (svn r205292) did_subs was
also added to the d_info_checkpoint struct. But except for updating
the field it was still not used.

Since it is never used just stop updating the field and remove it
from the two structs.

libiberty/ChangeLog:

	* cp-demangle.h (struct d_info): Remove did_subs field.
	* cp-demangle.c (struct d_info_checkpoint): Likewise.
	(d_template_param): Don't update did_subs.
	(d_substitution): Likewise.
	(d_checkpoint): Don't assign did_subs.
	(d_backtrack): Likewise.
	(cplus_demangle_init_info): Don't initialize did_subs.

From-SVN: r247054
2017-04-21 09:01:44 +00:00
Richard Biener
ad32f0675e tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
2017-04-21  Richard Biener  <rguenther@suse.de>

	* tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
	(build_distinct_type_copy): Likewise.
	(build_variant_type_copy): Likewise.
	* tree.c (build_qualified_type): Pass down mem-stat info.
	(build_distinct_type_copy): Likewise.
	(build_variant_type_copy): Likewise.

	cp/
	* cp-tree.h (copy_decl): Annotate with CXX_MEM_STAT_INFO.
	(copy_type): Likewise.
	* lex.c (copy_decl): Pass down mem-stat info.
	(copy_type): Likewise.

From-SVN: r247053
2017-04-21 08:58:39 +00:00
Jakub Jelinek
666f7903e0 re PR c/80468 (ICE on invalid AVX512 code with -m32)
PR c/80468
	* c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
	enabled, set specs->type to integer_type_node.

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

From-SVN: r247052
2017-04-21 10:51:53 +02:00
Martin Liska
25c28f47f8 Add test-case (PR tree-optimization/66278).
2017-04-21  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/66278
	* gcc.dg/vect/pr66278.c: New test.

From-SVN: r247051
2017-04-21 08:50:19 +00:00
Richard Biener
6d553e9bc9 re PR tree-optimization/80237 (float to double conversion is not optimized away)
2017-04-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80237
	* tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
	defaulted to NULL.
	(phi_translate_1): Also allow a leader in AVAIL_OUT of pred
	for a simplified result.

	* gcc.dg/tree-ssa/tailcall-9.c: New testcase.
	* gcc.dg/tree-ssa/ldist-pr45948.c: Remove undefined behavior,
	adjust expected optimizations.

From-SVN: r247049
2017-04-21 08:17:23 +00:00
Richard Biener
7fd1a7474a tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require sth as strict as a simple_iv but a chrec without symbols and an...
2016-04-21  Richard Biener  <rguenther@suse.de>

	* tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
	sth as strict as a simple_iv but a chrec without symbols and an
	operand defined in the loop we are peeling (and not some subloop).
	(propagate_constants_for_unrolling): Propagate all constants.

	* gcc.dg/vect/no-scevccp-outer-13.c: Adjust to prevent unrolling
	of inner loops.
	* gcc.dg/vect/no-scevccp-outer-7.c: Likewise.
	* gcc.dg/vect/vect-104.c: Likewise.

From-SVN: r247048
2017-04-21 08:12:27 +00:00