2017-05-01 Tom de Vries <tom@codesourcery.com>
PR testsuite/65941
* lib/target-supports.exp (check_effective_target_rdrand): New proc.
* g++.dg/other/pr59492.C: Require effective target rdrand.
From-SVN: r247438
libiberty/ChangeLog:
* d-demangle.c (dlang_identifier): Handle template constraint symbols.
(dlang_parse_template): Only advance if template symbol prefix is
followed by a digit.
* testsuite/d-demangle-expected: Add tests.
From-SVN: r247433
* tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
replacement expression is another instance of one of its arguments.
From-SVN: r247431
PR target/79430
* rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
check for stack push/pop autoinc.
* config/i386/i386.c (ix86_agi_dependent): Return false
if the only reason why modified_in_p returned true is that
addr is SP based and set_insn is a push or pop.
From-SVN: r247429
* gcc-interface/decl.c (components_to_record): Add more comments.
Put back pending fields onto the regular list if the misalignment
happens to cancel itself.
From-SVN: r247426
PR ipa/79224
* ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
(account_size_time): Use two predicates - exec_pred and
nonconst_pred_ptr.
(evaluate_conditions_for_known_args): Compute both clause and
nonspec_clause.
(evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
(inline_summary_t::duplicate): Update.
(estimate_function_body_sizes): Caluculate exec and nonconst predicates
separately.
(compute_inline_parameters): Likewise.
(estimate_edge_size_and_time): Update caluclation of time.
(estimate_node_size_and_time): Compute both time and nonspecialized
time.
(estimate_ipcp_clone_size_and_time): Update.
(inline_merge_summary): Update.
(do_estimate_edge_time): Update.
(do_estimate_edge_size): Update.
(do_estimate_edge_hints): Update.
(inline_read_section, inline_write_summary): Stream both new predicates.
* ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
as argument.
(compute_inlined_call_time): Cleanup.
(big_speedup_p): Update.
(edge_badness): Update.
* ipa-inline.h (INLINE_TIME_SCALE): Remove.
(size_time_entry): Replace predicate by exec_predicate and
nonconst_predicate.
(edge_growth_cache_entry): Cache both time nad nonspecialized time.
(estimate_edge_time): Return also nonspec_time.
(reset_edge_growth_cache): Update.
From-SVN: r247417
* parser.c (cp_parser_member_declaration): Add fix-it hints for
stray comma and missing semicolon at end of member declaration.
* g++.dg/diagnostic/member-decl-1.C: New test.
From-SVN: r247412
2017-04-29 François Dumont <fdumont@gcc.gnu.org>
* testsuite/libstdc++-prettyprinters/48362.cc: Replace a regexp-test
by a note-test.
From-SVN: r247411
PR rtl-optimization/80491
* ifcvt.c (noce_process_if_block): When looking for x setter
with missing else_bb, don't check only the insn right before
cond_earliest, but look for the last insn that x is modified in
within the same bb.
From-SVN: r247410
2017-04-28 Marc Glisse <marc.glisse@inria.fr>
gcc/
* match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.
gcc/testsuite/
* gcc.dg/tree-ssa/cmpexactdiv-2.c: Update for X-Z OP Y-Z.
From-SVN: r247398
2017-04-28 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Complete_Object_Operation): When rewriting the
controlling actual in a prefixed call, preserve the original node
information if the prefix itself has been rewritten, for ASIS use.
2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb (Insert_Post_Call_Actions):
Code clean up. Insert the post-call actions after an enclosing
procedure call when N denotes a function call and appears as an
actual parameter in the procedure call.
2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
* freeze.adb (Check_Component_Storage_Order): If there is a clause
for the component, also reject the attribute if the component
doesn't end on a byte boundary and its scalar storage order is
different from that of the enclosing record type.
From-SVN: r247391
2017-04-28 Bob Duff <duff@adacore.com>
* sem_util.ads, sem_util.adb (Might_Raise): New function
that replaces Is_Exception_Safe, but has the opposite
sense. Is_Exception_Safe was missing various cases -- calls inside
a pragma Debug, calls inside an 'if' or assignment statement,
etc. Might_Raise now walks the entire subtree looking for things
that can raise.
* exp_ch9.adb (Is_Exception_Safe): Remove.
(Build_Protected_Subprogram_Body): Replace call to
Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
constants where possible).
* exp_ch7.adb: Rename Is_Protected_Body -->
Is_Protected_Subp_Body. A protected_body is something different
in the grammar.
2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
* inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
* par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
(P_Discrete_Choice_List): Initialize Expr_Node variable.
* par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
(P_Protected): Likewise.
* sem_case.adb (Check_Duplicates):
Add pragma Warnings on variable.
* sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
* sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
* sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
(Analyze_Exit_Statement): Initialize Scope_Id variable.
(Analyze_Iterator_Specification): Initialize Bas variable.
* sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
(Analyze_Accept_Statement): Initialize Task_Nam.
2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb (Install_Primitive_Elaboration_Check):
Do not generate an elaboration check if all checks have been
suppressed.
2017-04-28 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications, case
Interrupt_Handler and Attach_Handler): Generate reference
to protected operation to prevent spurious warnings about
unreferenced entities. Previous scheme failed with style checks
enabled.
2017-04-28 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
that follows an expression function must not be relocated to
the generated body, because it applies to the code that follows.
From-SVN: r247387
2017-04-28 Gary Dismukes <dismukes@adacore.com>
* sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
Relaxed_RM_Semantics to avoid having CodePeer issue errors on
code that might violate the more stringent checking for 'Access
introduced in Ada 2005.
2017-04-28 Arnaud Charlet <charlet@adacore.com>
* a-cforse.adb: minor style fix in comment.
From-SVN: r247386
2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
initialize Block_Decls variable.
(Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
(Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
* exp_disp.adb (Expand_Interface_Actuals): Initialize
Formal_DDT and Actual_DDT variables.
(Expand_Interface_Thunk): Initialize Iface_Formal.
(Make_DT): Initialize Size_Comp.
(Make_Select_Specific_Data_Table): Initialize Decls.
* exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
Also initialize more RPC_Receiver_* variables.
(Build_To_Any_Function): Initialize Cstr_Formal.
* exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
2017-04-28 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
node between access types, freeze the designated type as well,
so that dispatch table pointers are created in the proper scope,
and not in the constructed body of the expression function.
2017-04-28 Bob Duff <duff@adacore.com>
* alloc.ads (Nodes_Initial): Go back to previous value. The large
value makes large compilations faster, but small compilations slower.
2017-04-28 Arnaud Charlet <charlet@adacore.com>
* sem_util.adb: minor typos in Is_Child_Or_Sibling.
2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
* erroutc.adb (Compilation_Errors): Do not consider info messages
as suitable warnings when warnings must be treated as errors.
* sem_ch7.adb (Analyze_Package_Specification): Do not consider
internally-generated packages when outputting completion
information.
* errout.adb (Output_Messages): Do not consider info messages as
suitable warnings when warnings must be treated as errors.
* errutil.adb (Finalize): Do not consider info messages as
suitable warnings when warnings must be treated as errors.
2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
* warnsw.ads: Minor fix for incorrect wording in comment.
2017-04-28 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (In_Instance_Code): New predicate in
Valid_Conversion, to determine whether a type conversion appears
as (or within) an actual for a formal object. Type conversions
in instances are not rechecked in Valid_Conversion because
visibility changes between generic location andi instance may
lead to spurious errors, but conversions within an actual must be
fully checked, and they are not fully resolved when pre-analyzing
the actuals.
From-SVN: r247385
2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
New_Copy_Tree instead of Relocate_Node as any subsequent copies
of the relocated node will have mangled Parent pointers.
* sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
tables used in conjunction with entity and itype replication.
(Visit_Entity): Rewrite the restriction on which entities
require duplication. The restriction now includes all types.
2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
* a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
cleanups.
From-SVN: r247384
2017-04-28 Martin Liska <mliska@suse.cz>
PR gcov-profile/79891
* gcov.c (add_line_counts): Assign BBs to lines just if the BB
is marked by compiler as living on a line.
(get_cycles_count): Remove usage of the union.
(output_intermediate_file): Likewise.
(find_source): Fix GNU coding style.
(accumulate_line_counts): Remove old non-all block mode.
(output_lines): Remove usage of the union.
* profile.c (output_location): Include all BBs, even if
belonging to a same line (and file) as a previous BB.
2017-04-28 Martin Liska <mliska@suse.cz>
PR gcov-profile/79891
* gcc.misc-tests/gcov-17.c: New test.
* gcc.misc-tests/gcov-18.c: New test.
From-SVN: r247374
2017-04-28 Martin Liska <mliska@suse.cz>
* gcov.c (struct block_location_info): New struct.
(process_file): Fill up the new structure.
(read_graph_file): Replace usage of encoding by the newly added
struct.
(add_line_counts): Likewise.
(accumulate_line_counts): Remove usage of the union.
(function_info::function_info): New function.
(function_info::~function_info): Likewise.
(process_file): Call delete instead of release_function.
(release_function): Release the function.
(release_structures): Call delete instead of release_function.
(solve_flow_graph): Replace usage of num_blocks.
(find_exception_blocks): Likewise.
(output_lines): Fix GNU coding style.
From-SVN: r247372