]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
10 years ago2015-10-26 Claire Dross <dross@adacore.com>
charlet [Mon, 26 Oct 2015 10:57:17 +0000 (10:57 +0000)] 
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.

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

10 years ago2015-10-26 Gary Dismukes <dismukes@adacore.com>
charlet [Mon, 26 Oct 2015 10:54:01 +0000 (10:54 +0000)] 
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.

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

10 years ago2015-10-26 Ed Schonberg <schonberg@adacore.com>
charlet [Mon, 26 Oct 2015 10:49:55 +0000 (10:49 +0000)] 
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.

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

10 years ago2015-10-26 Eric Botcazou <ebotcazou@adacore.com>
charlet [Mon, 26 Oct 2015 10:47:56 +0000 (10:47 +0000)] 
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.

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

10 years agoAdd make_restrict_var_constraints
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.

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

10 years agoAdd vars in intra_create_variables_info
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.

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

10 years agoInline get_vi_for_tree into intra_create_variable_infos
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.

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

10 years ago2015-10-26 Bob Duff <duff@adacore.com>
charlet [Mon, 26 Oct 2015 10:45:50 +0000 (10:45 +0000)] 
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.

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

10 years ago2015-10-26 Joel Brobecker <brobecker@adacore.com brobecker>
charlet [Mon, 26 Oct 2015 10:39:41 +0000 (10:39 +0000)] 
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.

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

