gcc.git
9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 15:44:32 +0000 (16:44 +0100)]
[multiple changes]

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_prag.adb (Add_Item_To_Name_Buffer): Update the comment on usage.
Add an output string for loop parameters.
(Analyze_Global_Items): Loop parameters are now a
valid global item. The share the legality checks of constants.
(Analyze_Input_Output): Loop parameters are now a valid dependency item.
(Find_Role): Loop parameters share the role of constants.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_res.adb (Resolve_Generalized_Indexing): In ASIS mode,
preserve the Generalized_ indexing link if the context is not
a spec expression that will be analyzed anew.

2015-10-26  Javier Miranda  <miranda@adacore.com>

* exp_ch6.ads, exp_ch6.adb (Build_Procedure_Body_Form): Promote it to
library level (to invoke this routine from the semantic analyzer).
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): When generating
C code, invoke Build_Procedure_Body_Form to transform a function
that returns a constrained array type into a procedure with an
out parameter that carries the return value.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>

* a-reatim.ads: Add "Clock_Time with Synchronous" contract in package
Ada.Real_Time.
* a-taside.ads: Add "Tasking_State with Synchronous" contract in
package Ada.Task_Identification.
* sem_ch12.adb: minor typo in comment

From-SVN: r229377

9 years agocontracts.adb (Analyze_Object_Contract): Set and restore the SPARK_Mode for both...
Hristian Kirtchev [Mon, 26 Oct 2015 15:40:10 +0000 (15:40 +0000)]
contracts.adb (Analyze_Object_Contract): Set and restore the SPARK_Mode for both constants and objects.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* contracts.adb (Analyze_Object_Contract): Set and restore
the SPARK_Mode for both constants and objects. Factor out the
semantic checks concerning Ghost objects.
* freeze.adb (Freeze_Array_Type): A Ghost array type cannot have a
concurrent component type.
(Freeze_Entity): A Ghost type cannot also be concurrent.
(Freeze_Record_Type): A Ghost record type cannot have a concurrent
component.
* sem_prag.adb (Analyze_Abstract_State): A Ghost abstract
state cannot also be synchronized.
(Check_Ghost_Synchronous): New routine.
* sem_util.adb (Yields_Synchronized_Object): Correct the case
of record components to account for the case where the type has
no component list.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* expander.adb (Expand): Expand a single protected declaration.
* exp_ch9.ads, exp_ch9.adb (Expand_N_Single_Protected_Declaration): New
routine.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_res.adb (Is_OK_Volatile_Context): A volatile object may appear
in an object declaration as long as it denotes the name.

From-SVN: r229376

9 years ago[PATCH] [PR tree-optimization/68013] Make sure first block in FSM path
Jeff Law [Mon, 26 Oct 2015 15:36:04 +0000 (09:36 -0600)]
[PATCH] [PR tree-optimization/68013] Make sure first block in FSM path
is in VISITED_BBs

PR tree-optimization/68013
* tree-ssa-threadbackward.c
(fsm_find_control_statement_thread_paths): Make sure the first block
in the path is in VISITED_BBs.

PR tree-optimization/68013
* gcc.c-torture/compile/pr68013.c: New test.

From-SVN: r229375

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 15:35:49 +0000 (16:35 +0100)]
[multiple changes]

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_ch9.adb (Analyze_Single_Protected_Declaration): The anonymous
object no longer comes from source.
(Analyze_Single_Task_Declaration): The anonymous object no longer
comes from source.
* sem_prag.adb (Analyze_Pragma): The analysis of pragma SPARK_Mode
now recognizes the internal anonymous object created for a single
concurren type as a valid context.
(Find_Related_Context): The internal anonymous object created for a
single concurrent type is now a valid context.
(Find_Related_Declaration_Or_Body): The internal anonymous object
created for a single concurrent type is now a valid context.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_util.adb (Inherit_Rep_Item_Chain): Another another guard
to prevent circularities in the rep_item_chain of the full view
of a type extension in a child unit that extends a private type
from the parent.

From-SVN: r229374

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 15:34:11 +0000 (16:34 +0100)]
[multiple changes]

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* atree.ads, atree.adb (Ekind_In): New 10 and 11 parameter versions.
* contracts.ads, contracts.adb (Analyze_Initial_Declaration_Contract):
New routine.
* sem_ch6.adb (Analyze_Generic_Subprogram_Body):
Analyze the contract of the initial declaration.
(Analyze_Subprogram_Body_Helper): Analyze the contract of the
initial declaration.
* sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the contract
of the initial declaration.
* sem_ch9.adb (Analyze_Entry_Body): Analyze the contract of
the initial declaration.
(Analyze_Protected_Body): Analyze
the contract of the initial declaration.
(Analyze_Task_Body): Analyze the contract of the initial declaration.
* sem_prag.adb (Add_Entity_To_Name_Buffer): Use "type" rather
than "unit" as it makes the error messages sound better.
(Add_Item_To_Name_Buffer): Update comment on usage. The routine
now supports discriminants and current instances of concurrent
types.
(Analyze_Depends_In_Decl_Part): Install the discriminants
of a task type.
(Analyze_Global_In_Decl_Part): Install the discriminants of a task type.
(Analyze_Global_Item): Add processing for current instances of
concurrent types and include discriminants as valid global items.
(Analyze_Input_Output): Discriminants and current instances of
concurrent types are now valid items. Update various error messages.
(Check_Usage): Current instances of protected and task types behaves
as formal parameters.
(Collect_Subprogram_Inputs_Outputs): There is
no longer need to manually analyze [Refined_]Global thanks to
freezing of initial declaration contracts.  Add processing for
the current instance of a concurrent type.
(Find_Role): Add categorizations for discriminants, protected and task
types.
(Is_CCT_Instance): New routine.
(Match_Items): Update the comment on usage. Update internal comments.
* sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update the
comment on usage.
* sem_util.adb (Entity_Of): Ensure that the entity is an object
when traversing a potential renaming chain.
(Fix_Msg): Use "type" rather than "unit" as it makes the error messages
sound better.
* sem_util.ads (Fix_Msg): Update the comment on usage.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>

* par.adb (Par): Do not generate an error when generating
SCIL for predefined units or new children of system and co.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* einfo.adb: Access_Disp_Table applies to a private
extension.

From-SVN: r229373

9 years agore PR rtl-optimization/67443 (DSE removes required store instruction)
Richard Biener [Mon, 26 Oct 2015 15:24:45 +0000 (15:24 +0000)]
re PR rtl-optimization/67443 (DSE removes required store instruction)

2015-10-26  Richard Biener  <rguenther@suse.de>
Dominik Vogt  <vogt@linux.vnet.ibm.com>

PR middle-end/67443
* alias.c (ao_ref_from_mem): Remove promoted subreg handling.
Properly prune ref->ref for accesses outside of ref.

* gcc.target/s390/pr67443.c: New testcase.

Co-Authored-By: Dominik Vogt <vogt@linux.vnet.ibm.com>
From-SVN: r229372

9 years agoAllow more complex call replacements in gimple-fold.c
Richard Sandiford [Mon, 26 Oct 2015 14:59:36 +0000 (14:59 +0000)]
Allow more complex call replacements in gimple-fold.c

An upcoming patch adds a match.pd rule that folds pow(pow(x,y),z)
to pow(x,y*z).  This fold can reuse the existing pow gimple statement
and simply replace the operands with x and y*z.  However, the y*z
itself requires a separate gimple statement and the code wasn't
prepared to handle that.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
* gimple-fold.c (replace_stmt_with_simplification): Don't allow
new statements to be inserted if inplace.  Allow calls to have
nonempty sequences.

From-SVN: r229371

9 years agooffload_host.cpp (OffloadDescriptor::setup_misc_data): Use calloc instead of malloc.
Ilya Verbin [Mon, 26 Oct 2015 14:38:02 +0000 (14:38 +0000)]
offload_host.cpp (OffloadDescriptor::setup_misc_data): Use calloc instead of malloc.

liboffloadmic/
* runtime/offload_host.cpp (OffloadDescriptor::setup_misc_data): Use
calloc instead of malloc.
(__offload_fini_library): Set mic_engines_total to zero.

Co-Authored-By: Aleksander Ivanushenko <aleksander.ivanushenko@intel.com>
From-SVN: r229368

9 years agoFix attribution in ChangeLog
Richard Sandiford [Mon, 26 Oct 2015 14:34:02 +0000 (14:34 +0000)]
Fix attribution in ChangeLog

While going through some history, I noticed that I'd committed one
of Alan's changes with my email address rather than his.  Sorry for
the screw-up.

From-SVN: r229366

9 years agotree-object-size.c: Remove builtins.h include, include tree-cfg.h.
Richard Biener [Mon, 26 Oct 2015 14:22:20 +0000 (14:22 +0000)]
tree-object-size.c: Remove builtins.h include, include tree-cfg.h.

2015-10-26  Richard Biener  <rguenther@suse.de>

* tree-object-size.c: Remove builtins.h include, include tree-cfg.h.
(do_valueize): New function.
(pass_object_sizes::execute): Use gimple_fold_stmt_to_constant and
replace_uses_by.
* tree-ssa-threadedge.c: Remove builtins.h include, include
gimple-fold.h
(fold_assignment_stmt): Remove.
(threadedge_valueize): New function.
(record_temporary_equivalences_from_stmts): Use
gimple_fold_stmt_to_constant_1, note additional cleanup
opportunities.

From-SVN: r229364

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 13:37:54 +0000 (14:37 +0100)]
[multiple changes]

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_res.adb (Resolve_Generalized_Indexing): In ASIS mode, when
restoring original node, remove Generalized_Indexing operation
so that it is recreated during re- analysis.

2015-10-26  Javier Miranda  <miranda@adacore.com>

* exp_unst.adb: (Unnest_Subprogram):
Replace absolute references to 1 and 0 by their counterpart
relative references through Subps_First.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* par-ch3.adb (P_Declarative_Items): In case of misplaced
aspect specifications, ensure that flag Done is properly set to
continue parse.
* sem_prag.adb, sem_prag.ads: Remove Build_Generic_Class_Condition,
unused.

From-SVN: r229362

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 13:30:23 +0000 (14:30 +0100)]
[multiple changes]

2015-10-26  Emmanuel Briot  <briot@adacore.com>

* s-os_lib.adb (Argument_String_To_List): Remove backslashes in
argument value.

2015-10-26  Javier Miranda  <miranda@adacore.com>

