PR libstdc++/56158
* include/bits/ios_base.h (_Ios_Fmtflags, _Ios_Openmode, _Ios_Iostate):
Define enumerators to ensure all values of type int are valid values
of the enumeration type.
* testsuite/27_io/ios_base/types/fmtflags/case_label.cc: Add new cases.
* testsuite/27_io/ios_base/types/iostate/case_label.cc: Likewise.
* testsuite/27_io/ios_base/types/openmode/case_label.cc: Likewise.
From-SVN: r230267
Fix PR ipa/68035
PR ipa/68035
* ipa-icf.c (void sem_item::set_hash): New function.
(sem_function::get_hash): Use renamed m_hash member variable.
(sem_item::update_hash_by_addr_refs): Utilize get_hash.
(sem_item::update_hash_by_local_refs): Likewise.
(sem_variable::get_hash): Use renamed m_hash member variable.
(sem_item_optimizer::update_hash_by_addr_refs): Utilize get_hash.
(sem_item_optimizer::build_hash_based_classes): Utilize set_hash.
(sem_item_optimizer::build_graph): As the hash value of an item
is lazy initialized, force the calculation.
* ipa-icf.h (set_hash): Declare new function and rename hash member
variable to m_hash.
* gcc.dg/ipa/pr68035.c: New test.
From-SVN: r230263
2015-11-12 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (vect_slp_analyze_data_ref_dependences):
Rename to vect_slp_analyze_instance_dependence.
* tree-vect-data-refs.c (vect_slp_analyze_data_ref_dependence):
Remove WAR special-case.
(vect_slp_analyze_node_dependences): Instead add more specific
code here, not relying on other instances being vectorized.
(vect_slp_analyze_instance_dependence): Adjust accordingly.
* tree-vect-slp.c (vect_build_slp_tree_1): Remove excessive
vertical space in dump files.
(vect_print_slp_tree): Likewise.
(vect_analyze_slp_instance): Dump a header for the final SLP tree.
(vect_slp_analyze_bb_1): Delay computing relevant stmts and
not vectorized stmts until after dependence analysis removed
instances. Merge alignment and dependence checks.
* tree-vectorizer.c (pass_slp_vectorize::execute): Clear visited
flag on all stmts.
From-SVN: r230262
gcc/
* config/aarch64/aarch64-protos.h (tune_params): Add new members
"max_case_values" and "cache_line_size".
* config/aarch64/aarch64.c (aarch64_case_values_threshold): New
function.
(aarch64_override_options_internal): Tune heuristics based on new
members in "tune_params".
(TARGET_CASE_VALUES_THRESHOLD): Define macro.
From-SVN: r230261
2015-11-12 Philippe Gil <gil@adacore.com>
* g-debpoo.adb (Print_Address): print address in hexadecimal as
in previous GNAT version (without secondary stack use)
(Deallocate): Deallocate calling once Unlock_Task.all when it
raise exception.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Subtype_Declaration): Remove redundant
copying of dimensions from parent type to subtype. This is
properly done in Analyze_Dimension.
* sem_dim.adb (Analyze_Dimension_Subtype_Declaration): Add entity
to error message, so that reference to entity can be formatted
properly.
* opt.ads: Fix typo.
From-SVN: r230254
2015-11-12 Bob Duff <duff@adacore.com>
* impunit.adb, lib-xref.ads, restrict.ads, scos.ads, sem_attr.ads,
types.ads: Get rid of some global variables.
* output.adb, output.ads: Move some global variables to the body.
2015-11-12 Yannick Moy <moy@adacore.com>
* lib-xref-spark_specific.adb
(Is_Constant_Object_Without_Variable_Input): Add special case
for imported constants.
2015-11-12 Philippe Gil <gil@adacore.com>
* g-debpoo.adb (Allocate): Avoid having allocations not handled.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Apply_Scalar_Range_Check): If the expression is
a real literal and the context type has static bounds, remove
range check when possible.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Collect_Primitive_Operations): If the type is
derived from a type declared elsewhere that has an incomplete
type declaration, the primitives are found in the scope of the
type nat that of its ancestor.
2015-11-12 Arnaud Charlet <charlet@adacore.com>
* switch-c.adb, debug.adb, osint-c.adb, gnat1drv.adb: Remove -gnatd.V
debug switch.
* exp_aggr.adb, exp_util.adb: Fix typos.
2015-11-12 Jerome Lambourg <lambourg@adacore.com>
* init.c: Properly adjust PC values in case of signals.
2015-11-12 Bob Duff <duff@adacore.com>
* sem_prag.adb (Check_Arg_Is_Library_Level_Local_Name): A
pragma that comes from an aspect does not "come from source",
so we need to test whether it comes from an aspect.
From-SVN: r230253
gcc/
PR tree-optimization/68305
* tree-vect-slp.c (vect_get_constant_vectors): Support
COND_EXPR with SSA_NAME as a condition.
gcc/testsuite/
PR tree-optimization/68305
* gcc.dg/vect/pr68305.c: New test.
From-SVN: r230252
2015-11-12 Gary Dismukes <dismukes@adacore.com>
* gnat1drv.adb, opt.ads: Minor reformatting.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Number_Declaration): Call Analyze_Dimension,
to propagate dimension information from expression to named
number.
* sem_dim.ads: Documentation: number declaration and explicit
dereference can carry dimension information.
* sem_dim.adb (Analyze_Dimension_Number_Declaration): New
procedure, to propagate dimension information from expression
of declaration to named number, whose type becomes one of the
dimensioned base types rather than universal real.
(Analyze_Dimension_Binary_Op):
a) If one operand is a literal that is the value of a declared
constant after constant-foloding, use the dimensions of the
declared constant.
b) If an operand is a literal that is a contant-folded expression,
and expander is active, do not report a dimension mismatch if
literal does not carry them, because dimension matching will
have been checked previously.
From-SVN: r230244
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Find_Selected_Component): In a synchronized
body, a reference to an operation of an object of the same
synchronized type was always interpreted as a reference to the
current instance. This is not always the case, as the prefix of
the reference may designate an object of the same type declared
in the enclosing context prior to the body.
2015-11-12 Arnaud Charlet <charlet@adacore.com>
* impunit.ads, impunit.adb (Get_Kind_Of_File): New. Cleaned up
implementation from previous Get_Kind_Of_Unit.
(Get_Kind_Of_Unit): Reimplemented using Get_Kind_Of_File.
* debug.adb: Remove d.4 switch, no longer used.
* opt.ads: Update doc on Debugger_Level.
* gnat1drv.adb: Code clean ups.
* sinput.ads: minor fix in comment
2015-11-12 Bob Duff <duff@adacore.com>
* sinfo.adb, sinfo.ads, sem_ch6.adb, atree.ads: Add
Was_Expression_Function flag, which is set in sem_ch6.adb when
converting an Expression_Function into a Subprogram_Body.
2015-11-12 Pascal Obry <obry@adacore.com>
* usage.adb: Update overflow checking documentation.
From-SVN: r230243
2015-11-12 Tristan Gingold <gingold@adacore.com>
* snames.ads-tmpl: Name_Gnat_Extended_Ravenscar: New identifier.
* s-rident.ads (Profile_Name): Add GNAT_Extended_Ravenscar.
(Profile_Info): Add new entry for GNAT_Extended_Ravenscar.
* sem_prag.adb (Set_Ravenscar_Profile): Add Profile parameter
to handle various ravenscar profiles. Adjust error messages.
(Analyze_Pragma): Handle GNAT_Extended_Ravenscar profile.
* targparm.adb (Get_Target_Parameters): Handle
GNAT_Extended_Ravenscar profile.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_warn.adb (Warn_On_Unreferenced_Entity): If the entity is an
Out_Parameter the front-end does not emit any warning on it, so
do not suppress warnings on the entity because the backend might
be able to determine an uninitialized path and warn accordingly.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component): Diagnose an attempt
to reference an internal entity from a synchronized type from
within the body of that type, when the prefix of the selected
component is not the current instance.
2015-11-12 Ed Falis <falis@adacore.com>
* s-stchop-vxworks.adb: Clean up in stack checking code.
2015-11-12 Gary Dismukes <dismukes@adacore.com>
* exp_ch6.adb (Is_Build_In_Place_Function_Call):
Test Expression (N) in N_Type_Conversion cases as well,
since conversions can occur in actual parameter contexts.
(Make_Build_In_Place_Call_In_Anonymous_Context): Retrieve
function call from Expression (Func_Call) when Nkind (Func_Call)
is N_Type_Conversion, since conversions are allowed in "anonymous"
contexts (specifically, as actual parameters).
From-SVN: r230242
2015-11-12 Thomas Quinot <quinot@adacore.com>
* sem_ch4.adb (analyze_If_Expression): Reject IF-expression where
THEN-expression is overloaded and none of its interpretation is
compatible with the ELSE-expression.
From-SVN: r230241
2015-11-12 Jerome Lambourg <lambourg@adacore.com>
* init.c: Do not try to mess with the MSR values in RTP mode:
not needed and forbidden.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
full view of a type that has pragma Stream_Convert, because
this indicates special processing for the stream operations of
the type.
From-SVN: r230240
2015-11-12 Gary Dismukes <dismukes@adacore.com>
* exp_ch5.adb, sem_ch3.adb, exp_util.ads, inline.adb, freeze.adb,
sem_util.adb, sem_util.ads, par-ch6.adb, sem_elab.adb: Minor
reformatting and a typo fix.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Preanalyze_Actuals): Add guard on use of
Incomplete_Actuals, which are only stored for a package
instantiation, in order to place the instance in the body of
the enclosing unit.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* exp_intr.adb: Add legality checks on calls to a
Generic_Dispatching_Constructor: the given tag must be defined,
it cannot be the tag of an abstract type, and its accessibility
level must not be greater than that of the constructor.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Try_Container_Indexing, Constant_Indexing_OK): If
the context is an overloaded call, assume that Constant_Indexing
is not OK if an interpretation has an assignable parameter
corresponding to the indexing expression.
2015-11-12 Jerome Lambourg <lambourg@adacore.com>
* init.c (__gnat_error_handler): Force the SPE bit of the MSR
when executing on e500v2 CPU.
2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Constituent): Stop the
analysis after detecting a misplaced constituent as this is a
critical error.
From-SVN: r230239
gcc/
* expr.c (do_store_flag): Expand vector comparison as
VEC_COND_EXPR if vector comparison is not supported
by target.
gcc/testsuite/
* gcc.dg/pr68286.c: New test.
From-SVN: r230238
2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
Remove the guard concerning entry bodies as it is spurious.
(Analyze_Entry_Or_Subprogram_Contract): Skip the analysis of
Contract_Cases when not annotating the tree.
* einfo.adb: Node25 is now used as Contract_Wrapper.
(Contract_Wrapper): New routine.
(PPC_Wrapper): Removed.
(Set_Contract_Wrapper): New routine.
(Set_PPC_Wrapper): Removed.
(Write_Field25_Name): Add output for Contract_Wrapper. Remove
output for PPC_Wrapper.
* einfo.ads: New attribute Contract_Wrapper along with usage
in entities. Remove attribute PPC_Wrapper along with usage in nodes.
(Contract_Wrapper): New routine along with pragma Inline.
(PPC_Wrapper): Removed along with pragma Inline.
(Set_Contract_Wrapper): New routine along with pragma Inline.
(Set_PPC_Wrapper): Removed along with pragma Inline.
* exp_ch9.adb (Build_Contract_Wrapper): New routine.
(Build_PPC_Wrapper): Removed.
(Build_Protected_Entry): Code cleanup.
(Expand_Entry_Declaration): Create a contract wrapper
which now verifies Contract_Cases along with pre/postconditions.
(Expand_N_Task_Type_Declaration): There is no need to check
whether an entry has pre/postconditions as this is now done
in Build_Contract_Wrapper.
* sem_ch13.adb (Analyze_Aspect_Specifications): Pragma
Refined_Post is now properly inserted in entry bodies.
(Insert_Pragma): Add circuitry to insert in an entry body. Redo
the instance "header" circuitry. Remove the now obsolete special
case of inserting pre- conditions.
* sem_prag.adb (Analyze_Pragma): Pragma Contract_Cases now
applies to entries.
* sem_res.adb (Resolve_Entry_Call): Update the calls to
PPC_Wrapper.
From-SVN: r230236
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Compile_Stream_Body_In_Scope): When compiling
a stream operation for an array type, install the scope of the
component type if it is private and not in scope, to prevent
spurious errors if the full view of the component type has
defaulted discriminants.
From-SVN: r230234
2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): For a
variable, if this is not an overlay, set on Treat_As_Volatile on it.
* gcc-interface/decl.c (E_Variable): Do not force the type to volatile
for address clauses. Tweak and adjust various RM references.
2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
* checks.ads: Minor comment fix.
From-SVN: r230233
2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Overlays_Constant): Document usage for E_Constant.
* freeze.adb (Warn_Overlay): Small reformatting.
(Check_Address_Clause): Deal specifically with deferred
constants. For a variable or a non-imported constant
overlaying a constant object and with initialization value,
either remove the initialization or issue a warning. Fix a
couple of typos.
* sem_util.adb (Note_Possible_Modification): Overhaul the condition for
the warning on modified constants and use Find_Overlaid_Entity instead
of doing it manually.
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Compute and
set Overlays_Constant once on entry. Do not treat the overlaid
entity as volatile. Do not issue the warning on modified
constants here.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Remove
over-restrictive condition for the special treatment of deferred
constants.
<E_Variable>: Remove obsolete associated code.
From-SVN: r230229
2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Renaming_Decl>: Do
not materialize renamed subprograms if only annotating types.
From-SVN: r230228
2015-11-12 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Create
IMPORTED_DECL nodes to describe the subprogram renamings which
are relevant at debug time.
* gcc-interface/gigi.h (get_debug_scope): Add declaration.
* gcc-interface/trans.c (Identifier_to_gnu): Consider
N_Defining_Operator_Symbol as valid entities.
(gnat_to_gnu): Handle N_Defining_Operator_Symbol the same way as
other entities. Introduce a specific handling for
N_Subprogram_Renaming_Declaration: call gnat_to_gnu_entity on
the entity defined for relevant ones.
(process_decls): Process subprogram renaming declarations during
the second pass only.
* gcc-interface/utils.c (get_debug_scope): Make it external.
Consider N_Defining_Operator_Symbol as valid entities.
(gnat_write_global_declarations): Output debugging information
for top-level imported declarations.
* gcc-interface/Makefile.in: Fix typo.
From-SVN: r230227
2015-11-12 Emmanuel Briot <briot@adacore.com>
* s-os_lib.ads: Documentation update.
2015-11-12 Arnaud Charlet <charlet@adacore.com>
* s-taprop-vxworks.adb, s-osinte-vxworks.ads: Use a single import of
taskDelay to avoid confusion.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Simple_Function_Return): If the return
type is class-wide and the expression is a view conversion,
remove the conversion to prevent overriding of the tag, which
must be that of the object being returned.
2015-11-12 Tristan Gingold <gingold@adacore.com>
* bindgen.adb (Gen_Adainit): Code cleanup.
2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
* s-stalib.ads: Code cleanup.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Incomplete_Type_Decl): small optimization.
(Analyze_Subtype_Declaration): For floating point types,
inherit dimensions.
(OK_For_Limited_Init_In_05): Handle properly a conditional
expression whose condition is static, and is rewritten as the
branch that will be executed.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Resolve_Attribute, case 'Access): If the context
type is an access constant type, do not mark the attribute
reference as a possible modification of the prefix.
From-SVN: r230226
* sem_ch6.adb (Analyze_Procedure_Call) If CodePeer_Mode is True,
do not analyze the expression of a machine code insertion.
* sem_ch13.adb (Analyze_Code_Statement) If CodePeer_Mode is True,
mark the N_Code_Statement node as analyzed and do nothing else.
From-SVN: r230225
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Check_Limited_Return): Make global to package
for use elsewhere.
(Analyze_Expression_Function): Remove duplicated code, pre-analyze
expression to capture names and call Check_Limited_Return so
that semantic checks are identical to those for regular functions
returning limited types.
2015-11-12 Gary Dismukes <dismukes@adacore.com>
* bindgen.adb: Fix typo.
* sem_ch6.adb: Minor reformatting.
2015-11-12 Emmanuel Briot <briot@adacore.com>
* s-os_lib.adb (Argument_String_To_List): fix handling of
windows separators
From-SVN: r230224
gcc/
2015-11-12 Renlin Li <renlin.li@arm.com>
* config/arm/arm.md (addsi3_compare_op2): Make the order of
assembly pattern consistent with constraint order.
From-SVN: r230222