10 years agoFix race on temp file in gfortran tests.
clyon [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.

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

10 years ago2015-10-26 Ed Schonberg <schonberg@adacore.com>
charlet [Mon, 26 Oct 2015 10:35:52 +0000 (10:35 +0000)] 
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.

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

10 years ago[optabs.c] Fix PR 67989: Handle const0_rtx target in expand_atomic_compare_and_swap
ktkachov [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.

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

10 years ago2015-10-26 Ed Schonberg <schonberg@adacore.com>
charlet [Mon, 26 Oct 2015 10:24:05 +0000 (10:24 +0000)] 
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.

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

10 years agoFix race on temp file in gfortran streamio_*.f90 tests
mkuvyrkov [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.

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

10 years ago2015-10-26 Gary Dismukes <dismukes@adacore.com>
charlet [Mon, 26 Oct 2015 10:12:40 +0000 (10:12 +0000)] 
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.

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

10 years ago2015-10-26 Christian Bruel <christian.bruel@st.com>
chrbr [Mon, 26 Oct 2015 09:50:37 +0000 (09:50 +0000)] 
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.

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

10 years ago2015-10-26 Richard Biener <rguenther@suse.de>
rguenth [Mon, 26 Oct 2015 09:48:32 +0000 (09:48 +0000)] 
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.

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

10 years agoMove int rounding folds to match.pd
rsandifo [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.

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

10 years agoUse macros to define built-in operator lists
rsandifo [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.

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

10 years agoFix scripto
rsandifo [Mon, 26 Oct 2015 09:21:27 +0000 (09:21 +0000)] 
Fix scripto

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

10 years agoMove cexp simplifications to match.pd
rsandifo [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).

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

10 years agoENABLE_CHECKING refactoring: pool allocators
miyuki [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.

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

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

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

10 years ago2015-01-25 Paul Thomas <pault@gcc.gnu.org>
pault [Sun, 25 Oct 2015 21:31:12 +0000 (21:31 +0000)] 
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

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

10 years ago * config/pa/som.h (EH_FRAME_THROUGH_COLLECT2): Define.
danglin [Sun, 25 Oct 2015 18:34:00 +0000 (18:34 +0000)] 
* config/pa/som.h (EH_FRAME_THROUGH_COLLECT2): Define.

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

10 years ago PR middle-end/68079
danglin [Sun, 25 Oct 2015 15:18:48 +0000 (15:18 +0000)] 
PR middle-end/68079
* dojump.c (do_compare_and_jump): Canonicalize both function and
method types.

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

10 years ago * g++.dg/Wno-frame-address.C: Skip on hppa*-*-*.
danglin [Sun, 25 Oct 2015 14:58:28 +0000 (14:58 +0000)] 
* g++.dg/Wno-frame-address.C: Skip on hppa*-*-*.

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

10 years ago PR target/68084
uros [Sun, 25 Oct 2015 13:21:01 +0000 (13:21 +0000)] 
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.

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

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

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

10 years agogcc/fortran/ChangeLog:
vehre [Sun, 25 Oct 2015 12:28:57 +0000 (12:28 +0000)] 
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.

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

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

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

10 years agoImplement C++17 std::invoke and LWG DR 2219
redi [Sun, 25 Oct 2015 00:00:54 +0000 (00:00 +0000)] 
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.

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

10 years agoReturn deferred future if thread cannot be run
redi [Sat, 24 Oct 2015 21:36:50 +0000 (21:36 +0000)] 
Return deferred future if thread cannot be run

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

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

10 years ago2015-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Sat, 24 Oct 2015 17:09:35 +0000 (17:09 +0000)] 
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.

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

10 years ago2015-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Sat, 24 Oct 2015 16:20:26 +0000 (16:20 +0000)] 
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.

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

10 years ago * gcc-interface/utils2.c (build_binary_op): Tweak formatting.
ebotcazou [Sat, 24 Oct 2015 09:06:26 +0000 (09:06 +0000)] 
* gcc-interface/utils2.c (build_binary_op): Tweak formatting.
(build_unary_op): Likewise.

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

10 years ago DR 1518
jason [Sat, 24 Oct 2015 02:58:10 +0000 (02:58 +0000)] 
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.

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

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

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

10 years ago PR ipa/pr67600
hubicka [Fri, 23 Oct 2015 23:33:58 +0000 (23:33 +0000)] 
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.

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

10 years ago * fold-const.c (operand_equal_p): Handle VIEW_CONVERT_EXPR.
hubicka [Fri, 23 Oct 2015 23:30:31 +0000 (23:30 +0000)] 
* fold-const.c (operand_equal_p): Handle VIEW_CONVERT_EXPR.

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

10 years agoThis patch fixes a compile-time regression that was originally
ctice [Fri, 23 Oct 2015 23:22:42 +0000 (23:22 +0000)] 
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.

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

10 years ago * config.gcc (powerpc-ibm-aix[6789]) [default_use_cxa_atexit]:
dje [Fri, 23 Oct 2015 22:56:08 +0000 (22:56 +0000)] 
    * config.gcc (powerpc-ibm-aix[6789]) [default_use_cxa_atexit]:
        Define as yes.

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

10 years agogcc/
ienkovich [Fri, 23 Oct 2015 22:41:40 +0000 (22:41 +0000)] 
gcc/

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

gcc/testsuite/

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

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

10 years agogcc/
ienkovich [Fri, 23 Oct 2015 22:38:37 +0000 (22:38 +0000)] 
gcc/

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

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

10 years ago[PATCH 4/9] ENABLE_CHECKING refactoring: Fortran
law [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.

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

10 years ago[PATCH] Call flush_ssaname_freelist more often
law [Fri, 23 Oct 2015 22:34:04 +0000 (22:34 +0000)] 
[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.

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

10 years ago PR c++/67813
jason [Fri, 23 Oct 2015 20:57:05 +0000 (20:57 +0000)] 
PR c++/67813
* constexpr.c (cxx_eval_store_expression): Always use *valp if
set.

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

10 years ago[rs6000] Enable secureplt by default on musl
nsz [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*.

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

10 years ago[RFA] Fix pr67830, another type narrowing problem
law [Fri, 23 Oct 2015 19:16:53 +0000 (19:16 +0000)] 
[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.

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

10 years agopowerpc musl libc support
nsz [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.

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

10 years ago * fold-const.c (operand_equal_p): Do not compare TYPE_MODE when
hubicka [Fri, 23 Oct 2015 18:05:55 +0000 (18:05 +0000)] 
* fold-const.c (operand_equal_p): Do not compare TYPE_MODE when
comparing addresses.

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

10 years ago * fold-const.c (operand_equal_p): Handle matching of vector
hubicka [Fri, 23 Oct 2015 18:05:09 +0000 (18:05 +0000)] 
* fold-const.c (operand_equal_p): Handle matching of vector
constructors.
* gcc.dg/tree-ssa/operand-equal-2.c: New testcase.

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

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

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

10 years ago2015-10-23 Steve Ellcey <sellcey@imgtec.com>
sje [Fri, 23 Oct 2015 17:06:07 +0000 (17:06 +0000)] 
2015-10-23  Steve Ellcey  <sellcey@imgtec.com>

* MAINTAINERS: Update email address.

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

10 years agoFix ChangeLog entry
sje [Fri, 23 Oct 2015 15:59:15 +0000 (15:59 +0000)] 
Fix ChangeLog entry

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

10 years ago2015-10-23 Steve Ellcey <sellcey@imgtec.com>
sje [Fri, 23 Oct 2015 15:58:33 +0000 (15:58 +0000)] 
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.

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

10 years ago2015-10-23 Steve Ellcey <sellcey@imgtec.com>
sje [Fri, 23 Oct 2015 15:56:15 +0000 (15:56 +0000)] 
2015-10-23  Steve Ellcey  <sellcey@imgtec.com>
    Andrew Pinski  <apinski@cavium.com>

PR rtl-optimization/67736
* combine.c (simplify_comparison): Use gen_lowpart_or_truncate instead
of gen_lowpart.

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

10 years agogcc/
ienkovich [Fri, 23 Oct 2015 13:38:16 +0000 (13:38 +0000)] 
gcc/

PR middle-end/68066
* tree.c (build_truth_vector_type): Support BLK mode
returned for boolean vector.

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

10 years ago2015-10-23 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 23 Oct 2015 13:10:35 +0000 (13:10 +0000)] 
2015-10-23  Arnaud Charlet  <charlet@adacore.com>

* gnat_rm.texi, gnat_ugn.texi: Regenerate.
* doc/share/ada_pygments.py, doc/gnat_ugn/gnat_project_manager.rst,
doc/gnat_ugn/building_executable_programs_with_gnat.rst,
doc/gnat_ugn/gnat_and_program_execution.rst,
doc/gnat_rm/implementation_defined_attributes.rst,
doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
doc/gnat_rm/representation_clauses_and_pragmas.rst,
doc/gnat_rm/implementation_defined_pragmas.rst,
doc/gnat_rm/about_this_guide.rst,
doc/gnat_rm/implementation_of_ada_2012_features.rst,
doc/gnat_rm/implementation_of_specific_ada_features.rst,
doc/gnat_rm/implementation_defined_aspects.rst,
doc/gnat_rm/implementation_advice.rst: Update documentation.

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

10 years ago2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 23 Oct 2015 13:04:01 +0000 (13:04 +0000)] 
2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>

* contracts.ads, contracts.adb: New unit.
* exp_ch6.adb Add with and use clauses for Contracts.
(Expand_Subprogram_Contract): Moved to Contracts.
* exp_ch6.ads (Expand_Subprogram_Contract): Moved to Contracts.
* sem_ch3.adb Add with and use clauses for Contracts.
(Analyze_Object_Contract): Moved to Contracts.
(Analyze_Declarations): Remove local variable Pack_Decl. Do not
capture global references in contracts. Check the hidden states
of a package body.
* sem_ch6.adb Add with and use clauses in Contracts.
(Analyze_Generic_Subprogram_Body): Do not capture global
references in contracts.
(Analyze_Subprogram_Body_Contract):
Moved to Contracts.
(Analyze_Subprogram_Body_Helper): Freeze the
contract of the nearest enclosing package body. Always analyze
the subprogram body contract. Do not expand the subprogram
body contract.
(Analyze_Subprogram_Contract): Moved to Contracts.
* sem_ch6.ads (Analyze_Subprogram_Body_Contract): Moved to Contracts.
(Analyze_Subprogram_Contract): Moved to Contracts.
* sem_ch7.adb Add with and use clauses for Contracts.
(Analyze_Package_Body_Contract): Moved to Contracts.
(Analyze_Package_Body_Helper): Freeze the contract of the
nearest enclosing package body.
(Analyze_Package_Contract): Moved to Contracts.
* sem_ch7.ads (Analyze_Package_Body_Contract): Moved to Contracts.
(Analyze_Package_Contract): Moved to Contracts.
* sem_ch10.adb Add with and use clauses for Contracts.
(Analyze_Compilation_Unit): Do not capture global references
in contracts.
(Analyze_Subprogram_Body_Stub_Contract): Moved to Contracts.
* sem_ch10.ads (Analyze_Subprogram_Body_Stub_Contract): Moved
to Contracts.
* sem_ch12.adb Add with and use clauses for Contracts.
(Analyze_Subprogram_Instantiation): Update the call to
Instantiate_Subprogram_Contract.
(Instantiate_Package_Body):
Do not copy the entity of the spec when creating an entity
for the body. Construct a brand new defining identifier for
the body and inherit the Comes_From_Source flag from the spec.
(Instantiate_Subprogram_Body): Remove Anon_Id to Act_Decl_Id
and update all occurrences. Construct a brand new defining
identifier for the body and inherit the Comes_From_Source
flag from the spec.
(Instantiate_Subprogram_Contract): Moved
to Contracts.
(Save_Global_References_In_Aspects): Moved to
the spec of Sem_Ch12.
(Save_Global_References_In_Contract):
Moved to Contracts.
* sem_ch12.ads (Save_Global_References_In_Aspects): Moved from
the body of Sem_Ch12.
(Save_Global_References_In_Contract):
Moved to Contracts.
* sem_prag.adb Add with and use clauses for Contracts.
(Add_Item): Removed. All references to this routine have been
replaced with calls to Append_New_Elmt.
(Analyze_Constituent):
Add special diagnostics for errors caused by freezing of
contracts.
(Analyze_Refined_State_In_Decl_Part): Add formal
parameter Freeze_Id. Add new global variable Freeze_Posted.
(Collect_Body_States): Removed.
(Report_Unused_States): Removed.
* sem_prag.ads (Analyze_Defined_State_In_Decl_Part): Add formal
parameter Freeze_Id and update comment on usage.
* sem_util.adb Remove with and use clauses for
Sem_Ch12.
(Add_Contract_Item): Moved to Contracts.
(Check_Unused_Body_States): New routine.
(Collect_Body_States):
New routine.
(Create_Generic_Contract): Moved to Contracts.
(Inherit_Subprogram_Contract): Moved to Contracts.
(Report_Unused_Body_States): New routine.
* sem_util.ads (Add_Contract_Item): Moved to Contracts.
(Check_Unused_Body_States): New routine.
(Collect_Body_States): New routine.
(Create_Generic_Contract): Moved to Contracts.
(Inherit_Subprogram_Contract): Moved to Contracts.
(Report_Unused_Body_States): New routine.
* sinfo.adb (Is_Expanded_Contract): New routine.
(Set_Is_Expanded_Contract): New routine.
* sinfo.ads New attribute Is_Expanded_Contract along with
placement in nodes.
(Is_Expanded_Contract): New routine along
with pragma Inline.
(Set_Is_Expanded_Contract): New routine
along with pragma Inline.
* gcc-interface/Make-lang.in: Add entry for contracts.o

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

* bindgen.adb, init.c, opt.ads, switch-b.adb: Implement new -Ea and
-Es switches.
* switch-b.ads: Minor comment fix.
* bindusg.adb: Document new -Ea and -Es switches.
* s-exctra.ads: Use -Es instead of -E.

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

10 years ago2015-10-23 Tristan Gingold <gingold@adacore.com>
charlet [Fri, 23 Oct 2015 13:01:23 +0000 (13:01 +0000)] 
2015-10-23  Tristan Gingold  <gingold@adacore.com>

* gcc-interface/utils2.c (build_call_alloc_dealloc): Check no implicit
task and protected object restrictions.

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

10 years ago2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 23 Oct 2015 12:55:06 +0000 (12:55 +0000)] 
2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_ch12.adb, exp_ch6.adb: Minor reformatting.

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

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

* exp_ch6.adb: Minor reformatting.

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

* sem_ch12.adb (Check_Formal_Packages): A formal package whose
actual part is (others => <>) os identical to a formal package
with an actual part written as (<>).

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

* a-reatim.adb ("/"): For Time_Span division convert the operands
to integers and then use integer division, which conforms to
the rounding required by Ada RM.

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

10 years ago2015-10-23 Ed Schonberg <schonberg@adacore.com>
charlet [Fri, 23 Oct 2015 12:51:30 +0000 (12:51 +0000)] 
2015-10-23  Ed Schonberg  <schonberg@adacore.com>

* sem_ch6.adb (Check_Missing_Return): Do not report a missing
return statement on a function body constructed to complete a
package body for a premature instantiation.

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

* exp_ch6.adb (Build_Procedure_Body_Form): Replace body of
original function with that of generated procedure, to simplify
processing and avoid scoping problems with local declarations.
(Rewrite_Function_Call_For_C): Handle properly the case of a
parameterless function.

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

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

* a-exextr.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.

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

10 years ago2015-10-23 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 23 Oct 2015 12:48:46 +0000 (12:48 +0000)] 
2015-10-23  Arnaud Charlet  <charlet@adacore.com>

* s-taskin.ads: Minor code clean up.
(Ada_Task_Control_Block): Move fixed size field before variable sized
ones.
* einfo.ads: Minor editing.

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

* sem_ch6.adb (Check_Aggregate_Accessibility): Apply rule in RM
6.5 (8.3) to verify that access discriminants in an aggregate
in a return statement have the proper accessibility, i.e. do
not lead to dangling references.

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

* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Add missing
test on Address_Clause_Overlay_Warnings to the "constant overlays
variable" warning. For the reverse case, also issue a warning if
the modification is potentially made through the initialization
of the variable.

2015-10-23  Jose Ruiz  <ruiz@adacore.com>

* a-exetim-posix.adb (Clock): Use the pthread_getcpuclockid
function to have access to CPU clocks for tasks other than the
calling task.

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

10 years ago2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 23 Oct 2015 12:40:50 +0000 (12:40 +0000)] 
2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>

* debug.adb: Switch -gnatd.5 is no longer in use, remove the
associated documentation.
* exp_dbug.adb (Get_External_Name): Do not add a special prefix
for ignored Ghost entities or when switch -gnatd.5 is enabled.
* exp_dbug.ads Remove the documentation concerning the encoding
of ignored Ghost entities.

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

* a-exextr.adb (Notify_Exception): For Unhandled_Raise_In_Main,
mimic the output from Ada.Exceptions.Last_Chance_Handler; don't
print "Exception raised".
* s-stalib.ads, s-exctra.ads, s-exctra.adb: Add
Unhandled_Raise_In_Main to types Exception_Trace_Kind/Trace_Kind.

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

10 years agoSupport for vectorizing conditional expressions
alahay01 [Fri, 23 Oct 2015 12:40:33 +0000 (12:40 +0000)] 
Support for vectorizing conditional expressions

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

gcc/
PR tree-optimization/65947
* tree-vect-loop.c
(vect_is_simple_reduction_1): Find condition reductions.
(vect_model_reduction_cost): Add condition reduction costs.
(get_initial_def_for_reduction): Add condition reduction initial var.
(vect_create_epilog_for_reduction): Add condition reduction epilog.
(vectorizable_reduction): Condition reduction support.
* tree-vect-stmts.c (vectorizable_condition): Add vect reduction arg
* doc/sourcebuild.texi (Vector-specific attributes): Document
vect_max_reduc

gcc/testsuite
PR tree-optimization/65947
* lib/target-supports.exp
(check_effective_target_vect_max_reduc): Add.
* gcc.dg/vect/pr65947-1.c: New test.
* gcc.dg/vect/pr65947-2.c: New test.
* gcc.dg/vect/pr65947-3.c: New test.
* gcc.dg/vect/pr65947-4.c: New test.
* gcc.dg/vect/pr65947-5.c: New test.
* gcc.dg/vect/pr65947-6.c: New test.
* gcc.dg/vect/pr65947-7.c: New test.
* gcc.dg/vect/pr65947-8.c: New test.
* gcc.dg/vect/pr65947-9.c: New test.
* gcc.dg/vect/pr65947-10.c: New test.
* gcc.dg/vect/pr65947-11.c: New test.

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

10 years ago2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 23 Oct 2015 12:39:08 +0000 (12:39 +0000)] 
2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_attr.adb, freeze.adb, sem_attr.adb, exp_aggr.adb,
gnatname.adb: Minor reformatting.

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

10 years ago2015-10-23 Steve Baird <baird@adacore.com>
charlet [Fri, 23 Oct 2015 12:37:35 +0000 (12:37 +0000)] 
2015-10-23  Steve Baird  <baird@adacore.com>

* a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads,
a-cborma.ads, a-cborse.ads, a-cbprqu.ads, a-cbsyqu.ads,
a-cdlili.ads, a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads,
a-cfinve.ads, a-cforma.ads, a-cforse.ads, a-cidlli.ads,
a-cihama.ads, a-cihase.ads, a-cimutr.ads, a-ciorma.ads,
a-ciormu.ads, a-ciorse.ads, a-coboho.ads, a-cobove.ads,
a-cofove.ads, a-cohama.ads, a-cohase.ads, a-coinho.ads,
a-coinho-shared.ads, a-coinve.ads, a-comutr.ads, a-conhel.ads,
a-convec.ads, a-coorma.ads, a-coormu.ads, a-coorse.ads,
a-cuprqu.ads, a-cusyqu.ads, a-rbtgbo.ads: Add spec Annotate
pragmas.
* a-cbdlli.adb, a-cbhama.adb, a-cbhase.adb, a-cbmutr.adb,
a-cborma.adb, a-cborse.adb, a-cbprqu.adb, a-cbsyqu.adb,
a-cdlili.adb, a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb,
a-cfinve.adb, a-cforma.adb, a-cforse.adb, a-cidlli.adb,
a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb,
a-ciormu.adb, a-ciorse.adb, a-coboho.adb, a-cobove.adb,
a-cofove.adb, a-cohama.adb, a-cohase.adb, a-coinho.adb,
a-coinho-shared.adb, a-coinve.adb, a-comutr.adb, a-conhel.adb,
a-convec.adb, a-coorma.adb, a-coormu.adb, a-coorse.adb,
a-cuprqu.adb, a-cusyqu.adb, a-rbtgbo.adb: Remove body Annotate
pragmas.

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

* gnatname.adb: When gnatname is invoked with a project file,
specified with switch -P, if gprname is available, gnatname will
invoke gprname, with the target if it is a cross gnatname.

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

* exp_ch4.adb: Fix typo.
* exp_ch6.adb: Update comment.
* exp_attr.adb (Expand_Min_Max_Attribute): Simplify expansion.
* exp_aggr.adb (Convert_To_Positional): Only convert to
positional when generating C in case of an object declaration.
(In_Object_Declaration): New.
(Late_Expansion): Adapt to trees generated by Modify_Tree_For_C.
* sinfo.ads: Update documentation.

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

* sigtramp.h (struct sigcontext, struct ucontext): Remove declarations,
and replace them by include of corresponding header file.

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

10 years ago2015-10-23 Bob Duff <duff@adacore.com>
charlet [Fri, 23 Oct 2015 12:29:51 +0000 (12:29 +0000)] 
2015-10-23  Bob Duff  <duff@adacore.com>

* a-convec.adb (Copy): Make sure C is initialized
on all paths, including when Checks is False.

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

* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove
error as unreachable.

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

10 years ago2015-10-23 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 23 Oct 2015 12:28:53 +0000 (12:28 +0000)] 
2015-10-23  Arnaud Charlet  <charlet@adacore.com>

* gnat1drv.adb (Adjust_Global_Switches): Adjust.

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

* exp_dbug.ads, exp_dbug.adb (Get_External_Name): The special prefix for
ignored Ghost entities is now ___ghost_.

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

* ghost.adb (Is_Subject_To_Ghost): Check the
original node when searching for pragma Ghost to catch cases
where a source construct has been rewritten into something else.

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

* einfo.ads, einfo.adb (Rewritten_For_C): New flag on functions
that return a constrained array type.  When generating C these
functions are rewritten as procedures with an out parameter,
and calls to such functions are rewritten accordingly.
* exp_ch6.adb (Expand_N_Subprogram_Declaration): When
Modify_Tree_For_C is set and the function returns a constrained
array type, generate a procedure declaration with an additional
out parameter. Mark original function as Rewritten_For_C.
The new declaration is inserted in tree immediately after
current declaration.
(Expand_Subprogram_Body): If entity is marked Rewritten_For_C,
generate body of corresponding procedure using declarations
and statements for function body. Replace return statements
with assignments to the out parameter, followed by a simple
return statement.
(Rewrite_Function_Call_For_C): New procedure to replace a function
call that returns an array by a procedure call.

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

10 years ago2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 23 Oct 2015 12:24:22 +0000 (12:24 +0000)] 
2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_util.adb (Denotes_Iterator): New routine.
(Is_Iterator): Code cleanup. Factor out the detection of a
predefined iterator.  As a result this fixes a missing case
where a tagged type implements interface Reversible_Iterator.

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

* sem_attr.adb (Eval_Attribute): Constant-fold 'Enabled if
not within a generic unit, even if expander is not active, so
that instances of container packages remain preelaborable in
-gnatc mode.

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

* init.c (__gnat_sigtramp): New assembly function for arm64-darwin.
(__gnat_error_handler): Use trampoline for arm64.

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

* exp_ch3.adb (Expand_N_Object_Declaration): if the type of the
object is a class-wide limited interface type, the expression
is not restricted to the forms specified for limited types.

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

* gnatname.adb: Code clean up.
* s-taasde.ads: Fix comment.

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

10 years ago2015-10-23 Ed Schonberg <schonberg@adacore.com>
charlet [Fri, 23 Oct 2015 12:21:21 +0000 (12:21 +0000)] 
2015-10-23  Ed Schonberg  <schonberg@adacore.com>

* sem_util.adb (Is_Iterator, Is_Reversible_iterator): Use
root type to determine whether the type is a descendant of the
corresponding interface type, so take into account multiple
levels of subtypes and derivations.

2015-10-23  Olivier Hainque  <hainque@adacore.com>

* tracebak.c: Refine selection of GCC/GENERIC_UNWINDER for
tracebacks on x86 & x86_64.
(x86 & x86_64): If !SJLJ, always pick the
GCC_UNWINDER for x86_64 (not only on linux).
* sem_util.ads: Minor fix in comment.

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

10 years ago2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Fri, 23 Oct 2015 12:19:35 +0000 (12:19 +0000)] 
2015-10-23  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_prag.adb (Analyze_Pragma): Pragma Volatile_Function should
not apply to a function instantiation.
* sem_util.adb (Has_Effectively_Volatile_Profile): New routine.
(Is_Volatile_Function): An instance of Ada.Unchecked_Conversion
is a volatile function when its profile contains an effectively
volatile type.
* sem_util.ads (Has_Effectively_Volatile_Profile): New routine.

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

