platform/upstream/linaro-gcc.git
8 years ago2015-10-20 Yannick Moy <moy@adacore.com>
charlet [Tue, 20 Oct 2015 11:59:22 +0000 (11:59 +0000)]
2015-10-20  Yannick Moy  <moy@adacore.com>

* sem_warn.adb (Is_OK_Fully_Initialized): Consider types with DIC as
fully default initialized.
* sem_ch6.adb: minor style fix in comment

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

* s-diflio.ads, s-diflio.adb (Image): New function for dimensioned
quantities, to produce a string that includes the dimension
synbol for the quantity, or the vector of dimensions in standard
notation.
* sem_dim.adb (Expand_Put_Call_With_Symbol): Process new function
Image, to include dimension information in the generated string,
identical to the string produced by the Put procedure on a string
for a dimensioned quantity.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229053 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Tue, 20 Oct 2015 11:49:17 +0000 (11:49 +0000)]
2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_ch7.adb (Process_Declarations): A loop
parameter does not require finalization actions.

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

* exp_ch6.adb (Expand_Simple_Function_Return): Do not create an
actual subtype for a mutable record return type if the expression
is itself a function call.

2015-10-20  Dmitriy Anisimkov  <anisimko@adacore.com>

* s-atocou.adb, s-atocou-builtin.adb: Fix implementation description
related to new type support.

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

* sem_res.adb (Resolve_Explicit_Dererence): Call Analyze_Dimension
to propagate dimension information from prefix.
* sem_dim.adb (Analyze_Dimension): Handle Explicit_Dereference.
* inline.ads: minor whitespace fix in comment
* sem_ch6.adb: minor gramar fix in comment

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

* sem_ch3.adb (Analyze_Object_Contract):
A protected type or a protected object is allowed to have a
discriminated part.

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

* sem_util.adb (Requires_Transient_Scope):
Return true for mutable records if the maximum size is very large.

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

