ChangeLog:
2010-10-07 Dave Korn <dave.korn.cygwin@gmail.com>
* configure.ac (build_lto_plugin): New shell variable.
(--enable-lto): Turn on by default for all non-ELF platforms that
have had LTO support added so far. Set build_lto_plugin appropriately
for both ELF and non-ELF.
(configdirs): Add lto-plugin or not based on build_lto_plugin.
* configure: Regenerate.
gcc/ChangeLog:
2010-10-07 Dave Korn <dave.korn.cygwin@gmail.com>
* config.host (host_lto_plugin_soname): New shell variable.
* configure.ac (LTOPLUGINSONAME): Add an AC_DEFINE for the above.
* config.in: Regenerate.
* configure: Regenerate.
* gcc.c (main): Use LTOPLUGINSONAME instead of hard-coding name of
LTO plugin shared library.
lto-plugin/ChangeLog:
2010-10-07 Dave Korn <dave.korn.cygwin@gmail.com>
* configure.ac: Source config.gcc to determine lto_binary_reader.
(LTO_FORMAT): New AC_SUBST variable inferred from lto_binary_reader.
* Makefile.am (LTO_FORMAT): Import.
(liblto_plugin_la_SOURCES): Add object format dependent module
defined by LTO_FORMAT.
(liblto_plugin_la_LIBADD): Allow for both PIC and non-PIC libiberty,
and work around libtool warning.
* configure: Regenerate.
* Makefile.in: Likewise.
* lto-plugin.c (struct sym_aux): Move to new lto-plugin.h.
(struct sym_aux): Likewise.
(struct plugin_symtab): Likewise.
(struct plugin_file_info): Likewise.
(LTO_SECTION_PREFIX): Likewise.
(add_symbols): Make non-static.
(claimed_files): Likewise.
(num_claimed_files): Likewise.
(check): Likewise.
(parse_table_entry): Likewise.
(translate): Likewise.
(resolve_conflicts): Likewise.
(process_symtab): Move to new lto-plugin-elf.c object format dependent
source file.
(claim_file_handler): Likewise, and make non-static.
(onload): Call new onload_format_checks function.
* lto-plugin.h: New file.
(LTO_SECTION_PREFIX): Move here.
(struct sym_aux): Likewise.
(struct plugin_symtab): Likewise.
(struct plugin_file_info): Likewise.
(claim_file_handler): Add new function prototype.
(onload_format_checks): Likewise.
(check): Declare extern.
(translate): Likewise.
(parse_table_entry): Likewise.
(resolve_conflicts): Likewise.
(add_symbols): Likewise.
(claimed_files): Likewise.
(num_claimed_files): Likewise.
* lto-plugin-elf.c (process_symtab): Move here.
(claim_file_handler): Likewise, and make non-static.
(onload_format_checks): New function factored out from onload.
* lto-plugin-coff.c (claim_file_handler): New function stub.
(onload_format_checks): Likewise.
From-SVN: r165133
In gcc/:
2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
* doc/objc.texi (Fast enumeration protocol): Mention that
'unsigned int' can also be used instead of 'unsigned long' in
countByEnumeratingWithState:objects:count:.
In gcc/objc/:
2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/45925
* objc-act.c (objc_finish_foreach_loop): Convert return value of
countByEnumeratingWithState:objects:count: to long unsigned int.
From-SVN: r165129
2010-10-07 Martin Jambor <mjambor@suse.cz>
* tree-sra.c (struct access): New field grp_assignment_write.
(dump_access): Dump grp_assignment_write.
(build_accesses_from_assign): Set grp_assignment_write.
(sort_and_splice_var_accesses): Aggregate grp_assignment_write.
(mark_read_status): Renamed to mark_rw_status, individual values
renamed too.
(analyze_access_subtree): Changed type of mark_write to
mark_read_status. Fixed propagating of mark_read and
mark_write. Changed benefit estimate. Updated comment.
* testsuite/gcc.dg/tree-ssa/sra-11.c: New test.
From-SVN: r165124
2010-10-07 Richard Guenther <rguenther@suse.de>
* machmode.h (mode_for_vector): Declare.
* stor-layout.c (mode_for_vector): New function, split out from ...
(layout_type): ... here.
* tree-vectorizer.h (current_vector_size): Declare.
* tree-vect-stmts.c (perm_mask_for_reverse): Check if the
mask vector type is available.
(get_vectype_for_scalar_type): Rename to ...
(get_vectype_for_scalar_type_and_size): ... this. Get a vector
size argument.
(get_vectype_for_scalar_type): New wrapper around
get_vectype_for_scalar_type_and_size using current_vector_size.
(get_same_sized_vectype): Use get_vectype_for_scalar_type_and_size.
* tree-vect-loop.c (vect_analyze_loop_2): Split out core part
of vect_analyze_loop here.
(vect_analyze_loop): Loop over vector sizes calling vect_analyze_loop_3.
* tree-vect-slp.c (vect_slp_analyze_bb): Set current_vector_size
to autodetect.
* config/i386/i386.c (ix86_vectorize_builtin_conversion): Fix
V8SF to V8SI conversion builtin.
From-SVN: r165116
gcc/objc:
* objc-act.c (build_objc_method_call): Replace calls to
build_function_call () with the VEC equivalent. Construct parameter
lists as VECs.
From-SVN: r165112
gcc/objc:
* objc-act.c (objc_build_message_expr): Call mark_exp_read () to signal that
the receiver has been used.
gcc/testsuite:
* objc.dg/set-not-used-1.m: New
* obj-c++.dg/set-not-used-1.mm: New.
From-SVN: r165111
2010-10-07 Robert Dewar <dewar@adacore.com>
* sem_prag.adb, sem_ch13.adb: Implement AI05-0012-1/02.
* gcc-interface/Make-lang.in: Update dependencies.
2010-10-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.ad: (Instantiate_Object): For an in-out formal of a child
unit, if the type of the formal is declared in a parent unit and is not
a formal itself, the actual must be located from an enclosing parent
instance by normal visibility.
2010-10-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Allocator): In Ada 2012, a null_exclusion
indicator is illegal for an uninitialized allocator.
From-SVN: r165110
2010-10-07 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Analyze_Attribute_Definition_Clause, case
Component_Size): Complete previous change.
2010-10-07 Vincent Celier <celier@adacore.com>
* scng.adb (Scan): Call Accumulate_Token_Checksum for Tok_Identifier,
even for keywords, to avoid having the checksum to depend on the Ada
version.
2010-10-07 Gary Dismukes <dismukes@adacore.com>
* sem_aggr.adb, sem_ch12.adb, sem_ch6.adb, par-ch5.adb,
exp_ch3.adb: Minor reformatting.
From-SVN: r165106
2010-10-07 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
Component_Size): It is now illegal to give an incorrect component size
clause in the case of aliased or atomic components.
* sem_prag.adb (Analyze_Pragma, case Pack): It is now illegal to give
an effective pragma Pack in the case of aliased or atomic components.
2010-10-07 Steve Baird <baird@adacore.com>
* exp_ch4.adb (Expand_N_Allocator): Do not bypass expansion
in the case of a violation of an active No_Task_Hierarchy restriction.
2010-10-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Validate_Derived_Type_Instance): If a formal derived
type is non-limited, an actual for it cannot be limited.
From-SVN: r165105
2010-10-07 Robert Dewar <dewar@adacore.com>
* einfo.ads (No_Pool_Assigned): Update documentation.
* sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
Storage_Size): We only set No_Pool_Assigned if the expression is a
static constant and zero.
* sem_res.adb (Resolve_Allocator): Allocation from empty storage pool
should be an error not a warning.
2010-10-07 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Expand_Array_Aggregate): Recognize additional cases
where an aggregate in an assignment can be built directly into the
target, and does not require the creation of a temporary that may
overflow the stack.
2010-10-07 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Analyze_Record_Aggregate): In Ada2012, a choice list
in a record aggregate can correspond to several components of
anonymous access types, as long as the designated subtypes match.
From-SVN: r165104
2010-10-07 Robert Dewar <dewar@adacore.com>
* par-ch3.adb, par-ch6.adb, par-ch7.adb, par-ch9.adb, par-ch10.adb: Add
Pexp to Pf_Rec constants
(P_Subprogram): Expression is always enclosed in parentheses
* par.adb (Pf_Rec): add Pexp flag for parametrized expression
* sinfo.ads (N_Parametrized_Expression): Expression must be in parens
2010-10-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Specification): Implement Ada2012
checks on functions that return an abstract type or have a controlling
result whose designated type is an abstract type.
(Check_Private_Overriding): Implement Ada2012 checks on functions
declared in the private part, if an abstract type is involved.
* sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): In Ada2012,
reject a generic function that returns an abstract type.
* exp_ch5.adb (Expand_Simple_Function_Return): in Ada2012, if a
function has a controlling access result, check that the tag of the
return value matches the designated type of the return expression.
From-SVN: r165100
2010-10-07 Robert Dewar <dewar@adacore.com>
* par-ch6.adb: Fix error in handling of parametrized expressions.
* par-ch4.adb (P_Name): Allow qualified expression as name in Ada 2012
mode.
(P_Simple_Expression): Better message for qualified expression prefix
* s-crc32.adb: Minor reformatting.
* exp_intr.adb (Expand_Unc_Deallocation): Remove test for empty
storage pool (this test is moved to Sem_Intr).
* sem_intr.adb (Check_Intrinsic_Call): Add check for deallocation from
empty storage pool, moved here from Exp_Intr and made into error.
(Check_Intrinsic_Call): Remove assumption in generating not-null free
warning that the name of the instantiation is Free.
* sinput.adb (Tree_Read): Document use of illegal free call allowed in
GNAT mode.
* types.ads: Remove storage size clauses from big types (since we may
need to do deallocations, which are now illegal for empty pools).
2010-10-07 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi: Add missing word.
From-SVN: r165099
2010-10-07 Robert Dewar <dewar@adacore.com>
* scng.adb (Skip_Other_Format_Characters): New procedure
(Start_Of_Wide_Character): New procedure
(Scan): Use Start_Of_Wide_Character where appropriate
(Scan): Improve error message for other_format chars in identifier
(Scan): Allow other_format chars between tokens
2010-10-07 Javier Miranda <miranda@adacore.com>
* exp_util.adb (Safe_Prefixed_Reference): When removing side effects,
Add missing support for explicit dereferences.
2010-10-07 Robert Dewar <dewar@adacore.com>
* par-ch10.adb, par-ch3.adb, par.adb: Minor reformatting.
From-SVN: r165097
2010-10-07 Robert Dewar <dewar@adacore.com>
* exp_disp.adb, exp_dist.adb, exp_util.ads, exp_util.adb,
exp_ch11.adb: Rename Full_Qualified_Name to Fully_Qualified_Name_String
* sem_util.adb, sem_util.ads (Full_Qualified_Name): Moved to
Exp_Util.Fully_Qualified_Name_String.
2010-10-07 Robert Dewar <dewar@adacore.com>
* rtsfind.ads: Add entry for Ada.Real_Time.Timing_Events.Set_Handler
* sem_res.adb (Resolve_Call): A call to
Ada.Real_Time.Timing_Events.Set_Handler violates restriction
No_Relative_Delay (AI-0211).
2010-10-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb: Small change in error message.
From-SVN: r165092
2010-10-07 Vincent Celier <celier@adacore.com>
* gnatcmd.adb (Check_Files): When looking for the .ci file for a
binder generated file, look for both b~xxx and b__xxx as gprbuild
always uses b__ as the prefix of such files.
From-SVN: r165085
2010-10-07 Robert Dewar <dewar@adacore.com>
* sem_res.adb: Minor reformatting
2010-10-07 Olivier Ramonat <ramonat@adacore.com>
* gnat_ugn.texi: Minor editing.
* opt.ads: Document that scripts rely on specific formats in opt.ads
2010-10-07 Robert Dewar <dewar@adacore.com>
* a-wichun.ads, a-wichun.adb (To_Lower_Case): New function
(To_Upper_Case): Fix to be inverse of To_Lower_Case
* a-zchuni.ads, a-zchuni.adb (To_Lower_Case): New function
(To_Upper_Case): Fix to be inverse of To_Lower_Case
2010-10-07 Robert Dewar <dewar@adacore.com>
* a-wichha.adb, a-wichha.ads, a-zchhan.adb, a-zchhan.ads: New file.
* impunit.adb: Add entries for a-wichha/a-zchhan
* Makefile.rtl: Add entries for a-wichha/a-zchhan
2010-10-07 Vincent Celier <celier@adacore.com>
* make.adb (Check): Call Check_Source_Info_In_ALI with Project_Tree
* makeutl.adb (Check_Source_Info_In_ALI): If there is at least one
replaced source, check that none of the replaced sources are in the
dependencies.
* makeutl.ads (Check_Source_Info_In_ALI): New parameter Tree
* prj-nmsc.adb (Remove_Source): New parameter Tree. If the source is
replaced with a source with a different file name, put it in the hash
table Replaced_Sources.
(Add_Source): Call Remove_Source with Data.Tree. If there is at least
one replaced source, check if it has the same file name as the current
source; if it has, remove it from the hash table Replaced_Sources.
* prj.adb (Reset): Reset hash table Tree.Replaced_Sources
* prj.ads (Replaced_Source_HTable): New hash table
(Project_Tree_Data): New components Replaced_Sources and
Replaced_Source_Number.
2010-10-07 Ed Schonberg <schonberg@adacore.com>
* sem_elab.adb (Check_A_Call): After inserting elaboration check, set
proper flag to prevent a double elaboration check on the same call.
* exp_util.adb (Insert_Actions): If the enclosing node is an
Expression_With_Actions and it has been analyzed already, find
insertion point further up in the tree.
2010-10-07 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Analyze_Record_Representation_Clause): Alphabetize all
local variables. Remove the general restriction which prohibits the
application of record rep clauses to Unchecked_Union types. Add Ada
2012 check to detect improper naming of an Unchecked_Union
discriminant in record rep clause.
* sem_prag.adb: Add with and use clause for Exp_Ch7.
(Analyze_Pragma): Unchecked_Union case: Propagate the Unchecked_Union
type to all invocations of Check_Component and Check_Variant.
(Check_Component): Add formal parameters UU_Typ and In_Variant_Part.
Rewritten. Add Ada 2012 check to detect improper use of formal
private types and private extensions as component types of an
Unchecked_Union declared inside a generic body.
(Check_Variant): Add formal parameter UU_Typ. Propagate the
Unchecked_Union type to all calls of Check_Component. Signal that the
current component comes from the variant part of an Unchecked_Union
type.
(Inside_Generic_Body): New routine.
2010-10-07 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_Composite_Equality): When looking for a primitive
equality operation for a record component, verify that both formals
have the same type, and the result type is boolean.
2010-10-07 Vincent Celier <celier@adacore.com>
* gnatcmd.adb (Check_Files): When looking for the .ci file for a
binder generated file, look for both b~xxx and b__xxx as gprbuild
always uses b__ as the prefix of such files.
From-SVN: r165084
2010-10-07 Robert Dewar <dewar@adacore.com>
* sem_attr.adb: Minor reformatting.
* einfo.ads, einfo.adb (Is_Ada_2012_Only): New flag
* itypes.adb (Create_Null_Excluding_Itype): Set Is_Ada_2012_Only flag
properly.
* lib-xref.adb (Generate_Reference): Warn on use of Ada 2012 entity in
non-Ada 2012 mode.
* opt.ads (Warn_On_Ada_2012_Compatibility): New flag
* sem_ch3.adb (Analye_Subtype_Declaration): Inherit Is_Ada_2012_Only
* sem_ch7.adb (Preserve_Full_Attributes): Preserve Is_Ada_2012_Only
flag.
* sem_prag.adb (Analyze_Pragma, case Ada_12/Ada_2012): Allow form with
argument.
* sem_type.adb (Disambiguate): Deal with Is_Ada_2012_Only.
* sem_warn.adb (Warn_On_Ada_2012_Compatibility): New flag, treated
same as 2005 flag.
2010-10-07 Javier Miranda <miranda@adacore.com>
* a-tags.ads: Use new support for pragma Ada_2012 with function
Type_Is_Abstract.
From-SVN: r165082
2010-10-07 Ed Schonberg <schonberg@adacore.com>
* par-ch5.adb (P_Sequence_Of_Statements): In Ada2012 a label can end a
sequence of statements.
2010-10-07 Vincent Celier <celier@adacore.com>
* gnatcmd.adb (Check_Files): Only add a .ci files if it exists
2010-10-07 Javier Miranda <miranda@adacore.com>
* a-tags.ads, a-tags.adb (Type_Is_Abstract): New subprogram.
* rtsfind.ads (RE_Type_Is_Abstract): New entity.
* exp_disp.adb (Make_DT): Initialize TSD component Type_Is_Abstract.
2010-10-07 Arnaud Charlet <charlet@adacore.com>
* sem_ch12.adb (Mark_Context): Removed, no longer needed.
(Analyze_Package_Instantiation): No longer analyze systematically a
generic body in CodePeer mode.
* freeze.adb, sem_attr.adb: Update comments.
From-SVN: r165081