10 years ago PR libgcc/66883
amylaar [Fri, 23 Oct 2015 11:57:26 +0000 (11:57 +0000)] 
    PR libgcc/66883
        * config/epiphany/udivsi3-float.c: Fix CONCISE test, and comment typo.

N.B., this is not active code, just documenting a previous approach for this
function in C.

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

10 years ago2015-10-23 Richard Biener <rguenther@suse.de>
rguenth [Fri, 23 Oct 2015 11:08:10 +0000 (11:08 +0000)] 
2015-10-23  Richard Biener  <rguenther@suse.de>

* Makefile.in (build/genmatch.o): Properly depend on is-a.h, tree.def
and builtins.def.

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

10 years ago2015-10-23 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 23 Oct 2015 10:55:10 +0000 (10:55 +0000)] 
2015-10-23  Arnaud Charlet  <charlet@adacore.com>

* exp_unst.adb (Unnest_Subprogram): Complete previous
change and update comments.

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

* sem_util.ads, sem_util.adb (Check_Function_With_Address_Parameter):
A subprogram that has an Address parameter and is declared in a Pure
package is not considered Pure, because the parameter may be used as a
pointer and the referenced data may change even if the address value
itself does not.
* freeze.adb (Freeze_Subprogram): use it.
* exp_ch6.adb (Expand_N_Subprogram_Body): Use it.

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

