Bill Schmidt [Mon, 3 Mar 2014 20:16:52 +0000 (20:16 +0000)]
rs6000.c (rs6000_preferred_reload_class): Disallow reload of PLUS rtx's outside of GENERAL_REGS or BASE_REGS...
2014-03-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_preferred_reload_class): Disallow
reload of PLUS rtx's outside of GENERAL_REGS or BASE_REGS; relax
constraint on constants to permit them being loaded into
GENERAL_REGS or BASE_REGS.
* c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
(init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
even when flag_preprocess_only.
* c-c++-common/cilk-plus/PS/vectorlength-2.c: New test.
* c-c++-common/cilk-plus/PS/vectorlength-3.c: New test.
Jakub Jelinek [Mon, 3 Mar 2014 07:25:50 +0000 (08:25 +0100)]
re PR middle-end/60175 (ICE on gcc.dg/asan/nosanitize-and-inline.c)
PR middle-end/60175
* function.c (expand_function_end): Don't emit
clobber_return_register sequence if clobber_after is a BARRIER.
* cfgexpand.c (construct_exit_block): Append instructions before
return_label to prev_bb.
Jan Hubicka [Sun, 2 Mar 2014 22:19:37 +0000 (23:19 +0100)]
re PR lto/60150 (ICE in function_and_variable_visibility, at ipa.c:1000)
PR ipa/60150
* ipa.c (function_and_variable_visibility): When dissolving comdat
group, also set all symbols to local.
* g++.dg/lto/pr60150.H: New testcase.
* g++.dg/lto/pr60150_0.C: New testcase.
* g++.dg/lto/pr60150_1.C: New testcase.
Richard Biener [Fri, 28 Feb 2014 13:14:23 +0000 (13:14 +0000)]
re PR tree-optimization/60280 (gcc.target/arm/ivopts.c and gcc.target/arm/ivopts-2.c failed caused by preserving loop structure.)
2014-02-28 Richard Biener <rguenther@suse.de>
PR target/60280
* tree-cfgcleanup.c (tree_forwarder_block_p): Restrict
previous fix and only allow to remove trivial pre-headers
and latches. Also honor LOOPS_MAY_HAVE_MULTIPLE_LATCHES.
(remove_forwarder_block): Properly update the latch of
a loop.
Alexandre Oliva [Fri, 28 Feb 2014 12:57:40 +0000 (12:57 +0000)]
re PR debug/59992 (Compilation of insn-recog.c too slow due to var-tracking)
PR debug/59992
* cselib.c (cselib_hasher::equal): Special-case VALUE lookup.
(cselib_preserved_hash_table): New.
(preserve_constants_and_equivs): Move preserved vals to it.
(cselib_find_slot): Look it up first.
(cselib_init): Initialize it.
(cselib_finish): Release it.
(dump_cselib_table): Dump it.
Alexandre Oliva [Fri, 28 Feb 2014 12:57:06 +0000 (12:57 +0000)]
re PR debug/59992 (Compilation of insn-recog.c too slow due to var-tracking)
PR debug/59992
* cselib.c (remove_useless_values): Skip to avoid quadratic
behavior if the condition moved from...
(cselib_process_insn): ... here holds.
Jeff Law [Thu, 27 Feb 2014 19:28:40 +0000 (12:28 -0700)]
re PR rtl-optimization/52714 (ICE in fixup_reorder_chain, at cfglayout.c:880)
PR rtl-optimization/52714
* combine.c (try_combine): When splitting an unrecognized PARALLEL
into two independent simple sets, if I3 is a jump, ensure the
pattern we place into I3 is a (set (pc) ...)
PR rtl-optimization/52714
* gcc.c-torture/compile/pr52714.c: New test.
re PR rtl-optimization/49847 (NULL deref in fold_rtx (prev_insn_cc0 == NULL))
PR rtl-optimization/49847
* cse.c (fold_rtx) Handle case where cc0 setter and cc0 user
are in different blocks.
* doc/tm.texi (Condition Code Status): Update documention for
relative locations of cc0-setter and cc0-user.
PR rtl-optimization/49847
* g++.dg/pr49847.C: New test.
Co-Authored-By: Jeff Law <law@redhat.com>
From-SVN: r208203
Marek Polacek [Thu, 27 Feb 2014 08:05:21 +0000 (08:05 +0000)]
re PR middle-end/59223 (-Wmaybe-uninitialized and -Wuninitialized relationships)
PR middle-end/59223
* tree-ssa-uninit.c (gate_warn_uninitialized): Run the pass even for
-Wmaybe-uninitialized.
testsuite/
* c-c++-common/pr59223.c: New test.
Jason Merrill [Wed, 26 Feb 2014 17:08:20 +0000 (12:08 -0500)]
re PR c++/54440 ([c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter)
PR c++/54440
* pt.c (get_template_parm_index): New.
(fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
(process_template_parm): Allow bare packs in template template
parm template parms.
(coerce_template_parameter_pack): Handle fixed template template
parm packs and fixed packs not at the end of the parm list.
(coerce_template_parms): Handle template parm packs not at the end
of the parm list.
(gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
Bin Cheng [Wed, 26 Feb 2014 01:49:35 +0000 (01:49 +0000)]
re PR tree-optimization/60280 (gcc.target/arm/ivopts.c and gcc.target/arm/ivopts-2.c failed caused by preserving loop structure.)
PR target/60280
* tree-cfgcleanup.c (tree_forwarder_block_p): Protect loop
preheaders and latches only if requested. Fix latch if it
is removed.
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Set
LOOPS_HAVE_PREHEADERS.
PR target/60280
* gnat.dg/renaming5.adb: Change to two expected gotos.
* gcc.dg/tree-ssa/pr21559.c: Change back to three expected
jump threads.
* gcc.dg/tree-prof/update-loopch.c: Check two "Invalid sum"
messages for removed basic block.
* gcc.dg/tree-ssa/ivopt_1.c: Fix unreliable scanning string.
* gcc.dg/tree-ssa/ivopt_2.c: Ditto.
* gcc.dg/tree-ssa/ivopt_3.c: Ditto.
* gcc.dg/tree-ssa/ivopt_4.c: Ditto.
Vladimir Makarov [Tue, 25 Feb 2014 20:34:44 +0000 (20:34 +0000)]
re PR rtl-optimization/60317 (find_hard_regno_for compile time hog in libvpx)
2014-02-25 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/60317
* params.def (PARAM_LRA_MAX_CONSIDERED_RELOAD_PSEUDOS): New.
* params.h (LRA_MAX_CONSIDERED_RELOAD_PSEUDOS): New.
* lra-assigns.c: Include params.h.
(spill_for): Use LRA_MAX_CONSIDERED_RELOAD_PSEUDOS as guard for
other reload pseudos considerations.
Robert Dewar [Tue, 25 Feb 2014 15:52:52 +0000 (15:52 +0000)]
rtsfind.adb (Is_RTE): Protect against entity with no scope field (previously this call blew up on the...
2014-02-25 Robert Dewar <dewar@adacore.com>
* rtsfind.adb (Is_RTE): Protect against entity with no scope
field (previously this call blew up on the Standard entity).
* sem_attr.adb (Analyze_Attribute, case Access): Remove
test for No_Abort_Statements, this is now handled in
Set_Entity_With_Checks.
* exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
* sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
Set_Entity_With_Checks.
(Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
Add checks for No_Abort_Statements.
2014-02-25 Robert Dewar <dewar@adacore.com>
* exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
Check_Restriction is OK.
Ed Schonberg [Tue, 25 Feb 2014 15:50:32 +0000 (15:50 +0000)]
sem_ch3.adb (Process_Full_View): Better error message when the full view of a private type without...
2014-02-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Process_Full_View): Better error message when
the full view of a private type without discriminants is an
unconstrained type.
* sem_ch7.adb (Uninstall_Declarations): Ditto.
Arnaud Charlet [Tue, 25 Feb 2014 15:49:45 +0000 (16:49 +0100)]
[multiple changes]
2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
* sigtramp-armvxw.c: Also restore r0.
2014-02-25 Robert Dewar <dewar@adacore.com>
* errout.adb (Error_Msg_Internal): Warning_Msg_Char set
unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
set unconditionally.
* erroutc.adb (Get_Warning_Tag): Does not give a leading space
any more (Output_Msg_Text): Rewritten with new convention on
output of warnings that are treated as errors.
* erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
if Warn is False.
* gnat_rm.texi: Updates to documentation on pragma
Warning_As_Error.
* warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
set Warning_Doc_Switch.
* lib-writ.ads: Add documentation note on ALI file generation
for C.
* exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
(belongs in Sem).
* sem_attr.adb (Resolve_Attribute, case Access):
Abort_Task'Access violates the No_Abort_Statements restriction.
* sem_res.adb (Resolve_Call): Check restriction
No_Abort_Statements for call to Abort_Task or a renaming of it.
Arnaud Charlet [Tue, 25 Feb 2014 15:48:05 +0000 (16:48 +0100)]
[multiple changes]
2014-02-25 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb (Array_Type_Declaration): Check for case of using
type name as index.
* lib.ads: Minor reformatting.
* einfo.ads: Minor reformatting.
2014-02-25 Doug Rupp <rupp@adacore.com>
* sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
use Short_Descriptor(S) as the argument passing mechanism.
2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
* sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
2014-02-25 Robert Dewar <dewar@adacore.com>
* atree.ads (Warnings_Treated_As_Errors): New variable.
* errout.adb (Error_Msg_Internal): Set Warn_Err flag in
error object (Initialize): Initialize Warnings_As_Errors_Count
(Write_Error_Summary): Include count of warnings treated as errors.
* erroutc.adb (Warning_Treated_As_Error): New function.
(Matches): Function moved to outer level of package.
* erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
(Warning_Treated_As_Error): New function.
* gnat_rm.texi: Document pragma Treat_Warning_As_Error.
* opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
* opt.ads (Config_Switches_Type): Add entry for
Warnings_As_Errors_Count.
(Warnings_As_Errors_Count): New variable.
(Warnings_As_Errors): New array.
* par-prag.adb: Add dummy entry for Warning_As_Error.
* sem_prag.adb (Analyze_Pragma): Implement new pragma
Warning_As_Error.
* snames.ads-tmpl: Add entries for Warning_As_Error pragma.
Arnaud Charlet [Tue, 25 Feb 2014 15:45:54 +0000 (16:45 +0100)]
[multiple changes]
2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
* sigtramp.h: Fix minor inaccuracy.
2014-02-25 Ben Brosgol <brosgol@adacore.com>
* gnat_ugn.texi: Added description of kill command.
2014-02-25 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi (Address_Clauses): Add a section discussing the
problem of address clauses causing unexpected initialization,
including the effect of Initialize_Scalars.
Arnaud Charlet [Tue, 25 Feb 2014 15:35:36 +0000 (16:35 +0100)]
[multiple changes]
2014-02-25 Robert Dewar <dewar@adacore.com>
* errout.adb: Various changes for better msgs for anonmous access
subprogram types.
* erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
argument.
(Buffer_Remove): Version with character argument.
* sem_attr.adb (Resolve_Attribute, case Access): Better handling
of mismatching conventions for access-to-subprogram case.
* sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
access types in record.
* sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
types, including in records.
2014-02-25 Doug Rupp <rupp@adacore.com>
* sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
enhancements and corrections.
2014-02-25 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: New section "Conventions and Anonymous Access Types"
Arnaud Charlet [Tue, 25 Feb 2014 15:30:10 +0000 (16:30 +0100)]
[multiple changes]
2014-02-25 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Update "Standard Library Routines" chapter to
include all 2012 packages.
Add section on pragma Reviewable.
* sem_ch5.adb (Diagnose_Non_Variable_Lhs): Avoid wrong msgs if
expander off.
* exp_ch9.ads, exp_dist.adb, exp_dist.ads: Minor reformatting.
* sem_ch6.adb (Assert_False): New function
(Check_Statement_Sequence): Call Assert_False to check for
pragma Assert (False) which is considered OK block of control
for function.
* snames.ads-tmpl (Name_False): New entry.
2014-02-25 Doug Rupp <rupp@adacore.com>
* init.c (VxWorks Section): Enable sigtramp for ARM.
* sigtramp-armvxw.c: New file.
Robert Dewar [Tue, 25 Feb 2014 15:27:16 +0000 (15:27 +0000)]
gnat_rm.texi: First set of documentation additions for predefined RM units.
2014-02-25 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: First set of documentation additions for
predefined RM units.
* checks.adb: Minor reformatting.
* sem_elab.adb (Check_Task_Activation): Minor fix to error
message.
* sem_util.adb: Minor reformatting.
Arnaud Charlet [Tue, 25 Feb 2014 15:20:43 +0000 (16:20 +0100)]
[multiple changes]
2014-02-25 Arnaud Charlet <charlet@adacore.com>
* usage.adb (Usage): Add help on -gnateC.
* switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
* opt.ads (Generate_CodePeer_Messages): New flag.
* gnat_ugn.texi: Document new switch -gnateC.
2014-02-25 Ben Brosgol <brosgol@adacore.com>
* gnat_rm.texi: Corrected minor typos in Implementation Defined
Aspects.
* opt.ads: Minor reformatting.
Robert Dewar [Tue, 25 Feb 2014 15:19:43 +0000 (15:19 +0000)]
binde.adb: Change messages to mention -gnatel instead of -gnatwl.
2014-02-25 Robert Dewar <dewar@adacore.com>
* binde.adb: Change messages to mention -gnatel instead of -gnatwl.
* gnat_ugn.texi: Update documentation of -gnatwl Add documentation
of -gnatel/-gnateL.
* opt.ads (Warn_Info_Messages): New flag.
* sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
messages.
* sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
messages.
* switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
* usage.adb: Add documentation of -gnatel/-gnateL Update
documentation of -gnatwl/-gnatwL.
* warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
* warnsw.ads (Elab_Info_Messages): New field in Warning_Record
Arnaud Charlet [Tue, 25 Feb 2014 15:18:38 +0000 (16:18 +0100)]
[multiple changes]
2014-02-25 Robert Dewar <dewar@adacore.com>
* einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
* gnat_rm.texi: Document pragma Provide_Shift_Operators.
* interfac.ads: Minor code reorganization (add pragma
Compiler_Unit_Warning).
* par-prag.adb: Add dummy entry for Provide_Shift_Operators.
* sem_ch3.adb (Build_Derived_Numeric_Type): Copy
Has_Shift_Operator flag.
* sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
* sem_prag.adb: Implement pragma Provide_Shift_Operators.
* snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
Add entry for Name_Amount.
* checks.adb (Selected_Range_Checks): When checking for a null
range, make sure we use the base type, and not the subtype for
deciding a range is null.
* sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
for suspicious loop bound which is outside the range of the
loop subtype.
* gnat_ugn.texi: Add documentation section "Determining the
Chosen Elaboration Order"
* sem_ch13.adb (UC_Entry): Add field Act_Unit
(Validate_Unchecked_Conversion): Store Act_Unit
(Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
* treepr.adb: Minor reformatting.
Arnaud Charlet [Tue, 25 Feb 2014 15:11:39 +0000 (16:11 +0100)]
[multiple changes]
2014-02-25 Robert Dewar <dewar@adacore.com>
* exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
reformatting.
2014-02-25 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Entity): If the return type of a function
is a limited view, and the non-limited view has not been seen yet,
defer freezing to some later point.
* exp_ch6.adb (Add_Or_Save_Precondition): New routine.
(Collect_Body_Postconditions_In_Decls): New routine.
(Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
postcondition aspects or pragmas that appear on a subprogram
body stub.
(Collect_Spec_Preconditions): Factor out code. Handle
precondition aspects or pragmas that appear on a subprogram
body stub.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
aspects that apply to a subprogram body stub is no longer delayed,
the aspects are analyzed on the spot.
(SPARK_Aspect_Error):
Aspects that apply to a subprogram declaration cannot appear in
a subunit.
* sem_ch10.adb Remove with and use clause for Sem_Ch13.
(Analyze_Proper_Body): Add local variable Comp_Unit. Unum
is now a local variable. Code cleanup. Analysis related to
the aspects of a subprogram body stub is now carried out by
Analyze_Subprogram_Body_Helper. Do not propagate the aspects
and/or pragmas of a subprogram body stub to the proper body
as this is no longer needed. Do not analyze the aspects of a
subprogram stub when the corresponding source unit is missing.
(Analyze_Protected_Body_Stub): Flag the illegal use of aspects
on a stub.
(Analyze_Task_Body_Stub): Flag the illegal use of
aspects on a stub.
(Optional_Subunit): Add local variable Unum.
* sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
pragma when it applies to a subprogram body stub.
* sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
Depends and Global can now apply to a subprogram body stub as
long as it acts as its own spec.
(Analyze_Refined_Pragma):
Code reformatting. Refinement pragmas cannot apply to a subunit.
* einfo.ads Update the usage of flag
Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
* exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
now starts with the letter 'C'. This makes reading expanded
code easier.
* exp_ch7.adb (Establish_Transient_Scope): Add local variable
Iter_Loop. Signal that an Ada 2012 iterator loop requires
secondary stack management when creating a transient scope for
an element reference.
* exp_util.adb (Process_Statements_For_Controlled_Objects):
When wrapping the statements of a loop, pass the E_Loop entity
to the wrapping machinery.
(Wrap_Statements_In_Block): Add
formal parameter Scop along with comment on usage. Add local
variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
block as requiring secondary stack management when the block is
created inside an Ada 2012 iterator loop. This ensures that any
reference objects are reclaimed on each iteration of the loop.
* sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
tasked with the handling of container iterators as requiring
secondary stack management. This ensures that iterators are
reclaimed when the loop terminates or is exited in any fashion.
* sem_util.adb (Add_Block_Identifier): New routine.
(Find_Enclosing_Iterator_Loop): New routine.
* sem_util.ads (Add_Block_Identifier): New routine.
(Find_Enclosing_Iterator_Loop): New routine.