Arnaud Charlet [Mon, 18 Apr 2016 10:44:09 +0000 (12:44 +0200)]
[multiple changes]
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
that relates operations of the parent type to the operations of
the derived type has three distinct sources:
a) explicit operations of the derived type carry an
Overridden_Operation that designates the operation in the
ancestor.
b) Implicit operations that are inherited by the derived type
carry an alias that may be an explicit subprogram (in which case
it may have an Overridden_ Operation indicator) or may also be
inherited and carry its own alias.
c) If the parent type is an interface, the operation of the
derived type does not override, but the interface operation
indicates the operation that implements it.
* sem_prag.adb: Minor reformatting.
* sem_prag.adb (Check_External_Property): Update
the comment on usage. Reimplement.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_Assignment_Statement): In restricted
profiles such as ZFP, ceiling priority is not available.
2016-04-18 Bob Duff <duff@adacore.com>
* namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
2016-04-18 Bob Duff <duff@adacore.com>
* sem_elab.adb (Output_Calls): Use
Get_Name_String, to clearly indicate that the global Name_Buffer
is being used. The previous code used Is_Internal_Name, which
returns a Boolean, but also has a side effect of setting the
Name_Buffer. Then it called the other Is_Internal_Name, which uses
the Name_Buffer for its input. And then it called Error_Msg_N,
again using the Name_Buffer. We haven't eliminated the global
usage here, but we've made it a bit clearer.
This also allows us to have a side-effect-free version of
Is_Internal_Name.
* namet.ads, namet.adb: Provide a type Bounded_String, along with
routines that can be used without using global variables. Provide
Global_Name_Buffer so existing code can continue to use the
global. Mark the routines that use globals as obsolete. New code
shouldn't call the obsolete ones, and we should clean up existing
code from time to time.
Name_Find_Str is renamed as Name_Find.
* namet.h: Changed as necessary to interface to the new version
of Namet.
* bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
Name_Find.
From-SVN: r235123
Arnaud Charlet [Mon, 18 Apr 2016 10:41:18 +0000 (12:41 +0200)]
[multiple changes]
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
outside of GNATprove, hence it should not be removed.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Refinement_Clause):
The refinement of an external abstract state can now mention
non-external constituents.
(Check_External_Property): Update all SPARK RM references.
2016-04-18 Bob Duff <duff@adacore.com>
* exp_intr.adb: Remove some duplicated code.
2016-04-18 Yannick Moy <moy@adacore.com>
* a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
package spec and body out of SPARK.
2016-04-18 Johannes Kanig <kanig@adacore.com>
* spark_xrefs.ads: Minor comment update.
2016-04-18 Johannes Kanig <kanig@adacore.com>
* gnat1drv.adb (Gnat1drv): Force loading of System
unit for SPARK.
2016-04-18 Bob Duff <duff@adacore.com>
* a-cuprqu.adb: Correction to previous change. If a new node
is inserted at the front of the queue (because it is higher
priority than the previous front node), we need to update
Header.Next_Unequal -- not just in the case where the queue was
previously empty.
From-SVN: r235122
Arnaud Charlet [Mon, 18 Apr 2016 10:37:47 +0000 (12:37 +0200)]
[multiple changes]
2016-04-18 Bob Duff <duff@adacore.com>
* a-cuprqu.ads: Change the representation of List_Type from a
singly-linked list to a doubly-linked list. In addition, add a
pointer Next_Unequal, which points past a possibly-long chain
of equal-priority items. This increases efficiency, especially
in the case of many equal-priority items.
* a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
advantage of new data structure.
(Finalize): Rewrite in terms of Dequeue, for simplicity.
2016-04-18 Yannick Moy <moy@adacore.com>
* contracts.adb (Analyze_Object_Contract,
Analyze_Protected_Contract): Remove tests performed in GNATprove.
* sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
Remove query for tests performed in GNATprove.
From-SVN: r235121
Arnaud Charlet [Mon, 18 Apr 2016 10:35:36 +0000 (12:35 +0200)]
[multiple changes]
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Record_Aggregate): If
Warn_On_Redundant_Constructs is enabled, report a redundant box
association that does not cover any components, as it done for
redundant others associations in case statements.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
Analyze the generated Check pragma for an inherited condition so
that it does not freeze the dispatching type of the primitive
operation, because it is pre-analyzed at the point of the
subprogram declaration (and not in the subprogram body, as is
done during regular expansion).
2016-04-18 Vincent Celier <celier@adacore.com>
* ali.ads: Increase the range of all _Id types to 100 millions.
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* sem_warn.adb (Check_References): Change warning to suggest
using pragma Export rather than saying "volatile has no effect".
2016-04-18 Bob Duff <duff@adacore.com>
* g-souinf.ads (Compilation_ISO_Date): New function to return
the current date in ISO form.
* exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
a call to Compilation_ISO_Date into a string literal containing
the current date in ISO form.
* exp_intr.ads (Add_Source_Info): Improve documentation.
* sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
Compilation_ISO_Date.
* snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
From-SVN: r235120
Arnaud Charlet [Mon, 18 Apr 2016 10:30:27 +0000 (12:30 +0200)]
[multiple changes]
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* layout.adb (Set_Elem_Alignment): Extend setting of alignment
to subtypes that are not first subtypes.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
Simplify interface.
* sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
generated pragmas after subprogram declaration, rather than in
the corresponding subprogram body.
* sem_ch6.adb (New_Overloaded_Entity): In GNATProve
mode, if the operation is overridding, call
Collect_Inherited_Class_Wide_Conditions to generate the
corresponding pragmas immediately after the corresponding
subprogram declaration.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
type to natural numbers.
(Stype): document code characters for concurrent entities.
2016-04-18 Olivier Hainque <hainque@adacore.com>
* targparm.ads: Update the Frontend_Exceptions default internal
value.
(Frontend_Exceptions_On_Target): Change default value to True.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component): Refine error
detection when a selected component in the body of a synchronized
type is a reference to an object of the same type declared
elsewhere. The construct is legal if the prefix of the selected
component includes an explicit dereference at any point.
From-SVN: r235118
Hristian Kirtchev [Mon, 18 Apr 2016 10:27:19 +0000 (10:27 +0000)]
sem_ch3.adb (Analyze_Object_Declaration): Do not consider internally generated expressions when...
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Do not consider
internally generated expressions when trying to determine whether
a formal parameter of a tagged type subject to Extensions_Visible
False is used to initialize an object.
* sem_ch4.adb (Analyze_Type_Conversion): Do not consider
internally generated expressions when trying to determine whether
a formal parameter of a tagged type subject to Extensions_Visible
False is used in a type conversion.
From-SVN: r235117
Arnaud Charlet [Mon, 18 Apr 2016 10:24:03 +0000 (12:24 +0200)]
[multiple changes]
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Is_Protected_Operation_Call):
Add guards to account for a non-decorated selected component.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
implementation of Body_Has_SPARK_Mode_On.
* sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
New function replacing previous Get_SPARK_Mode_From_Pragma, that
deals also with aspects.
(Get_SPARK_Mode_Type): Make function internal again.
* inline.adb, sem_ch7.adb, sem_util.adb: Use new
Get_SPARK_Mode_From_Annotation.
From-SVN: r235116
Hristian Kirtchev [Mon, 18 Apr 2016 10:22:13 +0000 (10:22 +0000)]
contracts.adb (Analyze_Object_Contract): Update references to SPARK RM.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Analyze_Object_Contract): Update references to
SPARK RM.
* freeze.adb (Freeze_Entity): Update references to SPARK RM.
* ghost.adb Add with and use clauses for Sem_Disp.
(Check_Ghost_Derivation): Removed.
(Check_Ghost_Overriding):
Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
(Check_Ghost_Primitive): New routine.
(Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
Update references to SPARK RM. (Is_OK_Pragma): Update references
to SPARK RM. Predicates are now a valid context for references
to Ghost entities.
* ghost.ads (Check_Ghost_Derivation): Removed.
(Check_Ghost_Overriding): Update the comment on usage.
(Check_Ghost_Primitive): New routine.
(Check_Ghost_Refinement): New routine.
(Remove_Ignored_Ghost_Code): Update references to SPARK RM.
* sem_ch3.adb (Process_Full_View): Remove the now obsolete check
related to Ghost derivations
* sem_ch6.adb (Check_Conformance): Remove now obsolete check
related to the convention-like behavior of pragma Ghost.
(Check_For_Primitive_Subprogram): Verify that the Ghost policy
of a tagged type and its primitive agree.
* sem_prag.adb (Analyze_Pragma): Update references to SPARK
RM. Move the verification of pragma Assertion_Policy Ghost
to the proper place. Remove the now obsolete check related
to Ghost derivations.
(Collect_Constituent): Add a call to Check_Ghost_Refinement.
* sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
From-SVN: r235115
Arnaud Charlet [Mon, 18 Apr 2016 10:19:26 +0000 (12:19 +0200)]
[multiple changes]
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* layout.adb: Fix more minor typos in comments.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
From-SVN: r235114
Arnaud Charlet [Mon, 18 Apr 2016 10:17:17 +0000 (12:17 +0200)]
[multiple changes]
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
mode, collect inherited class-wide conditions to generate the
corresponding pragmas.
* sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
* contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
procedure for overriding subprograms, used to generate the pragmas
corresponding to an inherited class- wide pre- or postcondition.
* sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
from contracts.adb (Replace_Condition_Entities): Subsidiary
Build_Pragma_Check_Equivalent, to implement the proper semantics
of inherited class-wide conditions, as given in AI12-0113.
(Process_Class_Wide_Condition): Removed.
(Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
in contract of subprogram, to collect inherited class-wide
conditions.
(Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
2016-04-18 Yannick Moy <moy@adacore.com>
* a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
* a-calend.ads (Ada.Calendar): Mark package spec as
SPARK_Mode and add synchronous external abstract state Clock_Time.
From-SVN: r235113
Arnaud Charlet [Mon, 18 Apr 2016 10:02:58 +0000 (12:02 +0200)]
[multiple changes]
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_res.adb (Resolve_Call): Prevent inlining of
calls inside expression functions. Factor previous code issuing
errors to call Cannot_Inline instead, which does appropriate
processing of message for GNATprove.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
osint-b.adb: Cleanups.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
body to inline in GNATprove mode when SPARK_Mode On applies to
subprogram body.
* sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
public.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* layout.adb: Fix minor typo in comment.
* inline.adb: Fix minor pasto.
* sem_ch12.ads: Fix minor typos in comments.
From-SVN: r235111
Arnaud Charlet [Mon, 18 Apr 2016 09:57:49 +0000 (11:57 +0200)]
[multiple changes]
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_disp.adb (Check_Dispatching_Call): Major rewriting to
handle some complex cases of tag indeterminate calls that are
actuals in other dispatching calls that are themselves tag
indeterminate.
(Check_Dispatching_Context): Add parameter to support recursive
check for an enclosing construct that may provide a tag for a
tag-indeterminate call.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Depends_In_Decl_Part):
Add global variables Task_Input_Seen and Task_Output_Seen.
(Analyze_Global_Item): Detect an illegal use of the current
instance of a single protected/task type in a global annotation.
(Analyze_Input_Output): Inputs and output related to the current
instance of a task unit are now tracked.
(Check_Usage): Require
the presence of the current instance of a task unit only when
one input/output is available. (Current_Task_Instance_Seen):
New routine.
(Is_CCT_Instance): New parameter profile. Update
the comment on usage. The routine now properly recognizes several
cases related to single protected/task types.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Freeze_Entity): Use New_Freeze_Node
to create a brand new freeze node. This handles a case where an
ignored Ghost context is freezing something which is not ignored
Ghost and whose freeze node should not be removed from the tree.
(New_Freeze_Node): New routine.
2016-04-18 Jerome Lambourg <lambourg@adacore.com>
* sigtramp.h (__gnat_set_is_vxsim) New function to
tell sigtramp-vxworks to handle vxsim signal contexts. *
sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
differences in the sigcontext structure between the expected
regular x86 or x86_64 ones and the ones received in case of
exexution on the vxworks simulator.
* init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
this information to sigtramp-vxworks.c. Remove the old mechanism for
vxsim.
* init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch3.adb (Inline_Init_Proc): New function returning
whether the initialization procedure of a type should be
inlined. Return again True for controlled type themselves.
(Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
(Build_Record_Init_Proc): Likewise.
From-SVN: r235110
Arnaud Charlet [Mon, 18 Apr 2016 09:54:17 +0000 (09:54 +0000)]
gnatvsn.ads (Library_Version): Bump to 7.
* gnatvsn.ads (Library_Version): Bump to 7.
From-SVN: r235109
Ed Schonberg [Mon, 18 Apr 2016 09:52:22 +0000 (09:52 +0000)]
sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag on the entity of a subprogram declaration that is completed by...
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
on the entity of a subprogram declaration that is completed by
an expression function.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Is_Current_Instance): A entity given by a subtype
declaration can appear in an aspect specification for a dynamic
predicate, and a pragma for aspect Predicate_Failure.
* exp_util.adb (Replace_Subtype_References): Replace current
occurrences of the subtype to which a dynamic predicate applies,
byt the expression that triggers a predicate check. Needed to
implement new aspect Predicate_Failure.
From-SVN: r235107
Arnaud Charlet [Mon, 18 Apr 2016 09:48:31 +0000 (11:48 +0200)]
[multiple changes]
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* a-intsig.ads, a-intsig.adb: Removed, no longer used.
* Makefile.rtl: update accordingly.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* sem_type.adb (Disambiguate): Call Covers only when necessary
for standard operators.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* atree.ads (Num_Extension_Nodes): Add couple of figures
to comment.
* atree.adb: Add GNAT.Heap_Sort_G dependency.
(Print_Statistics): New exported procedure to print statistics.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
as to be inlined if the type needs finalization.
From-SVN: r235106
Vincent Celier [Mon, 18 Apr 2016 09:28:16 +0000 (09:28 +0000)]
* gcc-interface/decl.c: Rename Descendent -> Descendant
From-SVN: r235104
Richard Biener [Mon, 18 Apr 2016 09:25:46 +0000 (09:25 +0000)]
re PR middle-end/37870 (ICE in extract_bit_field_1)
2016-04-18 Richard Biener <rguenther@suse.de>
PR middle-end/37870
* expmed.c (extract_bit_field_1): Remove broken case
using a wider MODE_INT mode.
From-SVN: r235103
Jerome Lambourg [Mon, 18 Apr 2016 09:24:08 +0000 (09:24 +0000)]
sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack alignment for x86_64.
2016-04-18 Jerome Lambourg <lambourg@adacore.com>
* sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
alignment for x86_64.
* init.c: Better fix for guard page reset on x86_64-vx7.
Do not try to retrieve the page that actually raised
the signal as the probing mechanism used on x86_64 do not allow
such retrieval. We thus just test if the guard page is active,
and re-activate it if not.
From-SVN: r235102
Arnaud Charlet [Mon, 18 Apr 2016 09:22:50 +0000 (11:22 +0200)]
[multiple changes]
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
added.
2016-04-18 Jerome Lambourg <lambourg@adacore.com>
* affinity.c: Use the proper type for task id.
* init.c (__gnat_inum_to_ivec): ivec is a pointer.
From-SVN: r235101
Arnaud Charlet [Mon, 18 Apr 2016 09:20:56 +0000 (11:20 +0200)]
[multiple changes]
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* sem_prag.adb (Process_Convention): Relax rule on exporting
Intrinsic types if Relaxed_RM_Semantics is True.
2016-04-18 Vincent Celier <celier@adacore.com>
* sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
exp_ch3.ads, exp_unst.adb: Change "descendent" to
"descendant" in comments, error messages and identifiers.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* sem_type.adb (Operator_Matches_Spec): Call First_Formal on
New_S only once at the beginning of the function.
From-SVN: r235100
Segher Boessenkool [Mon, 18 Apr 2016 08:57:01 +0000 (10:57 +0200)]
hsa: Fix bootstrap with older host compilers
We didn't have __builtin_swap16 on all targets before GCC 4.8; hsa-brig
tries to use it if the host GCC is 4.6 or up though, breaking bootstrap.
This trivial patch fixes it.
Noticed on gcc22.
* has-brig.c (lendian16): Don't try to use __builtin_bswap16
unless compiling with at least GCC-4.8.
From-SVN: r235096
Tom de Vries [Mon, 18 Apr 2016 08:53:41 +0000 (08:53 +0000)]
Add dot-file scans to pr70161.c
2016-04-18 Tom de Vries <tom@codesourcery.com>
PR testsuite/70699
* gcc.dg/pr70161.c: Add dot-file scans.
* lib/scandump.exp (dump-suffix): Return suffix after first dot char,
instead of after last dot char.
From-SVN: r235095
Edward Smith-Rowland [Mon, 18 Apr 2016 02:32:50 +0000 (02:32 +0000)]
Trivial comment misspelling.
From-SVN: r235092
Edward Smith-Rowland [Mon, 18 Apr 2016 02:30:31 +0000 (02:30 +0000)]
Obvious typo in comment.
From-SVN: r235091
GCC Administrator [Mon, 18 Apr 2016 00:16:21 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r235090
Jan Hubicka [Sun, 17 Apr 2016 18:30:21 +0000 (20:30 +0200)]
re PR bootstrap/70706 (r235082 caused bootstrap failure)
PR bootstrap/70706
* predict.h (tree_estimate_probability): Update prototype.
From-SVN: r235086
Jan Hubicka [Sun, 17 Apr 2016 18:04:51 +0000 (20:04 +0200)]
re PR bootstrap/70706 (r235082 caused bootstrap failure)
PR bootstrap/70706
* graphite.c (graphite_finalize): Update call to
tree_estimate_probability.
From-SVN: r235085
Eric Botcazou [Sun, 17 Apr 2016 17:38:28 +0000 (17:38 +0000)]
c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
* c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
(dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
to incomplete types.
(dump_nested_type): Remove redundant tests and tidy up.
(print_ada_declaration): Also set TREE_VISITED on the declaration of
a type which is the typedef of an original type.
From-SVN: r235084
Jan Hubicka [Sun, 17 Apr 2016 16:13:52 +0000 (18:13 +0200)]
* analyze_brprob: Update comment.
From-SVN: r235083
Jan Hubicka [Sun, 17 Apr 2016 16:08:27 +0000 (18:08 +0200)]
predict.c (combine_predictions_for_bb): Add dry_run parmaeter.
* predict.c (combine_predictions_for_bb): Add dry_run parmaeter.
(tree_estimate_probability): Likewise.
(pass_profile::execute): Update.
(report_predictor_hitrates): New function.
* profile.c (compute_branch_probabilities): Use it.
* predict.h (report_predictor_hitrates): Declare.
From-SVN: r235082
Jan Hubicka [Sun, 17 Apr 2016 16:04:05 +0000 (18:04 +0200)]
re PR c++/70018 (Possible issue around IPO and C++ comdats discovered as pure/const)
PR ipa/70018
* cgraph.h (cgraph_node::set_const_flag,
cgraph_node::set_pure_flag): Update prototype to return bool;
update comment.
* cgraph.c (cgraph_node::call_for_symbol_thunks_and_aliases): Thunks
of interposable symbol are interposable, too.
(cgraph_set_const_flag_1): Rename to ...
(set_const_flag_1): ... this one; change to self recursive function
instead of call_for_symbol_thunks_and_aliases. Handle correctly
clearnig the flag in all variants and also virtual thunks of const
functions are pure; track if any change was done.
(cgraph_node::set_const_flag): Update.
(struct set_pure_flag_info): New struct.
(cgraph_set_pure_flag_1): Rename to ...
(set_pure_flag_1): ... this one; take set_pure_flag_info parameter
rather than pointer encoded flags; track if any changes was done;
handle correctly clearning flag and setting flag of aliases already
declared const.
(cgraph_node::set_pure_flag): Update.
(cgraph_node::set_nothrow_flag): Handle correctly clearning the flag.
From-SVN: r235081
Tom de Vries [Sun, 17 Apr 2016 05:23:15 +0000 (05:23 +0000)]
Handle backslash in pp_write_text_as_dot_label_to_stream
2016-04-17 Tom de Vries <tom@codesourcery.com>
PR other/70433
* pretty-print.c (pp_write_text_as_dot_label_to_stream): Escape
backslash in label.
From-SVN: r235077
Tom de Vries [Sun, 17 Apr 2016 05:23:03 +0000 (05:23 +0000)]
Fix record-shape escapes in pp_write_text_as_dot_label_to_stream
2016-04-17 Tom de Vries <tom@codesourcery.com>
* pretty-print.c (pp_write_text_as_dot_label_to_stream): Classify chars
'{}<> ' as escape-for-record.
From-SVN: r235076
Tom de Vries [Sun, 17 Apr 2016 05:22:45 +0000 (05:22 +0000)]
Simplify loop in pp_write_text_as_dot_label_to_stream
2016-04-17 Tom de Vries <tom@codesourcery.com>
* pretty-print.c (pp_write_text_as_dot_label_to_stream): Simplify loop
structure.
From-SVN: r235075
Tom de Vries [Sun, 17 Apr 2016 05:22:33 +0000 (05:22 +0000)]
Only finalize dot files that have been initialized
2016-04-17 Tom de Vries <tom@codesourcery.com>
PR other/70185
* tree-pass.h (class opt_pass): Remove graph_dump_initialized member.
* dumpfile.h (struct dump_file_info): Add graph_dump_initialized field.
* dumpfile.c (dump_files): Initialize graph_dump_initialized field.
* passes.c (finish_optimization_passes): Only call
finish_graph_dump_file if dfi->graph_dump_initialized.
(execute_function_dump, pass_init_dump_file): Use
dfi->graph_dump_initialized instead of pass->graph_dump_initialized.
From-SVN: r235074
Tom de Vries [Sun, 17 Apr 2016 05:22:19 +0000 (05:22 +0000)]
Add debug_varinfo and debug_varmap
2016-04-17 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/70256
* tree-ssa-structalias.c (dump_varinfo, debug_varinfo, dump_varmap)
(debug_varmap): New function.
From-SVN: r235073
Tom de Vries [Sun, 17 Apr 2016 05:22:04 +0000 (05:22 +0000)]
Propagate dump flags in pass_manager::register_pass
2016-04-17 Tom de Vries <tom@codesourcery.com>
PR other/70183
* passes.c (pass_manager::register_pass): Propagate pflags.
* gcc.target/i386/vzeroupper-dump-flags.c: New test.
From-SVN: r235072
Tom de Vries [Sun, 17 Apr 2016 05:21:50 +0000 (05:21 +0000)]
Add pass parameter to TERMINATE_PASS_LIST
2016-04-17 Tom de Vries <tom@codesourcery.com>
PR other/68875
* pass_manager.h (TERMINATE_PASS_LIST): Add pass argument.
* passes.c (pass_manager::pass_manager): Declare and init p_start in
INSERT_PASSES_AFTER. Add pass parameter to TERMINATE_PASS_LIST, and
check if it's equal to p_start.
* passes.def: Add arguments to TERMINATE_PASS_LISTs.
From-SVN: r235071
GCC Administrator [Sun, 17 Apr 2016 00:16:20 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r235070
Sandra Loosemore [Sat, 16 Apr 2016 23:22:52 +0000 (19:22 -0400)]
re PR target/1078 (Problems with attributes documentation)
2016-04-16 Sandra Loosemore <sandra@codesourcery.com>
PR target/1078
gcc/cp/
* tree.c (cxx_attribute_table): Remove "com_interface" entry.
(handle_com_interface_attribute): Delete.
From-SVN: r235066
Jan Hubicka [Sat, 16 Apr 2016 18:54:49 +0000 (20:54 +0200)]
re PR c++/70018 (Possible issue around IPO and C++ comdats discovered as pure/const)
PR ipa/70018
* cgraph.c (cgraph_set_const_flag_1): Only set as pure if
function does not bind to current def.
* ipa-pure-const.c (worse_state): Add FROM and TO parameters;
handle conservatively calls to functions that does not need to bind
to current def.
(check_call): Update call of worse_state.
(ignore_edge_for_nothrow): Update.
(ignore_edge_for_pure_const): Likewise.
(propagate_pure_const): Update calls to worse_state.
(skip_function_for_local_pure_const): Reformat comments.
* g++.dg/ipa/pure-const-1.C: New testcase.
* g++.dg/ipa/pure-const-2.C: New testcase.
* g++.dg/ipa/pure-const-3.C: New testcase.
From-SVN: r235065
Jan Hubicka [Sat, 16 Apr 2016 16:30:48 +0000 (18:30 +0200)]
re PR c++/70018 (Possible issue around IPO and C++ comdats discovered as pure/const)
PR ipa/70018
* cgraph.c (cgraph_node::get_availability): Add REF parameter.
(cgraph_node::function_symbol): Likewise.
(cgraph_node::function_or_virtual_thunk_symbol): Likewise.
* cgraph.h (symtab_node::get_availabbility): Add REF parameter.
(symtab_node::ultimate_alias_target): Add REF parameter.
(symtab_node::binds_to_current_def_p): Declare.
(symtab_node;:ultimate_alias_target_1): Add REF parameter.
(cgraph_node::function_symbol): Likewise.
(cgraph_node::function_or_virtual_thunk_symbol): Likewise.
(cgraph_node::get_availability): Likewise.
(cgraph_edge::binds_to_current_def_p): New inline function.
(varpool_node::get_availability): Add REF parameter.
(varpool_node::ultimate_alias_target): Likewise.
* symtab.c (symtab_node::ultimate_alias_target_1): Likewise.
(symtab_node::binds_to_current_def_p): Likewise.
* varpool.c (varpool_node::get_availability): Likewise.
From-SVN: r235063
GCC Administrator [Sat, 16 Apr 2016 00:16:18 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r235058
Jason Merrill [Fri, 15 Apr 2016 19:47:19 +0000 (15:47 -0400)]
re PR c++/70685 (ICE: Segmentation fault)
PR c++/70685
* constexpr.c (get_fundef_copy): Handle null *slot.
From-SVN: r235045
Jason Merrill [Fri, 15 Apr 2016 16:32:22 +0000 (12:32 -0400)]
re PR c++/70505 (Constexpr failure when template type specified)
PR c++/70505
* pt.c (tsubst_baselink): Give the new TEMPLATE_ID_EXPR
unknown_type_node, too.
From-SVN: r235042
Jakub Jelinek [Fri, 15 Apr 2016 15:33:15 +0000 (17:33 +0200)]
* crontab: Enable snapshots from gcc-6-branch.
From-SVN: r235039
Kirill Yukhin [Fri, 15 Apr 2016 15:17:31 +0000 (15:17 +0000)]
AVX-512. Fix mode size check.
PR target/70662
gcc/
* config/i386/sse.md(define_insn "<avx512>_vec_dup<mode><mask_name>"):
Fix mode size check.
From-SVN: r235038
Jakub Jelinek [Fri, 15 Apr 2016 14:55:57 +0000 (16:55 +0200)]
* BASE-VER: Set to 7.0.0.
From-SVN: r235035
Jason Merrill [Fri, 15 Apr 2016 14:51:06 +0000 (10:51 -0400)]
re PR c++/70594 (-fcompare-debug failure)
PR c++/70594
* constexpr.c (constexpr_call_table): Preserve in GC.
(struct fundef_copy, struct fundef_copies_table_t): Delete.
(fundef_copies_table): Preserve in GC. Change to pointer to
tree->tree hash.
(maybe_initialize_fundef_copies_table): Adjust.
(get_fundef_copy): Return a TREE_LIST. Use non-inserting search.
(save_fundef_copy): Adjust for a TREE_LIST.
(cxx_eval_call_expression): Adjust for a fundef_copy TREE_LIST.
(fini_constexpr): New.
* cp-tree.h (fini_constexpr): Declare.
* decl2.c (c_parse_final_cleanups): Call fini_constexpr.
Co-Authored-By: Nathan Sidwell <nathan@acm.org>
From-SVN: r235033
Marek Polacek [Fri, 15 Apr 2016 14:46:06 +0000 (14:46 +0000)]
re PR c/70671 (Wrong column number shown for "error: cannot take address of bit-field")
PR c/70671
* c-typeck.c (build_unary_op): Pass location down to error and
warning call.
* gcc.dg/bitfld-22.c: New test.
From-SVN: r235032
Alexander Monakov [Fri, 15 Apr 2016 14:26:40 +0000 (17:26 +0300)]
config/nvptx/nvptx.opt (moptimize): Add a period at end of help text.
From-SVN: r235031
Kyrylo Tkachov [Fri, 15 Apr 2016 13:42:16 +0000 (13:42 +0000)]
[ARM][doc] Document deprecation of pre-ARMv4T architecture revisions
* doc/invoke.texi (ARM Options): Add note on deprecation of pre-ARMv4T
architecture revisions.
From-SVN: r235029
Bernd Schmidt [Fri, 15 Apr 2016 13:35:12 +0000 (13:35 +0000)]
i386: Don't convert stack operations to pushes if using a redzone.
* config/i386/i386-protos.h (ix86_using_red_zone): Declare.
* config/i386/i386.c (ix86_using_red_zone): No longer static.
* config/i386/i386.md (stack decrement to push peepholes): Guard
with !x86_using_red_zone ().
testsuite/
* gcc.target/i386/pr46470.c: Add -mno-red-zone to dg-options for
x86_64.
From-SVN: r235028
Marek Polacek [Fri, 15 Apr 2016 13:15:23 +0000 (13:15 +0000)]
re PR c/70651 (ICE on invalid code on x86_64-linux-gnu in build_va_arg, at c-family/c-common.c:5728)
PR c/70651
* c-common.c (build_va_arg): Change two asserts into errors and return
error_mark_node.
* c-c++-common/pr70651.c: New test.
From-SVN: r235027
Jakub Jelinek [Fri, 15 Apr 2016 13:07:43 +0000 (15:07 +0200)]
re PR c++/70675 (compare-debug failure building LLVM)
PR c++/70675
* tree-pretty-print.c (do_niy): Add FLAGS argument, pass it down
to dump_generic_node.
(NIY): Pass also flags to do_niy.
From-SVN: r235025
Kyrylo Tkachov [Fri, 15 Apr 2016 12:45:20 +0000 (12:45 +0000)]
[testsuite] PR rtl-optimization/70681: XFAIL ira-shrinkwrap-prep-2.c and pr10474.c tests on arm, powerpc
PR rtl-optimization/70681
* gcc.dg/ira-shrinkwrap-prep-2.c: XFAIL shrinkwrapping
dump scan on arm and powerpc.
* gcc.dg/pr10474.c: Likewise.
From-SVN: r235024
Jakub Jelinek [Fri, 15 Apr 2016 12:29:32 +0000 (14:29 +0200)]
re PR c++/69517 (SEGV on a VLA with excess initializer elements)
PR c++/69517
PR c++/70019
PR c++/70588
* g++.dg/cpp1y/vla11.C: Revert for real.
From-SVN: r235021
Jakub Jelinek [Fri, 15 Apr 2016 12:24:18 +0000 (14:24 +0200)]
re PR c/70436 (-Wparentheses missing ambiguous else warning)
PR c/70436
c/
* c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
where needed.
(c_parser_external_declaration, c_parser_struct_or_union_specifier,
c_parser_parameter_declaration, c_parser_compound_statement_nostart,
c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
Adjust c_parser_pragma callers.
(c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
caller.
(c_parser_omp_structured_block): Add IF_P argument, pass it down to
c_parser_statement.
(c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
c_parser_oacc_kernels_parallel, c_parser_omp_critical,
c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
down where needed.
(c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
(c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
calls.
cp/
* parser.c (cp_parser_pragma): Add IF_P argument, pass it down
where needed.
(cp_parser_declaration_seq_opt, cp_parser_member_specification_opt,
cp_parser_objc_interstitial_code, cp_parser_omp_declare_simd,
cp_parser_oacc_routine): Adjust cp_parser_pragma callers.
(cp_parser_statement): Likewise. Adjust cp_parser_cilk_for caller.
(cp_parser_omp_structured_block): Add IF_P argument, pass it down to
cp_parser_statement.
(cp_parser_oacc_data, cp_parser_oacc_host_data, cp_parser_oacc_loop,
cp_parser_oacc_kernels_parallel, cp_parser_omp_critical,
cp_parser_omp_simd, cp_parser_omp_for, cp_parser_omp_master,
cp_parser_omp_ordered, cp_parser_omp_parallel, cp_parser_omp_single,
cp_parser_omp_task, cp_parser_omp_taskgroup, cp_parser_omp_distribute,
cp_parser_omp_teams, cp_parser_omp_target_data, cp_parser_omp_target,
cp_parser_omp_taskloop, cp_parser_omp_construct,
cp_parser_cilk_grainsize, cp_parser_cilk_simd, cp_parser_cilk_for):
Add IF_P argument, pass it down where needed.
(cp_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
(cp_parser_omp_sections_scope): Adjust cp_parser_omp_structured_block
calls.
testsuite/
* c-c++-common/Wparentheses-1.c: New test.
* c-c++-common/gomp/Wparentheses-1.c: New test.
* c-c++-common/gomp/Wparentheses-2.c: New test.
* c-c++-common/gomp/Wparentheses-3.c: New test.
* c-c++-common/gomp/Wparentheses-4.c: New test.
* c-c++-common/cilk-plus/PS/Wparentheses-1.c: New test.
* c-c++-common/cilk-plus/CK/Wparentheses-1.c: New test.
* c-c++-common/goacc/Wparentheses-1.c: New test.
From-SVN: r235020
Thomas Schwinge [Fri, 15 Apr 2016 11:49:39 +0000 (13:49 +0200)]
Split out OMP constructs' SIMD clone supporting code
gcc/
* omp-low.c (simd_clone_struct_alloc, simd_clone_struct_copy)
(simd_clone_vector_of_formal_parm_types)
(simd_clone_clauses_extract, simd_clone_compute_base_data_type)
(simd_clone_mangle, simd_clone_create)
(simd_clone_adjust_return_type, create_tmp_simd_array)
(simd_clone_adjust_argument_types, simd_clone_init_simd_arrays)
(struct modify_stmt_info, ipa_simd_modify_stmt_ops)
(ipa_simd_modify_function_body, simd_clone_linear_addend)
(simd_clone_adjust, expand_simd_clones, ipa_omp_simd_clone)
(pass_data_omp_simd_clone, class pass_omp_simd_clone)
(pass_omp_simd_clone::gate, make_pass_omp_simd_clone): Move
into...
* omp-simd-clone.c: ... this new file.
(simd_clone_vector_of_formal_parm_types): Make it static.
* Makefile.in (OBJS): Add omp-simd-clone.o.
From-SVN: r235017
Kirill Yukhin [Fri, 15 Apr 2016 08:25:49 +0000 (08:25 +0000)]
AVX-512. Fix mem operand modifier for Intel syntax.
PR target/70662
gcc/
* config/i386/sse.md: Use proper memory operand
modifiers.
testsuite/gcc/
* gcc.target/i386/pr70662.c: New test.
From-SVN: r235008
Richard Biener [Fri, 15 Apr 2016 07:28:44 +0000 (07:28 +0000)]
re PR tree-optimization/70130 (h264ref fails with verification error starting with r231674 (r224221 is the true start of the problem))
2016-04-15 Richard Biener <rguenther@suse.de>
Alan Modra <amodra@gmail.com>
PR tree-optimization/70130
* tree-vect-data-refs.c (vect_supportable_dr_alignment): Detect
when alignment stays not the same and no not use the realign
scheme then.
* gcc.dg/vect/O3-pr70130.c: New testcase.
Co-Authored-By: Alan Modra <amodra@gmail.com>
From-SVN: r235006
Jason Merrill [Fri, 15 Apr 2016 04:02:49 +0000 (00:02 -0400)]
re PR c++/70494 (Internal Compiler Error: Capturing an array of vectors in a lambda)
PR c++/70494
* decl.c (cxx_maybe_build_cleanup): Handle non-decls.
* typeck2.c (split_nonconstant_init_1): Use it.
From-SVN: r235003
Jason Merrill [Fri, 15 Apr 2016 02:23:05 +0000 (22:23 -0400)]
re PR c++/70528 (bogus error: constructor required before non-static data member)
PR c++/70528
* class.c (type_has_constexpr_default_constructor): Return true
for an implicitly declared constructor.
From-SVN: r235002
GCC Administrator [Fri, 15 Apr 2016 00:16:16 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r234999
Michael Meissner [Thu, 14 Apr 2016 23:21:30 +0000 (23:21 +0000)]
re PR target/70669 (PowerPC __float128 does not support direct move)
[gcc]
2016-04-14 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/70669
* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add
direct move handlers for KFmode. Change TFmode handlers test from
FLOAT128_IEEE_P to FLOAT128_VECTOR_P.
[gcc/testsuite]
2016-04-14 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/70669
* gcc.target/powerpc/pr70669.c: New test.
From-SVN: r234995
Cesar Philippidis [Thu, 14 Apr 2016 21:24:03 +0000 (14:24 -0700)]
non-scalar-data.f90: Don't pass parameter variables to subroutines.
libgomp/
* testsuite/libgomp.oacc-fortran/non-scalar-data.f90: Don't
pass parameter variables to subroutines.
From-SVN: r234992
Jason Merrill [Thu, 14 Apr 2016 20:14:49 +0000 (16:14 -0400)]
re PR c++/70622 (auto specifier don't deduce value type and its pointer type within single declaration.)
PR c++/70622
* parser.c (cp_parser_init_declarator): Add auto_result parm.
(cp_parser_simple_declaration): Pass it.
(strip_declarator_types): New.
From-SVN: r234991
Jason Merrill [Thu, 14 Apr 2016 20:14:44 +0000 (16:14 -0400)]
re PR c++/70543 (wrong non-const error for enable_if and constexpr function)
PR c++/70543
* pt.c (value_dependent_expression_p) [VAR_DECL]: A type-dependent
initializer also makes the variable value-dependent.
From-SVN: r234990
Jason Merrill [Thu, 14 Apr 2016 20:14:38 +0000 (16:14 -0400)]
re PR c++/70648 (adplug-xmms fails to compile)
PR c++/70648
* constexpr.c (cxx_eval_store_expression): Also copy
CONSTRUCTOR_NO_IMPLICIT_ZERO.
From-SVN: r234989
Michael Meissner [Thu, 14 Apr 2016 20:05:58 +0000 (20:05 +0000)]
re PR target/70640 (IEEE 128-bit floating point negative/abs has two thinkos)
2016-04-14 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/70640
* gcc.target/powerpc/pr70640.c: Fix test so it correctly works on
a power7 system that does not have an assembler that supports
power8.
From-SVN: r234988
Jakub Jelinek [Thu, 14 Apr 2016 19:21:31 +0000 (21:21 +0200)]
re PR c++/70594 (-fcompare-debug failure)
PR c++/70594
* ipa-utils.h (polymorphic_ctor_dtor_p): New prototype.
* ipa-polymorphic-call.c (polymorphic_ctor_dtor_p): New function.
(inlined_polymorphic_ctor_dtor_block_p): Use it.
* tree-ssa-live.c (remove_unused_scope_block_p): When
in_ctor_dtor_block, avoid discarding not just BLOCKs with
BLOCK_ABSTRACT_ORIGIN being FUNCTION_DECL, but even when
block_ultimate_origin is FUNCTION_DECL.
(remove_unused_locals): If current_function_decl is
polymorphic_ctor_dtor_p, pass initial true to
remove_unused_scope_block_p' is_ctor_dtor_block.
From-SVN: r234987
Martin Sebor [Thu, 14 Apr 2016 17:35:23 +0000 (17:35 +0000)]
PR c++/70652 - [6 Regression] r234966 causes bootstrap to fail
PR c++/70652 - [6 Regression] r234966 causes bootstrap to fail
Revert patch for c++/69517, c++/70019, and c++/70588.
From-SVN: r234981
Marek Polacek [Thu, 14 Apr 2016 16:51:16 +0000 (16:51 +0000)]
re PR c++/70029 (ICE with C++11 and -flto)
PR c++/70029
* tree.c (verify_type): Disable the canonical type of main variant
check.
* g++.dg/torture/pr70029.C: New test.
Co-Authored-By: Jan Hubicka <hubicka@ucw.cz>
From-SVN: r234979
Jason Merrill [Thu, 14 Apr 2016 16:23:06 +0000 (12:23 -0400)]
Revert empty class parameter passing ABI changes.
From-SVN: r234977
Martin Sebor [Thu, 14 Apr 2016 15:25:40 +0000 (15:25 +0000)]
g++.dg/cpp1y/vla11.C...
g++.dg/cpp1y/vla11.C: Avoid using attribute aligned to increase type
size to prevent failures on targets with very low maximum alignment.
From-SVN: r234976
Cesar Philippidis [Thu, 14 Apr 2016 13:44:17 +0000 (06:44 -0700)]
re PR middle-end/70643 (broken openacc reduction inside a fortran module)
PR middle-end/70643
gcc/
* omp-low.c (lower_oacc_reductions): Check for TREE_CONSTANT
when building a mem ref for the incoming reduction variable.
libgomp/
* testsuite/libgomp.oacc-fortran/pr70643.f90: New test.
From-SVN: r234973
Richard Biener [Thu, 14 Apr 2016 13:21:40 +0000 (13:21 +0000)]
re PR tree-optimization/70614 (GCC gets stuck with -O)
2016-04-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/70614
* tree-scalar-evolution.c (analyze_evolution_in_loop): Terminate
loop if the evolution dropped to chrec_dont_know.
(interpret_condition_phi): Likewise.
From-SVN: r234972
Richard Biener [Thu, 14 Apr 2016 07:30:53 +0000 (07:30 +0000)]
re PR tree-optimization/70623 (ICE in compute_antic at -O2)
2016-04-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/70623
* tree-ssa-pre.c (changed_blocks): Make global ...
(compute_antic): ... local here. Move and fix worklist
handling here. Do not clear EDGE_DFS_BACK or call mark_dfs_back_edges.
(compute_antic_aux): Add dumping for MAX assumed succs. Remove
worklist handling, dump when ANTIC_IN changed.
(compute_partial_antic_aux): Remove worklist handling.
(init_pre): Do not compute post dominators. Add a comment about
the CFG order chosen.
(fini_pre): Do not free post dominators.
* gcc.dg/torture/pr70623.c: New testcase.
* gcc.dg/torture/pr70623-2.c: Likewise.
From-SVN: r234970
GCC Administrator [Thu, 14 Apr 2016 00:16:14 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r234969
Martin Sebor [Wed, 13 Apr 2016 23:26:41 +0000 (23:26 +0000)]
PR c++/69517 - [5/6 regression] SEGV on a VLA with excess initializer elements
PR c++/69517 - [5/6 regression] SEGV on a VLA with excess initializer elements
PR c++/70019 - VLA size overflow not detected
PR c++/70588 - SIGBUS on a VLA larger than SIZE_MAX / 2
gcc/testsuite/ChangeLog:
2016-04-13 Martin Sebor <msebor@redhat.com>
PR c++/69517
PR c++/70019
PR c++/70588
* c-c++-common/ubsan/vla-1.c (main): Catch exceptions.
* g++.dg/cpp1y/vla11.C: New test.
* g++.dg/cpp1y/vla12.C: New test.
* g++.dg/cpp1y/vla13.C: New test.
* g++.dg/cpp1y/vla14.C: New test.
* g++.dg/cpp1y/vla3.C: Restore deleted test.
* gcc/testsuite/g++.dg/init/array24.C: Fully brace VLA initializer.
* g++.dg/ubsan/vla-1.C: Disable exceptions.
gcc/cp/ChangeLog:
2016-04-13 Martin Sebor <msebor@redhat.com>
PR c++/69517
PR c++/70019
PR c++/70588
* cp-tree.h (throw_bad_array_length, build_vla_check): Declare new
functions.
* decl.c (check_initializer, cp_finish_decl): Call them.
(reshape_init_r): Reject incompletely braced intializer-lists
for VLAs.
* init.c (throw_bad_array_length, build_vla_check)
(build_vla_size_check, build_vla_init_check): Define new functions.
* typeck2.c (split_nonconstant_init_1): Use variably_modified_type_p()
to detect a VLA.
(store_init_value): Same.
gcc/doc/ChangeLog:
2016-04-13 Martin Sebor <msebor@redhat.com>
PR c++/69517
PR c++/70019
PR c++/70588
* extend.texi (Variable Length): Document C++ specifics.
libstdc++-v3/ChangeLog:
2016-04-13 Martin Sebor <msebor@redhat.com>
PR c++/69517
* testsuite/25_algorithms/rotate/moveable2.cc: Make sure VLA
upper bound is positive.
From-SVN: r234966
Martin Sebor [Wed, 13 Apr 2016 22:05:30 +0000 (22:05 +0000)]
check_GNU_style.sh: Avoid false posivies in trailing operator checks.
From-SVN: r234965
Jonathan Wakely [Wed, 13 Apr 2016 22:00:50 +0000 (23:00 +0100)]
Adjust for new empty class parameter passing ABI.
* include/bits/c++config (_GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES,
_GLIBCXX_END_NAMESPACE_EMPTY_TYPES, _GLIBCXX_ABI_TAG_EMPTY): Define.
* include/bits/hashtable.h (_Hashtable::_M_emplace): Change signatures
of functions taking empty structs by value. Add a template parameter
to overloads without hints. Rename overloads with hints to
_M_emplace_hint.
(_Hashtable::_M_erase(true_type, const_iterator),
_Hashtable::_M_erase(false_type, const_iterator)): Change signatures
by reordering parameters.
* include/bits/hashtable_policy.h (_Insert::insert): Adjust to call
_M_emplace_hint instead of _M_emplace.
* include/bits/shared_ptr.h (shared_ptr(_Tp1*, _Deleter, _Alloc),
shared_ptr(nullptr_t, _Deleter, _Alloc)): Use _GLIBCXX_ABI_TAG_EMPTY.
* include/bits/shared_ptr_base.h (_Sp_counted_deleter, __shared_count,
__shared_ptr): Likewise.
* include/bits/stl_algo.h (replace_if): Likewise.
* include/bits/stl_pair.h (piecewise_construct_t,
piecewise_construct): Use _GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES.
* include/bits/uses_allocator.h (allocator_arg_t, allocator_arg,
__uses_alloc0): Likewise.
* include/ext/pb_ds/assoc_container.hpp (basic_hash_table): Likewise.
* testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
* testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
* testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.
From-SVN: r234964
Jakub Jelinek [Wed, 13 Apr 2016 20:43:10 +0000 (22:43 +0200)]
re PR c++/70641 (ICE on valid code at -O1 and above on x86_64-linux-gnu: verify_gimple failed)
PR c++/70641
* ipa-pure-const.c (pass_nothrow::execute): Call maybe_clean_eh_stmt
on all recursive call stmts. Return TODO_cleanup_cfg if any dead
eh edges have been purged.
* g++.dg/opt/pr70641.C: New test.
From-SVN: r234962
Jakub Jelinek [Wed, 13 Apr 2016 20:35:59 +0000 (22:35 +0200)]
re PR c++/70594 (-fcompare-debug failure)
PR c++/70594
* tree-sra.c (create_access_replacement,
get_replaced_param_substitute): Set DECL_NAMELESS on repl if it
gets fancy name.
* tree-pretty-print.c (dump_fancy_name): New function.
(dump_decl_name, dump_generic_node): Use it.
From-SVN: r234961
Jason Merrill [Wed, 13 Apr 2016 20:11:29 +0000 (16:11 -0400)]
Warn about empty parameter ABI with -Wabi=9.
* call.c (empty_class_msg, mark_for_abi_warning)
(warn_empty_class_abi): New.
(build_call_a): Use them.
* decl.c (store_parm_decls): Use mark_for_abi_warning.
* error.c (pp_format_to_string): New.
From-SVN: r234960
Jason Merrill [Wed, 13 Apr 2016 20:11:20 +0000 (16:11 -0400)]
Pass empty class parameters like C.
* call.c (pass_as_empty_struct, empty_class_arg): New.
(type_passed_as, build_x_va_arg): Use pass_as_empty_struct.
(build_call_a): Use empty_class_arg.
* cp-tree.h (CPTI_EMPTY_STRUCT, empty_struct_type): New.
* decl.c (cxx_init_decl_processing): Create empty_struct_type.
From-SVN: r234959
Ian Lance Taylor [Wed, 13 Apr 2016 19:11:16 +0000 (19:11 +0000)]
libgo: update to Go 1.6.1 release
Reviewed-on: https://go-review.googlesource.com/22007
From-SVN: r234958
Cesar Philippidis [Wed, 13 Apr 2016 18:54:41 +0000 (11:54 -0700)]
re PR testsuite/68242 (FAIL: libgomp.oacc-c-c++-common/reduction-2.c, and other OpenACC reduction test case "oddities")
libgomp/
PR testsuite/68242
* testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Adjust test.
* testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
From-SVN: r234957
Jason Merrill [Wed, 13 Apr 2016 18:32:11 +0000 (14:32 -0400)]
re PR c++/70627 (internal compiler error: verify_type failed)
PR c++/70627
* decl.c (start_enum): Don't change an existing ENUM_UNDERLYING_TYPE.
From-SVN: r234956
Rainer Orth [Wed, 13 Apr 2016 18:13:31 +0000 (18:13 +0000)]
Fix gcc.dg/ifcvt-4.c on 64-bit SPARC (PR rtl-optimization/68749)
PR rtl-optimization/68749
* gcc.dg/ifcvt-4.c: Use "word_mode" rather than "int" to limit the
effects of argument promotions.
Remove default args to dg-skip-if.
From-SVN: r234955
Segher Boessenkool [Wed, 13 Apr 2016 18:02:08 +0000 (20:02 +0200)]
Make distclean clean up more (PR70173)
Currently, distclean does not remove the libcc1, gnattools, and gotools
directories, and not the stage_final file either. Fix that.
PR bootstrap/70173
* Makefile.tpl (local-distclean): Delete the libcc1, gnattools,
and gotools directories. Delete the stage_final file.
* Makefile.in: Regenerate.
From-SVN: r234954
Paolo Carlini [Wed, 13 Apr 2016 17:11:03 +0000 (17:11 +0000)]
re PR c++/70635 (ICE on (and rejects) valid code on x86_64-linux-gnu: Segmentation fault (program cc1plus))
/cp
2016-04-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/70635
* pt.c (resolve_typename_type): Fix typos in infinite recursion
avoidance mechanism.
/testsuite
2016-04-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/70635
* g++.dg/parse/pr70635.C: New.
From-SVN: r234953
Marek Polacek [Wed, 13 Apr 2016 16:28:46 +0000 (16:28 +0000)]
re PR c++/70639 (internal compiler error: in guard_tinfo_to_string, at c-family/c-indentation.c:560)
PR c++/70639
* c-indentation.c (should_warn_for_misleading_indentation): Bail out
for switch statements, too.
* c-c++-common/Wmisleading-indentation-4.c: New test.
From-SVN: r234952
Marek Polacek [Wed, 13 Apr 2016 16:00:52 +0000 (16:00 +0000)]
re PR c/70436 (-Wparentheses missing ambiguous else warning)
PR c/70436
* c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
adjust callers.
(c_parser_statement): Likewise.
(c_parser_c99_block_statement): Likewise.
(c_parser_while_statement): Likewise.
(c_parser_for_statement): Likewise.
(c_parser_if_body): Don't set IF_P here.
(c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
about dangling else here.
* c-tree.h (c_finish_if_stmt): Adjust declaration.
* c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
warn about dangling else here.
* testsuite/gcc.dg/Wparentheses-12.c: New test.
* testsuite/gcc.dg/Wparentheses-13.c: New test.
From-SVN: r234949
Dominique d'Humieres [Wed, 13 Apr 2016 15:04:57 +0000 (17:04 +0200)]
re PR fortran/67039 (Documentation of pseudorandom number intrinsics is incorrect)
2016-04-13 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/67039
* intrinsic.texi: Correct the documentation of pseudorandom
number intrinsics.
From-SVN: r234946
Jason Merrill [Wed, 13 Apr 2016 15:02:23 +0000 (11:02 -0400)]
re PR c++/70634 (ICE on valid code on x86_64-linux-gnu: Segmentation fault (program cc1plus))
PR c++/70634
* pt.c (instantiation_dependent_uneval_expression_p): Split out
from instantiation_dependent_expression_p.
(value_dependent_expression_p): Use it for unevaluated operands.
(instantiation_dependent_r): Don't check value-dependence.
(instantiation_dependent_expression_p): Check
value-dependence of the expression as a whole.
* cp-tree.h: Declare instantiation_dependent_uneval_expression_p.
* semantics.c (finish_decltype_type): Use it.
From-SVN: r234945
Jason Merrill [Wed, 13 Apr 2016 15:02:17 +0000 (11:02 -0400)]
constexpr.c (potential_nondependent_constant_expression): New.
* constexpr.c (potential_nondependent_constant_expression): New.
(potential_nondependent_static_init_expression): New.
(maybe_constant_value_1, fold_non_dependent_expr)
(maybe_constant_init): Use them.
* pt.c (instantiate_non_dependent_expr_sfinae)
(instantiate_non_dependent_or_null, convert_nontype_argument): Use
them.
* cp-tree.h: Declare them.
From-SVN: r234944
Jakub Jelinek [Wed, 13 Apr 2016 14:45:46 +0000 (16:45 +0200)]
re PR c++/70594 (-fcompare-debug failure)
PR c++/70594
* decl.c (pop_labels_1): Removed.
(note_label, sort_labels): New functions.
(pop_labels): During named_labels traversal, just push the slot
pointers into a vector, then qsort it by DECL_UID and only then
call pop_label and chain it into BLOCK_VARS.
From-SVN: r234942
Jason Merrill [Wed, 13 Apr 2016 14:33:53 +0000 (10:33 -0400)]
re PR c++/70615 (ICE on valid code at -O1 and above on x86_64-linux-gnu in add_expr, at tree.c:7870)
PR c++/70615
* cp-gimplify.c (cp_genericize_r): Expand PTRMEM_CST here.
(cp_gimplify_expr): Not here.
From-SVN: r234940
Ilya Enkovich [Wed, 13 Apr 2016 14:00:42 +0000 (14:00 +0000)]
i386.md (kunpckhi): Swap operands.
gcc/
* config/i386/i386.md (kunpckhi): Swap operands.
(kunpcksi): Likewise.
(kunpckdi): Likewise.
* config/i386/sse.md (vec_pack_trunc_qi): Likewise.
(vec_pack_trunc_<mode>): Likewise.
gcc/testsuite/
* gcc.target/i386/avx512bw-kunpckdq-2.c: New test.
* gcc.target/i386/avx512bw-kunpckwd-2.c: New test.
* gcc.target/i386/avx512f-kunpckbw-2.c: New test.
From-SVN: r234938