10 years ago2015-10-23 Olivier Hainque <hainque@adacore.com>
charlet [Fri, 23 Oct 2015 10:52:34 +0000 (10:52 +0000)] 
2015-10-23  Olivier Hainque  <hainque@adacore.com>

* tracebak.c: Fallback to generic unwinder for gcc-sjlj on x86 &
x86_64 linux
* tracebak.c: Rework x86 & x86_64 sections to resort to the
generic unwinder if __USING_SJLJ_EXCEPTIONS__.

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

* sem_util.adb (Check_Function_Writable_Actuals): For function
calls restrict the check to elementary types, as requested by
RM 6.4.1(6.15/3)

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

* exp_unst.adb (Unnest_Subprogram): Suppress initialization on
Decl_ARECnT since we are taking care of all initializations in
the generated code.

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

10 years agoAdjust previous change.
charlet [Fri, 23 Oct 2015 10:51:06 +0000 (10:51 +0000)] 
Adjust previous change.

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

10 years ago2015-10-23 Ed Schonberg <schonberg@adacore.com>
charlet [Fri, 23 Oct 2015 10:49:44 +0000 (10:49 +0000)] 
2015-10-23  Ed Schonberg  <schonberg@adacore.com>

* sem_dim.adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
Handle properly a box-initialized aggregate component.

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