* exp_unst.ads, exp_unst.adb (Is_Uplevel_Referenced): Removed.

From-SVN: r229361

9 years agomatch.pd ((A & ~B) - (A & B) -> (A ^ B) - B): Add missing :c.
Richard Biener [Mon, 26 Oct 2015 13:27:59 +0000 (13:27 +0000)]
match.pd ((A & ~B) - (A & B) -> (A ^ B) - B): Add missing :c.

2015-10-26  Richard Biener  <rguenther@suse.de>

* match.pd ((A & ~B) - (A & B) -> (A ^ B) - B): Add missing :c.
( (X & ~Y) | (~X & Y) -> X ^ Y): Remove redundant :c.

From-SVN: r229360

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 13:27:48 +0000 (14:27 +0100)]
[multiple changes]

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_util.adb, sem_aux.adb, exp_attr.adb, sem_eval.adb: Minor
reformatting.
* sem_util.adb, sem_ch5.adb: Minor reformatting.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* exp_unst.adb (Unnest_Subprogram): Add guard to prevent compiler
abort when handling a reference to a formal in an aspect of a
nested subprogram declaration as an uplevel reference.

From-SVN: r229359

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 13:26:11 +0000 (14:26 +0100)]
[multiple changes]

2015-10-26  Bob Duff  <duff@adacore.com>

* snames.ads-tmpl, aspects.adb, aspects.ads: Add the aspect and
pragma names and enter into relevant tables.
* sem_ch13.adb (Analyze_Aspect_Specifications): Analyze aspect
Predicate_Failure.
* sem_prag.adb (Predicate_Failure): Analyze pragma Predicate_Failure.
* exp_util.adb (Make_Predicate_Check): When building the Check
pragma, if Predicate_Failure has been specified, add the relevant
String argument to the pragma.
* par-prag.adb (Prag): Add Predicate_Failure to list of pragmas
handled during semantic analysis.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_ch5.adb (Analyze_Assignment): If the left-hand side
is an indexed component with generalized indexing, discard
interpretation that yields a reference type, which is not
assignable. This prevent spurious ambiguities when the right-hand
side is an aggregate which does not provide a target type.

From-SVN: r229358

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 13:23:35 +0000 (14:23 +0100)]
[multiple changes]

2015-10-26  Bob Duff  <duff@adacore.com>

* exp_ch7.adb, exp_ch6.adb: Minor comment fix.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* aspects.adb (Move_Or_Merge_Aspects): Move all aspects related
to a single concurrent type declaration to the declaration
of the anonymous object if they qualify.
(Relocate_Aspect): Update comment on usage.
* aspects.ads Add new sectioon on aspect specifications on single
concurrent types. Add new table Aspect_On_Anonymous_Object_OK.
(Move_Or_Merge_Aspects): Udate the comment on usage.
* atree.adb (Elist36): New routine.
(Set_Elist36): New routine.
* atree.ads (Elist36): New routine along with pragma Inline.
(Set_Elist36): New routine along with pragma Inline.
* atree.h: Elist36 is now an alias for Field36.
* contracts.adb (Add_Contract_Item): Add processing
for protected units and extra processing for variables.
(Analyze_Object_Contract): Code cleanup. The processing of
Part_Of now depends on wherer the object is a constant or
a variable. Add processing for pragmas Depends and Global
when they apply to a single concurrent object. Verify that a
variable which is part of a single concurrent type has full
default initialization. Set/restore the SPARK_Mode of a single
concurrent object.
(Analyze_Protected_Contract): New routine.
* contracts.ads (Add_Contract_Item): Update the comment on usage.
(Analyze_Object_Contract): Update the comment on usage.
(Analyze_Protected_Contract): New routine.
(Analyze_Task_Contract): Update the comment on usage.
* einfo.adb Part_Of_Constituents now uses Elist10.
(Anonymous_Object): New routine.
(Contract): Code cleanup.
(Has_Option): Remove the assumption that the only simple
option is External.
(Is_Synchronized_State): New routine.
(Part_Of_Constituents): This attribute applies to
variables and uses Elist10.
(Set_Anonymous_Object): New routine.
(Set_Contract): Code cleanup.
(Set_Part_Of_Constituents): This attribute applies to variables and
uses Elist10.
(Set_SPARK_Aux_Pragma): Code cleanup.
(Set_SPARK_Aux_Pragma_Inherited): Code cleanup.
(Set_SPARK_Pragma): Code cleanup. This attribute applies to
variables.
(Set_SPARK_Pragma_Inherited): Code cleanup. This
attribute applies to variables.
(SPARK_Aux_Pragma): Code cleanup.
(SPARK_Aux_Pragma_Inherited): Code cleanup.
(SPARK_Pragma): Code cleanup. This attribute applies to variables.
(SPARK_Pragma_Inherited): Code cleanup. This attribute applies
to variables.
(Write_Field9_Name): Remove the output for Part_Of_Constituents.
(Write_Field10_Name): Add output for Part_Of_Constituents.
(Write_Field30_Name): Add output for Anonymous_Object.
(Write_Field34_Name): Output SPARK_Pragma
for protected types and variables.
* einfo.ads: New attributes Anonymous_Object and
Is_Synchronized_State along with usage in entities. Update
the documentation of attributes Contract Encapsulating_State
Part_Of_Constituents SPARK_Aux_Pragma SPARK_Aux_Pragma_Inherited
SPARK_Pragma SPARK_Pragma_Inherited (Anonymous_Object): New
routine along with pragma Inline.
(Is_Synchronized_State): New routine.
(Set_Anonymous_Object): New routine along with pragma Inline.
* freeze.adb (Freeze_Record_Type): Ensure that a non-synchronized
record does not have synchronized components.
* sem_ch3.adb (Analyze_Declarations): Code cleanup. Analyze the
contract of protected units.
* sem_ch9.adb Add with and use clauses for Sem_Prag. Code cleanup.
(Analyze_Single_Protected_Declaration): Reimplemented.
(Analyze_Single_Task_Declaration): Reimplemented.
* sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Part_Of
can now apply to a single concurrent type declaration. Rely on
Insert_Pragma to place the pragma.  Update the error message on
usage to reflect the new context.
(Insert_Pragma): When inserting
pragmas for a protected or task type, create a definition if
the type lacks one.
* sem_elab.adb (Check_A_Call): Code cleanup. Issue error message
related to elaboration issues for SPARK when SPARK_Mode is "on"
and the offending entity comes from source.
* sem_prag.adb (Analyze_Abstract_State): Add new flag
Synchronous_Seen. Update the analysis of simple options Externa,
Ghost and Synchronous. Update various error messages to reflect
the use of single concurrent types.
(Analyze_Depends_Global): Pragmas Depends and Global can now apply to
a single task type or a single concurrent object created for a task
type.
(Analyze_Depends_In_Decl_Part): Do not push a scope when the
context is a single concurrent object. (Analyze_Part_Of):
Moved out of Analyze_Pragma. The routine has a new profile
and comment on usage.
(Analyze_Part_Of_In_Decl_Part): New routine.
(Analyze_Part_Of_Option): Update the call to Analyze_Part_Of.
(Analyze_Pragma): Pragma Abstract_State can
now carry simple option Synchronous. Pragma Part_Of can now
apply to a single concurrent type declaration. The analysis
of pragma Part_Of is delayed when the context is a single
concurrent object.
(Analyze_Refined_Depends_In_Decl_Part): Use the anonymous object when
the context is a single concurren type.
(Analyze_Refined_Global_In_Decl_Part): Use the
anonymous object when the context is a single concurren type.
(Check_Ghost_Constituent): Removed.
(Check_Matching_Constituent): Renamed to Match_Constituent.
(Check_Matching_State): Renamed to Match_State.
(Collect_Constituent): Update the comment
on usage. Verify various legality rules related to ghost and
synchronized entities.
(Find_Related_Declaration_Or_Body): A single task declaration is no
longer a valid context for a pragma.
(Fix_Msg): Moved to Sem_Util.
(Process_Overloadable): Add processing for single task objects.
(Process_Visible_Part): Add processing for single concurrent
types.
(Relocate_Pragmas_To_Anonymous_Object): New routine.
* sem_prag.ads Add new table Pragma_On_Anonymous_Object_OK.
(Analyze_Part_Of_In_Decl_Part): New routine.
(Relocate_Pragmas_To_Anonymous_Object): New routine.
* sem_util.adb (Defining_Entity): Code cleanup.
(Fix_Msg): Moved from Sem_Prag and augmented to handle
mode replacements.
(Has_Full_Default_Initialization): New routine.
(Is_Descendant_Of_Suspension_Object): Moved out of
Is_Effectively_Volatile.
(Is_Single_Concurrent_Object): New routine.
(Is_Single_Concurrent_Type): New routine.
(Is_Single_Concurrent_Type_Declaration): New routine.
(Is_Synchronized_Object): New routine.
(Yields_Synchronized_Object): New routine.
* sem_util.ads (Fix_Msg): Moved form Sem_Prag. Update the
comment on usage.
(Has_Full_Default_Initialization): New routine.
(Is_Single_Concurrent_Object): New routine.
(Is_Single_Concurrent_Type): New routine.
(Is_Single_Concurrent_Type_Declaration): New routine.
(Is_Synchronized_Object): New routine.
(Yields_Synchronized_Object): New routine.
* snames.ads-tmpl: Add name Synchronous.

From-SVN: r229357

9 years agosysdep.c (__gnat_get_task_options): Refine the workaround for the VX_USR_TASK_OPTION...
Jerome Lambourg [Mon, 26 Oct 2015 13:14:49 +0000 (13:14 +0000)]
sysdep.c (__gnat_get_task_options): Refine the workaround for the VX_USR_TASK_OPTION bug in VxWorks 7...

2015-10-26  Jerome Lambourg  <lambourg@adacore.com>

* sysdep.c (__gnat_get_task_options): Refine the workaround for
the VX_USR_TASK_OPTION bug in VxWorks 7, as we cannot check the
value of VX_DEALLOC_TCB in RTP mode, the macro value not being
defined in the headers.
* g-arrspl.ads: Fix typo.

From-SVN: r229356

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 13:10:12 +0000 (14:10 +0100)]
[multiple changes]

2015-10-26  Jerome Lambourg  <lambourg@adacore.com>

* sysdep.c (__gnat_get_task_options): Workaround a VxWorks
bug where VX_DEALLOC_TCB task option is forbidden when calling
taskCreate but allowed in VX_USR_TASK_OPTIONS.

