2012-10-05 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/54686
* include/c_std/cstdlib (abs(long long)): Define with
__builtin_llabs when we have long long.
(abs(long)): Use __builtin_labs.
(abs(__int128)): Define when we have __int128.
* testsuite/26_numerics/headers/cstdlib/54686.c: New file.
From-SVN: r192132
2012-10-05 Robert Dewar <dewar@adacore.com>
* sem_ch7.adb: Minor reformatting.
2012-10-05 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Persistent_BSS): check for
a duplicate pragma before Rep_Item_Too_Late to prevent spurious
messages about duplicate pragmas.
2012-10-05 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Find_Init_Call): If the successor of the
object declaration is a block, check whether it contains the
initialization call, because it may have been created by actuals
that use the secondary stack.
From-SVN: r192130
2012-10-05 Thomas Quinot <quinot@adacore.com>
* sem_dim.adb, errout.adb, errout.ads (Analyze_Dimension_Call): Add
guard against abnormal tree resulting from a previously diagnosed
illegality.
2012-10-05 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Freeze_Expression): Rename local variable Cspc to Spec
and update all refs to it. Do not freeze an entity outside a subprogram
body when the original context is an expression function.
2012-10-05 Robert Dewar <dewar@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Default for overflow checking
is suppressed, even if backend overflow/divide checks are enabled.
2012-10-05 Ed Schonberg <schonberg@adacore.com>
* einfo.adb (Set_Invariant_Procedure, Set_Predicate_Function):
chain properly subprograms on Subprograms_For_Type list.
* sem_ch13.ads; (Build_Invariant_Procedure_Declaration): new
procedure, to create declaration for invariant procedure
independently of the construction of the body, so that it can
be called within expression functions.
* sem_ch13.adb (Build_Invariant_Procedure): code cleanup. The
declaration may already have been generated at the point an
explicit invariant aspect is encountered.
* sem_prag.adb; (Analyze_Pragma, case Invariant): create declaration
for invariant procedure.
* sem_ch7.adb (Analyze_Package_Specification): clean up call to
build invariant procedure.
(Preserve_Full_Attributes): propagate information about invariants
if they appear on a completion,
2012-10-05 Pascal Obry <obry@adacore.com>
* gnat_ugn.texi: Update documentation to lift Microsoft C
restriction.
From-SVN: r192128
2012-10-05 Robert Dewar <dewar@adacore.com>
* sem_util.adb (Has_One_Matching_Field): Handle case of lone
discriminant.
2012-10-05 Yannick Moy <moy@adacore.com>
* checks.adb (Minimize_Eliminate_Overflow_Checks): Correct code
for the division operation and exponent operation. Adjust bound
for the mod and rem operations.
From-SVN: r192126
2012-10-05 Yannick Moy <moy@adacore.com>
* switch-c.adb, checks.adb, checks.ads, sem_prag.adb, exp_ch4.adb,
osint.adb: Minor correction of typos, and special case for Alfa mode.
2012-10-05 Hristian Kirtchev <kirtchev@adacore.com>
* s-spsufi.adb: Add with clause for Ada.Unchecked_Deallocation.
Add with and use clauses for System.Finalization_Masters.
(Finalize_And_Deallocate): Add an instance of
Ada.Unchecked_Deallocation. Merge the code from the now obsolete
Finalize_Subpool into this routine.
* s-spsufi.ads: Add pragma Preelaborate.
* s-stposu.adb: Remove with clause for
Ada.Unchecked_Deallocation; Add with and use clauses for
System.Storage_Pools.Subpools.Finalization; (Finalize_Pool):
Update the comment on all actions takes with respect to a subpool
finalization. Finalize and deallocate each individual subpool.
(Finalize_Subpool): Removed.
(Free): Removed;
(Detach): Move from package body to spec.
* s-stposu.ads (Detach): Move from package body to spec.
(Finalize_Subpool): Removed.
2012-10-05 Arnaud Charlet <charlet@adacore.com>
* s-tassta.adb: Update comments.
(Vulnerable_Complete_Master): If Free_On_Termination is set, do
nothing, and let the task free itself if not already done.
From-SVN: r192124
PR tree-optimization/54810
* tree-vrp.c (register_edge_assert_for_2): Handle
NAME = (unsigned) NAME2; if (NAME cmp CST) for
narrowing casts to unsigned integral type like
NAME = NAME2 & CST2; if (NAME cmp CST) where CST2
is the max value of the unsigned integral type.
* gcc.dg/tree-ssa/vrp85.c: New test.
From-SVN: r192115
* config/avr/predicates.md (flash_operand): New predicate.
* config/avr/avr.md (reload_in<mode>): Use it in operand 1 instead
of memory_operand.
From-SVN: r192090
2012-10-04 Richard Guenther <rguenther@suse.de>
PR middle-end/54735
* tree-ssa-pre.c (do_pre): Make sure to update virtual SSA form before
cleaning up the CFG.
* g++.dg/torture/pr54735.C: New testcase.
From-SVN: r192078
2012-10-04 Richard Guenther <rguenther@suse.de>
PR lto/47788
* tree-streamer-out.c (write_ts_block_tree_pointers): For
inlined functions outer scopes write the ultimate origin
as BLOCK_ABSTRACT_ORIGIN and BLOCK_SOURCE_LOCATION.
Do not stream the fragment chains.
* tree-streamer-in.c (lto_input_ts_block_tree_pointers): Likewise.
* dwarf2out.c (gen_subprogram_die): Handle NULL DECL_INITIAL.
(dwarf2out_decl): Always output DECL_ABSTRACT function decls.
From-SVN: r192075
2012-10-04 Robert Dewar <dewar@adacore.com>
* sem_res.adb (Resolve_Set_Membership): Warn on duplicates.
2012-10-04 Emmanuel Briot <briot@adacore.com>
* g-comlin.adb (Getopt): Fix value of Full_Switch returned in case of
invalid switch.
2012-10-04 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Make-lang.in: Update dependencies.
From-SVN: r192073
2012-10-04 Robert Dewar <dewar@adacore.com>
* sem_eval.adb (Fold_Str, Fold_Uint, Fold_Ureal): Reset static
expression state after Resolve call.
2012-10-04 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Analyze_Pragma. case Warnngs): Don't make entry
in the table for Warnings Off pragmas if within an instance.
2012-10-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch9.adb (Analyze_Entry_Body): Transfer
Has_Pragma_Unreferenced flag from entry formal to corresponding
entity in body, to prevent spurious warnings when pragma is
present.
2012-10-04 Robert Dewar <dewar@adacore.com>
* s-bignum.adb (Big_Exp): Raise Storage_Error for ludicrously
large results.
2012-10-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Check_Duplicate_Aspects): Diagnose properly
aspects that appear in the partial and the full view of a type.
2012-10-04 Robert Dewar <dewar@adacore.com>
* sinfo.ads (N_Return_Statement): Removed.
2012-10-04 Tristan Gingold <gingold@adacore.com>
* init.c (__gl_zero_cost_exceptions): Comment it as not used
anymore.
* bindgen.adb (Gen_Adainit): Do not emit Zero_Cost_Exceptions
anymore.
2012-10-04 Thomas Quinot <quinot@adacore.com>
* prep.adb, prepcomp.adb, gprep.adb, opt.ads: New preprocessor switch
-a (all source text preserved).
From-SVN: r192072
2012-10-04 Vincent Celier <celier@adacore.com>
* prj-proc.adb (Recursive_Process): Use project directory
display path name as the value of 'Project_Dir.
2012-10-04 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow):
Deal with case where we get a bignum operand and cannot do a
range analysis.
* sem_eval.adb (Why_Not_Static): Deal with bignum operands
2012-10-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Find_Unary_Types): Within an instance, an
interpretation that involves a predefied arithmetic operator is
not a candidate if the corresponding generic formal type is not
a numeric type.
* sem_util.ads, sem_util.adb (Corresonding_Generic_Type): If a
type is a generic actual type within an instance, return the
corresponding formal in the generic unit, otherwise return
Any_Type.
From-SVN: r192071
2012-10-04 Robert Dewar <dewar@adacore.com>
* checks.adb (Minimize_Eliminate_Overflow_Checks): Dont reanalyze
if/case expression if nothing has changed (just reexpand). Stops
case expression from generating incorrect temporary.
* exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow):
Fix cut and paste typo for range analysis in NE (not equal) case.
* sem_eval.adb (Compile_Time_Compare): Small optimization to
catch some more cases.
* types.ads (Suppressed_Or_Checked): New subtype of
Overflow_Check_Type.
From-SVN: r192070
2012-10-04 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Set_CPP_Constructors_Old): Removed.
(Set_CPP_Constructors): Code cleanup.
2012-10-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Is_Ancestor_Unit): Make global, for use elsewhere.
(Install_Private_with_Clauses): if clause is private and limited,
do not install the limited view if the library unit is an ancestor
of the unit being compiled. This unusual configuration occurs
when compiling a unit DDP, when an ancestor P of DDP has a
private limited with clause on a descendant of P that is itself
an ancestor of DDP.
From-SVN: r192069
2012-10-04 Vincent Celier <celier@adacore.com>
* prj-proc.adb (Process_Package_Declaration): Use project
directory display path name as the value of 'Project_Dir.
2012-10-04 Gary Dismukes <dismukes@adacore.com>
* exp_util.adb (Build_Allocate_Deallocate_Proc): The subpool can be
given by an arbitrary name, so copy the tree to make the call's actual.
2012-10-04 Robert Dewar <dewar@adacore.com>
* s-exnllf.adb, s-exnllf.ads: Minor reformatting.
2012-10-04 Thomas Quinot <quinot@adacore.com>
* exp_ch6.adb: Minor reformatting.
2012-10-04 Pascal Obry <obry@adacore.com>
* projects.texi: Use consistently @command{} when referencing
commands. Fix typos.
From-SVN: r192068
* config/i386/i386.c (ix86_dep_by_shift_count_body) : Add
check on reload_completed since it can be invoked before
register allocation phase in pre-reload schedule.
(ia32_multipass_dfa_lookahead) : Do not use dfa_lookahead for pre-reload
schedule to save compile time.
(ix86_sched_reorder) : Do not perform ready list reordering for pre-reload
schedule to save compile time.
(insn_is_function_arg) : New function. Returns true if lhs of insn is
HW function argument register.
(add_parameter_dependencies) : New function. Add output dependencies
for chain of function adjacent arguments if only there is a move to
likely spilled HW registers. Return first argument if at least one
dependence was added or NULL otherwise.
(avoid_func_arg_motion) : New function. Add output or anti dependency
from insn to first_arg to restrict code motion.
(add_dependee_for_func_arg) : New function. Avoid cross block motion of
function argument through adding dependency from the first non-jump
insn in bb.
(ix86_dependencies_evaluation_hook) : New function. Hook for pre-reload schedule:
avoid motion of function arguments passed in passed in likely spilled
HW registers.
(ix86_adjust_priority) : New function. Hook for pre-reload schedule: set priority
of moves from likely spilled HW registers to maximum to schedule them
as soon as possible.
(ix86_sched_init_global): Do not perform multipass scheduling for pre-reload
schedule to save compile time.
From-SVN: r192065
* sh.c (sh_can_use_simple_return_p): Return false for SHmedia
and SHcompact using call_cookie.
* sh.md (epilogue): Emit non-inlined return insns for SHmedia
and SHcompact using call_cookie.
From-SVN: r192061