* sem_prag.adb (Analyze_Pragma): Reject Volatile_Function not placed
on a function.

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

* a-extiin.ads, a-reatim.ads, a-interr.ads, a-exetim-mingw.ads,
a-exetim-default.ads, a-exetim.ads, a-taside.ads: Add "Global => null"
contract on subprograms.
* lib-xref-spark_specific.adb: collect scopes for stubs of
protected objects

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

* gnat1drv.adb (Adjust_Global_Switches): Enable
Back_Annotate_Rep_Info to get size information from gigi.
(Gnat1drv): Code clean ups.
* frontend.adb (Frontend): Ditto.

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

10 years ago2015-10-23 Arnaud Charlet <charlet@adacore.com>
charlet [Fri, 23 Oct 2015 10:46:27 +0000 (10:46 +0000)] 
2015-10-23  Arnaud Charlet  <charlet@adacore.com>

* gnat1drv.adb (Adjust_Global_Switches): Adjust settings.
* sem.adb (Semantics): Remove special case.

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

10 years agoAdd missing private clause in libgomp.c++/member-2.C
vries [Fri, 23 Oct 2015 10:45:13 +0000 (10:45 +0000)] 
Add missing private clause in libgomp.c++/member-2.C

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

PR testsuite/68063
* testsuite/libgomp.c++/member-2.C (A::m1): Add missing private clause.

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