2015-10-26  Javier Miranda  <miranda@adacore.com>

* exp_unst.ads, exp_unst.adb (Is_Uplevel_Referenced): New subprogram.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_ch4.adb (Constant_Indexing_OK): New predicate, subsidiary
of Try_Container_Indexing, that implements the name resolution
rules given in RM 4.1.6 (13-15).

From-SVN: r229355

9 years agosem_ch3.adb, [...]: Minor reformatting.
Hristian Kirtchev [Mon, 26 Oct 2015 13:04:09 +0000 (13:04 +0000)]
sem_ch3.adb, [...]: Minor reformatting.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_ch3.adb, sem_util.adb: Minor reformatting.

From-SVN: r229354

9 years agore PR fortran/66927 (ICE in gfc_conf_procedure_call)
Andre Vehreschild [Mon, 26 Oct 2015 13:03:22 +0000 (14:03 +0100)]
re PR fortran/66927 (ICE in gfc_conf_procedure_call)

gcc/fortran/ChangeLog:

2015-10-26  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/66927
* trans-array.c (evaluate_bound): For deferred length arrays get the
bounds directly from the descriptor, i.e., prevent using constant
zero lower bound from the gfc_conv_array_lbound () routine.
(gfc_conv_section_startstride): Hand deferred array status to
evaluate_bound ().
(gfc_conv_expr_descriptor): Same.

From-SVN: r229353

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 13:01:25 +0000 (14:01 +0100)]
[multiple changes]

2015-10-26  Javier Miranda  <miranda@adacore.com>

* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Return False when
generating C code.
* sem_ch3.adb: Fix typos.

2015-10-26  Bob Duff  <duff@adacore.com>

* sem_ch13.adb (Build_Predicate_Functions): Change the
structure of the predicate functions to reflect the requirements
of AI12-0071.
(Add_Condition): New procedure to do the "and-then-ing" in Add_Call
and Add_Predicates.
* einfo.ads (Static_Real_Or_String_Predicate): Change the
documentation to reflect the new structure.
* sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
Change the walking of the predicate expression to reflect the
new structure.
* exp_util.adb: Minor comment fix.

From-SVN: r229352

9 years agos-rident.ads (No_Dynamic_Sized_Objects): New restriction name.
Bob Duff [Mon, 26 Oct 2015 12:05:58 +0000 (12:05 +0000)]
s-rident.ads (No_Dynamic_Sized_Objects): New restriction name.

2015-10-26  Bob Duff  <duff@adacore.com>

* s-rident.ads (No_Dynamic_Sized_Objects): New restriction name.
* sem_util.ads, sem_util.adb (All_Composite_Constraints_Static):
New function to check that all relevant constraints are static.
* sem_aggr.adb (Resolve_Array_Aggregate): Call
All_Composite_Constraints_Static on the bounds of named array
aggregates.
* sem_ch3.adb (Analyze_Subtype_Declaration): Call
All_Composite_Constraints_Static if the type is composite and
the subtype is constrained.

From-SVN: r229351

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 12:03:29 +0000 (13:03 +0100)]
[multiple changes]

2015-10-26  Javier Miranda  <miranda@adacore.com>

* exp_ch6.adb (Expand_N_Subprogram_Declaration): Skip the frontend
transformation of functions that return a constrained array into
a procedure when they are unchecked_conversion instances.

2015-10-26  Gary Dismukes  <dismukes@adacore.com>

* s-os_lib.ads: Minor reformatting/rewording.

From-SVN: r229350

9 years agodebug.adb: Introduce debug flag -gnatd.5.
Arnaud Charlet [Mon, 26 Oct 2015 12:00:55 +0000 (12:00 +0000)]
debug.adb: Introduce debug flag -gnatd.5.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>

* debug.adb: Introduce debug flag -gnatd.5.

From-SVN: r229349

9 years agos-os_lib.ads, [...] (Kill): New routine.
Pascal Obry [Mon, 26 Oct 2015 11:59:42 +0000 (11:59 +0000)]
s-os_lib.ads, [...] (Kill): New routine.

2015-10-26  Pascal Obry  <obry@adacore.com>

* s-os_lib.ads, s-os_lib.adb (Kill): New routine. This routine
makes visible support for killing processes in expect.c.
* expect.c (__gnat_kill): Removed from here.
* adaint.c (__gnat_kill): Added here to be usable in the compiler
(System.OS_Lib).
* make.adb (Sigint_Intercepted): Use the Kill routine from
System.OS_Lib.

From-SVN: r229348

9 years agoeinfo.ads, [...] (Needs_Typedef, [...]): Removed, no longer used.
Arnaud Charlet [Mon, 26 Oct 2015 11:56:57 +0000 (11:56 +0000)]
einfo.ads, [...] (Needs_Typedef, [...]): Removed, no longer used.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>

* einfo.ads, einfo.adb, exp_unst.adb (Needs_Typedef,
Set_Needs_Typedef): Removed, no longer used.

From-SVN: r229347

9 years agotree-vect-loop.c (vect_create_epilog_for_reduction): Fix VEC_COND_EXPR types.
Alan Hayward [Mon, 26 Oct 2015 11:55:45 +0000 (11:55 +0000)]
tree-vect-loop.c (vect_create_epilog_for_reduction): Fix VEC_COND_EXPR types.

2015-10-26  Alan Hayward <alan.hayward@arm.com>

* tree-vect-loop.c (vect_create_epilog_for_reduction): Fix
VEC_COND_EXPR types.

From-SVN: r229346

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 11:55:18 +0000 (12:55 +0100)]
[multiple changes]

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* einfo.adb (First_Component): Update the assertion to allow
for concurrent types.
(First_Component_Or_Discriminant): Update the assertion to allow for
concurrent types.
* einfo.ads: Update the documentation of attributes First_Component
and First_Component_Or_Discriminant along with uses in entities.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_res.adb (Resolve_Actuals): An effectively
volatile object may act as an actual when the corresponding
formal is of a non-scalar effectively volatile type, not just
a non-scalar volatile type.

2015-10-26  Bob Duff  <duff@adacore.com>

* sinfo.ads, sem_util.ads: Update comments.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_prag.adb (Analyze_Refined_Depends_Global_Post): When dealing with
protected entries or protected subprograms, use the enclosing protected
type to ensure that the protected type declaration is declared
in a package spec. Remove an obsolete attempt to ensure the
aggregate for of pragma Refined_State as this routine is never
called in that case.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* exp_ch5.adb (Expand_Iterator_Loop_Over_Container): For
an element iterator loop, the element is a constant if the
container object is a constant, even if the container type has
a Variable_Indexing aspect.

From-SVN: r229345

9 years ago[auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD...
Kyrylo Tkachov [Mon, 26 Oct 2015 11:51:47 +0000 (11:51 +0000)]
[auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD cases

* auto-inc-dec.c (insert_move_insn_before): Delete.
(attempt_change): Remember to cost the simple move in the
FORM_PRE_ADD and FORM_POST_ADD cases.

From-SVN: r229344

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 11:51:46 +0000 (12:51 +0100)]
[multiple changes]

2015-10-26  Bob Duff  <duff@adacore.com>

* s-fileio.adb (Fopen_Mode): Use "r+" for Out_File/Stream_IO,
so the file won't be truncated on 'fopen', as required by
AI95-00283-1.

2015-10-26  Bob Duff  <duff@adacore.com>

* gnat1drv.adb, prj.adb, sem_ch6.adb, s-regpat.adb,
sem_prag.adb: Fix typos.
* einfo.ads, restrict.ads: Minor comment fixes.
* err_vars.ads, sem_util.adb, errout.ads: Code clean up.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_ch5.adb (Analyze_Assignment): Do not check that the
Left-hand side is legal in an inlined body, check is done on
the original template.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* exp_util.ads, exp_util.adb (Find_Primitive_Operations): New
subprogram to retrieve by name the possibly overloaded set of
primitive operations of a type.
* sem_ch4.adb (Try_Container_Indexing): Use
Find_Primitive_Operations to handle overloaded indexing operations
of a derived type.

From-SVN: r229343

9 years agoosint-c.ads: Minor comment update.
Arnaud Charlet [Mon, 26 Oct 2015 11:44:33 +0000 (11:44 +0000)]
osint-c.ads: Minor comment update.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>

* osint-c.ads: Minor comment update.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>

* s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
s-osinte-darwin.ads, s-osinte-android.ads, s-osinte-freebsd.ads,
s-taprop-posix.adb (Get_Page_Size): C function returns an int. Adjust
callers accordingly.

From-SVN: r229342

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 11:38:57 +0000 (12:38 +0100)]
[multiple changes]

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_ch4.adb (Is_OK_Object_Reference): New routine.
(Substitute_Valid_Check): Perform the 'Valid subsitution but do
not suggest the use of the attribute if the left hand operand
does not denote an object as it leads to illegal code.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_unst.adb: Minor reformatting.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_ch6.adb: Improve error msg.

From-SVN: r229341

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 11:37:17 +0000 (12:37 +0100)]
[multiple changes]

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_disp.adb (Check_Controlling_Type): Handle properly the
case of an incomplete type whose full view is tagged, when a
primitive operation of the type is declared between the two views.

2015-10-26  Bob Duff  <duff@adacore.com>

* adaint.c (__gnat_locate_exec_on_path): If the PATH environment
variable is not set, do not return NULL, because we can still find
the executable if it includes a directory name.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_elab.adb (Elab_Warning): Under dynamic elaboration, when
elaboration warnings are enabled, emit proper warning header
when triggered by an access attribute.

2015-10-26  Steve Baird  <baird@adacore.com>

* exp_ch11.adb: If CodePeer_Mode is true, generate simplified
SCIL for exception declarations.
* exp_ch11.adb (Expand_N_Exception_Declaration) If CodePeer_Mode
is True, initialize the Full_Name component of the exception
record to null instead of to the result of an unchecked
conversion.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* exp_unst.adb (Note_Uplevel_Ref) : Handle properly a reference
that denotes a function returning a constrained array, that has
been rewritten as a procedure.
* makeutl.ads: Minor edit.

From-SVN: r229340

9 years agoMinor reformatting.
Arnaud Charlet [Mon, 26 Oct 2015 11:32:50 +0000 (12:32 +0100)]
Minor reformatting.

From-SVN: r229339

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 11:32:36 +0000 (12:32 +0100)]
[multiple changes]

2015-10-26  Yannick Moy  <moy@adacore.com>

