* call.c (is_subseq): Handle ck_aggr, ck_list.
(compare_ics): Treat an aggregate or ambiguous conversion to the
same type as involving the same function.
From-SVN: r160804
2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/44391
* graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
size_one_node for pointer types. Do not call gmp_cst_to_tree.
* gcc.dg/graphite/pr44391.c: New.
From-SVN: r160803
* c-ada-spec.c (dump_sloc): Remove column info.
(is_simple_enum): New function.
(dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
enum types when relevant.
From-SVN: r160782
2010-06-15 Martin Jambor <mjambor@suse.cz>
PR lto/44464
* tree-sra.c (replace_removed_params_ssa_names): Call release_ssa_name
on the newly dead SSA name.
From-SVN: r160777
2010-06-14 Changpeng Fang <changpeng.fang@amd.com>
* tree-ssa-loop-prefetch.c (nothing_to_prefetch_p): New. Return
true if no prefetch is going to be generated for a given group.
(estimate_prefetch_count): Use prefetch_mod and unroll_factor to
estimate the prefetch_count.
(loop_prefetch_arrays): Call nothing_to_prefetch_p; estimate the
prefetch count by considering the unroll_factor and prefetch_mod
for is_loop_prefetching_profitable.
From-SVN: r160766
2010-06-14 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Build_Derived_Record_Type): if derived type is an
anonymous base generated when the parent is a constrained discriminated
type, propagate interface list to first subtype because it may appear
in a current instance within the extension part of the derived type
declaration, and its own subtype declaration has not been elaborated
yet.
* exp_disp.adb (Build_Interface_Thunk): Use base type of formal to
determine whether it has the controlling type.
From-SVN: r160748
2010-06-14 Jerome Lambourg <lambourg@adacore.com>
* exp_ch11.adb (Expand_N_Raise_Statement): Make sure that the explicit
raise of CE, SE and PE have the reason correctly set and are properly
expanded before stopping the expansions of .NET/JVM exceptions.
From-SVN: r160747
2010-06-14 Robert Dewar <dewar@adacore.com>
* opt.ads (Check_Policy_List): Add some clarifying comments
* sem_prag.adb (Analyze_Pragma, case Check): Set Pragma_Enabled flag
on rewritten Assert pragma.
2010-06-14 Gary Dismukes <dismukes@adacore.com>
* sem_ch6.adb (Check_Overriding_Indicator): Add a special check for
controlled operations, so that they will be treated as overriding even
if the overridden subprogram is marked Is_Hidden, as long as the
overridden subprogram's parent subprogram is not hidden.
2010-06-14 Robert Dewar <dewar@adacore.com>
* debug.adb: Entry for gnatw.d no longer specific for while loops
* einfo.adb (First_Exit_Statement): New attribute for E_Loop
* einfo.ads (First_Exit_Statement): New attribute for E_Loop
* sem_ch5.adb (Analyze_Loop_Statement): Check_Infinite_Loop_Warning has
new calling sequence to include test for EXIT WHEN.
(Analyze_Exit_Statement): Chain EXIT statement into exit statement chain
* sem_warn.ads, sem_warn.adb (Check_Infinite_Loop_Warning): Now handles
EXIT WHEN case.
* sinfo.adb (Next_Exit_Statement): New attribute of N_Exit_Statement
node.
* sinfo.ads (N_Pragma): Correct comment on Sloc field (points to
PRAGMA, not to pragma identifier).
(Next_Exit_Statement): New attribute of N_Exit_Statement node
2010-06-14 Robert Dewar <dewar@adacore.com>
* sem_res.adb (Resolve_Short_Circuit): Fix sloc of "assertion/check
would fail" msg.
2010-06-14 Robert Dewar <dewar@adacore.com>
* par-ch2.adb (Scan_Pragma_Argument_Association): Clarify message for
missing pragma argument identifier.
2010-06-14 Robert Dewar <dewar@adacore.com>
* atree.ads, atree.adb (Ekind_In): New functions
2010-06-14 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**N in stand alone context
2010-06-14 Robert Dewar <dewar@adacore.com>
* usage.adb (Usage): Redo documentation of -gnatwa.
From-SVN: r160743
2010-06-14 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Find_Type): The attribute 'class cannot be applied to
an untagged incomplete type that is a limited view.
From-SVN: r160741
2010-06-14 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi: Add description of '-cargs gcc_switches' to gnatstub
and gnatppa.
2010-06-14 Thomas Quinot <quinot@adacore.com>
* exp_ch4.adb (Expand_Short_Circuit_Operator): New subprogram,
factoring duplicated code between...
(Expand_N_And_Than, Expand_N_Or_Else): Remove duplicated code.
* a-envvar.ads: Minor reformatting
2010-06-14 Arnaud Charlet <charlet@adacore.com>
* ali.adb, ali.ads, lib-xref.ads: Document new '+' letter for C/C++
static entities.
(Scan_ALI): Take into account new Visibility field.
(Visibility_Kind): New type.
(Xref_Entity_Record): Replace Lib field by Visibility.
* gcc-interface/Make-lang.in: Update dependencies.
2010-06-14 Pascal Obry <obry@adacore.com>
* raise.h: Remove unused defintions.
2010-06-14 Bob Duff <duff@adacore.com>
* par-ch10.adb (P_Subunit): If the next token after "separate(X)" is
Tok_Not or Tok_Overriding, call P_Subprogram. We had previously given
the incorrect error "proper body expected".
* par-ch6.adb (P_Subprogram): Suppress "overriding indicator not
allowed here" error in case of subunits, which was triggered by the
above change to P_Subunit.
From-SVN: r160740
2010-06-14 Robert Dewar <dewar@adacore.com>
* ali.adb (Scan_ALI): Implement reading and storing of N lines
(Known_ALI_Lines): Add entry for 'N' (notes)
* ali.ads (Notes): New table to store Notes information
* alloc.ads: Add entries for Notes table
* lib-util.adb (Write_Info_Int): New procedure
(Write_Info_Slit): New procedure
(Write_Info_Uint): New procedure
* lib-util.ads (Write_Info_Int): New procedure
(Write_Info_Slit): New procedure
(Write_Info_Uint): New procedure
* lib-writ.adb (Write_Unit_Information): Output N (notes) lines
* lib-writ.ads: Update documentation for N (Notes) lines
* lib.adb (Store_Note): New procedure
* lib.ads (Notes): New table
(Store_Note): New procedure
* sem_prag.adb: Call Store_Note for affected pragmas
From-SVN: r160736
2010-06-14 Thomas Quinot <quinot@adacore.com>
* socket.c: Fix wrong condition in #ifdef
* g-socket.adb, g-sothco.ads: Functions imported from socket.c that
take or return char* values can't use Interfaces.C.Strings.chars_ptr,
because on VMS this type is a 32-bit pointer which is not compatible
with the default for C pointers for code compiled with gcc on that
platform.
From-SVN: r160735
2010-06-14 Ed Schonberg <schonberg@adacore.com>
* sem_util (Is_VMS_Operator): New predicate to determine whether an
operator is an intrinsic operator declared in the DEC system extension.
* sem_res.adb (Resolve_Logical_Op): operation is legal on signed types
if the operator is a VMS intrinsic.
* sem_eval.adb (Eval_Logical_Op): Operation is legal and be
constant-folded if the operands are signed and the operator is a VMS
intrinsic.
2010-06-14 Robert Dewar <dewar@adacore.com>
* g-socket.adb, gnatcmd.adb: Minor reformatting
From-SVN: r160734
2010-06-14 Pascal Obry <obry@adacore.com>
* s-finimp.adb: Fix typo.
* raise.h: Remove duplicate blank line.
2010-06-14 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Add_Sources): Always set the object file and the
switches file names, as the configuration of the language may change
in an extending project.
(Process_Naming_Scheme): For sources of projects that are extended, set
the configuration of the language from the highest extending project
where the language is declared.
2010-06-14 Gary Dismukes <dismukes@adacore.com>
* sem_res.adb (Resolve_Call): For infinite recursion check, test
whether the called subprogram is inherited from a containing subprogram.
(Same_Or_Aliased_Subprograms): New function
From-SVN: r160733
2010-06-14 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (End_Use_Type): Before indicating that an operator is not
use-visible, check whether it is a primitive for more than one type.
2010-06-14 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb (Copy_And_Swap): Copy Has_Pragma_Unmodified flag.
* sem_ch7.adb (Preserve_Full_Attributes): Preserve
Has_Pragma_Unmodified flag.
2010-06-14 Thomas Quinot <quinot@adacore.com>
* g-sttsne-locking.adb, g-sttsne-locking.ads, g-sttsne.ads,
g-sttsne-vxworks.adb, g-sttsne-dummy.ads: Removed. Mutual exclusion is
now done in GNAT.Sockets if necessary.
* gsocket.h, g-socket.adb, g-sothco.ads (GNAT.Sockets.Get_XXX_By_YYY):
Ensure mutual exclusion for netdb operations if the target platform
requires it.
(GNAT.Sockets.Thin_Common): New binding for getXXXbyYYY, treating struct
hostent as an opaque type to improve portability.
* s-oscons-tmplt.c, socket.c: For the case of Vxworks, emulate
gethostbyYYY using proprietary VxWorks API so that a uniform interface
is available for the Ada side.
* gcc-interface/Makefile.in: Remove g-sttsne-*
* gcc-interface/Make-lang.in: Update dependencies.
2010-06-14 Vincent Celier <celier@adacore.com>
* gnatcmd.adb (Mapping_File): New function.
From-SVN: r160731
2010-06-14 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Derive_Subprograms): Remove over-restrictive assertion.
2010-06-14 Arnaud Charlet <charlet@adacore.com>
* ali.adb: Fix typo.
* s-auxdec-vms-alpha.adb, scng.ads: Minor reformatting
2010-06-14 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb: Make Mark_Context transitive, and apply to subprogram
instances.
* sem_ch8.adb (Find_Expanded_Name): If a candidate compilation unit in
the context does not have a homonym of the selector, emit default
error message.
From-SVN: r160728
2010-06-14 Ed Schonberg <schonberg@adacore.com>
* sinfo.ads, sinfo,adb (Withed_Body): New attribute of a with_clause.
Indicates that there is an instantiation in the current unit that
loaded the body of the unit denoted by the with_clause.
* sem_ch12.adb (Mark_Context): When instanting a generic body, check
whether a with_clause in the current context denotes the unit that
holds the generic declaration, and mark the with_clause accordingly.
(Instantiate_Package_Body): call Mark_Context.
* sem.adb (Process_Bodies_In_Context): Use Withed_Body to determine
whether a given body should be traversed before the spec of the main
unit.
2010-06-14 Ed Falis <falis@adacore.com>
* sysdep.c: Fix 653 build against vThreads headers
From-SVN: r160725
2010-06-14 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body): Do not check conformance when
the spec has been generated for a body without spec that carries an
Inline_Always pragma.
2010-06-14 Arnaud Charlet <charlet@adacore.com>
* lib-xref.ads: Documentation change: allocate 'Z' letter to C/C++
macro.
From-SVN: r160723
2010-06-14 Jerome Lambourg <lambourg@adacore.com>
* exp_dbug.adb (Debug_Renaming_Declaration): Do not output any debug
declaration for VMs, as those are useless and might lead to duplicated
local variable names in the generated code.
* gcc-interface/Make-lang.in: Update dependdencies.
From-SVN: r160721
2010-06-14 Robert Dewar <dewar@adacore.com>
* opt.ads, sem.adb, sem_elab.adb: Minor reformatting
2010-06-14 Robert Dewar <dewar@adacore.com>
* exp_aggr.adb (Has_Address_Clause): Moved to Exp_Util, and there it
is renamed as Has_Following_Address_Clause.
* exp_ch3.adb (Needs_Simple_Initialization): Add Consider_IS argument
to allow the caller to avoid Initialize_Scalars having an effect.
(Expand_N_Object_Declaration): Do not do Initialize_Scalars stuff for
scalars with an address clause specified.
* exp_ch3.ads (Needs_Simple_Initialization): Add Consider_IS argument
to allow the caller to avoid Initialize_Scalars having an effect.
* exp_util.adb (Has_Following_Address_Clause): Moved here from Exp_Aggr
(where it was called Has_Address_Clause).
* exp_util.ads (Has_Following_Address_Clause): Moved here from Exp_Aggr
(where it was called Has_Address_Clause).
* freeze.adb (Warn_Overlay): Suppress message about overlaying causing
problems for Initialize_Scalars (since we no longer initialize objects
with an address clause.
2010-06-14 Robert Dewar <dewar@adacore.com>
* exp_prag.adb (Expand_Pragma_Check): Set Loc of generated code from
condition.
2010-06-14 Gary Dismukes <dismukes@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Debug_Info_Needed
on the entity of an implicitly generated postcondition procedure.
2010-06-14 Thomas Quinot <quinot@adacore.com>
* sem_ch7.adb (Preserve_Full_Attributes): Propagate
Discriminant_Constraint elist from full view to private view.
From-SVN: r160720