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
* config/rx/rx.c (struct decl_chain): New local structure.
(warned_decls): New local variable. Contains a stack of decls for
which warnings have been issued.
(add_warned_decl): Adds a decl to the stack.
(already_warned): Returns true if a given decl is on the stack.
(rx_set_current_function): Issue a warning if multiple fast
interrupt handlers are defined.
* config/rx/rx.opt (mwarn-multiple-fast-interrupts): New option.
* doc/invoke.texi: Document the option.
From-SVN: r192041