* lib-xref-spark_specific.adb (Traverse_Protected_Declaration): New
procedure for traversal.
(Add_SPARK_Xrefs): Remove debugging code.
(Traverse_Declaration_Or_Statement): Call the new traversal
procedure.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_prag.adb (Analyze_Pragma): Pragma
Extensions_Visible can now appear on an abstract subprogram
declaration.

From-SVN: r229338

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 11:31:06 +0000 (12:31 +0100)]
[multiple changes]

2015-10-26  Yannick Moy  <moy@adacore.com>

* lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Use character 'r' to
denote a reference to a constant which may have variable input, and
thus may be treated as a variable in GNATprove, instead of the
character 'c' used for constants.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_util.adb (Object_Access_Level): Only aliased formals of
functions have the accessibility level of the point of call;
aliased formals of procedures have the same level as unaliased
formals.
(New_Copy_Tree): Add guard on copying itypes. From code reading.

From-SVN: r229337

9 years ago[config/sh/sh.c] Fix PR68091: Return false for non shmedia targets in sh_vector_mode_...
Kaz Kojima [Mon, 26 Oct 2015 11:30:11 +0000 (11:30 +0000)]
[config/sh/sh.c] Fix PR68091: Return false for non shmedia targets in sh_vector_mode_supported_p

PR target/68091
* config/sh/sh.c (sh_vector_mode_supported_p): Use
TARGET_SHMEDIA_FPU instead of TARGET_FPU_ANY.

From-SVN: r229336

9 years agoCode clean ups.
Arnaud Charlet [Mon, 26 Oct 2015 11:29:34 +0000 (12:29 +0100)]
Code clean ups.

From-SVN: r229335

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 11:29:13 +0000 (12:29 +0100)]
[multiple changes]

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* inline.adb: Minor reformatting.

2015-10-26  Yannick Moy  <moy@adacore.com>

* get_spark_xrefs.adb (get_SPARK_Xrefs): Remove obsolete
assertion.
* lib-xref-spark_specific.adb (Traverse_Declaration_Or_Statement):
New procedure to factor duplicated code and add
treatment of protected entries.
(Add_SPARK_Scope, Traverse_Declarations_Or_Statements): Call the new
procedure Traverse_Declaration_Or_Statement. Use same character used in
normal xrefs for SPARK xrefs, for a given entity used as scope.
* spark_xrefs.ads Document character used for entries.
* sem_prag.adb (Check_Loop_Pragma_Placement): Account for possible
introduction of declarations and statements by the expansion, between
two otherwise consecutive loop pragmas.
* sem_util.ads, sem_util.adb (Is_Suspension_Object): Lifted from nested
function.
(Is_Descendant_Of_Suspension_Object): nested function lifted.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_attr.adb (Eval_Attribute): Attribute 'Enum_Rep can be folded
when its prefix denotes a constant, an enumeration literal or
an enumeration type. Use the expression of the attribute in the
enumeration type form, otherwise use the prefix to fold.

From-SVN: r229334

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 11:26:32 +0000 (12:26 +0100)]
[multiple changes]

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* aspects.adb Add an entry for entry bodies in table
Has_Aspect_Specifications_Flag.
(Aspects_On_Body_Or_Stub_OK): Entry bodies now allow for certain
aspects.
* contracts.adb (Add_Contract_Items): Code cleanup. Add
processing for entry bodies, entry declarations and task units.
(Analyze_Subprogram_Body_Contract): Renamed
to Analyze_Entry_Or_Subprogram_Body_Contract. Do not
analyze the contract of an entry body unless annotating the
original tree.
(Analyze_Subprogram_Contract): Renamed to
Analyze_Entry_Or_Subprogram_Contract.  Do not analyze the contract
of an entry declaration unless annotating the original tree.
(Analyze_Task_Contract): New routine.
* contracts.ads (Add_Contract_Item): Update the comment on usage.
(Analyze_Package_Body_Contract): Update comment on usage.
(Analyze_Package_Contract): Update the comment on usage.
(Analyze_Subprogram_Body_Contract): Renamed to
Analyze_Entry_Or_Subprogram_Body_Contract.
(Analyze_Subprogram_Body_Stub_Contract): Update the comment on usage.
(Analyze_Subprogram_Contract): Renamed to
Analyze_Entry_Or_Subprogram_Contract.
(Analyze_Task_Contract): New routine.
* einfo.adb (Contract): Restructure the assertion to include
entries and task units.
(SPARK_Pragma): This attribute now applies to operators.
(SPARK_Pragma_Inherited): This flag now applies to operators.
(Set_Contract): Restructure the assertion to include entries and task
units.
(Set_SPARK_Pragma): This attribute now applies to operators.
(Set_SPARK_Pragma_Inherited): This flag now applies to operators.
(Write_Field34_Name): Write out all Ekinds that have a contract.
(Write_Field40_Name): SPARK_Pragma now applies to operators.
* einfo.ads: Update the documentation of attribute Contract along
with usage in nodes.  Update the documentation of attributes
SPARK_Pragma and SPARK_Pragma_Inherited.
* exp_ch6.adb (Freeze_Subprogram): Update the call to
Analyze_Subprogram_Contract.
* par-ch9.adb (P_Entry_Barrier): Do not parse keyword "is" as it
is not part of the entry barrier production.
(P_Entry_Body): Parse the optional aspect specifications. Diagnose
misplaced aspects.
* sem_attr.adb (Analyze_Attribute_Old_Result): Update the call
to Find_Related_Subprogram_Or_Body.
* sem_aux.adb (Unit_Declaration_Node) Add an entry for entry
declarations and bodies.
* sem_ch3.adb (Analyze_Declarations): Analyze the contracts of
entry declarations, entry bodies and task units.
* sem_ch6.adb (Analyze_Generic_Subprogram_Body):
Update the call to Analyze_Subprogram_Body_Contract.
(Analyze_Subprogram_Body_Helper): Update the call to
Analyze_Subprogram_Body_Contract.
* sem_ch9.adb (Analyze_Entry_Body): Analyze the aspect
specifications and the contract.
* sem_ch10.adb (Analyze_Compilation_Unit): Update the call to
Analyze_Subprogram_Contract.
* sem_ch12.adb (Save_References_In_Pragma): Update the call to
Find_Related_Subprogram_Or_Body.
* sem_ch13.adb (Analyze_Aspects_On_Body_Or_Stub): Use
Unique_Defining_Entity rather than rummaging around in nodes.
(Diagnose_Misplaced_Aspects): Update comment on usage. Update the
error messages to accomondate the increasing number of contexts.
* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
Update the call to Find_Related_Subprogram_Or_Body.
(Analyze_Depends_Global): Update the call to
Find_Related_Subprogram_Or_Body. Add processing for entry
declarations.
(Analyze_Depends_In_Decl_Part): Update the call
to Find_Related_Subprogram_Or_Body. Task units have no formal
parameters to install. (Analyze_Global_In_Decl_Part): Update
the call to Find_Related_Subprogram_Or_Body. Task units have no
formal parameters to install.
(Analyze_Global_Item): Use Fix_Msg to handle the increasing number of
contexts.
(Analyze_Pragma): Update the call to Find_Related_Subprogram_Or_Body.
Perform full analysis when various pragmas appear in an entry body.
(Analyze_Pre_Post_Condition): Update the call to
Find_Related_Subprogram_Or_Body. Perform full analysis when the pragma
appears in an entry body.
(Analyze_Pre_Post_Condition_In_Decl_Part): Update the call to
Find_Related_Subprogram_Or_Body.
(Analyze_Refined_Depends_Global_Post): Update
the call to Find_Related_Subprogram_Or_Body. Use
Fix_Msg to handle the increasing number of contexts.
(Analyze_Refined_Depends_In_Decl_Part): Update
the call to Find_Related_Subprogram_Or_Body. Use
Unique_Defining_Entity to obtain the entity of the
spec. Use Fix_Msg to handle the increasing number of contexts.
(Analyze_Refined_Global_In_Decl_Part): Update the call to
Find_Related_Subprogram_Or_Body. Use Unique_Defining_Entity to obtain
the entity of the spec. Use Fix_Msg to handle the increasing number of
contexts.
(Analyze_Test_Case_In_Decl_Part): Update the call to
Find_Related_Subprogram_Or_Body.
(Check_Dependency_Clause): Use Fix_Msg to handle the increasing number
of contexts.
(Check_Mode_Restriction_In_Enclosing_Context): Use
Fix_Msg to handle the increasing number of contexts.
(Collect_Subprogram_Inputs_Outputs): Use the refined
versions of the pragmas when the context is an entry body or
a task body.
(Find_Related_Subprogram_Or_Body): Renamed to
Find_Related_Declaration_Or_Body.  Add processing for entries
and task units.
(Fix_Msg): New routine.
(Role_Error): Use Fix_Msg to handle the increasing number of contexts.
* sem_prag.ads (Find_Related_Subprogram_Or_Body): Renamed to
Find_Related_Declaration_Or_Body.  Update the comment on usage.
* sem_util.adb (Is_Entry_Body): New routine.
(Is_Entry_Declaration): New routine.
* sem_util.ads (Is_Entry_Body): New routine.
(Is_Entry_Declaration): New routine.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* inline.adb (Has_Excluded_Declaration): A subtype declaration
with a predicate aspect generates a subprogram, and therefore
prevents the inlining of the enclosing subprogram.
* osint.ads: Fix typo.

From-SVN: r229333

9 years agosem_case.adb (Check_Choice_Set): Choose initial choice range below low bound of type...
Ed Schonberg [Mon, 26 Oct 2015 11:21:21 +0000 (11:21 +0000)]
sem_case.adb (Check_Choice_Set): Choose initial choice range below low bound of type...

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_case.adb (Check_Choice_Set): Choose initial choice range
below low bound of type, to prevent spurious errors on case
statements whose expressions have an integer subtype with a
static predicate.
* sem_util.ads: Fix typo.

From-SVN: r229332

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 11:17:42 +0000 (12:17 +0100)]
[multiple changes]

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* exp_ch4.adb (Expand_N_Case_Expression): In the scope of a
predicate function, delay the expansion of the expression only
if the target type has a specified Static_ Predicate aspect,
because the expression is processed later. A dynamic predicate
must be expanded in standard fashion.

2015-10-26  Claire Dross  <dross@adacore.com>

* a-nudira.ads: Remove SPARK_Mode as it currently causes an error.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>

