PR ipa/65302
* value-prof.c (gimple_ic): Pure dead eh edges when needed.
* g++.dg/lto/pr65302_1.C: New testcase.
* g++.dg/lto/pr65302_0.C: New testcase.
From-SVN: r221244
2015-03-06 Richard Biener <rguenther@suse.de>
PR middle-end/64928
* tree-ssa-live.h (struct tree_live_info_d): Add livein_obstack
and liveout_obstack members.
(calculate_live_on_exit): Remove.
(calculate_live_ranges): Change declaration.
* tree-ssa-live.c (liveness_bitmap_obstack): Remove global var.
(new_tree_live_info): Adjust.
(calculate_live_ranges): Delete livein when not wanted.
(calculate_live_ranges): Do not initialize liveness_bitmap_obstack.
Deal with partly deleted live info.
(loe_visit_block): Remove temporary bitmap by using
bitmap_ior_and_compl_into.
(live_worklist): Adjust accordingly.
(calculate_live_on_exit): Make static.
* tree-ssa-coalesce.c (coalesce_ssa_name): Tell calculate_live_ranges
we do not need livein.
From-SVN: r221237
* include/std/future (future_error(error_code)): Construct base
class with error_code's message.
* src/c++11/future.cc (future_error::what()): Do not call c_str() on
temporary string.
From-SVN: r221236
For expressions containing a TypeSwitchGuard with a short variable
declaration e.g. var := x.(type), the spec says that var is declared
at the beginning of the implicit block for each in each clause.
Previously, var was declared in the block for the switch statement
and each implicit block, which led to errors if the type case clause
referenced a type with a similar name as the declared variable.
Fixesgolang/go#10047.
From-SVN: r221230
2015-03-05 Vladimir Makarov <vmakarov@redhat.com>
PR target/64342
* lra-assigns.c (find_hard_regno_for): Rename to
find_hard_regno_for_1. Add a new parameter.
(find_hard_regno_for): New function using find_hard_regno_for_1.
From-SVN: r221223
* ipa-inline.c (inline_small_functions): Set default value to
prevent warning during bootstrap.
* tree.h: Add pragma guard that ignores false positives during
bootstrap.
From-SVN: r221211
2015-03-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/65310
* tree-vect-data-refs.c (vect_compute_data_ref_alignment):
Properly preserve alignment of the base of the access.
* gcc.dg/vect/pr65310.c: New testcase.
From-SVN: r221206
2015-03-05 Richard Biener <rguenther@suse.de>
PR middle-end/65233
* ipa-polymorphic-call.c: Include tree-ssa-operands.h and
tree-into-ssa.h.
(walk_ssa_copies): Revert last chage. Instead do not walk
SSA names registered for SSA update.
From-SVN: r221203
PR ipa/65270
* ipa-icf.c (sem_item::compare_cgraph_references): Compare
vtable references for their containing type.
(sem_function::equals_wpa): Compare TYPE_RESTRICT
and type attributes.
From-SVN: r221199
* fold-const.c (round_up_loc): Cast divisor to signed on all paths
before negating it.
* stor-layout.c (finalize_record_size): Revert latest change.
From-SVN: r221198
Fix PR65261
Running bootstrap-ubsan on ppc64le shows many instances of:
libcpp/lex.c:552:30: runtime error: load of misaligned address
0x01001f31d37a for type 'const uchar', which requires 16 byte alignment
But the unaligned vector loads are intended in this case, because they
are preferable to forced-alignment on POWER8. So just silence the ubsan
errors.
2015-03-02 Markus Trippelsdorf <markus@trippelsdorf.de>
include/
PR target/65261
* ansidecl.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro.
libcpp/
PR target/65261
* lex.c (search_line_fast): Silence ubsan errors.
From-SVN: r221190
2015-03-04 Robert Dewar <dewar@adacore.com>
* sem_warn.adb: Minor reformatting.
* init.c: Minor tweaks.
2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
* a-coinho-shared.adb: Fix clear of already empty holder.
2015-03-04 Robert Dewar <dewar@adacore.com>
* exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
(Check_Uplevel_Reference_To_Type): Ignore call inside generic.
(Note_Uplevel_Reference): Ignore call inside generic.
(Note_Uplevel_Reference): Fix check for no entity field.
(Unnest_Subprogram): Ignore call inside generic.
(Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
(Visit_Node): Ignore calls to Imported subprograms.
(Visit_Node): Fix problem in finding subprogram body in some cases.
(Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
From-SVN: r221188
2015-03-04 Robert Dewar <dewar@adacore.com>
* einfo.adb (Is_ARECnF_Entity): Removed.
(Last_Formal): Remove special handling of Is_ARECnF_Entity.
(Next_Formal): Remove special handling of Is_ARECnF_Entity.
(Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
(Number_Entries): Minor reformatting.
* einfo.ads (Is_ARECnF_Entity): Removed.
* exp_unst.adb (Unnest_Subprogram): Remove setting of
Is_ARECnF_Entity.
(Add_Extra_Formal): Use normal Extra_Formal circuit.
* sprint.adb (Write_Param_Specs): Properly handle case where
there are no source formals, but we have at least one Extra_Formal
present.
2015-03-04 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Record_Aggregate,
Add_Discriminant_Values): If the value is a reference to the
current instance of an enclosing type, use its base type to check
against prefix of attribute reference, because the target type
may be otherwise constrained.
From-SVN: r221187
* config/rl78/rl78.h (enum reg_class): Remove real registers from
General register class.
* config/rl78/rl78-real.md: Replace general register constraints
with real+virtual register constraints.
From-SVN: r221185
2015-03-04 Robert Dewar <dewar@adacore.com>
* atree.h: Add entries for Flag287-Flag309.
* einfo.adb: Add (unused) flags Flag287-Flag309.
2015-03-04 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Collect_Interfaces, Collect): When gathering
interfaces of ancestors, handle properly a subtype of a private
extension.
From-SVN: r221183
2015-03-04 Robert Dewar <dewar@adacore.com>
* einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
(Next_Formal): Don't return ARECnF formal.
(Last_Formal): Don't consider ARECnF formal.
(Next_Formal_With_Extras): Do consider ARECnF formal.
* einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
* exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
2015-03-04 Javier Miranda <miranda@adacore.com>
* exp_ch6.adb (Expand_Simple_Function_Return): When the returned
object is a class-wide interface object and we generate the
accessibility described in RM 6.5(8/3) then displace the pointer
to the object to reference the base of the object (to get access
to the TSD of the object).
From-SVN: r221182
2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Abstract_State): Use routine
Malformed_State_Error to issue general errors.
(Analyze_Pragma): Diagnose a syntax error related to a state
declaration with a simple option.
(Malformed_State_Error): New routine.
2015-03-04 Robert Dewar <dewar@adacore.com>
* a-strsup.adb (Super_Slice): Deal with super flat case.
* einfo.ads: Minor reformatting.
* s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
redundant code.
2015-03-04 Claire Dross <dross@adacore.com>
* a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
containers.
From-SVN: r221180
2015-03-04 Ed Schonberg <schonberg@adacore.com>
* sem_warn.adb (Check_References): When checking for an unused
in-out parameter of a class- wide type, use its type to determine
whether it is private, in order to avoid a spurious warning when
subprogram spec and body are in different units.
2015-03-04 Yannick Moy <moy@adacore.com>
* sem_attr.adb: Improve warning messages.
From-SVN: r221178
2015-03-04 Robert Dewar <dewar@adacore.com>
* exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
generic subprograms.
* exp_unst.adb (Check_Dynamic_Type): Handle record types properly
(Note_Uplevel_Reference): Ignore uplevel references to non-types
(Get_Level): Consider only subprograms, not blocks.
(Visit_Node): Set proper condition for generating ARECnF entity.
Ignore indirect calls. Ignore calls to subprograms
outside our nest.
(Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
(Add_Form_To_Spec): Properly set Last_Entity field.
(Unnest_Subprogram): Set current subprogram scope for analyze calls.
Handle case of no uplevel refs in outer subprogram
Don't mark uplevel entities as aliased.
Don't deal with calls with no ARECnF requirement.
2015-03-04 Robert Dewar <dewar@adacore.com>
* s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
* s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
operation in computing LZ.
* sem_attr.adb: Minor typo fix
From-SVN: r221177