* a-except-2005.adb (To_Stderr): Import Put_Char_Stderr with
the same signature as in System.IO.Put.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229052 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 11:45:37 +0000 (11:45 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* a-cobove.adb (Set_Length): Restore previous logic, but with "Checks
and then" on the check.

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

* par-ch3.adb (P_Known_Discriminant_Part_Opt): Handle properly
a misplaced "constant" keyword in a discriminant specification.

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

* einfo.ads (Is_Param_Block_Component_Type): New function decl
for querying the flag.
(Set_Is_Param_Block_Component_Type): New procedure decl for setting
the flag.
* einfo.adb (Is_Param_Block_Component_Type): New function body.
(Set_Is_Param_Block_Component_Type): New procedure body.
(Write_Entity_Flags): Display the new flag.
* exp_ch9.adb (Build_Parameter_Block): Set flag on parameter
block component types.
(Expand_N_Entry_Declaration): Set flag on parameter block component
types.

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

* sem_elab.adb: Do not pass an N_Attribute_Reference node to
Sinfo.Set_No_Elaboration_Check.
* sem_elab.adb (Check_Elab_Call) Do not pass a non-call
node (specifically, an N_Attribute_Reference node) to
Sinfo.Set_No_Elaboration_Check.

2015-10-20  Tristan Gingold  <gingold@adacore.com>

* adaint.c: File names are case sensitive on aarch64-ios.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229051 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 10:56:25 +0000 (10:56 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* a-cbdlli.ads, a-cbhase.ads, a-cbmutr.ads, a-cborse.ads,
* a-cdlili.ads, a-cidlli.ads, a-cihase.ads, a-cimutr.ads,
* a-ciorse.ads, a-cobove.ads, a-cohase.ads, a-coinve.ads,
* a-comutr.ads, a-convec.ads, a-coorse.ads: Use non-private with clause.

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

* exp_util.adb (Requires_Cleanup_Actions): A loop parameter does not
require finalization actions.

2015-10-20  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.

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

* rtsfind.ads Remove the entries for Ada.Synchronous_Task_Control
and Suspension_Object from tables RE_Id, RE_Unit_Table and RTU_Id.
* sem_util.adb (Is_Descendant_Of_Suspension_Object): Update
the comment on usage. Use routine Is_Suspension_Object to detect
whether a type matches Suspension_Object.
(Is_Suspension_Object): New routine.
* snames.ads-tmpl: Add predefined names for Suspension_Object
and Synchronous_Task_Control.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229049 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Ed Schonberg <schonberg@adacore.com>
charlet [Tue, 20 Oct 2015 10:53:39 +0000 (10:53 +0000)]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_smem.adb (Check_Shared_Var): Clean up code that handles
type declarations with discriminants, remove obsolete check.

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

* par_sco.adb: Minor style fixes.

2015-10-20  Vincent Celier  <celier@adacore.com>

* debug.adb: Update documentation of -gnatdu.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229048 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Tue, 20 Oct 2015 10:43:21 +0000 (10:43 +0000)]
2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* aspects.adb Add aspect Volatile_Function to table
Canonical_Aspect.
* aspect.ads Add aspect Volatile_Function to tables
Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
and Implementation_Defined_Aspect.  Aspects Async_Readers,
Async_Writers, Effective_Reads and Effective_Writes are no
longer Boolean.
* einfo.adb (Get_Pragma): Add an entry for pragma
Volatile_Function.
* par-prag.adb (Prag): Pragma Volatile_Function does not need
special processing by the parser.
* rtsfind.ads Add an entry for Ada.Synchronous_Task_Control in
table RTU_Id. Add an entry for Suspension_Object in table RE_Id.
* sem_ch3.adb Fix SPARK RM references.
(Analyze_Object_Contract): Update the error guard.
* sem_ch5.adb Fix SPARK RM references.
* sem_ch6.adb (Analyze_Subprogram_Body_Contract): Ensure
that a non-volatile function does not contain an effectively
volatile parameter.
(Analyze_Subprogram_Contract): Ensure
that a non-volatile function does not contain an effectively
volatile parameter.
* sem_ch12.adb (Instantiate_Object): Remove the reference to
the SPARK RM from the error message.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add
processing for aspects Async_Readers, Async_Writers,
Effective_Reads, Effective_Writes and Volatile_Function.
(Check_Aspect_At_Freeze_Point): Aspects Async_Readers,
Async_Writers, Effective_Reads, Effective_Writes and
Volatile_Function do not need special processing at the freeze
point.
* sem_prag.adb Add an entry for pragma Volatile_Function in
table Sig_Flags.
(Analyze_External_Property_In_Decl_Part):
Reimplemented as Async_Readers, Async_Writers, Effective_Reads
and Effective_Writes are no longer Boolean pragmas.
(Analyze_Global_Item): An external state or effectively
volatile object cannot appear as an item in pragma
[Refined_]Global.
(Analyze_Pragma): Change the implementation
of Async_Readers, Async_Writers, Effective_Reads and
Effective_Writes as these are no longer Boolean pragmas.
Use routine Check_Static_Boolean_Expression to verify the
optional Boolean expression of Async_Readers, Async_Writers,
Constant_After_Elaboration, Effective_Reads, Effective_Writes,
Extensions_Visible and Volatile_Function.  Add processing for
pragma Volatile_Function.
(Check_Static_Boolean_Expression): New routine.
(Find_Related_Context): Update the comment on usage.
(Is_Enabled_Pragma): New routine.
* sem_prag.ads (Is_Enabled_Pragma): New routine.
* sem_res.adb Fix SPARK RM references.
(Is_OK_Volatile_Context): Add detection for return statements.
(Resolve_Actuals): Remove the check concerning an effectively volatile
OUT actual parameter as this is now done by the SPARK flow analyzer.
(Resolve_Entity_Name): Remove the check concerning an effectively
volatile OUT formal parameter as this is now done by the SPARK
flow analyzer. (Within_Volatile_Function): New routine.
* sem_util.adb (Add_Contract_Item): Add processing for pragma
Volatile_Function.
(Check_Nonvolatile_Function_Profile): New routine.
(Is_Descendant_Of_Suspension_Object): New routine.
(Is_Effectively_Volatile): Protected types and descendants of
Suspension_Object are now treated as effectively volatile.
(Is_Enabled): The optional Boolean expression of pragmas
Async_Readers, Async_Writers, Effective_Reads and Effective_Writes
now appears as the first argument.
(Is_Volatile_Function): New routine.
* sem_util.ads Add SPARK RM references.
(Add_Contract_Item): Update the comment on usage.
(Check_Nonvolatile_Function_Profile): New routine.
(Is_Effectively_Volatile): Update the comment on usage.
(Is_Volatile_Function): New routine.
* snames.ads-tmpl Add a predefined name and pragma id for
Volatile_Function.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229047 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * gnat_ugn.texi, gnat_rm.texi: Regenerate.
charlet [Tue, 20 Oct 2015 10:41:38 +0000 (10:41 +0000)]
* gnat_ugn.texi, gnat_rm.texi: Regenerate.
* doc/gnat_ugn/gnat_project_manager.rst,
doc/gnat_ugn/building_executable_programs_with_gnat.rst,
doc/gnat_ugn/the_gnat_compilation_model.rst,
doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
doc/gnat_rm/implementation_defined_pragmas.rst,
doc/gnat_rm/the_gnat_library.rst,
doc/gnat_rm/implementation_defined_characteristics.rst: Update doc.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229046 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoEnable VTV for aarch64 and arm
ramana [Tue, 20 Oct 2015 10:39:30 +0000 (10:39 +0000)]
Enable VTV for aarch64 and arm

Requires fix for section anchors with VTV i.e. PR other/67868

2015-10-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

* configure.tgt (aarch64*-*-linux): Enable.
(arm*-*-linux*): Enable.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229045 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix VTV for targets with section anchors.
ramana [Tue, 20 Oct 2015 10:36:54 +0000 (10:36 +0000)]
Fix VTV for targets with section anchors.

2015-10-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

PR other/67868
* varasm.c (assemble_variable): Move special vtv handling to..
(handle_vtv_comdat_sections): .. here. New function.
(output_object_block): Handle vtv sections.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229044 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix VTV for targets with section anchors.
ramana [Tue, 20 Oct 2015 10:36:33 +0000 (10:36 +0000)]
Fix VTV for targets with section anchors.

2015-10-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

PR other/67868
* varasm.c (assemble_variable): Move special vtv handling to..
(handle_vtv_comdat_sections): .. here. New function.
(output_object_block): Handle vtv sections.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229043 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoUpdate targets.
charlet [Tue, 20 Oct 2015 10:36:00 +0000 (10:36 +0000)]
Update targets.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229042 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 10:23:46 +0000 (10:23 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* sem_ch13.adb (Analyze_One_Aspect): Avoid
analyzing the expression in a 'Disable_Controlled attribute when
Expander_Active is False, because otherwise, we get errors about
nonstatic expressions in pragma-Preelaborate generic packages.
* restrict.ads: minor whitespace cleanup in comment

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

* a-conhel.adb: Remove "use SAC;", because otherwise the compiler
complains about use clauses in run-time units. Use "use type"
instead.
* a-btgbso.adb, a-btgbso.ads, a-cbdlli.adb, a-cbdlli.ads,
* a-cbhama.adb, a-cbhama.ads, a-cbhase.adb, a-cbhase.ads,
* a-cbmutr.adb, a-cbmutr.ads, a-cborma.adb, a-cborma.ads,
* a-cborse.adb, a-cborse.ads, a-cdlili.adb, a-cdlili.ads,
* a-chtgbk.adb, a-chtgbk.ads, a-chtgbo.adb, a-chtgbo.ads,
* a-chtgke.adb, a-chtgke.ads, a-chtgop.adb, a-chtgop.ads,
* a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
* a-cihase.adb, a-cihase.ads, a-cimutr.adb, a-cimutr.ads,
* a-ciorma.adb, a-ciorma.ads, a-ciormu.adb, a-ciormu.ads,
* a-ciorse.adb, a-ciorse.ads, a-cobove.adb, a-cobove.ads,
* a-cohama.adb, a-cohama.ads, a-cohase.adb, a-cohase.ads,
* a-cohata.ads, a-coinve.adb, a-comutr.adb, a-comutr.ads,
* a-convec.adb, a-coorma.adb, a-coorma.ads, a-coormu.adb,
* a-coormu.ads, a-coorse.adb, a-coorse.ads, a-crbltr.ads,
* a-crbtgk.adb, a-crbtgk.ads, a-crbtgo.adb, a-crbtgo.ads,
* a-rbtgbk.adb, a-rbtgbk.ads, a-rbtgbo.adb, a-rbtgbo.ads,
* a-rbtgso.adb, a-rbtgso.ads: Change all the predefined containers
to share the tampering machinery in Ada.Containers.Helpers. This
reduces the amount of duplicated code, and takes advantage of
efficiency improvements in Helpers.
Protect all run-time checks and supporting machinery with "if
Checks" or "if T_Check", so this code can be suppressed with
pragma Suppress or -gnatp.
Add Pseudo_Reference and Get_Element_Access to remaining
containers, so that the compiler can optimize "for ... of" loops.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229041 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 10:20:37 +0000 (10:20 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* a-contai.adb, a-coinve.ads, a-contai.ads, a-conhel.adb, a-conhel.ads,
Makefile.rtl, a-convec.ads: Move helper code from Ada.Containers to a
new package Ada.Containers.Helpers, because otherwise it's not
visible everywhere it needs to be (e.g. in the package
Ada.Containers.Red_Black_Trees, Generic_Tree_Types wants to have
a component of type Tamper_Counts).

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

* sem_type.adb (Intersect_Types): Specialize error message when
one operand is a limited view which is a priori incompatible
with all other named types.
* sem_prag.adb: minor fix in comment
* sem_ch13.adb: Code clean up.

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

* sem_ch12.adb (Need_Subprogram_Instance_Body): Also return true
for a subprogram nested in an inlined subprogram.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229040 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 10:13:47 +0000 (10:13 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* a-coinve.adb, a-contai.adb: Update comments.
* pprint.ads: Minor reformatting.

2015-10-20  Tristan Gingold  <gingold@adacore.com>

* env.c, init.c: Handle arm64-darwin like arm-darwin.
* tracebak.c: Handle arm64-darwin.

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

* s-trasym.adb (Symbolic_Traceback): When giving the traceback
as hexadecimal code addresses, separate by blanks instead of LF.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229039 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Ed Schonberg <schonberg@adacore.com>
charlet [Tue, 20 Oct 2015 10:10:20 +0000 (10:10 +0000)]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate freeze
node for subprogram in Compile_Only mode.

2015-10-20  Dmitriy Anisimkov  <anisimko@adacore.com>

* s-atocou.adb, s-atocou.ads, a-contai.adb, a-contai.ads,
s-atocou-x86.adb, s-atocou-builtin.adb: Task safe over container
iterations.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229037 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Philippe Gil <gil@adacore.com>
charlet [Tue, 20 Oct 2015 10:07:09 +0000 (10:07 +0000)]
2015-10-20  Philippe Gil  <gil@adacore.com>

* g-debpoo.ads (Dump): NEW print Debug_Pool statistics & main
contributors.
(Dump_Stdout): NEW print to stdout Debug_Pool statistics &
main contributors.
(Reset): NEW reset counters to 0.
(Get_Size): NEW return size allocated at parameter.
(High_Water_Mark): NEW.
(Current_Water_Mark): NEW.
(System_Memory_Debug_Pool): NEW tell Debug_Pools that
System.Memory uses it.
* g-debpoo.adb (Traceback_Htable_Elem): add Frees, Total_Frees
components.
(Find_Or_Create_Traceback): don't manage in System.Memory
Debug_Pool Deallocate Traceback's.
(Validity): add optional Handled table when System.Memory asked
for Allow_Unhandled_Memory.
(Allocate): handle Allocate reentrancy occuring when System.Memory
uses Debug_Pools.
(Deallocate): handle when Allow_Unhandled_Memory
is set deallocation of unhandled memory. Dont't check
Size_In_Storage_Elements if equal to Storage_Count'Last. update
Frees, Total_Frees new components.

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

* fe.h: Minor tweak.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229036 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Vincent Celier <celier@adacore.com>
charlet [Tue, 20 Oct 2015 10:04:44 +0000 (10:04 +0000)]
2015-10-20  Vincent Celier  <celier@adacore.com>

* sem_cat.adb (Check_Categorization_Dependencies): Do nothing
when -gnatdu is specified.

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

* sem_ch8.adb (analyze_Subprogram_Renaming): The actual for a
formal abstract subprogram must have a controlling type.
* stand.ads: Minor whitespace cleanup.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229035 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Gary Dismukes <dismukes@adacore.com>
charlet [Tue, 20 Oct 2015 10:00:15 +0000 (10:00 +0000)]
2015-10-20  Gary Dismukes  <dismukes@adacore.com>

* sem_ch13.adb: Minor reference change (RM => AARM).

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

* make.adb (Check): Skip multilib switches reinstated by the
compiler only when counting the number of switches, since it is
what really matters in the regular operating mode.

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

* einfo.adb: Add extra assertion for small clause.
* cstand.adb: Minor style fix in comment.
* debug.adb: Minor reformatting.
* exp_util.adb: Fix minor typo.

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

* sem_ch12.adb (Same_Instantiated_Function): New predicate in
Check_Formal_Package_Instance, used to verify that the formal
and the actual of an actual package match when both are functions
given as attribute references.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229034 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 09:56:56 +0000 (09:56 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* a-coinve.ads, a-coinve.adb: Do the same efficiency
improvements that were already done in the definite case
(Ada.Containers.Vectors, i.e. a-convec). This includes the
ability to suppress checks, the fast path for Append, inlining
as appropriate, and special-casing of "for ... of" loops. Reuse
the tampering machinery that is now in Ada.Containers. Simplify
many operations.
* a-convec.ads, a-convec.adb: Change the code to be more similar
to a-coinve.
* a-finali.ads, a-finali.adb: Expose the "null"-ness of the
operations. This may enable optimizations in the future, and
seems cleaner anyway.

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

* sem_ch13.adb (Is_Operational_Item): Attributes related to
Ada 2012 iterators are operational items, and can be specified
on partial views.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229033 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Tue, 20 Oct 2015 09:55:20 +0000 (09:55 +0000)]
2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_prag.adb (Check_Usage): Update the calls to Usage_Error.
(Usage_Error): Remove formal parameter Item. Emit a clearer message
concerning a missing dependency item and place it on the related pragma.

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

* debug.adb, expander.adb: Implement -gnatd.B switch, which
triggers a bug box when an abort_statement is seen. This is
useful for testing Comperr.Compiler_Abort.
* gnat1drv.adb: Trigger bug box on all exceptions other than
Unrecoverable_Error.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229032 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Thomas Quinot <quinot@adacore.com>
charlet [Tue, 20 Oct 2015 09:53:11 +0000 (09:53 +0000)]
2015-10-20  Thomas Quinot  <quinot@adacore.com>

* Makefile.rtl: add the following...
* g-binenv.ads, g-binenv.adb: New unit providing runtime access
to bind time captured values ("bind environment")
* init.c: declare new global variable __gl_bind_env_addr.
* bindgen.ads, bindgen.adb (Set_Bind_Env): record a bind
environment key=value pair.
(Gen_Bind_Env_String): helper to produce the bind environment data
called  in the binder generated file.
(Gen_Output_File_Ada): Call the above (Gen_Adainit): Set
__gl_bind_env_addr accordingly.
* switch-b.adb: Support for command line switch -V (user interface
to set a build environment key=value pair)
* bindusg.adb: Document the above

2015-10-20  Vincent Celier  <celier@adacore.com>

* sem_prag.adb (Analyse_Pragma: Pragma Pure): Do not set the
entity as Pure if Debug_Flag_U is set.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229031 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 09:48:00 +0000 (09:48 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* output.adb (Write_Int): Work with negative numbers in order to avoid
negating Int'First and thereby causing overflow.
* sem_util.adb: Minor comment fix.

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

* make.adb (Check): Skip multilib switches reinstated by the
compiler when doing the comparison with switches passed to
gnatmake.

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

* inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Return
False for procedures marked No_Return.
* sem_util.ads (Enclosing_Declaration): Improve comment.
* einfo.adb (Is_Completely_Hidden): Remove spurious assertion.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229029 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Thomas Quinot <quinot@adacore.com>
charlet [Tue, 20 Oct 2015 09:45:29 +0000 (09:45 +0000)]
2015-10-20  Thomas Quinot  <quinot@adacore.com>

* types.ads: Minor reformatting.

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

* einfo.adb (Get_Pragma): Minor reformatting. Rename local constant
Is_CDG to Is_CLS. Add pragma Constant_After_Elaboration to the list of
classification pragmas.

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

* sem_ch3.adb (Analyze_Declarations); At the of the visible part,
perform name resolution on the expressions in aspects of visible
entities.
* sem_ch13.ads, sem_ch13.adb (Resolve_Aspect_Expressions): Resolve
expressions in aspects independently of whether corresponding
entity is frozen. Used to complete name resolution of aspect
expressions for entities declared in the visible part of a
package or generic package declaration.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229028 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Vincent Celier <celier@adacore.com>
charlet [Tue, 20 Oct 2015 09:42:53 +0000 (09:42 +0000)]
2015-10-20  Vincent Celier  <celier@adacore.com>

* prj-attr.adb: Add package Codepeer and its attributes.

2015-10-20  Thomas Quinot  <quinot@adacore.com>

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

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

* gnatlink.adb (Gnatlink): Do not translate --RTS switch
for the linker and instead pass the switches that were
reinstated by the compiler.

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

* a-contai.ads, a-convec.ads: Move Count_Type_Last from
a-convec.ads to a-contai.ads, so other containers can refer to it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229027 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Ed Schonberg <schonberg@adacore.com>
charlet [Tue, 20 Oct 2015 09:40:24 +0000 (09:40 +0000)]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within
Analyze_Full_Type_ Declaration, used to apply legality rules in
13,1,1 (18.3.3) concerning aspects that cannot be overridden in
a type extension.
(Check_Duplicate_Aspects): It is not legal to specify the
Implicit_Dereference aspect on a full view if partial view has
known discriminants.
* sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Verify that
the specification of the aspect on a derived type confirms the
value of the inherited one.
* sem_util.adb (Reference_Discriminant): Return empty if none
specified.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229026 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Thomas Quinot <quinot@adacore.com>
charlet [Tue, 20 Oct 2015 09:38:17 +0000 (09:38 +0000)]
2015-10-20  Thomas Quinot  <quinot@adacore.com>

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

2015-10-20  Vincent Celier  <celier@adacore.com>

* a-strsup.adb (Super_Trim): Remove statements that put NUL
characters in unused portion of the Data string.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229025 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix default_binds_local_p_2 for extern protected data
nsz [Tue, 20 Oct 2015 09:37:27 +0000 (09:37 +0000)]
Fix default_binds_local_p_2 for extern protected data

gcc:

PR target/66912
* varasm.c (default_binds_local_p_2): Turn on extern_protected_data.

gcc/testsuite:

PR target/66912
* gcc.target/aarch64/pr66912.c: New.
* gcc.target/arm/pr66912.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229024 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR c++/67064
jason [Tue, 20 Oct 2015 06:49:13 +0000 (06:49 +0000)]
PR c++/67064

* semantics.c (force_paren_expr): Don't mess with hard register vars.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229021 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH] c/67925 - update documentation on `inline'
law [Tue, 20 Oct 2015 05:52:00 +0000 (05:52 +0000)]
[PATCH] c/67925 - update documentation on `inline'

* doc/extend.texi: Update documentation WRT inline functions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229020 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago Implement N4268, Do constant evaluation of all non-type template args.
jason [Tue, 20 Oct 2015 02:48:51 +0000 (02:48 +0000)]
Implement N4268, Do constant evaluation of all non-type template args.

gcc/c-family/
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_nontype_template_args.
gcc/cp/
* parser.c (cp_parser_template_argument): For C++1z just parse a
constant-expression.
* pt.c (convert_nontype_argument): For C++1z always call
maybe_constant_value.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229019 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago Expand PTRMEM_CST only when necessary.
jason [Tue, 20 Oct 2015 02:48:43 +0000 (02:48 +0000)]
Expand PTRMEM_CST only when necessary.

* constexpr.c (cxx_eval_constant_expression): Expand PTRMEM_CST
only when necessary.
(cxx_eval_component_reference): Like here.
* decl2.c (lower_var_init): And here.
(c_parse_final_cleanups): Call it.
* typeck2.c (digest_init_r): Not here.
* decl.c (complete_vars): Or here.
(cp_finish_decl): Add local statics to symbol table.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229018 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * c-cppbuiltin.c (c_cpp_builtins): Define
jason [Tue, 20 Oct 2015 02:48:36 +0000 (02:48 +0000)]
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_enumerator_attributes, __cpp_fold_expressions,
__cpp_unicode_characters.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229017 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agotypo
jason [Tue, 20 Oct 2015 02:48:25 +0000 (02:48 +0000)]
typo

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229016 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Tue, 20 Oct 2015 00:31:48 +0000 (00:31 +0000)]
2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>

* resolve.c (gfc_verify_binding_labels): Check for NULL pointer.

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

* gfortran.dg/pr67900.f90: New tests.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229013 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Tue, 20 Oct 2015 00:16:15 +0000 (00:16 +0000)]
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229012 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoPR66870 PowerPC64 Enable gold linker with split stack
amodra [Mon, 19 Oct 2015 23:50:30 +0000 (23:50 +0000)]
PR66870 PowerPC64 Enable gold linker with split stack

A powerpc-linux/powerpc64-linux biarch compiler can default to either
-m32 or -m64, and we need to notice both -m32 and -m64 on the gccgo
command line.  It's also possible to build a -m64 only compiler, so in
that case we can define TARGET_CAN_SPLIT_STACK.

gcc/
PR go/66870
* config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Don't define.
* config/rs6000/linux64.h (TARGET_CAN_SPLIT_STACK): Define.
(TARGET_CAN_SPLIT_STACK_64BIT): Define.
gcc/go/
PR go/66870
* gospec.c (saw_opt_m32): Rename to..
(is_m64): ..this, initialised by TARGET_CAN_SPLIT_STACK_64BIT.
Update uses.
(lang_specific_driver): Set is_m64 if OPT_m64, clear if OPT_m32.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229009 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoREE: fix uninitialized registers handling
pmderodat [Mon, 19 Oct 2015 23:47:35 +0000 (23:47 +0000)]
REE: fix uninitialized registers handling

gcc/ChangeLog:

PR rtl-optimization/66790
* df.h (DF_MIR): New macro.
(DF_LAST_PROBLEM_PLUS1): Update to be past DF_MIR
(DF_MIR_INFO_BB): New macro.
(DF_MIR_IN, DF_MIR_OUT): New macros.
(struct df_mir_bb_info): New.
(df_mir): New macro.
(df_mir_add_problem, df_mir_simulate_one_insn): New forward
declarations.
(df_mir_get_bb_info): New.
* df-problems.c (struct df_mir_problem_data): New.
(df_mir_free_bb_info, df_mir_alloc, df_mir_reset,
df_mir_bb_local_compute, df_mir_local_compute, df_mir_init,
df_mir_confluence_0, df_mir_confluence_n,
df_mir_transfer_function, df_mir_free, df_mir_top_dump,
df_mir_bottom_dump, df_mir_verify_solution_start,
df_mir_verify_solution_end): New.
(problem_MIR): New.
(df_mir_add_problem, df_mir_simulate_one_insn): New.
* timevar.def (TV_DF_MIR): New.
* ree.c: Include bitmap.h
(add_removable_extension): Add an INIT_REGS parameter.  Use it
to skip zero-extensions that may get an uninitialized register.
(find_removable_extensions): Compute must-initialized registers
using the MIR dataflow problem. Update the call to
add_removable_extension.
(find_and_remove_re): Call df_mir_add_problem.

gcc/testsuite/ChangeLog:

* gnat.dg/opt50.adb: New test.
* gnat.dg/opt50_pkg.adb: New helper.
* gnat.dg/opt50_pkg.ads: New helper.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229008 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agomn10300: Use the STC bb-reorder algorithm at -Os
segher [Mon, 19 Oct 2015 22:03:13 +0000 (22:03 +0000)]
mn10300: Use the STC bb-reorder algorithm at -Os

For mn10300, STC still gives better results for optimise-for-size than
"simple" does.  So use STC at -Os as well.

2015-10-19  Segher Boessenkool  <segher@kernel.crashing.org>

* common/config/mn10300/mn10300-common.c
(mn10300_option_optimization_table) <OPT_freorder_blocks_algorithm_>:
Use REORDER_BLOCKS_ALGORITHM_STC at -Os and up.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229006 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoProposed doc update for Explicit Reg Vars 1/3
law [Mon, 19 Oct 2015 21:15:41 +0000 (21:15 +0000)]
Proposed doc update for Explicit Reg Vars 1/3
        * doc/extend.texi (Explicit Register Variables): Simplify and
        avoid unnecessary and confusion abbreviations.  Update cross
        references.
        doc/implement-c.tex: Update cross reference.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229004 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Mon, 19 Oct 2015 21:09:21 +0000 (21:09 +0000)]
2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/68019
* decl.c (add_init_expr_to_sym): Remove an assert() to allow an error
message to be issued.

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

PR fortran/68019
* gfortran.dg/pr68019.f90: new test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229003 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates...
law [Mon, 19 Oct 2015 16:24:00 +0000 (16:24 +0000)]
[PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates a multi-way branch

* tree-ssa-threadupdate.c (valid_jump_thread_path): Reject paths
that create irreducible loops unless the path elimiantes a multiway
branch.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228974 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-19 Richard Biener <rguenther@suse.de>
rguenth [Mon, 19 Oct 2015 14:00:28 +0000 (14:00 +0000)]
2015-10-19  Richard Biener  <rguenther@suse.de>

PR tree-optimization/67975
* tree-cfg.h (extract_true_false_controlled_edges): Declare.
* tree-cfg.c (extract_true_false_controlled_edges): Split out
core worker from ...
* tree-ssa-loop-im.c (extract_true_false_args_from_phi): ... here.
* tree-ssa-sccvn.c (vn_phi_compute_hash): Hash number of args
instead of block number for PHIs with two or one args.
(vn_phi_eq): Compare edge predicates of PHIs that are in different
blocks.

* gcc.dg/tree-ssa/ssa-fre-50.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228971 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-19 Richard Biener <rguenther@suse.de>
rguenth [Mon, 19 Oct 2015 13:58:27 +0000 (13:58 +0000)]
2015-10-19  Richard Biener  <rguenther@suse.de>

* gimple-fold.c (gimple_phi_nonnegative_warnv_p): New function.
(gimple_stmt_nonnegative_warnv_p): Use it.
* match.pd (CPROJ): New operator list.
(cproj (complex ...)): Move simplifications from ...
* builtins.c (fold_builtin_cproj): ... here.

* gcc.dg/torture/builtin-cproj-1.c: Skip for -O0.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228970 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoUse GET_MODE_BITSIZE to get vector natural alignment
hjl [Mon, 19 Oct 2015 11:41:03 +0000 (11:41 +0000)]
Use GET_MODE_BITSIZE to get vector natural alignment

Since GET_MODE_ALIGNMENT is defined by psABI and the biggest alignment
is 4 byte for IA MCU psABI, we should use GET_MODE_BITSIZE for IA MCU
psABI to get vector natural alignment to check misaligned vector move.

* config/i386/i386.c (ix86_expand_vector_move): Use
GET_MODE_BITSIZE for IA MCU psABI to get vector natural
alignment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228969 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoReplace @optindex with @opindex
hjl [Mon, 19 Oct 2015 11:30:46 +0000 (11:30 +0000)]
Replace @optindex with @opindex

* doc/invoke.texi: Replace @optindex with @opindex.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228968 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDon't leak ISA to __attribute__ ((target("arch=XXX")))
hjl [Mon, 19 Oct 2015 11:18:14 +0000 (11:18 +0000)]
Don't leak ISA to __attribute__ ((target("arch=XXX")))

When processing __attribute__ ((target("arch=XXX"))), we should clear
the ISA bits in x_ix86_isa_flags first to avoid leaking ISA from
command line.

gcc/

PR target/67995
* config/i386/i386.c (ix86_valid_target_attribute_tree): If
arch= is set,  clear all bits in x_ix86_isa_flags, except for
ISA_64BIT, ABI_64, ABI_X32, and CODE16.

gcc/testsuite/

PR target/67995
* gcc.target/i386/pr67995-1.c: New test.
* gcc.target/i386/pr67995-2.c: Likewise.
* gcc.target/i386/pr67995-3.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228967 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agofix date of changelog entry
vondele [Mon, 19 Oct 2015 10:26:32 +0000 (10:26 +0000)]
fix date of changelog entry

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228966 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix PR68002, add -fkeep-static-functions
vondele [Mon, 19 Oct 2015 10:24:37 +0000 (10:24 +0000)]
Fix PR68002, add -fkeep-static-functions

gcc/ChangeLog:

2015-10-17  Joost VandeVondele  <vondele@gnu.gcc.org>

        PR middle-end/68002
        * common.opt (fkeep-static-functions): New option.
        * doc/invoke.texi: Document it.
        * cgraphunit.c (cgraph_node::finalize_function): Use it.

gcc/testsuite/ChangeLog:

2015-10-17  Joost VandeVondele  <vondele@gnu.gcc.org>

        PR middle-end/68002
        * gcc.dg/PR68002.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228965 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoRemove undefined behaviour from builtins-20.c
rsandifo [Mon, 19 Oct 2015 10:06:56 +0000 (10:06 +0000)]
Remove undefined behaviour from builtins-20.c

builtins-20.c had:

      if (cos((y*=2, -fabs(tan(x/-y)))) != cos((y*=2,tan(x/y))))
        link_error ();

which is undefined behaviour.  The test expected that y had the same
value in x/y and x/-y, but gimplification actually implements the
"obvious" interpretation, multiplying y by 2, using it for one cos call,
then multiplying it by 2 again and using it for the other cos call.

The file has other (valid) tests that side-effects don't block
optimisation, such as:

      if (cosf((y*=3, -x)) != cosf((y*=3,x)))
        link_error ();

so this patch simply removes this instance.

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

gcc/testsuite/
* gcc.dg/builtins-20.c: Remove undefined behavior.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228963 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[haifa-sched] model load/store multiples properly in autoprefetcher scheduling
ktkachov [Mon, 19 Oct 2015 09:23:07 +0000 (09:23 +0000)]
[haifa-sched] model load/store multiples properly in autoprefetcher scheduling

* sched-int.h (struct autopref_multipass_data_): Remove offset
field.  Add min_offset, max_offset, multi_mem_insn_p fields.
* haifa-sched.c (analyze_set_insn_for_autopref): New function.
(autopref_multipass_init): Use it.  Handle PARALLEL sets.
(autopref_rank_data): New function.
(autopref_rank_for_schedule): Use it.
(autopref_multipass_dfa_lookahead_guard_1): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228962 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Mon, 19 Oct 2015 00:16:12 +0000 (00:16 +0000)]
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228959 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix crash in gengtype debug dump
miyuki [Sun, 18 Oct 2015 23:33:21 +0000 (23:33 +0000)]
Fix crash in gengtype debug dump

gcc/
PR other/65800
* gengtype.c (dump_type): Handle TYPE_UNDEFINED correctly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228956 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoRevise Darwin's sysroot handling to be compatible with the clang toolchain.
iains [Sun, 18 Oct 2015 18:33:05 +0000 (18:33 +0000)]
Revise Darwin's sysroot handling to be compatible with the clang toolchain.

gcc/
* config/darwin.h (TARGET_SYSTEM_ROOT): Remove this from here,
(HAVE_LD_SYSROOT): New.  (SYSROOT_SPEC): New.
(LINK_SYSROOT_SPEC): Revise to remove the default for target sysroot.
(STANDARD_STARTFILE_PREFIX_1): New.
(STANDARD_STARTFILE_PREFIX_2): New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228950 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR c++/68006
jason [Sun, 18 Oct 2015 18:02:10 +0000 (18:02 +0000)]
PR c++/68006

* decl.c (implicit_default_ctor_p): New.
(start_preparsed_function): Don't clobber on entry to one.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228949 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix common-related error recovery ICE.
mikael [Sun, 18 Oct 2015 17:17:21 +0000 (17:17 +0000)]
Fix common-related error recovery ICE.

Fix an inconsistent state, between the in_common attribute
and the common_block pointer.

 - adding a symbol to a common block list in gfc_match_common is delayed
   after the call to gfc_add_in_common.
 - gfc_restore_latest_undo_checkpoint is changed to check the common_block
   pointer directly instead of the in_common attribute.
 - gfc_restore_old_symbol is changed to also restore
   the common-related pointers.  This is done using a new function created
   to factor the related memory management.
 - In gfc_restore_last_undo_checkpoint, when a symbol has been removed
   from the common block linked list, its common_next pointer is cleared.

PR fortran/67758
gcc/fortran/
* gfortran.h (gfc_symbol): Expand comment.
* match.c (gfc_match_common): Delay adding the symbol to
the common_block after the gfc_add_in_common call.
* symbol.c (gfc_free_symbol): Move common block memory handling...
(gfc_set_symbol_common_block): ... here as a new function.
(restore_old_symbol): Restore common block fields.
(gfc_restore_last_undo_checkpoint):
Check the common_block pointer instead of the in_common attribute.
When a symbol has been removed from the common block linked list,
clear its common_next pointer.
gcc/testsuite/
* gfortran.dg/common_25.f90: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228947 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDarwin - Tidy mmacosx-version-min code and specs.
iains [Sun, 18 Oct 2015 14:31:25 +0000 (14:31 +0000)]
Darwin - Tidy mmacosx-version-min code and specs.

gcc/

* config/darwin-driver.c (darwin_default_min_version): Refactor code.
(darwin_driver_init): Note a version-min when provided on the c/l.
* config/darwin.h (%darwin_minversion): Remove.
* config/i386/darwin.h: Likewise.
* config/rs6000/darwin.h: Likewise.
* config/darwin.opt (mmacosx-version-min=): Use the configured default, rather than
an arbitrary constant.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228944 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix PR63758 by using the _NSGetEnviron() API on Darwin
iains [Sun, 18 Oct 2015 10:33:37 +0000 (10:33 +0000)]
Fix PR63758 by using the _NSGetEnviron() API on Darwin

include/

Roland McGrath  <roland@gnu.org>

PR other/63758
* environ.h: New file.

libiberty/

Roland McGrath  <roland@gnu.org>
Iain Sandoe  <iain@codesourcery.com>

PR other/63758
* pex-unix.c: Obtain the environment interface from settings in environ.h
rather than in-line code.  Update copyright date.
* setenv.c: Likewise.
* xmalloc.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228942 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoImprove handling of -arch flag for Darwin
iains [Sun, 18 Oct 2015 10:11:03 +0000 (10:11 +0000)]
Improve handling of -arch flag for Darwin

gcc/
* config/darwin-driver.c (darwin_driver_init): Handle '-arch' for
PPC, detect conflicts between -arch and multilib settings.  Detect
and warn about conflicts between multiple -arch definitions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228941 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-18 Paul Thomas <pault@gcc.gnu.org>
pault [Sun, 18 Oct 2015 09:31:21 +0000 (09:31 +0000)]
2015-10-18  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/67177
PR fortran/67977
* primary.c (match_substring): Add an argument 'deferred' to
flag that a substring reference with null start and end should
not be optimized away for deferred length strings.
(match_string_constant, gfc_match_rvalue): Set the argument.
* trans-expr.c (alloc_scalar_allocatable_for_assignment): If
there is a substring reference return.
* trans-intrinsic.c (conv_intrinsic_move_alloc): For deferred
characters, assign the 'from' string length to the 'to' string
length. If the 'from' expression is deferred, set its string
length to zero. If the 'to' expression has allocatable
components, deallocate them.

2015-10-18  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/67177
* gfortran.dg/move_alloc_15.f90: New test
* gfortran.dg/move_alloc_16.f90: New test

PR fortran/67977
* gfortran.dg/deferred_character_assignment_1.f90: New test

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228940 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agofix Darwin bootstrap
iains [Sun, 18 Oct 2015 09:22:33 +0000 (09:22 +0000)]
fix Darwin bootstrap

gcc/
* config/darwin-driver.h: Adjust includes to add diagnostic-core.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228939 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Sun, 18 Oct 2015 00:16:13 +0000 (00:16 +0000)]
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228936 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-17 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Sat, 17 Oct 2015 16:50:47 +0000 (16:50 +0000)]
2015-10-17  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67987
* decl.c (char_len_param_value): Unwrap unlong line.  If LEN < 0,
force it to zero per the Fortran 90, 95, 2003, and 2008 Standards.
* resolve.c (gfc_resolve_substring_charlen): Unwrap unlong line.
If 'start' is larger than 'end', length of substring is negative,
so explicitly set it to zero.
(resolve_charlen): Remove -Wsurprising warning.  Update comment to
reflect that the text is from the F2008 standard.

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

PR fortran/67987
* gfortran.df/pr67987.f90: New test.
* gfortran.dg/char_length_2.f90: Update testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228933 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agochange a function argument from rtx to rtx_insn *
tbsaunde [Sat, 17 Oct 2015 01:00:08 +0000 (01:00 +0000)]
change a function argument from rtx to rtx_insn *

gcc/ChangeLog:

2015-10-16  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* lra-constraints.c (add_next_usage_insn): Change argument type
from rtx to rtx_insn *.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228931 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Sat, 17 Oct 2015 00:16:11 +0000 (00:16 +0000)]
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228929 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago* config/rl78/divmodqi.S: Return 0x00 by default for div by 0.
dj [Fri, 16 Oct 2015 21:47:07 +0000 (21:47 +0000)]
* config/rl78/divmodqi.S: Return 0x00 by default for div by 0.
* config/rl78/divmodsi.S: Update return register to r8.
* config/rl78/divmodhi.S: Update return register to r8,r9.
Branch to main_loop_done_himode to pop registers before return.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228926 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDisable X86_TUNE_ALWAYS_FANCY_MATH_387 for Lakemont
hjl [Fri, 16 Oct 2015 21:07:54 +0000 (21:07 +0000)]
Disable X86_TUNE_ALWAYS_FANCY_MATH_387 for Lakemont

Since Lakemont processor doesn't have 387, we should disable
X86_TUNE_ALWAYS_FANCY_MATH_387 for Lakemont.

* i386/x86-tune.def (X86_TUNE_ALWAYS_FANCY_MATH_387): Disable
for Lakemont.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228925 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix def_test_returning_type in iamcu/test_basic_returning.c
hjl [Fri, 16 Oct 2015 20:03:17 +0000 (20:03 +0000)]
Fix def_test_returning_type in iamcu/test_basic_returning.c

Use union to check float return bits to avoid converting from integer
to float when comparing float return value.

* gcc.target/i386/iamcu/test_basic_returning.c
(def_test_returning_type): Use union to check float return bits.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228924 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Andrew MacLeod <amacleod@redhat.com>
amacleod [Fri, 16 Oct 2015 19:47:09 +0000 (19:47 +0000)]
2015-10-16  Andrew MacLeod  <amacleod@redhat.com>

* config/tilepro/gen-mul-tables.cc: Adjust include files.
* config/tilegx/mul-tables.c: Regenerate.
* config/tilepro/mul-tables.c: Regenerate.

* config/tilegx/tilegx-c.c: Adjust include files.
* config/tilegx/tilegx.c: Likewise.
* config/tilepro/tilepro-c.c: Likewise.
* config/tilepro/tilepro.c: Likewise.
* config/aarch64/aarch64-builtins.c: Likewise.
* config/aarch64/aarch64.c: Likewise.
* config/aarch64/cortex-a57-fma-steering.c: Likewise.
* config/alpha/alpha.c: Likewise.
* config/arc/arc.c: Likewise.
* config/arm/aarch-common.c: Likewise.
* config/arm/arm-builtins.c: Likewise.
* config/arm/arm-c.c: Likewise.
* config/arm/arm.c: Likewise.
* config/avr/avr-c.c: Likewise.
* config/avr/avr-devices.c: Likewise.
* config/avr/avr-log.c: Likewise.
* config/avr/avr.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/c6x/c6x.c: Likewise.
* config/cr16/cr16.c: Likewise.
* config/cris/cris.c: Likewise.
* config/darwin-c.c: Likewise.
* config/darwin-driver.c: Likewise.
* config/darwin.c: Likewise.
* config/default-c.c: Likewise.
* config/epiphany/epiphany.c: Likewise.
* config/epiphany/mode-switch-use.c: Likewise.
* config/epiphany/resolve-sw-modes.c: Likewise.
* config/fr30/fr30.c: Likewise.
* config/frv/frv.c: Likewise.
* config/ft32/ft32.c: Likewise.
* config/glibc-c.c: Likewise.
* config/h8300/h8300.c: Likewise.
* config/i386/host-cygwin.c: Likewise.
* config/i386/host-mingw32.c: Likewise.
* config/i386/i386-c.c: Likewise.
* config/i386/i386.c: Likewise.
* config/i386/msformat-c.c: Likewise.
* config/i386/winnt-cxx.c: Likewise.
* config/i386/winnt-stubs.c: Likewise.
* config/i386/winnt.c: Likewise.
* config/ia64/ia64-c.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/iq2000/iq2000.c: Likewise.
* config/lm32/lm32.c: Likewise.
* config/m32c/m32c-pragma.c: Likewise.
* config/m32c/m32c.c: Likewise.
* config/m32r/m32r.c: Likewise.
* config/mcore/mcore.c: Likewise.
* config/mep/mep-pragma.c: Likewise.
* config/mep/mep.c: Likewise.
* config/microblaze/microblaze-c.c: Likewise.
* config/microblaze/microblaze.c: Likewise.
* config/mips/mips-tables.opt
* config/mips/mips.c: Likewise.
* config/mmix/mmix.c: Likewise.
* config/mn10300/mn10300.c: Likewise.
* config/moxie/moxie.c: Likewise.
* config/msp430/msp430-c.c: Likewise.
* config/msp430/msp430.c: Likewise.
* config/nds32/nds32-cost.c: Likewise.
* config/nds32/nds32-fp-as-gp.c: Likewise.
* config/nds32/nds32-intrinsic.c: Likewise.
* config/nds32/nds32-isr.c: Likewise.
* config/nds32/nds32-md-auxiliary.c: Likewise.
* config/nds32/nds32-memory-manipulation.c: Likewise.
* config/nds32/nds32-pipelines-auxiliary.c: Likewise.
* config/nds32/nds32-predicates.c: Likewise.
* config/nds32/nds32.c: Likewise.
* config/nios2/nios2.c: Likewise.
* config/nvptx/mkoffload.c: Likewise.
* config/nvptx/nvptx.c: Likewise.
* config/pa/pa.c: Likewise.
* config/pdp11/pdp11.c: Likewise.
* config/rl78/rl78-c.c: Likewise.
* config/rl78/rl78.c: Likewise.
* config/rs6000/host-darwin.c: Likewise.
* config/rs6000/rs6000-c.c: Likewise.
* config/rs6000/rs6000-linux.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/rx/rx.c: Likewise.
* config/s390/s390-c.c: Likewise.
* config/s390/s390.c: Likewise.
* config/sh/sh-c.c: Likewise.
* config/sh/sh-mem.cc: Likewise.
* config/sh/sh.c: Likewise.
* config/sh/sh_optimize_sett_clrt.cc: Likewise.
* config/sh/sh_treg_combine.cc: Likewise.
* config/sol2-c.c: Likewise.
* config/sol2-cxx.c: Likewise.
* config/sol2-stubs.c: Likewise.
* config/sol2.c: Likewise.
* config/sparc/sparc-c.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/spu/spu-c.c: Likewise.
* config/spu/spu.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/v850/v850-c.c: Likewise.
* config/v850/v850.c: Likewise.
* config/vax/vax.c: Likewise.
* config/visium/visium.c: Likewise.
* config/vms/vms-c.c: Likewise.
* config/vms/vms.c: Likewise.
* config/vxworks.c: Likewise.
* config/winnt-c.c: Likewise.
* config/xtensa/xtensa.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228923 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoReplace printf with __builtin_printf
hjl [Fri, 16 Oct 2015 19:34:32 +0000 (19:34 +0000)]
Replace printf with __builtin_printf

* gcc.target/i386/iamcu/test_basic_64bit_returning.c (main):
Replace printf with __builtin_printf.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228922 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoProperly initialize u5
hjl [Fri, 16 Oct 2015 19:31:20 +0000 (19:31 +0000)]
Properly initialize u5

* gcc.target/i386/iamcu/test_passing_unions.c (main): Properly
initialize u5.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228921 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR middle-end/67966
ebotcazou [Fri, 16 Oct 2015 15:56:49 +0000 (15:56 +0000)]
PR middle-end/67966
* gnat.dg/pack21.adb: New test.
* gnat.dg/pack22.adb: Likewise.
* gnat.dg/pack22_pkg.ad[sb]: New helper.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228917 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDocument options for Filesystem TS library
redi [Fri, 16 Oct 2015 13:55:12 +0000 (13:55 +0000)]
Document options for Filesystem TS library

* doc/xml/manual/configure.xml: Document
--enable-libstdcxx-filesystem-ts option.
* doc/xml/manual/status_cxx2014.xml: Document libstdc++fs.a.
* doc/xml/manual/using.xml: Likewise.
* doc/html/*: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228914 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Christian Bruel <christian.bruel@st.com>
chrbr [Fri, 16 Oct 2015 13:52:51 +0000 (13:52 +0000)]
2015-10-16  Christian Bruel  <christian.bruel@st.com>

  PR target/67745
  * config/arm/arm.h (FUNCTION_BOUNDARY): Use FUNCTION_BOUNDARY_P.
  (FUNCTION_BOUNDARY_P): New macro:
  * config/arm/arm.c (TARGET_RELAYOUT_FUNCTION, arm_relayout_function):
  New hook.
  * doc/tm.texi.in (TARGET_RELAYOUT_FUNCTION): Document.
  * doc/tm.texi (TARGET_RELAYOUT_FUNCTION): New hook.
  * gcc/target.def (TARGET_RELAYOUT_FUNCTION): Likewise.
  * gcc/function.c (allocate_struct_function): Call relayout_function hook.
  * gcc/passes.c (rest_of_decl_compilation): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228912 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 16 Oct 2015 13:52:44 +0000 (13:52 +0000)]
2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

* aspects.adb Add an entry for Constant_After_Elaboration in
table Canonical_Aspect.
* aspects.ads Add entries for Constant_After_Elaboration in
tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
and Implementation_Defined_Aspect.
* par-prag.adb Pragma Constant_After_Elaboration does not require
special processing by the parser.
* sem_ch13.adb Add an entry for Constant_After_Elaboration
in table Sig_Flags.
(Analyze_Aspect_Specifications):
Add processing for aspect Constant_After_Elaboration.
(Check_Aspect_At_Freeze_Point): Aspect Constant_After_Elaboration
does not require special processing at freeze time.
* sem_prag.adb (Analyze_Pragma): Add processing for pragma
Constant_After_Elaboration. Use routine Find_Related_Context to
retrieve the context of pragma Part_Of.
(Duplication_Error): Update comment on usage.
(Find_Related_Context): New routine.
* sem_prag.ads Add an entry for Constant_After_Elaboration
in table Aspect_Specifying_Pragma.
(Analyze_Contract_Cases_In_Decl_Part): Update the comment on usage.
* sem_util.adb (Add_Contract_Item): Add processing for pragma
Constant_After_Elaboration.
* sem_util.ads (Add_Contract_Item): Update the comment on usage.
* snames.ads-tmpl Add new predefined name and aspect id for
Constant_After_Elaboration.

2015-10-16  Vincent Celier  <celier@adacore.com>

* prj-pp.adb (Pretty_Print.Print): Correctly display extending
packages, instead of making them renamed packages.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228911 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 16 Oct 2015 13:43:47 +0000 (13:43 +0000)]
2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_ch12.adb (Analyze_Package_Instantiation):
Treat a missing SPARK_Mode annotation as having mode "Off".
(Analyze_Subprogram_Instantiation): Treat a missing SPARK_Mode
annotation as having mode "Off".
(Instantiate_Package_Body): Code
reformatting. Treat a missing SPARK_Mode annotation as having mode
"Off".
(Instantiate_Subprogram_Body): Code reformatting. Treat
a missing SPARK_Mode annotation as having mode "Off".

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

* exp_ch5.adb: Code clean up.
* sem_ch13.adb: Minor fix in comment.

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

* a-exexda.adb: Change format of Exception_Information to be
more like what we print for unhandled exceptions.
* a-exstat.adb: Parse new format.
* a-except-2005.adb, a-except.adb: Document new format.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228907 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Javier Miranda <miranda@adacore.com>
charlet [Fri, 16 Oct 2015 13:41:29 +0000 (13:41 +0000)]
2015-10-16  Javier Miranda  <miranda@adacore.com>

* sem_ch5.adb (Analyze_Iterator_Specification): Associate a
transient scope with the renaming object declararation.
* exp_util.adb (Insert_Actions): if the enclosing interator
loop is marked as requiring the secondary stack then attach the
actions to the transient scope.

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

* exp_ch7.adb: Minor spelling fixes.

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

* sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
If anonymous type is component type of array type declaration,
analyze its declaration in the current scope, not the enclosing
one.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228906 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoComplete previous change.
charlet [Fri, 16 Oct 2015 13:40:04 +0000 (13:40 +0000)]
Complete previous change.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228905 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Christian Bruel <christian.bruel@st.com>
chrbr [Fri, 16 Oct 2015 13:37:14 +0000 (13:37 +0000)]
2015-10-16  Christian Bruel  <christian.bruel@st.com>

PR target/67745
* config/arm/arm.h (FUNCTION_BOUNDARY): Move optimize_size condition to:
* config/arm/arm.c (arm_option_override_internal): Call
arm_override_options_after_change_1.
(arm_override_options_after_change): New function.
(arm_override_options_after_change_1): Likewise.
(TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define hook.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228904 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoCode clean up.
charlet [Fri, 16 Oct 2015 13:28:39 +0000 (13:28 +0000)]
Code clean up.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228903 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoComplete previous change.
charlet [Fri, 16 Oct 2015 13:26:51 +0000 (13:26 +0000)]
Complete previous change.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228902 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Gary Dismukes <dismukes@adacore.com>
charlet [Fri, 16 Oct 2015 13:25:00 +0000 (13:25 +0000)]
2015-10-16  Gary Dismukes  <dismukes@adacore.com>

* prj.adb, sem_util.adb, exp_ch6.adb: Minor reformatting.

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

* exp_ch5.adb (Expand_Formal_Container_Element_Loop): Modify
expansion to allow element iteration over formal containers
whose elements are indefinite types.

2015-10-16  Doug Rupp  <rupp@adacore.com>

* s-taprop-linux.adb (Monotonic_Clock): Call clock_gettime
instead of gettimeofday.
* s-osinte-linux.ads (clock_gettime): New imported subprogram.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228901 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoComplete previous change.
charlet [Fri, 16 Oct 2015 13:21:25 +0000 (13:21 +0000)]
Complete previous change.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228900 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 16 Oct 2015 13:14:24 +0000 (13:14 +0000)]
2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
Indefinite or limited library level objects are now returned on
the heap.
* exp_ch7.adb (Build_Finalization_Master): Add formal
parameter For_Lib_Level. Add context specific insertion for a
finalization master created for an access result type related
to a build-in-place function call used to initialize a library
level object.
* exp_ch7.ads (Build_Finalization_Master): Add formal parameter
For_Lib_Level. Update the comment on usage.
* sem_util.adb (Mark_Coextensions): Code cleanup.

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

* prj.adb (For_Every_Project_Imported_Context): Fix handling
of aggregated projects with duplicate names.
* a-ngelfu.ads: Minor whitespace fix.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228899 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix typo.
charlet [Fri, 16 Oct 2015 13:14:12 +0000 (13:14 +0000)]
Fix typo.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228898 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Ed Schonberg <schonberg@adacore.com>
charlet [Fri, 16 Oct 2015 13:11:18 +0000 (13:11 +0000)]
2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* sem_ch13.adb (Build_Predicate_Functions): The expression for
the predicate is side-effect free if it does not contain any
variable references.

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

* a-convec.adb ("="): Previous version depended
on "=" composing, but that doesn't quite work -- we want the "="
operator passed in to the generic. So we need a loop after all.

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

* sem_util.adb (Is_Object_Reference): Attribute 'Loop_Entry produces
an object.
* sem_ch6.adb: Minor fix in comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228897 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Bob Duff <duff@adacore.com>
charlet [Fri, 16 Oct 2015 13:08:04 +0000 (13:08 +0000)]
2015-10-16  Bob Duff  <duff@adacore.com>

* a-contai.ads: Add two check names: Container_Checks and
Tampering_Check.  Move the tampering check machinery from
Ada.Containers.Vectors to Ada.Containers. Later we can share it
with other containers.
Disable the tampering machinery in the presence of
Suppress(Tampering_Check).
Simplify the implementation of tampering checks. E.g. use RAII
to make incrementing/decrementing of the counts more concise.
* a-contai.adb: New package body, implementing the above.
* a-convec.ads, a-convec.adb: Use tampering check machinery
in Ada.Containers.
Disable all checking code when checks are suppressed.
Simplify many of the operations. Implement "&" in terms of Append,
rather than "by hand".
Remove: function "=" (L, R : Elements_Array) return Boolean is
abstract; so we can call the predefined "=" on Elements_Array.
For "=" on Vectors: Previously, we returned True immediately if
Left'Address = Right'Address.  That seems like a non-optimization
("if X = X" is unusual), so removed that.  Simplify by using
slice comparison ("=" on Element_Array will automatically call
"=" on the components, even if user defined).

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

* sem_ch13.adb (Chek_Record_Representation_Clause): When
iterating over components, skip anonymous subtypes created for
constrained array components.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228896 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
charlet [Fri, 16 Oct 2015 13:03:16 +0000 (13:03 +0000)]
2015-10-16  Eric Botcazou  <ebotcazou@adacore.com>

* a-tags.ads (Parent_Size): Remove obsolete pragma Export.
* s-finmas.ads (Header_Offset): Delete.
* s-finmas.adb (Header_Offset): Likewise.
(Finalize): Call Header_Size instead of Header_Offset.
* s-stposu.adb (Allocate_Any_Controlled): Likewise.
(Deallocate_Any_Controlled): Likewise.

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

* a-exetim.ads, a-exetim-mingw.ads, a-exetim-default.ads: Whitespace
cleanup.
* s-osprim-mingw.adb, einfo.ads, sem_util.adb, sem_util.ads,
sem_ch4.adb, sem_ch13.adb, s-trasym.adb, s-trasym.ads,
s-taprop-posix.adb: Minor reformatting.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228895 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Bob Duff <duff@adacore.com>
charlet [Fri, 16 Oct 2015 12:53:03 +0000 (12:53 +0000)]
2015-10-16  Bob Duff  <duff@adacore.com>

* adadecode.h, adadecode.c (ada_demangle): Remove
ada_demangle, no longer used.
* a-except-2005.adb: Bring System.Traceback.Symbolic into the
closure.

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

* sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
locate the access discriminant that supports implicit dereference on a
record type.
(Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
of Implicit_Dereference on an access_to_constant when actual
parameter is a rewritten variable or function call.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228886 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Bob Duff <duff@adacore.com>
charlet [Fri, 16 Oct 2015 12:47:43 +0000 (12:47 +0000)]
2015-10-16  Bob Duff  <duff@adacore.com>

        * a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get                elaboration circularities when polling is turned on.

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

* sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
When creating a full declaration for a formal parameter, the
entity is labelled as an Itype, so set Associated_Node_For_Itype
accordingly.
* einfo.ads: Clarify use of Associated_Node_For_Itype.

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

* bindgen: Move pragmas Warnings earlier, otherwise
we can get warnings on with_clauses.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228885 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 16 Oct 2015 12:43:21 +0000 (12:43 +0000)]
2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
s-taprop-posix.adb (Monotonic_Clock): Removed, not used.
Remove remaining references to OS_Primitives.Monotonic_Clock.
Keep it only on windows which is a special case.

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

* a-textio.adb (Get_Line): Fix documentation.
* einfo.ads (Interface_Name): Fix documentation.
* exp_aggr.adb (Backend_Processing_Possible): Fix documentation.
* exp_ch4.adb (Expand_N_In): Fix documentation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228884 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
charlet [Fri, 16 Oct 2015 12:41:13 +0000 (12:41 +0000)]
2015-10-16  Eric Botcazou  <ebotcazou@adacore.com>

* inline.adb (Subp_Info): Remove Listed component.
(Add_Inlined_Subprogram): Take an entity instead of an index.
Do not set Listed component to True.
(New_Entry): Do not initialize Listed component to False.
(Analyze_Inlined_Bodies): Do not test Listed component
(Must_Inline): Add calls not in the main unit only
if they are in a subprogram that can be inlined outside its unit.
(Add_Inlined_Body): Move test around and add comment.

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

* sinfo.ads, einfo.ads: monir clean ups.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228883 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * gcc-interface/Make-lang.in: Update dependencies
charlet [Fri, 16 Oct 2015 12:35:59 +0000 (12:35 +0000)]
    * gcc-interface/Make-lang.in: Update dependencies

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228882 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 16 Oct 2015 12:32:52 +0000 (12:32 +0000)]
2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* usage.adb, debug.adb, a-except.adb, a-except.ads, a-except-2005.adb,
a-except-2005.ads, s-imgrea.adb: Minor code clean ups related to
jgnat/dotnet removal.

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

* s-osprim-vxworks.adb, s-osprim-darwin.adb, s-tadeca.adb,
s-osprim-unix.adb, s-osprim-solaris.adb, s-osprim-posix.adb,
s-osprim.ads (Monotonic_Clock): Removed, unused.

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

* sem_ch4.adb (Try_Object_Operation, Try_One_Interpretation):
Do not reset the Obj_Type of the prefix if an interpretation
involves an untagged type, to prevent a crash when analyzing an
illegal program in All_Errors mode.

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

* exp_ch4.adb (Expand_N_Expression_With_Actions):
Force the evaluation of the expression when its type is Boolean.
(Force_Boolean_Evaluation): New routine.

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

* sem_util.adb (Has_Discrim_Dep_Array): Remove
this function, and the call. No longer needed now that the back
end can handle such things. Should result in further speedups
in some cases.

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

* sem_ch13.adb (Build_Predicate_Functions): If expression for
predicate is side-effect free, indicate that the predicate
function is pure, to allow for optimization of redundant
predicate checks.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228881 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 16 Oct 2015 12:25:58 +0000 (12:25 +0000)]
2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* checks.adb: Fix typo.
* s-osinte-linux.ads: Add header.
* projects.texi: Removed, no longer used.
* s-multip.adb: Minor: fix header.
* sem_ch3.adb, exp_ch7.adb, g-dirope.ads, sinfo.ads, types.ads,
a-textio.adb, s-exctra.adb, ali.adb, back_end.ads, exp_intr.adb,
a-tigeli.adb, exp_ch3.adb, s-os_lib.ads: Remove further references to
.NET.
* gnatlink.adb, opt.ads, exp_aggr.adb, s-solita.adb: Minor comment
updates.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228880 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Gary Dismukes <dismukes@adacore.com>
charlet [Fri, 16 Oct 2015 12:22:22 +0000 (12:22 +0000)]
2015-10-16  Gary Dismukes  <dismukes@adacore.com>

* exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
the temporary object used for a by-copy entry parameter, to
ensure that the object doesn't get its No_Initialization flag
reset later in Default_Initialize_Object. Also, generate the
assignment of the actual to the temporary in the additional case
of a scalar out parameter whose type has a Default_Value aspect.
* exp_ch3.adb: Fix minor typo in comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228879 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 16 Oct 2015 12:21:03 +0000 (12:21 +0000)]
2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
Minor reformatting.
* sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
SPARK_Mode from the context.

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

* sem_util.adb (Requires_Transient_Scope):
If Typ is a generic formal incomplete type, look at the actual
type. Otherwise, we don't notice that the actual type is tagged,
has a variant part, etc, causing a mismatch of calling conventions
between caller and callee.

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

* einfo.ads: Move the declaration of enumeration
literal E_Abstract_State above E_Entry.  Update the upper bound
of subtype Overloadable_Kind.

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

* exp_attr.adb: Minor editorial changes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228878 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoShrink std::random_shuffle test to pass on simulators
redi [Fri, 16 Oct 2015 11:12:15 +0000 (11:12 +0000)]
Shrink std::random_shuffle test to pass on simulators

2015-10-16  Aurelio Remonda  <aurelio.remonda@tallertechnologies.com>

* testsuite/25_algorithms/random_shuffle/moveable.cc: Change variable
N from const int N = 200000 to const unsigned int N = 10000.
Delete useless fill_ascending function call.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228876 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago Revert:
hubicka [Fri, 16 Oct 2015 11:06:14 +0000 (11:06 +0000)]
Revert:
* ipa-icf-gimple.c (func_checker::compare_operand): Compare only
empty constructors.
* gcc.c-torture/compile/icfmatch.c: Add testcase

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228875 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 16 Oct 2015 11:01:53 +0000 (11:01 +0000)]
2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
Code clean up: remove special handling for .NET and JVM.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228874 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-16 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 16 Oct 2015 11:00:05 +0000 (11:00 +0000)]
2015-10-16  Arnaud Charlet  <charlet@adacore.com>

* sem_ch12.adb: Minor punctuation fix in comment
* s-rident.ads: Minor consistency fix in comment
* exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
* restrict.ads: Style fix in comments.
* sem_prag.adb: Minor grammar fix in comment

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228873 138bc75d-0d04-0410-961f-82ee72b054a4