* sem_aggr.adb, sem_type.adb, sem_ch12.adb, sem_res.adb, sem_ch4.adb,
sem_ch8.adb, exp_aggr.adb, sem_eval.adb, s-fatgen.adb, a-tienio.adb:
Fix typos.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_ch13.adb (Analyze_Aspect_Specifications): The processing
for aspects Abstract_State, Ghost, Initial_Condition, Initializes
and Refined_State no longer have to take SPARK_Mode into account.
(Insert_After_SPARK_Mode): Removed.
(Insert_Pragma): Update profile and comment on usage. The routine can
now insert a pragma after the "header" of an instance.
* sem_prag.adb (Analyze_If_Available): New routine.
(Analyze_Pragma): Do not reset the Analyzed flag of various
SPARK pragmas as they use the Is_Analyzed_Pragma attribute to
avoid reanalysis. Various pragmas now trigger the analysis
of related pragmas that depend on or are dependent on the
current pragma. Remove the declaration order checks related
to pragmas Abstract_State, Initial_Condition and Initializes.
(Analyze_Pre_Post_Condition): Analyze pragmas SPARK_Mode and
Volatile_Function prior to analyzing the pre/postcondition.
(Check_Declaration_Order): Removed.
(Check_Distinct_Name): Ensure that a potentially duplicated pragma
Test_Case is not the pragma being analyzed.
(Is_Followed_By_Pragma): Removed.

From-SVN: r229331

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 11:11:10 +0000 (12:11 +0100)]
[multiple changes]

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_ch6.adb: Handle subprogram bodies without previous specs.

2015-10-26  Claire Dross  <dross@adacore.com>

* a-nudira.ads: Specify appropriate SPARK_Mode so that the unit
can be used in SPARK code.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* contracts.adb (Analyze_Subprogram_Body_Contract): Do not analyze
pragmas Refined_Global and Refined_Depends because these pragmas
are now fully analyzed when encountered.
(Inherit_Pragma): Update the call to attribute Is_Inherited.
* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Add a guard
to prevent reanalysis. Mark the pragma as analyzed at the end of
the processing.
(Analyze_Depends_Global): New parameter profile
and comment on usage. Do not fully analyze the pragma, this is
now done at the outer level.
(Analyze_Depends_In_Decl_Part): Add a guard to prevent reanalysis.
Mark the pragma as analyzed at the end of the processing.
(Analyze_External_Property_In_Decl_Part): Add a guard to prevent
reanalysis.  Mark the pragma as analyzed at the end of the processing.
(Analyze_Global_In_Decl_Part): Add a guard to prevent reanalysis. Mark
the pragma as analyzed at the end of the processing.
(Analyze_Initial_Condition_In_Decl_Part): Add a guard to prevent
reanalysis.  Mark the pragma as analyzed at the end of the processing.
(Analyze_Initializes_In_Decl_Part): Add a guard to prevent reanalysis.
Mark the pragma as analyzed at the end of the processing.
(Analyze_Pragma): Reset the Analyzed flag on various pragmas that
require delayed full analysis. Contract_Cases is now analyzed
immediately when it applies to a subprogram body stub. Pragmas Depends,
Global, Refined_Depends and Refined_Global are now analyzed
in pairs when they appear in a subprogram body [stub].
(Analyze_Pre_Post_Condition_In_Decl_Part): Add a guard to
prevent reanalysis.  Mark the pragma as analyzed at the end of
the processing.
(Analyze_Refined_Depends_Global_Post): Update the comment on usage.
(Analyze_Refined_Depends_In_Decl_Part): Add a guard to prevent
reanalysis. Mark the pragma as analyzed at the end of the processing.
(Analyze_Refined_Global_In_Decl_Part): Add a guard to prevent
reanalysis. Mark the pragma as analyzed at the end of the processing.
(Analyze_Refined_State_In_Decl_Part): Add a guard to prevent
reanalysis. Mark the pragma as analyzed at the end of the processing.
(Analyze_Test_Case_In_Decl_Part): Add a guard to prevent reanalysis.
Mark the pragma as analyzed at the end of the processing.
(Is_Followed_By_Pragma): New routine.
* sinfo.adb (Is_Analyzed_Pragma): New routine.
(Is_Inherited): Renamed to Is_Inherited_Pragma.
(Set_Is_Analyzed_Pragma): New routine.
(Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma.
* sinfo.ads Rename attribute Is_Inherited to Is_Inherited_Pragma
and update occurrences in nodes.
(Is_Analyzed_Pragma): New routine along with pragma Inline.
(Is_Inherited): Renamed to Is_Inherited_Pragma along with pragma Inline.
(Set_Is_Analyzed_Pragma): New routine along with pragma Inline.
(Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma along
with pragma Inline.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* par-ch3.adb (P_Component_Items): When style checks are enabled,
apply them to component declarations in a record type declaration
or extension.

From-SVN: r229330

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 11:07:51 +0000 (12:07 +0100)]
[multiple changes]

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_util.adb (Is_Suspension_Object): Ensure that the scope of "Ada"
is Standard_Standard.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_res.adb (Is_OK_Volatile_Context): A subprogram call is an OK
context for a reference to an effectively volatile object.
(Resolve_Actuals): Add references to SPARK RM.
(Within_Procedure_Call): Removed.
(Within_Subprogram_Call): New routine.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_ch6.adb (Check_Aggregate_Accessibility): A reference to a
formal parameter in an aggregate does not need an accesibility
check only if the formal is aliased.

From-SVN: r229329

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 10:57:17 +0000 (11:57 +0100)]
[multiple changes]

2015-10-26  Claire Dross  <dross@adacore.com>

* sem_aux.ads (Number_Components): Can return 0 when called on
an empty record.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* contracts.adb (Analyze_Subprogram_Body_Contract): Use
Unique_Defining_Entity instead of Corresponding_Spec_Of.
* einfo.adb SPARK_Pragma and SPARK_Aux_Pragma are now Node40 and
Node41 respectively.
(SPARK_Aux_Pragma): Update the assertion and node querry.
(SPARK_Aux_Pragma_Inherited): Update the assertion and node query.
(SPARK_Pragma): Update the assertion and node query.
(SPARK_Pragma_Inherited): Update the assertion and node query.
(Set_SPARK_Aux_Pragma): Update the assertion and node setting.
(Set_SPARK_Aux_Pragma_Inherited): Update the assertion and node setting.
(Set_SPARK_Pragma): Update the assertion and node setting.
(Set_SPARK_Pragma_Inherited): Update the assertion and node setting.
(Write_Field32_Name): Remove the output for SPARK_Pragma.
(Write_Field33_Name): Remove the output for SPARK_Aux_Pragma.
(Write_Field40_Name): Add output for SPARK_Pragma.
(Write_Field41_Name): Add output for SPARK_Aux_Pragma.
* einfo.ads Rewrite the documentation on attributes
SPARK_Pragma, SPARK_Aux_Pragma, SPARK_Pragma_Inherited and
SPARK_Aux_Pragma_Inherited. Update their uses in nodes.
* exp_ch4.adb (Create_Anonymous_Master): Use
Unique_Defining_Entity instead of Corresponding_Spec_Of.
* exp_ch9.adb (Expand_Entry_Declaration): Mark the barrier
function as such.
(Expand_N_Task_Body): Mark the task body as such.
(Expand_N_Task_Type_Declaration): Mark the task body as such.
* exp_unst.adb (Visit_Node): Use Unique_Defining_Entity instead
of Corresponding_Spec_Of.
* sem_attr.adb (Analyze_Attribute_Old_Result): Use
Unique_Defining_Entity instead of Corresponding_Spec_Of.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Entry barrier
functions do not inherit the SPARK_Mode from the context.
(Build_Subprogram_Declaration): The matching spec is now marked
as a source construct to mimic the original stand alone body.
* sem_ch7.adb (Analyze_Package_Body_Helper): Code cleanup.
* sem_ch9.adb Add with and use clauses for Contracts.
(Analyze_Entry_Body): An entry body freezes the contract of
the nearest enclosing package body. The entry body now inherits
the SPARK_Mode from the context.
(Analyze_Entry_Declaration): A protected entry declaration now inherits
the SPARK_Mode from the context.
(Analyze_Protected_Body): A protected body freezes
the contract of the nearest enclosing package body. Set the
Etype of a protected body as this is neede for proper aspect
analysis. Protected bodies can now carry meaningful aspects and
those are now analyzed.
(Analyze_Protected_Type_Declaration): A protected type now inherits the
SPARK_Mode from the context.
(Analyze_Task_Body): A task body freezes the contract of the
nearest enclosing package body. Set the Etype of a task body
as this is needed for proper aspect analysis. A task body
now inherits the SPARK_Mode from the context.  Task bodies
can now carry meaningful aspects and those are now analyzed.
(Analyze_Task_Type_Declaration): A task type declaration now
inherits the SPARK_Mode of from the context.
* sem_ch10.adb (Analyze_Protected_Body_Stub): Protected body
stubs can now carry meaningful aspects.
(Analyze_Task_Body_Stub): Task body stubs can now carry meaningful
aspects.
* sem_ch13.adb (Analyze_Aspect_Specifications): Aspects SPARK_Mode
Warnings now use routine Insert_Pragma as means of insertion into
the tree.
(Insert_After_SPARK_Mode): Clean up documentation.
(Insert_Pragma): Clean up documentation. The routine is now
capable of operating on synchronized units.
* sem_prag.adb (Add_Entity_To_Name_Buffer): New routine.
(Analyze_Contract_Cases_In_Decl_Part): Use
Unique_Defining_Entity instead of Corresponding_Spec_Of.
(Analyze_Depends_Global): Use Unique_Defining_Entity instead
of Corresponding_Spec_Of.
(Analyze_Depends_In_Decl_Part): Use Unique_Defining_Entity instead of
Corresponding_Spec_Of.
(Analyze_Global_In_Decl_Part): Use Unique_Defining_Entity instead of
Corresponding_Spec_Of.
(Analyze_Pragma): Use Unique_Defining_Entity instead of
Corresponding_Spec_Of.
Update the detection of an illegal pragma Ghost when it applies
to a task or protected unit. Reimplement the handling of
pragma SPARK_Mode.
(Analyze_Pre_Post_Condition_In_Decl_Part): Use Unique_Defining_Entity
instead of Corresponding_Spec_Of.
(Analyze_Test_Case_In_Decl_Part): Use Unique_Defining_Entity instead of
Corresponding_Spec_Of.
(Check_Library_Level_Entity): Update the comment on usage.
Reimplemented to offer a more specialized errror context.
(Check_Pragma_Conformance): Update profile and comment on usage.
Handle error message output on single protected or task units.
(Collect_Subprogram_Inputs_Outputs): Use Unique_Defining_Entity
instead of Corresponding_Spec_Of.
(Process_Body): New routine.
(Process_Overloadable): New routine.
(Process_Private_Part): New routine.
(Process_Statement_Part): New routine.
(Process_Visible_Part): New routine.
(Set_SPARK_Context): New routine.
(Set_SPARK_Flags): Removed.
* sem_util.adb (Corresponding_Spec_Of): Removed.
(Unique_Entity): Reimplemented to handle many more cases.
* sem_util.ads (Corresponding_Spec_Of): Removed.
(Unique_Defining_Entity): Update the comment on usage.
* sinfo.ads (Is_Entry_Barrier_Function): Update the assertion.
(Is_Task_Body_Procedure): New routine.
(Set_Is_Entry_Barrier_Function): Update the assertion.
(Set_Is_Task_Body_Procedure): New routine.
* sinfo.adb Update the documentation of attribute
Is_Entry_Barrier_Function along with use in nodes. Add new
attribute Is_Task_Body_Procedure along with use in nodes.
(Is_Task_Body_Procedure): New routine along with pragma Inline.
(Set_Is_Task_Body_Procedure): New routine along with pragma Inline.

