aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
AgeCommit message (Collapse)AuthorFilesLines
2009-10-02decl.c (gnat_to_gnu_entity): Generate an XVZ variable alongside the XVS type ↵Eric Botcazou2-4/+19
if the size is not constant. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Generate an XVZ variable alongside the XVS type if the size is not constant. (maybe_pad_type): Minor tweak. From-SVN: r152420
2009-10-02decl.c (check_ok_for_atomic): Do nothing if the type doesn't come from source.Eric Botcazou2-0/+10
* gcc-interface/decl.c (check_ok_for_atomic): Do nothing if the type doesn't come from source. From-SVN: r152418
2009-10-02decl.c (gnat_to_gnu_component_type): Force at least unit size for the ↵Eric Botcazou2-0/+18
component size of an array with aliased components. * gcc-interface/decl.c (gnat_to_gnu_component_type): Force at least unit size for the component size of an array with aliased components. (maybe_pad_type): Do not warn for MAX_EXPR. From-SVN: r152417
2009-09-29decl.c (gnat_to_gnu_entity): Factor out common code processing the component ↵Eric Botcazou2-152/+108
type into... * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Factor out common code processing the component type into... <E_Array_Subtype>: Likewise. (gnat_to_gnu_component_type): ...this new static function. (maybe_pad_type): Minor cleanup. From-SVN: r152273
2009-09-29decl.c (gnat_to_gnu_entity): Rewrite the handling of constrained ↵Eric Botcazou2-159/+496
discriminated record subtypes. * decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Rewrite the handling of constrained discriminated record subtypes. (components_to_record): Declare the type of the variants and of the qualified union. (build_subst_list): Move around. (compute_field_positions): Rename into... (build_position_list): ...this. Return a TREE_VEC. (annotate_rep): Adjust for above renaming. (build_variant_list): New static function. (create_field_decl_from): Likewise. (get_rep_part): Likewise. (get_variant_part): Likewise. (create_variant_part_from): Likewise. (copy_and_substitute_in_size): Likewise. From-SVN: r152272
2009-09-28Add PR reference to ChangeLog entry.Olivier Hainque1-0/+1
From-SVN: r152254
2009-09-28ada/Olivier Hainque2-1/+17
* gcc-interface/targtyps.c * (get_target_default_allocator_alignment): Account for observable alignments out of default allocators. testsuite/ * gnat.dg (tagged_alloc_free.adb): New testcase. From-SVN: r152243
2009-09-28except.h (struct eh_region_d): Add use_cxa_end_cleanup.Richard Henderson2-1/+6
* except.h (struct eh_region_d): Add use_cxa_end_cleanup. * except.c (gen_eh_region): Set it. (duplicate_eh_regions_1): Copy it. * tree-eh.c (lower_resx): Use it to determine which function to call to resume. * langhooks.h (struct lang_hooks): Add eh_use_cxa_end_cleanup. * langhooks-def.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. * builtins.def (BUILT_IN_CXA_END_CLEANUP): New. * tree.c (build_common_builtin_nodes): Remove parameter. Build BUILT_IN_CXA_END_CLEANUP if necessary. * tree.h (build_common_builtin_nodes): Update decl. * c-common.c (c_define_builtins): Update call to build_common_builtin_nodes. gcc/ada/ * gcc-interface/utils.c (gnat_install_builtins): Update call to build_common_builtin_nodes. gcc/cp/ * cp-objcp-common.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. gcc/fortran/ * f95-lang.c (gfc_init_builtin_functions): Update call to build_common_builtin_nodes. gcc/java/ * builtins.c (initialize_builtins): Update call to build_common_builtin_nodes. * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. From-SVN: r152241
2009-09-26decl.c (gnat_to_gnu_entity): Filter out negative size for the array ↵Eric Botcazou3-36/+94
dimensions like in the constrained case. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Filter out negative size for the array dimensions like in the constrained case. <E_Array_Subtype>: Do not create an artificially non-constant high bound if the low bound is non-constant. Minor tweaks. * gcc-interface/trans.c (lvalue_required_p): Add CONSTANT parameter and turn ALIASED into a boolean parameter. Adjust calls to self. <N_Attribute_Reference>: Return 1 for more attributes. <N_Object_Renaming_Declaration>: Return 1 for non-constant objects. <N_Assignment_Statement>: Return 1 for the LHS. (Identifier_to_gnu): Adjust calls to lvalue_required_p. (call_to_gnu): Be prepared for wrapped boolean rvalues. From-SVN: r152201
2009-09-25Fix nitsEric Botcazou1-3/+3
From-SVN: r152166
2009-09-25ada-tree.h (TYPE_REPRESENTATIVE_ARRAY): New language specific node.Olivier Hainque6-23/+280
ada/ * gcc-interface/ada-tree.h (TYPE_REPRESENTATIVE_ARRAY): New language specific node. Representative array type for VECTOR_TYPE entities. * gcc-interface/utils.c (handle_vector_type_attribute): New handler. Turn an ARRAY_TYPE entity into a VECTOR_TYPE. (gnat_types_compatible_p): Handle VECTOR_TYPEs. (convert): Likewise. Arrange to produce VECTOR_CST out of constant array aggregates for VECTOR_TYPE entities. (unchecked_convert): Likewise. (maybe_vector_array): New function. If EXP has VECTOR_TYPE, return EXP converted to the associated TYPE_REPRESENTATIVE_ARRAY. (handle_pure_attribute, handle_sentinel_attribute, handle_noreturn_attribute, handle_malloc_attribute, handle_vector_size_attribute): Replace uses of qE format by qs. Remove GCC_DIAG_STYLE definition. * gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Convert vector input to representative array type on entry. <N_Op_Eq, etc>: Likewise. * gcc-interface/gigi.h (maybe_vector_array): Declare. (VECTOR_TYPE_P): New predicate. * gcc-interface/misc.c (gnat_print_type): Handle VECTOR_TYPE. testsuite/ * gnat.dg/sse_nolib.adb: New testcase. From-SVN: r152165
2009-09-24ada.h: Fix outdated comment.Eric Botcazou7-227/+162
* gcc-interface/ada.h: Fix outdated comment. * gcc-interface/ada-tree.h (SET_TYPE_RM_VALUE): Use MARK_VISITED in lieu of mark_visited. * gcc-interface/gigi.h (mark_visited): Change type of parameter. (MARK_VISITED): New macro. (gnat_truthvalue_conversion): Delete. * gcc-interface/decl.c (gnat_to_gnu_entity): Use MARK_VISITED in lieu of mark_visited. (annotate_rep): Fix formatting and tidy. (compute_field_positions): Get rid of useless variable. * gcc-interface/trans.c (gnat_to_gnu): Retrieve the Nkind of the GNAT node only once. Use IN operator for the Nkind in more cases. Remove calls to gnat_truthvalue_conversion. (mark_visited): Change type of parameter and adjust. (mark_visited_r): Dereference TP only once. (add_decl_expr): Use MARK_VISITED in lieu of mark_visited. * gcc-interface/utils2.c (gnat_truthvalue_conversion): Delete. (build_binary_op): Remove calls to gnat_truthvalue_conversion. (build_unary_op): Likewise. From-SVN: r152121
2009-09-24Makefile.in (LIBGNAT_TARGET_PAIRS): Simplify test for a-except% in target ↵Dave Korn2-1/+6
pairs list... * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Simplify test for a-except% in target pairs list; don't (implicitly) compare whitespace. From-SVN: r152116
2009-09-24cgraphunit.c (cgraph_lower_function): Revert last change.Jakub Jelinek2-3/+12
* cgraphunit.c (cgraph_lower_function): Revert last change. * targhooks.c (default_static_chain): Use !DECL_STATIC_CHAIN instead of DECL_NO_STATIC_CHAIN. * tree-cfg.c (verify_gimple_call): Likewise. * tree-nested.c (get_chain_decl, get_chain_field, convert_tramp_reference_op, convert_gimple_call): Likewise. (convert_all_function_calls): Likewise. Always set or clear DECL_STATIC_CHAIN initially, for !n->outer clear it. (lower_nested_functions): Remove DECL_NO_STATIC_CHAIN checking code. * c-parser.c (c_parser_declaration_or_fndef): Set DECL_STATIC_CHAIN if nested. * print-tree.c (print_node): Handle DECL_STATIC_CHAIN instead of DECL_NO_STATIC_CHAIN. * config/i386/i386.c (ix86_static_chain): Use !DECL_STATIC_CHAIN instead of DECL_NO_STATIC_CHAIN. (ix86_function_regparm, find_drap_reg): Likewise. Don't test decl_function_context. * varasm.c (initializer_constant_valid_p): Likewise. * tree.h (DECL_NO_STATIC_CHAIN): Renamed to ... (DECL_STATIC_CHAIN): ... this. * config/moxie/moxie.c (moxie_static_chain): Use !DECL_STATIC_CHAIN instead of DECL_NO_STATIC_CHAIN. * method.c (make_thunk, make_alias_for): Don't set DECL_NO_STATIC_CHAIN. * decl.c (builtin_function_1, grokfndecl): Likewise. * lex.c (build_lang_decl): Likewise. * gcc-interface/utils.c (gnat_pushdecl): Don't set DECL_NO_STATIC_CHAIN, set DECL_STATIC_CHAIN for nested functions. * testsuite/gcc.target/i386/pr12329.c: Adjust. From-SVN: r152114
2009-09-21s-osinte-rtems.ad[bs]: Get_Page_Size cannot return 0.Joel Sherrill3-13/+8
2009-09-21 Joel Sherrill <joel.sherrill@oarcorp.com> * s-osinte-rtems.ad[bs]: Get_Page_Size cannot return 0. Bind to getpagesize() in RTEMS 4.10 and newer. From-SVN: r151946
2009-09-21ada: init.c (__gnat_error_handler): Cast msg to const char *.Rainer Orth3-1/+12
* env.c [__alpha__ && __osf__] (_BSD): Define. * init.c [__alpha__ && __osf__] (__gnat_error_handler): Cast msg to const char *. From-SVN: r151938
2009-09-18[multiple changes]Arnaud Charlet6-27/+91
2009-09-18 Pascal Obry <obry@adacore.com> * mingw32.h: Activate Unicode support for x86-64 Windows platform. 2009-09-18 Vadim Godunko <godunko@adacore.com> * s-oscons-tmplt.c: Add circuit for handling IOV_MAX macro on IRIX. 2009-09-18 Javier Miranda <miranda@adacore.com> * exp_aggr.adb (Backend_Processing_Possible): Disable backend processing for array aggregates in the VM backend if the array has aliased components. 2009-09-18 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Indexed_Component): Emit error if the type of the prefix indicates a previous semantic error, and this is the first error in the program. 2009-09-18 Bob Duff <duff@adacore.com> * gnat_ugn.texi: Minor editing. From-SVN: r151844
2009-09-18[multiple changes]Arnaud Charlet4-0/+19
2009-09-18 Vincent Celier <celier@adacore.com> * prj.ads, prj.adb (Project_Data): New component Imported_Directories_Switches. 2009-09-18 Pascal Obry <obry@adacore.com> * mingw32.h: Include standard _mingw.h file. Define _WIN32_WINNT only if not already defined. From-SVN: r151843
2009-09-18[multiple changes]Arnaud Charlet4-24/+51
2009-09-18 Thomas Quinot <quinot@adacore.com> * g-socket.adb (Is_Open): New function indicating whether a Selector_Type object is open. 2009-09-18 Vincent Celier <celier@adacore.com> * osint-c.adb (Create_Output_Library_Info): Make sure that the ALI file is deleted before creating it. 2009-09-18 Robert Dewar <dewar@adacore.com> * bindgen.adb: Minor reformatting From-SVN: r151842
2009-09-18[multiple changes]Arnaud Charlet8-59/+126
2009-09-18 Arnaud Charlet <charlet@adacore.com> * s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop-posix.adb (Abort_Task): Do nothing if no signal handler is installed. * s-tassta.adb (Finalize_Global_Tasks): Do not wait for independent tasks if Abort_Task_Interrupt cannot be used. 2009-09-18 Vincent Celier <celier@adacore.com> * prj-tree.ads: Minor comment update From-SVN: r151841
2009-09-17g-socket.ads: Document the fact that Close_Selector has no effect on a ↵Bob Duff3-3/+53
closed selector. 2009-09-17 Bob Duff <duff@adacore.com> * g-socket.ads: Document the fact that Close_Selector has no effect on a closed selector. * g-socket.adb: Raise an exception when a Selector that should be open is closed. (Check_Selector): Declare RSig as a constant rather than a renames, less confusing. From-SVN: r151798
2009-09-17Minor reformatting.Arnaud Charlet5-20/+25
From-SVN: r151797
2009-09-17exp_ch9.adb, [...]: Minor reformattingRobert Dewar7-20/+33
2009-09-17 Robert Dewar <dewar@adacore.com> * exp_ch9.adb, exp_ch5.adb, exp_ch4.adb, prj-conf.adb, prj-env.ads, prj-ext.adb: Minor reformatting From-SVN: r151796
2009-09-17[multiple changes]Arnaud Charlet6-19/+65
2009-09-17 Emmanuel Briot <briot@adacore.com> * prj-conf.adb, prj-env.adb, prj-env.ads (Create_Temp_File): Moved to spec. (Do_Autoconf): If the object directory does not exists, create auto.cgpr in a temporary directory instead 2009-09-17 Bob Duff <duff@adacore.com> * a-dynpri.adb (Set_Priority): Don't do anything if the task is already terminated. (Get_Priority): Correct message for "terminated" case -- it said "null". 2009-09-17 Robert Dewar <dewar@adacore.com> * exp_ch6.adb: Minor reformatting From-SVN: r151795
2009-09-172009-09-17 Emmanuel Briot <briot@adacore.com>Emmanuel Briot11-77/+131
* gnatcmd.adb, make.adb, prj-part.adb, prj-ext.adb, prj-ext.ads, switch-m.adb, switch-m.ads, clean.adb, prj-tree.ads (Project_Node_Tree_Data.Project_Path): New field. * prj-conf.adb (Do_Autoconf): Remove "creating auto.cgpr" message From-SVN: r151794
2009-09-17prj-ext.adb, [...] (Is_External_Assignment): Remove duplicate code.Emmanuel Briot4-32/+27
2009-09-17 Emmanuel Briot <briot@adacore.com> * prj-ext.adb, prj-ext.ads, makeutl.adb (Is_External_Assignment): Remove duplicate code. (Prj.Ext): Fix memory leak (Check): Now allow the syntax "-Xfoo=" to set an empty value to the variable. This was previously allowed in the code in Is_External_Assignment, and some tests rely on it From-SVN: r151793
2009-09-17[multiple changes]Arnaud Charlet20-102/+220
2009-09-17 Bob Duff <duff@adacore.com> * gnat_rm.texi, s-oscons-tmplt.c: Minor typo 2009-09-17 Emmanuel Briot <briot@adacore.com> * gnatcmd.adb, prj-proc.adb, make.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, makeutl.ads, clean.adb, prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb, prj-tree.ads, prj-proc.ads, prj-nmsc.ads (Add, Value_Of, Reset): new parameter Tree. Scenario variables are now specific to each project tree loaded in memory. Code clean ups. 2009-09-17 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Make_DT): Remove wrong line of code that was undocumented and probably added by mistake. From-SVN: r151792
2009-09-16trans.c (Attribute_to_gnu): Strip conversions between original and packable ↵Eric Botcazou2-3/+16
version of types from the... * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Strip conversions between original and packable version of types from the expression. From-SVN: r151757
2009-09-16decl.c (gnat_to_gnu_field): Add DEBUG_INFO_P parameter.Eric Botcazou2-16/+47
* gcc-interface/decl.c (gnat_to_gnu_field): Add DEBUG_INFO_P parameter. If a padding type was made for the field, declare it. (components_to_record): Add DEBUG_INFO_P parameter. Adjust call to gnat_to_gnu_field and call to self. (gnat_to_gnu_entity) <E_Array_Type>: Do not redeclare padding types. <E_Array_Subtype>: Likewise. Adjust calls to gnat_to_gnu_field and components_to_record. From-SVN: r151755
2009-09-16Minor reformatting.Arnaud Charlet1-2/+6
From-SVN: r151751
2009-09-16[multiple changes]Arnaud Charlet7-63/+147
2009-09-16 Robert Dewar <dewar@adacore.com> * prj-nmsc.adb: Minor reformatting 2009-09-16 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_Conditional_Expression): If the type of the expression is a by-reference type (tagged or inherently limited) introduce an access type to capture references to the values of each branch of the conditional. 2009-09-16 Emmanuel Briot <briot@adacore.com> * prj-proc.adb, prj-part.adb, prj-tree.adb, prj-tree.ads (Project_Name_And_Node.Display_Name): new field The display name of a project (as written in the .gpr file) is now computed when the project file itself is parsed, not when it is processed. From-SVN: r151750
2009-09-16[multiple changes]Arnaud Charlet11-98/+302
2009-09-16 Thomas Quinot <quinot@adacore.com> * freeze.adb, exp_intr.adb (Expand_Intrinsic_Call): Leave calls to intrinsics untouched (to be expanded later on by gigi) if an external name has been specified. (Freeze_Entity): Do not generate a default external name for imported subprograms with convention Intrinsic (so that the above code can identify the case where an external name has been explicitly provided). * s-oscons-tmplt.c: Quote TARGET_OS early so that it is not erroneously replaced by something else due to an existing #define clause. 2009-09-16 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo.adb (Is_Accessibility_Actual): New flag on Parameter_Association node, created for the extra actual generated for an access parameter of a function that dispatches on result, to prevent double generation of such actuals when the call is rewritten is a dispatching call. * exp_ch6.adb (Expand_Call): Set Is_Accessibility_Actual when needed. * exp_disp.adb (Expand_Dispatching_Call): Do not transfer extra actuals that carry this flag when rewriting the original call as a dispatching call, after propagating the controlling tag. 2009-09-16 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Add_Source): New parameter Source_Dir_Rank to be put in the source data. (Check_File): New parameter Source_Dir_Rank, to check if a duplicate source is allowed. (Find_Source_Dirs): New parameter Rank to be recorded with the source directories. (Search_Directories): Call Check_File with the rank of the directory * prj.adb (Project_Empty): Add new component Source_Dir_Ranks (Free): Free also Number_Lists (Reset): Init also Number_Lists * prj.ads (Number_List_Table): New dynamic table for lists of numbers (Source_Data): New component Source_Dir_Rank. Remove component Known_Order_Of_Source_Dirs, no longer needed. (Project_Data): New component Source_Dir_Ranks (Project_Tree_Data): New components Number_Lists From-SVN: r151749
2009-09-16[multiple changes]Arnaud Charlet6-11/+113
2009-09-16 Vincent Celier <celier@adacore.com> * gprep.adb (Yes_No): New global constant Unix_Line_Terminators: New global Boolean variable (Process_One_File): Create the out file with a "Text_Translation=" form that depends on the use of option -T. (Scan_Command_Line): Add option -T (Usage): Add line for option -T 2009-09-16 Ed Schonberg <schonberg@adacore.com> * exp_disp.ads, exp_disp.adb (Is_Predefined_Internal_Operation): New predicate that describes a proper subset of Is_Predefined_Dispatching_Operation and excludes stream operations, which can be overridden by the user. * sem_ch6.adb (Create_Extra_Formals): use Is_Predefined_Internal_Operation, so that stream operations get extra formals. * exp_ch6.adb (Prevent double generation of extra actuals in calls to 'Input, which may be expanded twice, first as a function call and then as a dispatching call. From-SVN: r151748
2009-09-16s-oscons-tmplt.c (Target_OS, [...]): New constants.Thomas Quinot3-6/+34
2009-09-16 Thomas Quinot <quinot@adacore.com> * s-oscons-tmplt.c (Target_OS, Target_Name): New constants. * g-expect.adb (Set_Up_Child_Communications): Use System.OS_Constants.Target_OS to determine whether running on Windows. From-SVN: r151747
2009-09-14builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec.Richard Henderson2-4/+8
* builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec. * cfgbuild.c (make_edges): Handle asm goto. * cfglayout.c (fixup_reorder_chain): Likewise. * cfgrtl.c (patch_jump_insn): Likewise. * gimple-pretty-print.c (dump_gimple_asm): Likewise. * gimple.c (gimple_build_asm_1): Add and use nlabels parameter. (gimple_build_asm_vec): Add and use labels parameter. (gimple_build_asm): Remove. (walk_gimple_asm): Walk labels too. * gimple.def (GIMPLE_ASM): Update docs. * gimple.h: Update decls. (struct gimple_statement_asm): Change nc to use unsigned char; add nl member. (gimple_asm_nlabels): New. (gimple_asm_label_op, gimple_asm_set_label_op): New. * gimplify.c (gimplify_asm_expr): Copy labels from ASM_EXPR into gimple_build_asm_vec. * jump.c (mark_jump_label_asm): New. (mark_jump_label): Use it. (redirect_jump_1): Handle asm goto. (invert_jump_1): Soft fail if X is null. * recog.c (extract_asm_operands): New. (asm_noperands): Use it; handle asm labels. (decode_asm_operands): Use extract_asm_operands. (asm_operand_ok): Properly handle empty string. * reg-stack.c (get_asm_operands_in_out): Rename from get_asm_operand_n_inputs; use extract_asm_operands; return both inputs and outputs by reference; update all callers. * rtl.def (ASM_OPERANDS): Add label vector as operand 6. * rtl.h (ASM_OPERANDS_LABEL_VEC): New. (ASM_OPERANDS_LABEL_LENGTH, ASM_OPERANDS_LABEL): New. (ASM_OPERANDS_SOURCE_LOCATION): Renumber. (extract_asm_operands): Declare. * stmt.c (expand_asm_operands): Add and use labels parameter. (check_unique_operand_names): Likewise. (resolve_asm_operand_names, resolve_operand_name_1): Likewise. (expand_asm_stmt): Handle asm labels. * tree-cfg.c (make_gimple_asm_edges): New. (make_edges): Use it. (cleanup_dead_labels): Handle asm labels. (is_ctrl_altering_stmt): Likewise. (gimple_redirect_edge_and_branch): Likewise. * tree.def (ASM_EXPR): Add 5th operand. * tree.h (ASM_LABELS): New. (resolve_asm_operand_names): Update decl. * c-parser.c (c_parser_asm_statement): Parse asm goto. (c_parser_asm_goto_operands): New. * c-tree.h (build_asm_expr): Update decl. * c-typeck.c (build_asm_expr): Add and use labels parameter. * doc/extend.texi: Document asm goto. gcc/ada/ * gcc-interface/trans.c (Pragma_to_gnu): Use build5 for ASM_EXPR. gcc/cp/ * cp-tree.h (finish_asm_stmt): Update decl. * parser.c (cp_parser_asm_definition): Parse asm goto. (cp_parser_asm_label_list): New. * pt.c (tsubst_copy_asm_operands): Don't recurse on labels. (tsubst_expr): Handle asm labels. * semantics.c (finish_asm_stmt): Add and use labels parameter. gcc/testsuite/ * c-c++-common/asmgoto-1.c, c-c++-common/asmgoto-2.c, c-c++-common/asmgoto-3.c, gcc.c-torture/compile/asmgoto-1.c, gcc.dg/tree-ssa/asmgoto-1.c: New files. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r151701
2009-09-14exp_dbug.ads (Packed Array Encoding): Document the new encoding for the ↵Eric Botcazou4-15/+59
unconstrained case. * exp_dbug.ads (Packed Array Encoding): Document the new encoding for the unconstrained case. * gcc-interfaces/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Implement the encoding. Do not give a name to the pointer type to the XUT type. * gcc-interfaces/utils.c (gnat_pushdecl): Propagate DECL_ORIGINAL_TYPE for fat pointer types, if any. Make sure DECL_ARTIFICIAL is cleared on nodes with DECL_ORIGINAL_TYPE set. (update_pointer_to): Set DECL_ORIGINAL_TYPE to the original pointer for fat pointer types. Make sure DECL_ARTIFICIAL is cleared. From-SVN: r151697
2009-09-14Squash commit of EH in gimpleRichard Henderson4-4/+15
From-SVN: r151696
2009-09-14Fix latest entryEric Botcazou1-7/+8
From-SVN: r151683
2009-09-13langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.Richard Guenther4-7/+34
2009-09-13 Richard Guenther <rguenther@suse.de> Rafael Avila de Espindola <espindola@google.com> * langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define. (LANG_HOOKS_EH_PERSONALITY): Likewise. (LANG_HOOKS_INITIALIZER): Adjust. (lhd_pass_through_t): Declare. * langhooks.h (struct lang_hooks): Add eh_runtime_type and eh_personality. * langhooks.c (lhd_pass_through_t): New function. * dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc, dwarf2out_begin_prologue): Use personality from current_function_decl. * expr.h (get_personality_function): Declare. * expr.c (get_personality_function): New function. (build_personality_function): Likewise. * libfuncs.h (libfunc_index): Remove LTI_eh_personality. (eh_personality_libfunc): Remove. * optabs.c (build_libfunc_function): New function split out from ... (init_one_libfunc): ... here. * tree.h (DECL_FUNCTION_PERSONALITY): New. (tree_function_decl): Add personality. (lhd_gcc_personality): Declare. (build_personality_function): Likewise. * tree.c (gcc_eh_personality_decl): New. (lhd_gcc_personality): New function. * except.h (lang_eh_runtime_type): Remove. (enum eh_personality_kind): New. (build_personality_function): Declare. (function_needs_eh_personality): Declare. * except.c (lang_eh_runtime_type): Remove. (function_needs_eh_personality): New function. (add_type_for_runtime): Call lang_hooks.type_for_runtime instead. (sjlj_emit_function_enter, output_function_exception_table): Use personality from current_function_decl. * tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY. * tree-inline.c (tree_can_inline_p): Do not inline across different EH personalities. (expand_call_inline): Likewise. Adjust the callers EH personality. (tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY. * cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY. * Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency. (c-parser.o): Likewise * c-tree.h (c_eh_initialized_p): Remove. (c_maybe_initialize_eh): Likewise. * c-decl.c (finish_decl): Don't call c_maybe_initialize_eh. (finish_decl): Don't call c_maybe_initialize_eh. (c_eh_initialized_p): Remove. (c_maybe_initialize_eh): Likewise. * c-parser.c (c_parser_omp_construct): Likewise. (c_parse_file): Initialize exception handling. objc/ * objc-act.c (objc_eh_runtime_type): Export. (objc_init_exceptions): Remove. Move warning code ... (objc_begin_try_stmt): ... here (objc_build_throw_stmt): ... and here. (objc_eh_personality_decl): New. (objc_eh_personality): New function. * objc-act.h (objc_eh_runtime_type): Declare. (objc_eh_personality): Likewise. * objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define. (LANG_HOOKS_EH_PERSONALITY): Likewise. cp/ * except.c (init_exception_processing): Do not set lang_eh_runtime_type. (choose_personality_routine): Do not set eh_personality_decl, set pragma_java_exceptions. * cp-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define. (LANG_HOOKS_EH_PERSONALITY): Likewise. (cp_eh_personality_decl): New. (cp_eh_personality): Likewise. * Make-lang.in (cp-lang.o): Add $(EXPR_H) and $(EXCEPT_H) dependencies. java/ * decl.c (do_nothing): Remove. (java_init_decl_processing): Do not set lang_eh_runtime_type. * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency. * lang.c (java_eh_personality): New. (java_eh_personality_decl): Likewise. (LANG_HOOKS_EH_PERSONALITY): Define. ada/ * gcc-interface/misc.c (gnat_init_gcc_eh): Do not set lang_eh_runtime_type. (LANG_HOOKS_EH_PERSONALITY): Define. (gnat_eh_personality_decl): New. (gnat_eh_personality): Likewise. * Make-lang.in (misc.o): Add gt-ada-misc.h dependency. * config-lang.in (gtfiles): Add misc.c. fortran/ * f95-lang.c (gfc_maybe_initialize_eh): Do not init eh_personality_libfunc. Co-Authored-By: Rafael Avila de Espindola <espindola@google.com> From-SVN: r151676
2009-09-10gcc/testsuite:Rainer Orth2-0/+7
PR ada/18302 * ada/acats/run_all.sh (target_run): Use run_test.exp to execute commands. * ada/acats/run_test.exp: New file. gcc/ada: PR ada/18302 * gcc-interface/Make-lang.in (check-acats): Export rootme, EXPECT. Co-Authored-By: James A. Morrison <phython@gcc.gnu.org> From-SVN: r151614
2009-09-08decl.c (gnat_to_gnu_entity): Tidy flow of control.Eric Botcazou2-95/+100
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Tidy flow of control. Avoid useless work when processing the Treat_As_Volatile flag. From-SVN: r151535
2009-09-08* gcc-interface/targtyps.c: Reorder include directives.Eric Botcazou2-1/+5
From-SVN: r151498
2009-09-07targtyps.c: Add missing include for tm_p.h.Laurent GUERBY3-4/+10
2009-09-07 Laurent GUERBY <laurent@guerby.net> * gcc-interface/targtyps.c: Add missing include for tm_p.h. * gcc-interface/Make-lang.in: Update dependencies. From-SVN: r151474
2009-09-07make.adb: Add missing documentation for multilib handling.Laurent GUERBY2-2/+25
2009-09-07 Laurent GUERBY <laurent@guerby.net> * make.adb: Add missing documentation for multilib handling. From-SVN: r151473
2009-09-03[multiple changes]Diego Novillo2-1/+5
2009-09-01 Diego Novillo <dnovillo@google.com> * c-lang.c (lang_hooks): Remove const qualifier. java/ChangeLog * lang.c (lang_hooks): Remove const qualifier. objc/ChangeLog * objc-lang.c (lang_hooks): Remove const qualifier. objcp/ChangeLog * objcp-lang.c (lang_hooks): Remove const qualifier. ada/ChangeLog * gcc-interface/misc.c (lang_hooks): Remove const qualifier. fortran/ChangeLog * f95-lang.c (lang_hooks): Remove const qualifier. cp/ChangeLog * cp-lang.c (lang_hooks): Remove const qualifier. 2009-09-01 Diego Novillo <dnovillo@google.com> * cgraph.c (cgraph_node_for_decl): New. * cgraph.h (cgraph_node_for_decl): Declare. * tree.c (host_integerp): Return 0 if T is NULL. 2009-09-01 Diego Novillo <dnovillo@google.com> * tree.h (struct alias_pair): Move from varasm.c. (alias_pairs): Likewise. (TYPE_MAXVAL): Define. (TYPE_MINVAL): Define. (iterative_hash_host_wide_int): Declare. (remove_unreachable_alias_pairs): Declare. * tree-pass.h (pass_ipa_free_lang_data): Declare. * diagnostic.c (default_diagnostic_starter): Make extern. (default_diagnostic_finalizer): Make extern. * diagnostic.h (default_diagnostic_starter): Declare. (default_diagnostic_finalizer): Declare. (default_tree_printer): Declare. * toplev.c (default_tree_printer): Make extern. 2009-09-01 Richard Guenther <rguenther@suse.de> Diego Novillo <dnovillo@google.com> * cgraph.c (cgraph_add_new_function): Remove gimplification. * cgraphunit.c (cgraph_expand_function): Do not emit associated thunks from here. (cgraph_emit_thunks): New. (cgraph_optimize): Call it. Return if any IPA pass finds an error. * varasm.c (finish_aliases_1): Ignore errorneous aliases used by thunks. 2009-09-01 Simon Baldwin <simonb@google.com> Rafael Espindola <espindola@google.com> Richard Guenther <rguenther@suse.de> Doug Kwan <dougkwan@google.com> Diego Novillo <dnovillo@google.com> * tree.c: Include tree-pass.h, langhooks-def.h, diagnostic.h, cgraph.h, timevar.h, except.h and debug.h. (free_lang_data_in_type): New. (need_assembler_name_p): New. (free_lang_data_in_block): New. (free_lang_data_in_decl): New. (struct free_lang_data_d): New. (add_tree_to_fld_list): New. (find_decls_types_r): New. (get_eh_types_for_runtime): New. (find_decls_types_in_eh_region): New. (find_decls_types_in_node): New. (find_decls_types_in_var): New. (free_lang_data_in_cgraph): New. (free_lang_data): New. (gate_free_lang_data): New. (pass_ipa_free_lang_data): New. 2009-09-01 Diego Novillo <dnovillo@google.com> * timevar.def (TV_IPA_FREE_LANG_DATA): Define. * langhooks.h (struct lang_hooks): Add field free_lang_data. (lang_hooks): Remove const qualifier. * ipa.c (cgraph_remove_unreachable_nodes): Call remove_unreachable_alias_pairs. * except.c (add_type_for_runtime): Check if TYPE has already been converted. (lookup_type_for_runtime): Likewise. (check_handled): Handle converted types. * varasm.c (remove_unreachable_alias_pairs): New. * gimple.c: Include demangle.h. (gimple_decl_printable_name): New. (gimple_fold_obj_type_ref): New. * gimple.h (gimple_decl_printable_name): Declare. (gimple_fold_obj_type_ref): Declare. * passes.c (init_optimization_passes): Add pass pass_ipa_free_lang_data. * langhooks-def.h (LANG_HOOKS_FREE_LANG_DATA): Define. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_FREE_LANG_DATA. testsuite/ChangeLog 2009-09-01 Diego Novillo <dnovillo@google.com> * gcc.dg/gomp/combined-1.c: Adjust expected pattern. * g++.dg/tree-prof/inline_mismatch_args.C: Likewise. * g++.dg/warn/unit-1.C: Likewise. * g++.dg/ipa/iinline-1.C: Likewise. * g++.dg/template/cond2.C: Adjust expected line location for the error. * g++.dg/template/pr35240.C: Likewise. cp/ChangeLog 2009-09-01 Doug Kwan <dougkwan@google.com> * tree.c (cp_fix_function_decl_p): New. (cp_free_lang_data): New. 2009-09-01 Diego Novillo <dnovillo@google.com> * Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H). * decl2.c: Include pointer-set.h. (collect_candidates_for_java_method_aliases): New. (cp_write_global_declarations): Call it. Add local variable CANDIDATES. If set, call build_java_method_aliases. (build_java_method_aliases): Add argument CANDIDATES. Use it to determine if FNDECL should get a hidden alias. * cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define. * cp-tree.h (cp_free_lang_data): Declare. 2009-09-03 Richard Guenther <rguenther@suse.de> * method.c (use_thunk): Use cgraph_finalize_function to hand off thunks to the cgraph. * semantics.c (emit_associated_thunks): Do not emit thunks for really extern functions. From-SVN: r151360
2009-09-02* tb-gcc.c (__gnat_backtrace): Mark all arguments unused.Richard Henderson2-3/+9
From-SVN: r151355
2009-09-02init.c (__gnat_error_handler, AIX): Add ATTRIBUTE_UNUSED on si and uc arguments.Olivier Hainque2-1/+8
* init.c (__gnat_error_handler, AIX): Add ATTRIBUTE_UNUSED on si and uc arguments. From-SVN: r151329
2009-09-02decl.c (cannot_be_superflat_p): Handle Signed_Integer_Type_Definition ↵Olivier Hainque2-4/+15
Scalar_Ranges. ada/ * gcc-interface/decl.c (cannot_be_superflat_p): Handle Signed_Integer_Type_Definition Scalar_Ranges. testsuite/ * gnat.dg/array7.ad[bs]: Add check for Signed_Integer_Type_Definition. From-SVN: r151322
2009-09-02trans.c (gnat_gimplify_expr): Gimplify the SAVE_EXPR built for misaligned ↵Eric Botcazou2-41/+37
arguments. * gcc-interface/trans.c (gnat_gimplify_expr) <ADDR_EXPR>: Gimplify the SAVE_EXPR built for misaligned arguments. Remove redundant stuff. (addressable_p): Return true for more rvalues. Co-Authored-By: Olivier Hainque <hainque@adacore.com> From-SVN: r151319
2009-09-01boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT type.Jakub Jelinek2-2/+8
* boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT type. * gcc-interface/utils2.c (maybe_wrap_malloc, maybe_wrap_free): Cast POINTER_SIZE to HOST_WIDE_INT. From-SVN: r151263