10 years ago2015-10-23 Gary Dismukes <dismukes@adacore.com>
charlet [Fri, 23 Oct 2015 10:44:35 +0000 (10:44 +0000)] 
2015-10-23  Gary Dismukes  <dismukes@adacore.com>

* bindgen.adb, restrict.adb: Minor spelling/grammar fixes.

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

* sem_res.adb (Resolve_Entity_Name): Code cleanup. Check for possible
elaboration issues in SPARK when the name denotes a source variable.

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

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

* exp_ch7.adb (Process_Transient_Objects): Reimplement to properly
handle restriction No_Exception_Propagation.
* exp_ch11.adb (Expand_At_End_Handler): Update the parameter
profile and all references to Block.
* exp_ch11.ads (Expand_At_End_Handler): Update the parameter
profile and comment on usage.
* exp_intr.adb (Expand_Unc_Deallocation): Reimplement to properly
handle restriction No_Exception_Propagation.
* gnat1drv.adb, restrict.adb: Update comment.

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

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

* exp_ch6.adb (Expand_N_Extended_Return_Statement): Do not call
SS_Release for a block statement enclosing the return statement in the
case where a build-in-place function return is returning
the result on the secondary stack. This is accomplished by
setting the Sec_Stack_Needed_For_Return flag on such blocks.
It was already being set for the function itself, and it was
already set correctly for blocks in the non-build-in-place case
(in Expand_Simple_Function_Return).
(Set_Enclosing_Sec_Stack_Return): New procedure to perform
the Set_Sec_Stack_Needed_For_Return calls. Called in the
build-in-place and non-build-in-place cases.
(Expand_Simple_Function_Return): Call
Set_Enclosing_Sec_Stack_Return instead of performing the loop
in line.

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

* scng.adb (Char_Literal_Case): If an apostrophe
follows a reserved word, treat it as a lone apostrophe, rather
than the start of a character literal. This was already done for
"all", but it needs to be done also for (e.g.) "Delta".

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