From-SVN: r229328

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 10:54:01 +0000 (11:54 +0100)]
[multiple changes]

2015-10-26  Gary Dismukes  <dismukes@adacore.com>

* sem_ch13.adb: Minor reformatting.

2015-10-26  Steve Baird  <baird@adacore.com>

* exp_disp.adb: Omit most dispatch table initialization code
if Generate_SCIL is true.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>

* sinfo.ads, exp_ch3.adb: Revert previous change.
(Build_Record_Init_Proc): Do not build an aggregate if
Modify_Tree_For_C.

From-SVN: r229327

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 10:49:55 +0000 (11:49 +0100)]
[multiple changes]

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_ch6.adb (Find_Corresponding_Spec): Reject a subprogram
body whose signature is type conformant with a previous expression
function.

2015-10-26  Bob Duff  <duff@adacore.com>

* treepr.adb: Code clean up.

From-SVN: r229326

9 years agofreeze.adb (Check_Component_Storage_Order): Skip a record component if it has Complex...
Eric Botcazou [Mon, 26 Oct 2015 10:47:56 +0000 (10:47 +0000)]
freeze.adb (Check_Component_Storage_Order): Skip a record component if it has Complex_Representation.

2015-10-26  Eric Botcazou  <ebotcazou@adacore.com>

* freeze.adb (Check_Component_Storage_Order): Skip a record
component if it has Complex_Representation.
(Freeze_Record_Type): If the type has Complex_Representation, skip the
regular treatment of Scalar_Storage_Order attribute and instead issue
a warning if it is present.

From-SVN: r229325

9 years agoAdd make_restrict_var_constraints
Tom de Vries [Mon, 26 Oct 2015 10:47:09 +0000 (10:47 +0000)]
Add make_restrict_var_constraints

2015-10-26  Tom de Vries  <tom@codesourcery.com>

* tree-ssa-structalias.c (make_restrict_var_constraints): New function,
factored out of ...
(intra_create_variable_infos): ... here.

From-SVN: r229324

9 years agoAdd vars in intra_create_variables_info
Tom de Vries [Mon, 26 Oct 2015 10:47:00 +0000 (10:47 +0000)]
Add vars in intra_create_variables_info

2015-10-26  Tom de Vries  <tom@codesourcery.com>

* tree-ssa-structalias.c (intra_create_variable_infos): Add
restrict_pointer_p and recursive_restrict_p variables.

From-SVN: r229323

9 years agoInline get_vi_for_tree into intra_create_variable_infos
Tom de Vries [Mon, 26 Oct 2015 10:46:52 +0000 (10:46 +0000)]
Inline get_vi_for_tree into intra_create_variable_infos

2015-10-26  Tom de Vries  <tom@codesourcery.com>

* tree-ssa-structalias.c (intra_create_variable_infos): Inline
get_vi_for_tree call.

From-SVN: r229322

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 10:45:50 +0000 (11:45 +0100)]
[multiple changes]

2015-10-26  Bob Duff  <duff@adacore.com>

* sem_ch13.adb (Check_Iterator_Functions): For a Default_Iterator
aspect, make sure an implicitly declared interpretation is
overridden by an explicit one.
* sem_util.ads: Update comment.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_ch7.adb, sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only source
bodies should "freeze" the contract of the nearest enclosing
package body.

From-SVN: r229321

9 years ago2015-10-26 Joel Brobecker <brobecker@adacore.com brobecker>
Arnaud Charlet [Mon, 26 Oct 2015 10:39:41 +0000 (11:39 +0100)]
2015-10-26  Joel Brobecker  <brobecker@adacore.com brobecker>

* adaint.c (__gnat_lwp_self): Replace current implementation re-using
the Linux one, which uses an __NR_gettid syscall rather than
pthread_self.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>

* sinfo.ads, exp_ch3.adb (Build_Array_Init_Proc,
Build_Record_Init_Proc): Do not inline init procs when
Modify_Tree_For_C is True.

2015-10-26  Bob Duff  <duff@adacore.com>

* errout.ads: Minor comment fix.
* einfo.ads: Minor style fix.

2015-10-26  Bob Duff  <duff@adacore.com>

* sem_ch3.adb (Derive_Interface_Subprogram): Fix
Is_Abstract_Subprogram, which might have been calculated
incorrectly, because we're passing Ultimate_Alias (Subp) (and
its dispatching type) to Derive_Subprogram, instead of the true
parent subprogram and type.

2015-10-26  Bob Duff  <duff@adacore.com>

* sem_ch13.adb (Check_Iterator_Functions): When
printing the "default iterator must be unique" error message,
also print references to the places where the duplicates are
declared. This makes the message clearer.

From-SVN: r229320

9 years agoFix race on temp file in gfortran tests.
Christophe Lyon [Mon, 26 Oct 2015 10:37:22 +0000 (10:37 +0000)]
Fix race on temp file in gfortran tests.

2015-10-26  Christophe Lyon  <christophe.lyon@linaro.org>

* gfortran.dg/chmod_1.f90: Add suffix to the temporary filename to
make it unique per testcase.
* gfortran.dg/chmod_2.f90: Likewise.
* gfortran.dg/chmod_3.f90: Likewise.
* gfortran.dg/direct_io_8.f90: Likewise.
* gfortran.dg/f2003_inquire_1.f03: Likewise.
* gfortran.dg/f2003_io_1.f03: Likewise.
* gfortran.dg/f2003_io_2.f03: Likewise.
* gfortran.dg/f2003_io_8.f03: Likewise.
* gfortran.dg/inquire_size.f90: Likewise.
* gfortran.dg/namelist_66.f90: Likewise.
* gfortran.dg/namelist_82.f90: Likewise.
* gfortran.dg/namelist_87.f90: Likewise.
* gfortran.dg/open_negative_unit_1.f90: Likewise.
* gfortran.dg/open_new.f90: Likewise.
* gfortran.dg/stat_1.f90: Likewise.
* gfortran.dg/stat_2.f90: Likewise.
* gfortran.dg/streamio_15.f90: Likewise.
* gfortran.dg/unf_read_corrupted_1.f90: Likewise.

From-SVN: r229319

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 10:35:52 +0000 (11:35 +0100)]
[multiple changes]

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_ch12.adb (Analyze_Formal_Package_Declaration): Do not set
Box_Present when the formal part is (others => <>) even though
it is equivalent to a formal part (<>), because ASIS tools depend
on the syntactic setting of this flag.

2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_ch13.adb: Minor reformatting.
* einfo.ads: Minor typo.

2015-10-26  Joel Brobecker  <brobecker@adacore.com brobecker>

* adaint.c (__gnat_open_new_temp): Use mkstemp on Android.

From-SVN: r229318

9 years ago[optabs.c] Fix PR 67989: Handle const0_rtx target in expand_atomic_compare_and_swap
Kyrylo Tkachov [Mon, 26 Oct 2015 10:28:12 +0000 (10:28 +0000)]
[optabs.c] Fix PR 67989: Handle const0_rtx target in expand_atomic_compare_and_swap

PR middle-end/67989
* optabs.c (expand_atomic_compare_and_swap): Handle case when
ptarget_oval or ptarget_bool are const0_rtx.

* g++.dg/pr67989.C: New test.

From-SVN: r229317

9 years agosem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.
Ed Schonberg [Mon, 26 Oct 2015 10:24:05 +0000 (10:24 +0000)]
sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

* sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.
* sem_ch13.adb (Check_Inherited_Indexing): New inner procedure
of Check_Indexing_Functions, to verify that a derived type with an
Indexing aspect is not inheriting such an aspect from an ancestor.
(Check_Indexing_Functions): Call Check_Inherited_Indexing within
an instance.

From-SVN: r229316

9 years agoFix race on temp file in gfortran streamio_*.f90 tests
Maxim Kuvyrkov [Mon, 26 Oct 2015 10:22:15 +0000 (10:22 +0000)]
Fix race on temp file in gfortran streamio_*.f90 tests

* gfortran.dg/streamio_4.f90, gfortran.dg/streamio_5.f90,
* gfortran.dg/streamio_6.f90, gfortran.dg/streamio_7.f90,
* gfortran.dg/streamio_10.f90, gfortran.dg/streamio_12.f90: Add
suffix to the temporary filename to make it unique per testcase.

From-SVN: r229315

9 years ago[multiple changes]
Arnaud Charlet [Mon, 26 Oct 2015 10:12:40 +0000 (11:12 +0100)]
[multiple changes]

2015-10-26  Gary Dismukes  <dismukes@adacore.com>

        * a-reatim.adb, contracts.adb, contracts.ads: Minor reformatting and
        typo corrections.

2015-10-26  Ed Schonberg  <schonberg@adacore.com>

        * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
        recheck the consistency betwen the freeze point and the end of
        declarations for the expression in an aspect specification,
        because it was done already in the analysis of the generic.
        Furthermore, the delayed analysis of an aspect of the instance
        may produce spurious errors when the generic is a child unit
        that references entities in the parent (which might not be in
        scope at the freeze point of the instance).

2015-10-26  Yannick Moy  <moy@adacore.com>

        * sem_res.adb (Resolve_Call): Issue info message
        instead of warning when call cannot be inlined in GNATprove mode.

