Paolo Carlini [Fri, 31 Jan 2014 16:22:53 +0000 (16:22 +0000)]
re PR c++/59082 (ICE with duplicate (virtual) base)
/cp
2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59082
* class.c (build_vfield_ref): Early return error_mark_node if
TYPE_VFIELD (type) is null.
(build_base_path): Check return value of build_vfield_ref.
/testsuite
2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
Arnaud Charlet [Fri, 31 Jan 2014 15:59:59 +0000 (16:59 +0100)]
[multiple changes]
2014-01-31 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Minor update.
* gnat_rm.texi: Add example to Restriction_Warnings documentation.
* exp_util.adb: Minor reformatting.
2014-01-31 Ed Schonberg <schonberg@adacore.com>
* exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
depends on data that is not private to the protected object,
and potentially modifiable in unsynchronized fashion.
* exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
the logic that generates a runtime check to determine the
controlled status of the object about to be allocated or
deallocated. Class-wide types now always use a runtime check
even if they appear as generic actuals.
(Find_Object): Detect
a special case that involves interface class-wide types because
the object appears as a complex expression.
Arnaud Charlet [Fri, 31 Jan 2014 15:53:25 +0000 (16:53 +0100)]
[multiple changes]
2014-01-31 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Process_Formals): In Ada2012 mode, place
subprogram with an incomplete untagged formals on the list of
private dependents, to verify that the type is properly completed
in the private part.
* sem_attr.adb: Code clean up.
2014-01-31 Robert Dewar <dewar@adacore.com>
* exp_ch6.adb: Minor reformatting.
2014-01-31 Vincent Celier <celier@adacore.com>
* prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
when Pkg is unknown.
Arnaud Charlet [Fri, 31 Jan 2014 15:46:40 +0000 (16:46 +0100)]
[multiple changes]
2014-01-31 Robert Dewar <dewar@adacore.com>
* erroutc.adb (Validate_Specific_Warnings): Warnings are
controlled -gnatw.W.
* gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
* opt.ads (Warn_On_Warnings_Off): Now controls more cases.
2014-01-31 Arnaud Charlet <charlet@adacore.com>
* exp_disp.adb: Update comments.
2014-01-31 Yannick Moy <moy@adacore.com>
* sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
Save_Global_References): Guard access to expression in aspect.
2014-01-31 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
Issue an error when the pragma is applied to a generic unit,
a generic declaration, or inside a generic.
2014-01-31 Yannick Moy <moy@adacore.com>
* sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
entity.
Bob Duff [Fri, 31 Jan 2014 15:43:41 +0000 (15:43 +0000)]
s-taskin.ads: Minor comment fix.
2014-01-31 Bob Duff <duff@adacore.com>
* s-taskin.ads: Minor comment fix.
* s-tassta.adb (Abort_Dependents): Don't abort all dependents;
just direct dependents. If this is actually an abort, each task
will take care of aborting its dependents, so all dependents will
get aborted, as before. However, when this is called the second
time from Vulnerable_Complete_Master "for convenience" (i.e. to
kill off tasks waiting at terminate alternatives), aborting
indirect dependents is wrong, because it causes some unrelated
tasks to get aborted.
Jason Merrill [Fri, 31 Jan 2014 15:20:12 +0000 (10:20 -0500)]
re PR c++/59646 (ICE with volatile in initializer list)
PR c++/59646
* call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
[ck_list]: Check for error_mark_node.
(build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
Richard Biener [Fri, 31 Jan 2014 11:54:26 +0000 (11:54 +0000)]
re PR middle-end/59990 (incorrect memcpy optimization)
2014-01-31 Richard Biener <rguenther@suse.de>
PR middle-end/59990
* builtins.c (fold_builtin_memory_op): Make sure to not
use a floating-point mode or a boolean or enumeral type for
the copy operation.
Bill Schmidt [Thu, 30 Jan 2014 18:59:55 +0000 (18:59 +0000)]
rs6000.c (rs6000_expand_vector_init): Use gen_vsx_xxspltw_v4sf_direct instead of gen_vsx_xxspltw_v4sf...
gcc:
2014-01-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* gcc/config/rs6000/rs6000.c (rs6000_expand_vector_init): Use
gen_vsx_xxspltw_v4sf_direct instead of gen_vsx_xxspltw_v4sf;
remove element index adjustment for endian (now handled in vsx.md
and altivec.md).
(altivec_expand_vec_perm_const): Use
gen_altivec_vsplt[bhw]_direct instead of gen_altivec_vsplt[bhw].
* gcc/config/rs6000/vsx.md (UNSPEC_VSX_XXSPLTW): New unspec.
(vsx_xxspltw_<mode>): Adjust element index for little endian.
* gcc/config/rs6000/altivec.md (altivec_vspltb): Divide into a
define_expand and a new define_insn *altivec_vspltb_internal;
adjust for -maltivec=be on a little endian target.
(altivec_vspltb_direct): New.
(altivec_vsplth): Divide into a define_expand and a new
define_insn *altivec_vsplth_internal; adjust for -maltivec=be on a
little endian target.
(altivec_vsplth_direct): New.
(altivec_vspltw): Divide into a define_expand and a new
define_insn *altivec_vspltw_internal; adjust for -maltivec=be on a
little endian target.
(altivec_vspltw_direct): New.
(altivec_vspltsf): Divide into a define_expand and a new
define_insn *altivec_vspltsf_internal; adjust for -maltivec=be on
a little endian target.
gcc/testsuite:
2014-01-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* gcc.dg/vmx/splat.c: New.
* gcc.dg/vmx/splat-vsx.c: New.
* gcc.dg/vmx/splat-be-order.c: New.
* gcc.dg/vmx/splat-vsx-be-order.c: New.
* gcc.dg/vmx/eg-5.c: Remove special casing for little endian.
* gcc.dg/vmx/sn7153.c: Add special casing for little endian.
Richard Biener [Thu, 30 Jan 2014 18:28:19 +0000 (18:28 +0000)]
re PR middle-end/59993 (ICE: SSA corruption)
2014-01-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/59993
* tree-ssa-forwprop.c (associate_pointerplus): Check we
can propagate form the earlier stmt and avoid the transform
when the intermediate result is needed.
David Holsgrove [Thu, 30 Jan 2014 17:18:17 +0000 (17:18 +0000)]
Add SImode to comparison operator, prevents ICE during combine
rtl pass with error message;
internal compiler error: in simplify_subreg, at simplify-rtx.c:5725
Use ordered_comparison_operator predicate to limit operators to
those fcmp can handle, and letting compiler reorder insns to
accomodate unordered as necessary
gcc/ChangeLog
2013-11-26 David Holsgrove <david.holsgrove@xilinx.com>
* config/microblaze/microblaze.md(cstoresf4, cbranchsf4): Replace
comparison_operator with ordered_comparison_operator.
testsuite/ChangeLog
2014-01-22 David holsgrove <david.holsgrove@xilinx.com>
* testsuite/gcc.target/microblaze/isa/fcmp4.c: New file.
Nick Clifton [Thu, 30 Jan 2014 16:01:43 +0000 (16:01 +0000)]
rl78.c (register_sizes): Make the "upper half" of %fp 2 to keep registers after it properly word-aligned.
* config/rl78/rl78.c (register_sizes): Make the "upper half" of
%fp 2 to keep registers after it properly word-aligned.
(rl78_alloc_physical_registers_umul): Handle the case where both
input operands are the same.
Co-Authored-By: DJ Delorie <dj@redhat.com>
From-SVN: r207308
Jonathan Wakely [Wed, 29 Jan 2014 23:46:31 +0000 (23:46 +0000)]
re PR libstdc++/57226 (The installation of pretty printers is not documented)
PR libstdc++/57226
* doc/xml/manual/debug.xml (debug.gdb): Update documentation for
installation and use of python printers.
* doc/xml/manual/status_cxx2011.xml: Update.
* doc/html/*: Regenerate.
Jason Merrill [Wed, 29 Jan 2014 22:12:09 +0000 (17:12 -0500)]
re PR c++/59989 (ICE when a template parameter pack is explicitly specified for a function template and provides a complete argument list for a template)
Jason Merrill [Wed, 29 Jan 2014 20:44:50 +0000 (15:44 -0500)]
re PR c++/59956 (internal compiler error: unexpected expression ‘P_S’ of kind template_parm_index)
PR c++/59956
* friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
have a friend template in a class template.
* pt.c (tsubst_friend_function): Look through it.
(push_template_decl_real): A friend member template is
primary.
* einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
* einfo.ads (Get_Pragma): Update the comment on special pragmas
handled by this routine.
* sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
to the contract of the related subprogram body.
* sem_util.adb (Add_Contract_Item): Handle the insertion of
pragma Refined_Post into the contract of a subprogram body.
* sinfo.ads Update the documentation of node N_Contract.
* sem_res.adb (Resolve_Entity_Name): Add a guard
to detect abstract states and variables only when checking the
SPARK 2014 rules concerning volatile object placement.
2014-01-29 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
null is compatible with any access type.
Bill Schmidt [Wed, 29 Jan 2014 16:12:28 +0000 (16:12 +0000)]
rs6000.c (altivec_expand_vec_perm_const): Use CODE_FOR_altivec_vmrg*_direct rather than CODE_FOR_altivec_vmrg*.
gcc:
2014-01-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Use
CODE_FOR_altivec_vmrg*_direct rather than CODE_FOR_altivec_vmrg*.
* config/rs6000/vsx.md (vsx_mergel_<mode>): Adjust for
-maltivec=be with LE targets.
(vsx_mergeh_<mode>): Likewise.
* config/rs6000/altivec.md (UNSPEC_VMRG[HL]_DIRECT): New
unspecs.
(mulv8hi3): Use gen_altivec_vmrg[hl]w_direct.
(altivec_vmrghb): Replace with define_expand and new
*altivec_vmrghb_internal insn; adjust for -maltivec=be with LE
targets.
(altivec_vmrghb_direct): New define_insn.
(altivec_vmrghh): Replace with define_expand and new
*altivec_vmrghh_internal insn; adjust for -maltivec=be with LE
targets.
(altivec_vmrghh_direct): New define_insn.
(altivec_vmrghw): Replace with define_expand and new
*altivec_vmrghw_internal insn; adjust for -maltivec=be with LE
targets.
(altivec_vmrghw_direct): New define_insn.
(*altivec_vmrghsf): Adjust for endianness.
(altivec_vmrglb): Replace with define_expand and new
*altivec_vmrglb_internal insn; adjust for -maltivec=be with LE
targets.
(altivec_vmrglb_direct): New define_insn.
(altivec_vmrglh): Replace with define_expand and new
*altivec_vmrglh_internal insn; adjust for -maltivec=be with LE
targets.
(altivec_vmrglh_direct): New define_insn.
(altivec_vmrglw): Replace with define_expand and new
*altivec_vmrglw_internal insn; adjust for -maltivec=be with LE
targets.
(altivec_vmrglw_direct): New define_insn.
(*altivec_vmrglsf): Adjust for endianness.
(vec_widen_umult_hi_v16qi): Use gen_altivec_vmrghh_direct.
(vec_widen_umult_lo_v16qi): Use gen_altivec_vmrglh_direct.
(vec_widen_smult_hi_v16qi): Use gen_altivec_vmrghh_direct.
(vec_widen_smult_lo_v16qi): Use gen_altivec_vmrglh_direct.
(vec_widen_umult_hi_v8hi): Use gen_altivec_vmrghw_direct.
(vec_widen_umult_lo_v8hi): Use gen_altivec_vmrglw_direct.
(vec_widen_smult_hi_v8hi): Use gen_altivec_vmrghw_direct.
(vec_widen_smult_lo_v8hi): Use gen_altivec_vmrglw_direct.
gcc/testsuite:
2014-01-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* sem_prag.adb (Check_Missing_Part_Of): List all values of
State_Space_Kind for readability reasons. Do not emit an error on
a private item when the enclosing package lacks aspect/pragma
Abstract_State. Do not emit an error on a private package
instantiation when the corresponding generic template lacks
visible state.
(Has_Visible_State): New routine.
* sem_util.adb (Find_Placement_In_State_Space): The visible
declarations of any kind of child units in general act as proper
placement location.
Arnaud Charlet [Wed, 29 Jan 2014 15:37:54 +0000 (16:37 +0100)]
[multiple changes]
2014-01-29 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
that checks if an interface types defines the predefined "="
function because the compiler was erroneously not generating the
predefined "=" primitive as soon as the name of some interface
primitive is "=" (formals were not checked).
2014-01-29 Ed Schonberg <schonberg@adacore.com>
* expander.adb (Expander): In GNATprove mode, do not process
transient scopes: they are in general not created in this mode,
and an attempt to examine them will lead to constraint errors when
processing configuration pragmas that have analyzable expressions.
Vincent Celier [Wed, 29 Jan 2014 15:36:37 +0000 (15:36 +0000)]
clean.adb (Gnatclean): Fail if main project is an aggregate project or if...
2014-01-29 Vincent Celier <celier@adacore.com>
* clean.adb (Gnatclean): Fail if main project is an aggregate
project or if there is an aggregate library project in the
project tree.
* gnatcmd.adb: Fail if the main project is an aggregate project
or if there is an aggegate library project in the project tree.
* make.adb (Initialize): : Fail if main project is an aggregate
project or if there is an aggregate library project in the
project tree.
* makeutl.ads (Aggregate_Libraries_In): New Boolean function.
* prj-makr.adb (Initialize): Fail if the main project is an
aggregate project or an aggregate library project.
Vincent Celier [Wed, 29 Jan 2014 15:35:09 +0000 (15:35 +0000)]
prj-part.adb (Check_Import_Aggregate): New procedure to check if an imported project is an aggregate project.
2014-01-29 Vincent Celier <celier@adacore.com>
* prj-part.adb (Check_Import_Aggregate): New procedure
to check if an imported project is an aggregate project.
(Parse_Single_Project): Call Check_Import_Aggregate
* projects.texi: Document that aggregate projects cannot be
extended or imported.
* einfo.adb Flag264 is now unused.
(Has_Body_References): Removed.
(Set_Has_Body_References): Removed.
(Write_Entity_Flags): Remove the output for flag Has_Body_References.
* einfo.ads Update the comment on usage of attribute
Body_References. Remove attribute Has_Body_References and its
usage in nodes.
(Has_Body_References): Removed along with pragma Inline.
(Set_Has_Body_References): Removed along with pragma Inline.
* sem_prag.adb (Analyze_Global_Item): Move the call to
Record_Possible_Body_Reference in the state related checks
section. Add a comment intended function.
(Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
in the state related checks section. Add a comment intended function.
(Analyze_Refinement_Clause): Cleanup the illegal body reference
reporting. Add a comment on timing of error reporting.
(Record_Possible_Body_Reference): Reimplement the routine.
2014-01-29 Vincent Celier <celier@adacore.com>
* makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
unit-based languages.
(Mains.Complete_Mains.Do_Complete): Use the source file project
tree when calling Find_File_Add_Extension. Use the correct
project name when reporting an error.
* aspects.adb Add an entry for aspect Part_Of in table
Canonical_Aspect.
* aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
Aspect_Argument, Aspect_Names and Aspect_Delay.
* atree.h Define Elist9.
* atree.adb (Elist9): New routine.
(Set_Elist9): New routine.
* atree.ads (Elist9): New routine.
(Set_Elist9): New routine.
* einfo.adb Add Part_Of_Constituents and Encapsulating_State to
the list of node usage. Remove Refined_State from the list of
node usage.
(Encapsulating_State): New routine.
(Get_Pragma):
Handle pragma Part_Of; (Part_Of_Constituents): New routine.
(Refined_State): Removed.
(Set_Encapsulating_State): New routine.
(Set_Part_Of_Constituents): New routine.
(Set_Refined_State): Removed.
(Write_Field9_Name): Add an entry
for Part_Of_Constituents (Write_Field10_Name): Add an entry for
Encapsulating_State. Remove the entry for Refined_State.
* einfo.ads Add new attributes Encapsulating_State
and Part_Of_Constituents alond with their usage in
entities. Remove attribute Refined_State along with its
usage in entities.
(Encapsulating_State): New routine and
pragma Inline. (Get_Pragma): Update the comment on usage.
(Part_Of_Constituents): New routine and pragma Inline.
(Refined_State): Removed along with pragma Inline.
(Set_Encapsulating_State): New routine and pragma Inline.
(Set_Part_Of_Constituents): New routine and pragma Inline.
(Set_Refined_State): Removed along with pragma Inline.
* par-prag.adb Pragma Part_Of does not need any special processing
by the parser.
* sem_ch3.adb (Analyze_Declarations): Remove local variables
Body_Id and Prag. Call separate routines to analyze the
contract of a package [body].
(Analyze_Object_Contract):
Update the comment on usage. Remove local variables
Items and Nam. Use Get_Pragma rather than traversing the
classification list. Verify whether the lack of indicator
Part_Of agrees with the placement of the variable in state space.
(Analyze_Object_Declaration): Initialize the encapsulating state
of a variable. (Requires_State_Refinement): Moved to sem_util.
* sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
(Analyze_Package_Contract): New routine.
* sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
(Analyze_Package_Contract): New routine.
* sem_ch10.adb (Decorate_State): Initialize the encapsulating
state and Part_Of constituents.
* sem_ch13.adb (Analyze_Aspect_Specifications):
Add processing for aspect Part_Of. Update all
calls to Decorate_Delayed_Aspect_And_Pragma.
(Check_Aspect_At_Freeze_Point): Aspect Part_Of does
not need any special processing at freeze time.
(Decorate_Delayed_Aspect_And_Pragma): Renamed to
Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
update the associated comment.
* sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
(Analyze_Abstract_State): Add new global variable State_Id. Remove
local constants Errors and Loc. Remove local variables Is_Null
and State_Nam. Create the entity of the abstract state on the
spot, before all remaining checks are performed. Verify that a
missing Part_Of option agrees with the placement of the abstract
state within the state space.
(Analyze_Depends_In_Decl_Part):
Add new global variables Constits_Seen and States_Seen. Check
that a state and a corresponding constituent do not appear
in pragma [Refined_]Depends.
(Analyze_Global_In_Decl_Part):
Add new global variables Constits_Seen and States_Seen. Check
that a state and a corresponding constituent do not appear
in pragma [Refined_]Global.
(Analyze_Global_Item):
Remove the now obsolete code that deals with Part_Of.
Add the entity of the global item to the list of processed
items. (Analyze_Initializes_In_Decl_Part): Add new global
variables Constits_Seen and States_Seen. Check that a state
and a corresponding constituent do not appear in pragma
Initializes.
(Analyze_Initialization_Item): Add the entity
of the initialization item to the list of processed items.
(Analyze_Input_Item): Add the entity of the initialization
item to the list of processed items.
(Analyze_Input_Output):
Remove the now obsolete code that deals with Part_Of. Add the
entity of the input/output to the list of processed items.
(Analyze_Part_Of): New routine.
(Analyze_Part_Of_Option): Remove
local constant Par_State. Add local constant Encaps and local
variables Encaps_Id and Legal. Use Analyze_Part of to analyze
the option. Turn the related state into a Part_Of constituent
if the option is legal.
(Analyze_Pragma): Add processing
for pragma Part_Of.
(Analyze_Refined_State_In_Decl_Part):
Remove global constants Pack_Body and Spec_Id. Remove
global variables Abstr_States and Hidden_States. Add new
global variables Available_States, Body_Id, Body_States and
Spec_Id. Add new local constant Body_Decl. Reimplement the
logic that extracts the states available for refinement from
the related package and the body hidden states of the said
package.
(Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
(Check_Applicable_Policy): Alphabetize body.
(Check_Dependency_Clause): Replace Refined_State
with Encapsulating_State.
(Check_Matching_Constituent):
Reimplement the logic that determines whether an item is a valid
/ invalid constituent of the current refined state. Return when
a construct does not denote a valid abstract state. Extract the
list of Part_Of constituents for further analysis. Check that all
Part_Of constituents of a state have been used in its refinement.
(Check_Matching_State): Update the comment on usage. Operate
on the list of available states.
(Check_Missing_Part_Of): New routine.
(Check_Refined_Global_Item): Replace Refined_State
with Encapsulating_State.
(Check_State_And_Constituent_Use): New routine.
(Create_Abstract_State): New routine.
(Is_Matching_Input): Replace Refined_State with Encapsulating_State.
(Is_Part_Of): Removed.
(Collect_Body_States): New routine.
(Collect_Constituent): Replace Refined_State with Encapsulating_State.
(Collect_Hidden_States): Removed.
(Report_Unrefined_States): Change the profile of the procedure along
with the comment on usage.
(Report_Unused_Constituents): New routine.
(Report_Unused_Hidden_States): Removed.
(Report_Unused_States): New routine.
* sem_prag.ads (Check_Missing_Part_Of): New routine.
* sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
appear in the classification pragmas of a package instantiation
or a variable.
(Find_Placement_In_State_Space): New routine.
(Is_Child): Removed.
(Is_Child_Or_Sibling): Remove formal
parameter Private_Child. Remove the private child checks.
(Requires_State_Refinement): Moved from sem_ch3.
* sem_util.ads Add new type State_Space_Kind along with
comment on its usage and values.
(Add_Contract_Item): Update the comment on usage.
(Find_Body_Discriminal): Alphabetize spec.
(Find_Placement_In_State_Space): New routine.
(Is_Child_Or_Sibling): Remove formal parameter Private_Child
and update the comment on usage.
(Requires_State_Refinement): Moved from sem_ch3.
* sinfo.ads: Update the documentation of N_Contract.
* snames.ads-tmpl The predefined name for Part_Of is now used
to denote a pragma. Add Pragma_Id for Part_Of.
Ed Schonberg [Wed, 29 Jan 2014 15:26:18 +0000 (15:26 +0000)]
checks.adb: minor clarification.
2014-01-29 Ed Schonberg <schonberg@adacore.com>
* checks.adb: minor clarification.
* sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
search for primitive operations to the entities that immediately
follow the type declaration.