10 years ago2015-10-23 Richard Biener <rguenther@suse.de>
naveenh [Fri, 23 Oct 2015 10:30:49 +0000 (10:30 +0000)] 
2015-10-23  Richard Biener  <rguenther@suse.de>
    Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

* fold-const.c (fold_binary_loc) : Move Fold (A & ~B) - (A & B)
into (A ^ B) - B to match.pd
Move (X & ~Y) | (~X & Y) is X ^ Y to match.pd.

* match.pd (minus (bit_and:cs @0 (bit_not @1)) (bit_and:s @0 @1)):
New simplifier.
(minus (bit_and:s @0 INTEGER_CST@2) (bit_and:s @0 INTEGER_CST@1)):
New simplifier.
(minus (bit_and:s @0 @1) (bit_and:cs @0 (bit_not @1))):
New simplifier.
(bit_ior:c (bit_and:c @0 (bit_not @1)) (bit_and:c (bit_not @0) @1)):
New simplifier.
(bit_ior:c (bit_and @0 INTEGER_CST@2) (bit_and (bit_not @0)
INTEGER_CST@1)): New simplifier.

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

10 years ago2015-10-23 Bob Duff <duff@adacore.com>
charlet [Fri, 23 Oct 2015 10:29:50 +0000 (10:29 +0000)] 
2015-10-23  Bob Duff  <duff@adacore.com>

* exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Use
Underlying_Type for B_Typ, in case the Typ is a subtype of a type with
unknown discriminants.
* g-awk.ads: Minor style fix in comment

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