2015-10-26  Arnaud Charlet  <charlet@adacore.com>

        * exp_ch6.adb (Build_Procedure_Form): Use _result as the
        name of the extra parameter, cleaner than a random temp name.
        * gnat1drv.adb (Gnat1drv): Code clean up.

From-SVN: r229314

9 years agofunction.h (MINIMUM_METHOD_BOUNDARY): New macro.
Christian Bruel [Mon, 26 Oct 2015 09:50:37 +0000 (10:50 +0100)]
function.h (MINIMUM_METHOD_BOUNDARY): New macro.

2015-10-26  Christian Bruel  <christian.bruel@st.com>

* function.h (MINIMUM_METHOD_BOUNDARY): New macro.
* cp/decl.c (grokfndecl): Set DECL_ALIGN with MINIMUM_METHOD_BOUNDARY.
* cp/method.c (implicitly_declare_fn): Likewise.
* cp/lambda.c (maybe_add_lambda_conv_op): Likewise. Remove VBIT setting.
* java/class.c (add_method_1): Likewise.

From-SVN: r229313

9 years agoalloc-pool.h (base_pool_allocator): Use placement new.
Richard Biener [Mon, 26 Oct 2015 09:48:32 +0000 (09:48 +0000)]
alloc-pool.h (base_pool_allocator): Use placement new.

2015-10-26  Richard Biener  <rguenther@suse.de>

* alloc-pool.h (base_pool_allocator): Use placement new.
(base_pool_allocator::remove): Likewise.  Compute size outside of
flag_checking.

From-SVN: r229312

9 years agoMove int rounding folds to match.pd
Richard Sandiford [Mon, 26 Oct 2015 09:29:26 +0000 (09:29 +0000)]
Move int rounding folds to match.pd

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
* builtins.c (do_real_to_int_conversion): New function.
(fold_fixed_mathfn, fold_builtin_int_roundingfn): Delete.
(fold_builtin_1): Handle constant {i,l,ll}{ceil,floor,round}{f,,l}
arguments here.
* match.pd: Add rules previously handled by fold_fixed_mathfn
and fold_builtin_int_roundingfn.

gcc/testsuite/
* gcc.dg/torture/builtin-minmax-1.c: Don't run at -O0.

From-SVN: r229311

9 years agoUse macros to define built-in operator lists
Richard Sandiford [Mon, 26 Oct 2015 09:26:11 +0000 (09:26 +0000)]
Use macros to define built-in operator lists

No functional change.  This should be a slight readability improvement
on its own, but becomes more important with the next patch.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
* match.pd: Use macros to define built-in operator lists.

From-SVN: r229310

9 years agoFix scripto
Richard Sandiford [Mon, 26 Oct 2015 09:21:27 +0000 (09:21 +0000)]
Fix scripto

From-SVN: r229309

9 years agoMove cexp simplifications to match.pd
Richard Sandiford [Mon, 26 Oct 2015 09:18:30 +0000 (09:18 +0000)]
Move cexp simplifications to match.pd

This required reinstating support for captures in the result
of a simplification.  That part (genmatch.c) is by Richard B.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
2015-10-20  Richard Sandiford  <richard.sandiford@arm.com>
    Richard Biener  <rguenther@suse.de>

* genmatch.c (dt_simplify::gen): Skip captures that are
part of the result.
(parser::parse_expr): Allow captures in results too.
* builtins.c (fold_builtin_cexp): Delete.
(fold_builtin_1): Handle constant cexp arguments here.
* match.pd: Fold cexp(x+yi) to exp(x) * cexpi(y).

Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r229308

9 years agoENABLE_CHECKING refactoring: pool allocators
Mikhail Maltsev [Mon, 26 Oct 2015 01:11:00 +0000 (01:11 +0000)]
ENABLE_CHECKING refactoring: pool allocators

gcc/
* alloc-pool.h (base_pool_allocator::initialize, ::allocate): Remove
conditional compilation.
(base_pool_allocator::remove): Use flag_checking.

From-SVN: r229307

9 years agoDaily bump.
GCC Administrator [Mon, 26 Oct 2015 00:16:17 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r229306

9 years agore PR fortran/67171 (sourced allocation)
Paul Thomas [Sun, 25 Oct 2015 21:31:12 +0000 (21:31 +0000)]
re PR fortran/67171 (sourced allocation)

2015-01-25  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/67171
* trans-array.c (structure_alloc_comps): On deallocation of
class components, reset the vptr to the declared type vtable
and reset the _len field of unlimited polymorphic components.
*trans-expr.c (gfc_find_and_cut_at_last_class_ref): Bail out on
allocatable component references to the right of part reference
with non-zero rank and return NULL.
(gfc_reset_vptr): Simplify this function by using the function
gfc_get_vptr_from_expr. Return if the vptr is NULL_TREE.
(gfc_reset_len): If gfc_find_and_cut_at_last_class_ref returns
NULL return.
* trans-stmt.c (gfc_trans_allocate): Rely on the use of
gfc_trans_assignment if expr3 is a variable expression since
this deals correctly with array sections.

2015-01-25  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/67171
* gfortran.dg/allocate_with_source_12.f03: New test

PR fortran/61819
* gfortran.dg/allocate_with_source_13.f03: New test

PR fortran/61830
* gfortran.dg/allocate_with_source_14.f03: New test

From-SVN: r229303

9 years agosom.h (EH_FRAME_THROUGH_COLLECT2): Define.
John David Anglin [Sun, 25 Oct 2015 18:34:00 +0000 (18:34 +0000)]
som.h (EH_FRAME_THROUGH_COLLECT2): Define.

* config/pa/som.h (EH_FRAME_THROUGH_COLLECT2): Define.

From-SVN: r229302

9 years agore PR middle-end/68079 (hppa: pointers to method types need canonicalization before...
John David Anglin [Sun, 25 Oct 2015 15:18:48 +0000 (15:18 +0000)]
re PR middle-end/68079 (hppa: pointers to method types need canonicalization before comparison)

PR middle-end/68079
* dojump.c (do_compare_and_jump): Canonicalize both function and
method types.

From-SVN: r229299

9 years agoWno-frame-address.C: Skip on hppa*-*-*.
John David Anglin [Sun, 25 Oct 2015 14:58:28 +0000 (14:58 +0000)]
Wno-frame-address.C: Skip on hppa*-*-*.

* g++.dg/Wno-frame-address.C: Skip on hppa*-*-*.

From-SVN: r229298

9 years agore PR target/68084 (Inverted conditions generated for x86 inline assembly "flag outpu...
Uros Bizjak [Sun, 25 Oct 2015 13:21:01 +0000 (14:21 +0100)]
re PR target/68084 (Inverted conditions generated for x86 inline assembly "flag output constraints")

PR target/68084
* config/i386/i386.c (ix86_md_asm_adjust) [case 'a']: Use NE code
for =@ccae.

testsuite/ChangeLog:

PR target/68084
* gcc.target/i386/pr68084.c: New test.

From-SVN: r229296

9 years agoAdded missing testcases of r229294 for patch of
Andre Vehreschild [Sun, 25 Oct 2015 13:02:32 +0000 (14:02 +0100)]
Added missing testcases of r229294 for patch of
PR fortran/66927.

From-SVN: r229295

9 years agore PR fortran/66927 (ICE in gfc_conf_procedure_call)
Andre Vehreschild [Sun, 25 Oct 2015 12:28:57 +0000 (13:28 +0100)]
re PR fortran/66927 (ICE in gfc_conf_procedure_call)

gcc/fortran/ChangeLog:

2015-10-25  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/66927
PR fortran/67044
* trans-array.c (build_array_ref): Modified call to
gfc_get_class_array_ref to adhere to new interface.
(gfc_conv_expr_descriptor): For one-based arrays that
are filled by a loop starting at one the start index of the
source array has to be mangled into the offset.
* trans-expr.c (gfc_get_class_array_ref): When the tree to get
the _data component is present already, add a way to supply it.
(gfc_copy_class_to_class): Allow to copy to a derived type also.
* trans-stmt.c (gfc_trans_allocate): Do not conv_expr_descriptor
for functions returning a class or derived object. Get the
reference instead.
* trans.h: Interface change of gfc_get_class_array_ref.

gcc/testsuite/ChangeLog:

2015-10-25  Andre Vehreschild  <vehre@gmx.de>

PR fortran/66927
PR fortran/67044
* gfortran.dg/allocate_with_source_10.f08: New test.
* gfortran.dg/allocate_with_source_11.f08: New test.
* gfortran.dg/class_array_15.f03: Changed count of expected
_builtin_frees to 11. One step of temporaries is spared, therefore
the allocatable component of that temporary is not to be freeed.

From-SVN: r229294

9 years agoDaily bump.
GCC Administrator [Sun, 25 Oct 2015 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r229293

9 years agoImplement C++17 std::invoke and LWG DR 2219
Jonathan Wakely [Sun, 25 Oct 2015 00:00:54 +0000 (01:00 +0100)]
Implement C++17 std::invoke and LWG DR 2219

* include/std/functional (__invoke_impl): New overloads.
(__invoke): Replace with a single function calling __invoke_impl.
(invoke): Add C++17 std::invoke.
(reference_wrapper::operator()): Qualify call to __invoke.
(_Mem_fn_traits_base, _Mem_fn_traits): Remove unused typedefs.
(_Mem_fn_base): Remove unused typedefs and implement call operator in
terms of __invoke.
* include/std/future (__future_base::_Async_state_commonV2): Do not
pass reference_wrapper as object argument to call_once.
* include/std/type_traits (result_of): Define nested __invoke_type.
Handle reference_wrapper as per LWG 2219.
* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error directives.
* testsuite/20_util/function_objects/mem_fn/55463.cc: Remove tests
using member functions of reference_wrapper.

From-SVN: r229290

9 years agoReturn deferred future if thread cannot be run
Jonathan Wakely [Sat, 24 Oct 2015 21:36:50 +0000 (22:36 +0100)]
Return deferred future if thread cannot be run

* include/std/future (async): Use deferred function on exception.
* testsuite/30_threads/async/except.cc: New.

From-SVN: r229289

9 years agore PR fortran/68055 (ICE on using unsupported kinds in program without program statement)
Steven G. Kargl [Sat, 24 Oct 2015 17:09:35 +0000 (17:09 +0000)]
re PR fortran/68055 (ICE on using unsupported kinds in program without program statement)

2015-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/68055
* decl.c (gfc_match_decl_type_spec): Check for valid kind in old-style
declarations.

2015-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/68055
* gfortran.dg/pr68055.f90: New case.

From-SVN: r229288

9 years agore PR fortran/67805 (ICE on array constructor with wrong character specification)
Steven G. Kargl [Sat, 24 Oct 2015 16:20:26 +0000 (16:20 +0000)]
re PR fortran/67805 (ICE on array constructor with wrong character specification)

2015-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67805
* array.c (gfc_match_array_constructor): Check for error from type
spec matching.
* decl.c (char_len_param_value): Check for valid of charlen parameter.
Reap dead code dating to 2008.
match.c (gfc_match_type_spec): Special case the keyword use in REAL.

2015-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67805
* gfortran.dg/pr67805.f90: New testcase.
* gfortran.dg/array_constructor_26.f03: Update testcase.
* gfortran.dg/array_constructor_27.f03: Ditto.
* gfortran.dg/char_type_len_2.f90: Ditto.
* gfortran.dg/pr67802.f90: Ditto.
* gfortran.dg/used_before_typed_3.f90: Ditto.

From-SVN: r229287

9 years agoutils2.c (build_binary_op): Tweak formatting.
Eric Botcazou [Sat, 24 Oct 2015 09:06:26 +0000 (09:06 +0000)]
utils2.c (build_binary_op): Tweak formatting.

* gcc-interface/utils2.c (build_binary_op): Tweak formatting.
(build_unary_op): Likewise.

From-SVN: r229284

9 years agoDR 1518 DR 1630 PR c++/54835 PR c++/60417
Jason Merrill [Sat, 24 Oct 2015 02:58:10 +0000 (22:58 -0400)]
DR 1518 DR 1630 PR c++/54835 PR c++/60417

DR 1518
DR 1630
PR c++/54835
PR c++/60417
* call.c (convert_like_real): Value-initialization can't use
explicit constructors in C++11 and up.

From-SVN: r229283

9 years agoDaily bump.
GCC Administrator [Sat, 24 Oct 2015 00:16:12 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r229282

9 years agoPR ipa/pr67600
Jan Hubicka [Fri, 23 Oct 2015 23:33:58 +0000 (01:33 +0200)]
PR ipa/pr67600

PR ipa/pr67600
* ipa-polymorphic-call.c
(ipa_polymorphic_call_context::get_dynamic_type): Do not confuse
instance offset with offset of outer type.
* g++.dg/torture/pr67600.C: New testcase.

From-SVN: r229279

9 years ago* fold-const.c (operand_equal_p): Handle VIEW_CONVERT_EXPR.
Jan Hubicka [Fri, 23 Oct 2015 23:30:31 +0000 (01:30 +0200)]
* fold-const.c (operand_equal_p): Handle VIEW_CONVERT_EXPR.

From-SVN: r229278

9 years agoThis patch fixes a compile-time regression that was originally introduced by the...
Caroline Tice [Fri, 23 Oct 2015 23:22:42 +0000 (16:22 -0700)]
This patch fixes a compile-time regression that was originally introduced by the fix for PR64111, in GCC 4.9.3.

This patch fixes a compile-time regression that was originally
introduced by the fix for PR64111, in GCC 4.9.3.
gcc/ChangeLog:

2015-10-23  Caroline Tice  <cmtice@google.com>

        (from Richard Biener)
        * tree.c (int_cst_hasher::hash):  Replace XOR with more efficient
        call to iterative_hash_host_wide_int.

From-SVN: r229277

9 years agoconfig.gcc (powerpc-ibm-aix[6789]): Define as yes.
David Edelsohn [Fri, 23 Oct 2015 22:56:08 +0000 (22:56 +0000)]
config.gcc (powerpc-ibm-aix[6789]): Define as yes.

        * config.gcc (powerpc-ibm-aix[6789]) [default_use_cxa_atexit]:
        Define as yes.

From-SVN: r229276

9 years agotree-vect-generic.c (expand_vector_operations_1): Check optab exists before use it.
Ilya Enkovich [Fri, 23 Oct 2015 22:41:40 +0000 (22:41 +0000)]
tree-vect-generic.c (expand_vector_operations_1): Check optab exists before use it.

gcc/

* tree-vect-generic.c (expand_vector_operations_1): Check
optab exists before use it.

gcc/testsuite/

* g++.dg/pr68062.C: New test.

From-SVN: r229275

9 years agotree-vect-generic.c (expand_vector_condition): Avoid uninitialized variable warning.
Ilya Enkovich [Fri, 23 Oct 2015 22:38:37 +0000 (22:38 +0000)]
tree-vect-generic.c (expand_vector_condition): Avoid uninitialized variable warning.

gcc/

* tree-vect-generic.c (expand_vector_condition): Avoid
uninitialized variable warning.

From-SVN: r229274

9 years ago[PATCH 4/9] ENABLE_CHECKING refactoring: Fortran
Mikhail Maltsev [Fri, 23 Oct 2015 22:36:12 +0000 (22:36 +0000)]
[PATCH 4/9] ENABLE_CHECKING refactoring: Fortran

2015-10-05  Mikhail Maltsev  <maltsevm@gmail.com>

* trans-common.c (create_common): Adjust to use flag_checking.
* trans.c (gfc_add_modify_loc): Use gcc_checking_assert.

From-SVN: r229273

9 years ago[PATCH] Call flush_ssaname_freelist more often
Jeff Law [Fri, 23 Oct 2015 22:34:04 +0000 (16:34 -0600)]
[PATCH] Call flush_ssaname_freelist more often

[PATCH] Call flush_ssaname_freelist more often
       * passes.c (execute_function_todo): Do not call flush_ssaname_freelist
        here.  Instead...
        (execute_todo): Call it here.
        * tree-ssanames.c (make_ssa_name_fn): Unconditionally gather reuse
        statistics
        (pass_release_ssa_names::execute): Do not call flusH_ssaname_freelist.

From-SVN: r229272

9 years agore PR c++/67813 ([C++14] copy-initialization of object with pointer member fails...
Jason Merrill [Fri, 23 Oct 2015 20:57:05 +0000 (16:57 -0400)]
re PR c++/67813 ([C++14] copy-initialization of object with pointer member fails in constexpr function)

PR c++/67813
* constexpr.c (cxx_eval_store_expression): Always use *valp if
set.

From-SVN: r229270

9 years ago[rs6000] Enable secureplt by default on musl
Gregor Richards [Fri, 23 Oct 2015 19:44:24 +0000 (19:44 +0000)]
[rs6000] Enable secureplt by default on musl

* config.gcc (enable_secureplt): Add *-linux*-musl*.

Co-Authored-By: Szabolcs Nagy <szabolcs.nagy@arm.com>
From-SVN: r229268

9 years ago[RFA] Fix pr67830, another type narrowing problem
Jeff Law [Fri, 23 Oct 2015 19:16:53 +0000 (13:16 -0600)]
[RFA] Fix pr67830, another type narrowing problem

PR tree-optimization/67830
* match.pd ((bit_and (plus/minus (convert @0) (convert @1)) mask)):
Explicitly verify the mask has no bits outside the type of
the innermost operands.

PR tree-optimization/67830
* gcc.dg/pr67830.c: New test.

From-SVN: r229267

9 years agopowerpc musl libc support
Gregor Richards [Fri, 23 Oct 2015 19:07:05 +0000 (19:07 +0000)]
powerpc musl libc support

gcc/
* config/rs6000/linux64.h (MUSL_DYNAMIC_LINKER32): Define.
(MUSL_DYNAMIC_LINKER64): Define.
(GNU_USER_DYNAMIC_LINKER32): Update.
(GNU_USER_DYNAMIC_LINKER64): Update.
(CHOOSE_DYNAMIC_LINKER): Update.

* config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Update.
(MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER_E,)
(INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,)
(INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,)
(INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define.
(CHOOSE_DYNAMIC_LINKER): Update.
(INCLUDE_DEFAULTS): Redefine.

* config/rs6000/sysv4le.h (MUSL_DYNAMIC_LINKER_E): Define.

Co-Authored-By: Szabolcs Nagy <szabolcs.nagy@arm.com>
From-SVN: r229266

9 years agofold-const.c (operand_equal_p): Do not compare TYPE_MODE when comparing addresses.
Jan Hubicka [Fri, 23 Oct 2015 18:05:55 +0000 (20:05 +0200)]
fold-const.c (operand_equal_p): Do not compare TYPE_MODE when comparing addresses.

* fold-const.c (operand_equal_p): Do not compare TYPE_MODE when
comparing addresses.

From-SVN: r229265

9 years agofold-const.c (operand_equal_p): Handle matching of vector constructors.
Jan Hubicka [Fri, 23 Oct 2015 18:05:09 +0000 (20:05 +0200)]
fold-const.c (operand_equal_p): Handle matching of vector constructors.

* fold-const.c (operand_equal_p): Handle matching of vector
constructors.
* gcc.dg/tree-ssa/operand-equal-2.c: New testcase.

From-SVN: r229264

9 years ago* doc/install.texi (*-ibm-aix*): Additional information for AIX 7.1.
David Edelsohn [Fri, 23 Oct 2015 17:25:43 +0000 (17:25 +0000)]
* doc/install.texi (*-ibm-aix*): Additional information for AIX 7.1.

From-SVN: r229263

9 years agoMAINTAINERS: Update email address.
Steve Ellcey [Fri, 23 Oct 2015 17:06:07 +0000 (17:06 +0000)]
MAINTAINERS: Update email address.

2015-10-23  Steve Ellcey  <sellcey@imgtec.com>

* MAINTAINERS: Update email address.

From-SVN: r229262

9 years agoFix ChangeLog entry
Steve Ellcey [Fri, 23 Oct 2015 15:59:15 +0000 (15:59 +0000)]
Fix ChangeLog entry

From-SVN: r229261

9 years agore PR rtl-optimization/67736 (Wrong optimization with -fexpensive-optimizations on...
Steve Ellcey [Fri, 23 Oct 2015 15:58:33 +0000 (15:58 +0000)]
re PR rtl-optimization/67736 (Wrong optimization with -fexpensive-optimizations on mips64el)

2015-10-23  Steve Ellcey  <sellcey@imgtec.com>
    Andrew Pinski  <apinski@cavium.com>

PR rtl-optimization/67736
* gcc.dg/torture/pr67736.c: New test.
* gcc.dg/combine-subregs.c: New test.

Co-Authored-By: Andrew Pinski <apinski@cavium.com>
From-SVN: r229260