* debug.adb: Document the use of debug switch -gnatd.5.
* einfo.adb: Code reformatting. (Is_Ghost_Entity): Moved from ghost.adb.
* einfo.ads New synthesized attribute Is_Ghost_Enity along
with usage in nodes and pragma Inline.
(Is_Ghost_Entity: Moved from ghost.ads.
* exp_ch3.adb Code reformatting.
(Expand_Freeze_Array_Type): Capture, set and restore the Ghost mode.
(Expand_Freeze_Class_Wide_Type): Capture, set and restore the
Ghost mode.
(Expand_Freeze_Enumeration_Type): Capture, set and
restore the Ghost mode.
(Expand_Freeze_Record_Type): Capture, set and restore the Ghost mode.
* exp_ch6.adb (Expand_Subprogram_Contract): Do not expand the
contract of an ignored Ghost subprogram.
* exp_ch13.adb Add with and use clauses for Ghost.
(Expand_N_Freeze_Entity): Capture, set and restore the Ghost mode.
* exp_dbug.adb (Get_External_Name): Code reformatting. Add a
special prefix for ignored Ghost entities or when requested by
-gnatd.5 for any Ghost entity.
* exp_dbug.ads Document the use of prefix "_ghost_" for ignored
Ghost entities.
* exp_prag.adb (Expand_Pragma_Check): Capture, set and restore the
Ghost mode.
(Expand_Pragma_Loop_Variant): Use In_Assertion_Expr
to signal the original context.
* ghost.adb (Check_Ghost_Overriding): Code cleanup.
(Is_Ghost_Entity): Moved to einfo.adb. (Is_OK_Declaration):
Move the assertion expression check to the outer level.
(Is_OK_Ghost_Context): An assertion expression is a valid Ghost
context.
* ghost.ads (Is_Ghost_Entity): Moved to einfo.ads.
* sem_ch3.adb (Analyze_Object_Contract): A source Ghost object
cannot be imported or exported. Mark internally generated objects
as Ghost when applicable.
(Make_Class_Wide_Type): Inherit the ghostness of the root tagged type.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark
a stand alone subprogram body as Ghost when applicable.
(Analyze_Subprogram_Declaration): Mark internally generated
subprograms as Ghost when applicable.
* sem_ch7.adb: Code cleanup.
* sem_ch13.adb (Add_Invariants): Add various formal
parameters to break dependency on global variables.
(Build_Invariant_Procedure): Code cleanup. Capture, set and
restore the Ghost mode.
* sem_res.adb (Resolve_Actuals): The actual parameter of a source
Ghost subprogram whose formal is of mode IN OUT or OUT must be
a Ghost variable.

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

* sem_ch8.adb Code cleanup.
(Find_Expanded_Name): Replace
the call to In_Pragmas_Depends_Or_Global with a call to
In_Abstract_View_Pragma.
(In_Abstract_View_Pragma): New routine.
(In_Pragmas_Depends_Or_Global): Removed.
* sem_prag.adb (Analyze_Part_Of): Catch a case where indicator
Part_Of denotes the abstract view of a variable.

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

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

* sem_util.ads (Unique_Defining_Entity): Document the result
for tasks and entries.
* sem_util.adb (Unique_Entity): Return declaration entity for task and
entry bodies

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

10 years agoMove fold_trunc_transparent_mathfn to match.pd
rsandifo [Fri, 23 Oct 2015 10:01:47 +0000 (10:01 +0000)] 
Move fold_trunc_transparent_mathfn to match.pd

This moves the fold rules for trunc, floor, ceil, round, nearbyint and
rint in one go, since they're tested as a group.  Most of the code is
supporting the f(x)->x fold when x is known to be integer-valued.
Like with the non-negative test, this is probably more elegantly handled
by tracking range information for reals, but until that happens, I think
we should handle it analogously to tree_expr_nonnegative_p.

I've incorporated the fix for PR68031 in the new version of
integer_valued_real_p.  However, it seemed confusing to test for an
SSA name at the head of the function rather than the case statement,
and not fall through to tree_simple_nonnegative_warnv_p (which
conceptually shouldn't care whether an update is in progress).
But tree_simple_nonnegative_warnv_p is a no-op for SSA names,
so I simply changed it to:

          return (!name_registered_for_update_p (t)
      && depth < PARAM_VALUE (PARAM_MAX_SSA_NAME_QUERY_DEPTH)
      && gimple_stmt_nonnegative_warnv_p (SSA_NAME_DEF_STMT (t),
  strict_overflow_p, depth));

and used that in the new code too.

Doing these folds later meant that IPA would start to use information
about the aborting sinf and floor in 20030125-1.c before the folds
kicked in.  I changed them from noinline to weak to stop that.

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

gcc/
* builtins.c (integer_valued_real_p): Move to fold-const.c.
(fold_trunc_transparent_mathfn, fold_builtin_trunc, fold_builtin_floor)
(fold_builtin_ceil, fold_builtin_round): Delete.
(fold_builtin_1): Handle constant trunc, floor, ceil and round
arguments here.
* convert.c (convert_to_real): Remove narrowing of rounding
functions.
* fold-const.h (integer_valued_real_unary_p)
(integer_valued_real_binary_p, integer_valued_real_call_p)
(integer_valued_real_single_p, integer_valued_real_p): Declare.
* fold-const.c (tree_single_nonnegative_warnv_p): Move
name_registered_for_update_p check to SSA_NAME case statement.
Don't call tree_simple_nonnegative_warnv_p for SSA names.
(integer_valued_real_unary_p, integer_valued_real_binary_p)
(integer_valued_real_call_p, integer_valued_real_single_p)
(integer_valued_real_invalid_p): New functions.
(integer_valued_real_p): Move from fold-const.c and rework
to call the functions above.  Handle SSA names.
* gimple-fold.h (gimple_stmt_integer_valued_real_p): Declare.
* gimple-fold.c (gimple_assign_integer_valued_real_p)
(gimple_call_integer_valued_real_p, gimple_phi_integer_valued_real_p)
(gimple_stmt_integer_valued_real_p): New functions.
* match.pd: Fold f(f(x))->f(x) for fp->fp rounding functions f.
Fold f(x)->x for the same f if x is known to be integer-valued.
Fold f(extend(x))->extend(f'(x)) if doing so doesn't affect
the result.  Canonicalize floor(x) as trunc(x) if x is
nonnegative.

gcc/testsuite/
* gcc.c-torture/execute/20030125-1.c (floor, floorf, sin, sinf):
Make weak rather than noinline.
* gcc.dg/builtins-57.c: Compile with -O.
* gcc.dg/torture/builtin-integral-1.c: Skip for -O0.

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

10 years ago2015-10-23 Paulo Matos <pmatos@linki.tools>
pmatos [Fri, 23 Oct 2015 09:51:32 +0000 (09:51 +0000)] 
2015-10-23  Paulo Matos  <pmatos@linki.tools>

        * MAINTAINERS: Update email address.

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

10 years agoUse make_constraint_from in intra_create_variable_infos
vries [Fri, 23 Oct 2015 09:38:45 +0000 (09:38 +0000)] 
Use make_constraint_from in intra_create_variable_infos

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

* tree-ssa-structalias.c (intra_create_variable_infos): Use
make_constraint_from.

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

10 years agoAdd missing is_full_var setting in create_variable_info_for_1
vries [Fri, 23 Oct 2015 09:38:36 +0000 (09:38 +0000)] 
Add missing is_full_var setting in create_variable_info_for_1

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

* tree-ssa-structalias.c (create_variable_info_for_1): Add missing
setting of is_full_var in case of a single field.

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

10 years agoRun tree-ssa/restrict-4.c without fipa-icf
vries [Fri, 23 Oct 2015 09:38:26 +0000 (09:38 +0000)] 
Run tree-ssa/restrict-4.c without fipa-icf

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

* gcc.dg/tree-ssa/restrict-4.c: Add -fno-ipa-icf to dg-options.

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

10 years ago2015-10-23 Alan Hayward <alan.hayward@arm.com>
alahay01 [Fri, 23 Oct 2015 09:05:49 +0000 (09:05 +0000)] 
2015-10-23  Alan Hayward <alan.hayward@arm.com>

* MAINTAINERS  (Write After Approval): Add myself.

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

10 years agoUpdate HOWTO_MERGE file for libsanitizer.
chefmax [Fri, 23 Oct 2015 08:50:30 +0000 (08:50 +0000)] 
Update HOWTO_MERGE file for libsanitizer.

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

10 years agoFix typo.
nickc [Fri, 23 Oct 2015 07:39:32 +0000 (07:39 +0000)] 
Fix typo.

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

10 years agoFix ASan output pattern tests on Darwin.
chefmax [Fri, 23 Oct 2015 07:22:37 +0000 (07:22 +0000)] 
Fix ASan output pattern tests on Darwin.

gcc/testsuite/

PR sanitizer/68042
* c-c++-common/asan/memcmp-1.c: Adjust test to pass on Darwin.
* c-c++-common/asan/sanity-check-pure-c-1.c: Likewise.

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

10 years agotypo
jason [Fri, 23 Oct 2015 00:52:46 +0000 (00:52 +0000)] 
typo

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

10 years ago * call.c (add_template_conv_candidate): Pass DEDUCE_CALL.
jason [Fri, 23 Oct 2015 00:51:14 +0000 (00:51 +0000)] 
* call.c (add_template_conv_candidate): Pass DEDUCE_CALL.
(add_template_candidate_real): Handle it.
(fn_type_unification): Handle it.

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