aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-18* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: New.Eric Botcazou1-0/+6
From-SVN: r202690
2013-08-13decl.c (gnat_to_gnu_entity): Do not bother about alias sets of derived types ↵Eric Botcazou1-1/+1
in ASIS mode. * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias sets of derived types in ASIS mode. From-SVN: r201705
2013-08-13decl.c (gnat_to_gnu_entity): Replace True with true.Eric Botcazou1-10/+10
* gcc-interface/decl.c (gnat_to_gnu_entity): Replace True with true. (is_cplusplus_method): Likewise, and False with false. (components_need_strict_alignment): Likewise. * gcc-interface/misc.c (gnat_init_gcc_fp): Likewise. * gcc-interface/trans.c (Loop_Statement_to_gnu): Likewise. (Handled_Sequence_Of_Statements_to_gnu): Likewise. (add_cleanup): Likewise. (Sloc_to_locus1): Likewise. (Sloc_to_locus): Likewise. (set_expr_location_from_node): Likewise. * gcc-interface/utils.c (potential_alignment_gap): Likewise. From-SVN: r201704
2013-06-13ada-tree.h (DECL_BY_DOUBLE_REF_P): Delete.Eric Botcazou1-24/+5
* gcc-interface/ada-tree.h (DECL_BY_DOUBLE_REF_P): Delete. * gcc-interface/gigi.h (annotate_object): Adjust prototype. (convert_vms_descriptor): Likewise. * gcc-interface/decl.c (gnat_to_gnu_param): Do not pass fat pointer types by double dereference. (annotate_object): Remove BY_DOUBLE_REF parameter and adjust. (gnat_to_gnu_entity): Adjust calls to annotate_object. * gcc-interface/trans.c (Identifier_to_gnu): Do not deal with double dereference. (Call_to_gnu): Likewise. (build_function_stub): Adjust call to convert_vms_descriptor. (Subprogram_Body_to_gnu): Adjust call to annotate_object. * gcc-interface/utils.c (convert_vms_descriptor): Remove BY_REF parameter and adjust. From-SVN: r200057
2013-05-26decl.c: (gnat_to_gnu_entity): In ASIS mode, do not check that access types ↵Eric Botcazou1-3/+6
have a set size. * gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not check that access types have a set size. From-SVN: r199343
2013-05-26decl.c (vinfo_t): New type and associated vector.Eric Botcazou1-87/+158
* gcc-interface/decl.c (vinfo_t): New type and associated vector. (components_to_record): Change return type to bool. Lay out the variants in two passes. Do not force a specific layout for the variant part if the variants do not have a representation clause. Take the alignment of the variant part into account when laying out variants without rep clause in a record type with a partial rep clause. (create_rep_part): Do not set the position of the field. From-SVN: r199342
2013-05-26gigi.h (create_type_decl): Adjust prototype.Eric Botcazou1-131/+137
* gcc-interface/gigi.h (create_type_decl): Adjust prototype. (create_label_decl): Complete prototype. (process_attributes): Declare. * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust multiple calls to create_type_decl throughout. <E_Enumeration_Type>: Do the layout of the type manually and call process_attributes on it. Reindent. <E_Enumeration_Subtype>: Minor tweak. <E_Floating_Point_Subtype>: Reindent. <E_Array_Subtype>: Call process_attributes on the array type built for a packed array type. <E_Record_Type>: Call process_attributes on the type. <E_Record_Subtype>: Likewise. <E_Access_Type>: Likewise. <E_Subprogram_Type>: Likewise. Likewise for all types at the end of the processing. * gcc-interface/utils.c (make_aligning_type): Adjust call to create_type_decl. (maybe_pad_type): Likewise. (create_index_type): Likewise. (create_type_decl): Remove attr_list parameter and associated code. (create_var_decl_1): Call process_attributes on the variable. (process_attributes): Take a pointer to the object and add in_place and gnat_node parameters and adjust throughout. <ATTR_MACHINE_ATTRIBUTE>: Pass ATTR_FLAG_TYPE_IN_PLACE only on demand and set the input location. Zap the attribute list at the end. (create_subprog_decl): Call process_attributes on the subprogram. (build_unc_object_type): Adjust call to create_type_decl. (handle_vector_type_attribute): Remove dead code. From-SVN: r199338
2013-05-26gigi.h (make_aligning_type): Adjust prototype.Eric Botcazou1-1/+1
* gcc-interface/gigi.h (make_aligning_type): Adjust prototype. * gcc-interface/utils.c (make_aligning_type): Take GNAT_NODE parameter for the position of the associated TYPE_DECL. * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to above. * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise. From-SVN: r199337
2013-05-26decl.c (gnat_to_gnu_entity): Do not prematurely elaborate the full view of a ↵Eric Botcazou1-2/+5
type with a freeze node. * gcc-interface/decl.c (gnat_to_gnu_entity): Do not prematurely elaborate the full view of a type with a freeze node. * gcc-interface/trans.c (process_type): Add explicit predicate. From-SVN: r199336
2013-05-26decl.c (gnat_to_gnu_entity): Always build the UNC variable for aliased ↵Eric Botcazou1-19/+12
objects with unconstrained nominal... * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Always build the UNC variable for aliased objects with unconstrained nominal subtype. From-SVN: r199335
2013-05-24gigi.h (enum inline_status_t): New type.Eric Botcazou1-6/+9
* gcc-interface/gigi.h (enum inline_status_t): New type. (create_subprog_decl): Adjust prototype. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust calls to create_subprog_decl. (get_minimal_subprog_decl): Likewise. * gcc-interface/trans.c (gigi): Likewise. (build_raise_check): Likewise. (establish_gnat_vms_condition_handler): Likewise. (Compilation_Unit_to_gnu): Likewise. (gnat_to_gnu): Likewise. * gcc-interface/utils.c (create_subprog_decl): Change inline_flag parameter to inline_status and implement for suppressed inlining. From-SVN: r199286
2013-05-24decl.c (gnat_to_gnu_entity): Constify a handful of local variables.Eric Botcazou1-13/+60
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Constify a handful of local variables. For a derived untagged type that renames discriminants, change the type of the stored discriminants to a subtype with the bounds of the type of the visible discriminants. (build_subst_list): Rename local variable. From-SVN: r199279
2013-05-07re PR ada/56474 (bogus Storage_Error raised for record containing empty ↵Eric Botcazou1-5/+10
zero-based array) PR ada/56474 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Use int_const_binop to shift bounds by 1 when they are integer constants. From-SVN: r198663
2013-04-11stor-layout.c (skip_simple_constant_arithmetic): Move to...Eric Botcazou1-4/+5
* stor-layout.c (skip_simple_constant_arithmetic): Move to... * tree.c (skip_simple_constant_arithmetic): ...here and make public. (skip_simple_arithmetic): Tidy up. * tree.h (skip_simple_constant_arithmetic): Declare. ada/ * gcc-interface/decl.c (elaborate_expression_1): Skip only constant arithmetics when looking for a read-only variable in the expression. From-SVN: r197815
2013-03-06decl.c (gnat_to_gnu_field): Remove the wrapper around a misaligned integral ↵Eric Botcazou1-0/+7
type if... * gcc-interface/decl.c (gnat_to_gnu_field): Remove the wrapper around a misaligned integral type if a size is specified for the field. From-SVN: r196506
2013-02-06Revert previous change, unintended.Arnaud Charlet1-69/+19
From-SVN: r195805
2013-02-06[multiple changes]Arnaud Charlet1-19/+69
2013-02-06 Vincent Celier <celier@adacore.com> * prj-proc.adb (Process_Aggregated_Projects): Use a new project node tree for each project tree rooted at an aggregated project. 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com> * sem_util.adb (Is_Interface_Conversion): New routine. (Object_Access_Level): Detect an interface conversion that has been rewritten into a different construct. Use the original form of the conversion to find the access level of the operand. 2013-02-06 Eric Botcazou <ebotcazou@adacore.com> * einfo.ads (Has_Pragma_No_Inline): New flag using Flag201. (Has_Pragma_No_Inline): Declare and mark as inline. (Set_Has_Pragma_No_Inline): Likewise. * einfo.adb (Has_Pragma_No_Inline): New function. (Set_Has_Pragma_No_Inline): New procedure. (Write_Entity_Flags): Handle Has_Pragma_No_Inline. * snames.ads-tmpl (Name_No_Inline): New pragma-related name. (Pragma_Id): Add Pragma_No_Inline value. * par-prag.adb (Prag): Handle Pragma_Inline. * sem_prag.adb (Inline_Status): New enumeration type. (Process_Inline): Change Active parameter to Inline_Status and add support for suppressed inlining. (Analyze_Pragma) <Pragma_Inline>: Adjust to above change. <Pragma_Inline_Always>: Likewise. <Pragma_No_Inline>: Implement new pragma No_Inline. (Sig_Flags): Add Pragma_No_Inline. * gnat_rm.texi (Implementation Defined Pragmas): Add No_Inline. * gnat_ugn.texi (Switches for gcc): Mention Pragma No_Inline. 2013-02-06 Pascal Obry <obry@adacore.com> * s-osprim-mingw.adb (Clock): Make sure we copy all data locally to avoid interleaved modifications that could happen from another task calling Get_Base_Data. (Get_Base_Data): Make it a critical section. Avoid updating if another task has already done it. From-SVN: r195801
2013-02-03decl.c: Include diagnostic-core.h.Eric Botcazou1-0/+5
* gcc-interface/decl.c: Include diagnostic-core.h. (gnat_to_gnu_entity) <E_Array_Type>: Sorry if Reverse_Storage_Order is set on the entity. <E_Record_Type>: Likewise. * gcc-interface/Make-lang.in (ada/decl.o): Add $(DIAGNOSTIC_CORE_H). From-SVN: r195694
2013-01-07decl.c (gnat_to_gnu_entity): Adjust comment about type extension with ↵Eric Botcazou1-8/+5
discriminants. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust comment about type extension with discriminants. <E_Record_Subtype>: Remove useless test and reorder conditions. (elaborate_entity) <E_Record_Subtype>: Likewise. From-SVN: r194965
2013-01-06decl.c (gnat_to_gnu_field): Emit a specialized diagnostic for component size ↵Olivier Hainque1-5/+21
mismatch wrt volatile requirements. * gcc-interface/decl.c (gnat_to_gnu_field): Emit a specialized diagnostic for component size mismatch wrt volatile requirements. Add a gcc_unreachable() at the end of the checks for size. Split the check on volatile for positions into one check on atomic and a subsequent one on volatile. From-SVN: r194946
2013-01-06* gcc-interface/decl.c (elaborate_entity) <E_Record_Type>: Delete.Eric Botcazou1-12/+0
From-SVN: r194945
2013-01-06decl.c (gnat_to_gnu_entity): Do not pack the field of the record type made ↵Eric Botcazou1-3/+6
for a misaligned type. * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not pack the field of the record type made for a misaligned type. From-SVN: r194942
2013-01-06decl.c (annotate_value): Be prepared for discriminants inherited from parent ↵Eric Botcazou1-11/+18
record types. * gcc-interface/decl.c (annotate_value) <COMPONENT_REF>: Be prepared for discriminants inherited from parent record types. From-SVN: r194939
2012-11-28stor-layout.c (layout_type): Do not clear TREE_OVERFLOW on overflowed ↵Eric Botcazou1-27/+29
zeroes, except in one specific case. * stor-layout.c (layout_type) <ARRAY_TYPE>: Do not clear TREE_OVERFLOW on overflowed zeroes, except in one specific case. ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use valid_constant_size_p to detect too large objects. <E_Subprogram_Type>: Likewise for too large return types. (allocatable_size_p): Call valid_constant_size_p in the fixed case. (annotate_value) <INTEGER_CST>: Simplify. <BIT_AND_EXPR>: Deal with negative values here. * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use valid_constant_size_p to detect too large objects on the LHS. * gcc-interface/misc.c (default_pass_by_ref): Likewise for large types. And use TYPE_SIZE_UNIT throughout. (must_pass_by_ref): Likewise. * gcc-interface/utils.c (max_size) <tcc_unary>: Split from common case. <tcc_binary>: Likewise. Call size_binop instead of fold_build2. <tcc_expression>: Simplify. * gcc-interface/utils2.c (build_allocator): Use valid_constant_size_p to detect too large allocations. From-SVN: r193886
2012-11-23decl.c (components_need_strict_alignment): New.Eric Botcazou1-7/+45
* gcc-interface/decl.c (components_need_strict_alignment): New. (components_to_record): Do not pack the variants if one of the fields needs strict alignment. Likewise for the variant part as a whole. Specify the position of the variants even if the size isn't specified, but do not specify the size of the variant part in this case. From-SVN: r193750
2012-11-20Introduce vNULL to use as a nil initializer for vec<>.Diego Novillo1-2/+2
This patch implements Jakub's idea of adding an empty struct with a typecast operator that returns nil vectors. This is useful to shorten all the initializers when declaring vec instances or passing nil vectors as function arguments. 2012-11-20 Diego Novillo <dnovillo@google.com> Jakub Jelinek <jakub@redhat.com> ChangeLog * vec.h (struct vnull): Declare. (vNULL): Declare. * vec.c (vNULL): Define. * bb-reorder.c: Replace all vec<T, A>() initializers with vNULL. * cfgexpand.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cgraph.c: Likewise. * config/c6x/c6x.c: Likewise. * config/i386/i386.c: Likewise. * df-core.c: Likewise. * dominance.c: Likewise. * dwarf2out.c: Likewise. * except.c: Likewise. * function.c: Likewise. * gcse.c: Likewise. * genautomata.c: Likewise. * graphds.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ira-build.c: Likewise. * lto-cgraph.c: Likewise. * lto-streamer-in.c: Likewise. * lto-symtab.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * ree.c: Likewise. * sched-deps.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * stor-layout.c: Likewise. * trans-mem.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-data-ref.c: Likewise. * tree-diagnostic.c: Likewise. * tree-eh.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-predcom.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-stdarg.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * value-prof.c: Likewise. * varasm.c: Likewise. ada/ChangeLog * gcc-interface/decl.c: Replace all vec<T,A>() initializers with vNULL. cp/ChangeLog * name-lookup.c: Replace all vec<T, A>() initializers with vNULL. * semantics.c: Likewise. fortran/ChangeLog * trans-openmp.c: Replace all vec<T, A>() initializers with vNULL. lto/ChangeLog * lto.c: Replace all vec<T, A>() initializers with vNULL. objc/ChangeLog * objc-act.c: Replace all vec<T, A>() initializers with vNULL. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r193677
2012-11-18decl.c: Remove trailing spaces.Eric Botcazou1-2/+2
* gcc-interface/decl.c: Remove trailing spaces. * gcc-interface/trans.c: Remove trailing spaces. From-SVN: r193597
2012-11-17This patch rewrites the old VEC macro-based interface into a new one based ↵Diego Novillo1-43/+41
on the template class 'vec'. This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'. The user-visible changes are described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec. I have tested the patch pretty extensively: - Regular bootstraps on x86_64, ppc, ia64, sparc and hppa. - Bootstraps with --enable-checking=release - Bootstraps with --enable-checking=gc,gcac - Basic builds on all targets (using contrib/config-list.mk). We no longer access the vectors via VEC_* macros. The pattern is "VEC_operation (T, A, V, args)" becomes "V.operation (args)". The only thing I could not do is create proper ctors and dtors for the vec class. Since these vectors are stored in unions, we have to keep them as PODs (C++03 does not allow non-PODs in unions). This means that creation and destruction must be explicit. There is a new method vec<type, allocation, layout>::create() and another vec<type, allocation, layout>::destroy() to allocate the internal vector. For vectors that must be pointers, there is a family of free functions that implement the operations that need to tolerate NULL vectors. These functions all start with the prefix 'vec_safe_'. See the wiki page for details. The gengtype change removes the special handling for VEC() that used to exist in gengtype. Additionally, it allows gengtype to recognize templates of more than one argument and introduces the concept of an undefined type (useful for template arguments that may or may not be types). When a TYPE_UNDEFINED is reached, gengtype will ignore it if it happens inside a type marked with GTY((user)). Otherwise, it will emit an error. Finally, gengtype rejects root types marked GTY((user)) that are not first class pointers. 2012-11-16 Diego Novillo <dnovillo@google.com> VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec) * vec.c (register_overhead): Convert it into member function of vec_prefix. (release_overhead): Likewise. (calculate_allocation): Likewise. (vec_heap_free): Remove. (vec_gc_o_reserve_1): Remove. (vec_heap_o_reserve_1): Remove. (vec_stack_o_reserve_1): Remove. (vec_stack_o_reserve_exact): Remove. (register_stack_vec): New. (stack_vec_register_index): New. (unregister_stack_vec): New. (vec_assert_fail): Remove. * vec.h: Conditionally include ggc.h. Document conditional hackery. Update top-level documentation. (ALONE_VEC_CHECK_INFO): Remove. (VEC_CHECK_INFO): Remove. (ALONE_VEC_CHECK_DECL): Remove. (VEC_CHECK_DECL): Remove. (ALONE_VEC_CHECK_PASS): Remove. (VEC_CHECK_PASS): Remove. (VEC_ASSERT): Remove. (vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and va_stack. Mark fields alloc_ and num_ as protected. (struct vec_t): Remove. Remove all function members. (struct vl_embed): Declare. (struct vl_ptr): Declare. (free): Remove. (reserve_exact): Remove. (reserve): Remove. (safe_splice): Remove. (safe_push): Remove. (safe_grow): Remove. (safe_grow_cleared): Remove. (safe_insert): Remove. (DEF_VEC_I): Remove. (DEF_VEC_ALLOC_I): Remove. (DEF_VEC_P): Remove. (DEF_VEC_ALLOC_P): Remove. (DEF_VEC_O): Remove. (DEF_VEC_ALLOC_O): Remove. (DEF_VEC_ALLOC_P_STACK): Remove. (DEF_VEC_ALLOC_O_STACK): Remove. (DEF_VEC_ALLOC_I_STACK): Remove. (DEF_VEC_A): Remove. (DEF_VEC_ALLOC_A): Remove. (vec_stack_p_reserve_exact_1): Remove. (vec_stack_o_reserve): Remove. (vec_stack_o_reserve_exact): Remove. (VEC_length): Remove. (VEC_empty): Remove. (VEC_address): Remove. (vec_address): Remove. (VEC_last): Remove. (VEC_index): Remove. (VEC_iterate): Remove. (VEC_embedded_size): Remove. (VEC_embedded_init): Remove. (VEC_free): Remove. (VEC_copy): Remove. (VEC_space): Remove. (VEC_reserve): Remove. (VEC_reserve_exact): Remove. (VEC_splice): Remove. (VEC_safe_splice): Remove. (VEC_quick_push): Remove. (VEC_safe_push): Remove. (VEC_pop): Remove. (VEC_truncate): Remove. (VEC_safe_grow): Remove. (VEC_replace): Remove. (VEC_quick_insert): Remove. (VEC_safe_insert): Remove. (VEC_ordered_remove): Remove. (VEC_unordered_remove): Remove. (VEC_block_remove): Remove. (VEC_lower_bound): Remove. (VEC_alloc): Remove. (VEC_qsort): Remove. (va_heap): Declare. (va_heap::default_layout): New typedef to vl_ptr. (va_heap::reserve): New. (va_heap::release): New. (va_gc): Declare. (va_gc::default_layout): New typedef to vl_embed. (va_gc::reserve): New. (va_gc::release): New. (va_gc_atomic): Declare. Inherit from va_gc. (va_stack): Declare. (va_stack::default_layout): New typedef to vl_ptr. (va_stack::alloc): New. (va_stack::reserve): New. (va_stack::release): New. (register_stack_vec): Declare. (stack_vec_register_index): Declare. (unregister_stack_vec): Declare. (vec<T, A = va_heap, L = typename A::default_layout>): Declare empty vec template. (vec<T, A, vl_embed>): Partial specialization for embedded layout. (vec<T, A, vl_embed>::allocated): New. (vec<T, A, vl_embed>::length): New. (vec<T, A, vl_embed>::is_empty): New. (vec<T, A, vl_embed>::address): New. (vec<T, A, vl_embed>::operator[]): New. (vec<T, A, vl_embed>::last New. (vec<T, A, vl_embed>::space): New. (vec<T, A, vl_embed>::iterate): New. (vec<T, A, vl_embed>::iterate): New. (vec<T, A, vl_embed>::copy): New. (vec<T, A, vl_embed>::splice): New. (vec<T, A, vl_embed>::quick_push New. (vec<T, A, vl_embed>::pop New. (vec<T, A, vl_embed>::truncate): New. (vec<T, A, vl_embed>::quick_insert): New. (vec<T, A, vl_embed>::ordered_remove): New. (vec<T, A, vl_embed>::unordered_remove): New. (vec<T, A, vl_embed>::block_remove): New. (vec<T, A, vl_embed>::qsort): New. (vec<T, A, vl_embed>::lower_bound): New. (vec<T, A, vl_embed>::embedded_size): New. (vec<T, A, vl_embed>::embedded_init): New. (vec<T, A, vl_embed>::quick_grow): New. (vec<T, A, vl_embed>::quick_grow_cleared): New. (vec_safe_space): New. (vec_safe_length): New. (vec_safe_address): New. (vec_safe_is_empty): New. (vec_safe_reserve): New. (vec_safe_reserve_exact): New. (vec_alloc): New. (vec_free): New. (vec_safe_grow): New. (vec_safe_grow_cleared): New. (vec_safe_iterate): New. (vec_safe_push): New. (vec_safe_insert): New. (vec_safe_truncate): New. (vec_safe_copy): New. (vec_safe_splice): New. (vec<T, A, vl_ptr>): New partial specialization for the space efficient layout. (vec<T, A, vl_ptr>::exists): New. (vec<T, A, vl_ptr>::is_empty): New. (vec<T, A, vl_ptr>::length): New. (vec<T, A, vl_ptr>::address): New. (vec<T, A, vl_ptr>::operator[]): New. (vec<T, A, vl_ptr>::operator!=): New. (vec<T, A, vl_ptr>::operator==): New. (vec<T, A, vl_ptr>::last): New. (vec<T, A, vl_ptr>::space): New. (vec<T, A, vl_ptr>::iterate): New. (vec<T, A, vl_ptr>::copy): New. (vec<T, A, vl_ptr>::reserve): New. (vec<T, A, vl_ptr>::reserve_exact): New. (vec<T, A, vl_ptr>::splice): New. (vec<T, A, vl_ptr>::safe_splice): New. (vec<T, A, vl_ptr>::quick_push): New. (vec<T, A, vl_ptr>::safe_push): New. (vec<T, A, vl_ptr>::pop): New. (vec<T, A, vl_ptr>::truncate): New. (vec<T, A, vl_ptr>::safe_grow): New. (vec<T, A, vl_ptr>::safe_grow_cleared): New. (vec<T, A, vl_ptr>::quick_grow): New. (vec<T, A, vl_ptr>::quick_grow_cleared): New. (vec<T, A, vl_ptr>::quick_insert): New. (vec<T, A, vl_ptr>::safe_insert): New. (vec<T, A, vl_ptr>::ordered_remove): New. (vec<T, A, vl_ptr>::unordered_remove): New. (vec<T, A, vl_ptr>::block_remove): New. (vec<T, A, vl_ptr>::qsort): New. (vec<T, A, vl_ptr>::lower_bound): New. (vec_stack_alloc): Define. (FOR_EACH_VEC_SAFE_ELT): Define. * vecir.h: Remove. Update all users. * vecprim.h: Remove. Update all users. Move uchar to coretypes.h. * Makefile.in (VEC_H): Add $(GGC_H). Remove vecir.h and vecprim.h dependencies everywhere. 2012-11-16 Diego Novillo <dnovillo@google.com> * gengtype-lex.l (VEC): Remove. Add characters in the set [\!\>\.-]. * gengtype-parse.c (token_names): Remove "VEC". (require_template_declaration): Remove handling of VEC_TOKEN. (type): Likewise. Call create_user_defined_type when parsing GTY((user)). * gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED. (write_state_undefined_type): New. (write_state_type): Call write_state_undefined_type for TYPE_UNDEFINED. (read_state_type): Call read_state_undefined_type for TYPE_UNDEFINED. * gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED. (create_user_defined_type): Make extern. (type_for_name): Factor out of resolve_typedef. (create_undefined_type): New (resolve_typedef): Call it when we cannot find a previous typedef and the type is not a template. (find_structure): Accept TYPE_UNDEFINED. (set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES, default to false. Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or ALLOWED_UNDEFINED_TYPES is set. Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT. (filter_type_name): Accept templates with more than one argument. (output_mangled_typename): Handle TYPE_UNDEFINED (walk_type): Likewise. (write_types_process_field): Likewise. (write_func_for_structure): If CHAIN_NEXT is set, ORIG_S should not be a user-defined type. (write_types_local_user_process_field): Handle TYPE_ARRAY, TYPE_NONE and TYPE_UNDEFINED. (write_types_local_process_field): Likewise. (contains_scalar_p): Return 0 for TYPE_USER_STRUCT. (write_root): Reject user-defined types that are not pointers. Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT and TYPE_PARAM_STRUCT. (output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and TYPE_ARRAY. (dump_typekind): Handle TYPE_UNDEFINED. * gengtype.h (enum typekind): Add TYPE_UNDEFINED. (create_user_defined_type): Declare. (enum gty_token): Remove VEC_TOKEN. 2012-11-16 Diego Novillo <dnovillo@google.com> Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec) * coretypes.h (uchar): Define. * alias.c: Use new vec API in vec.h. * asan.c: Likewise. * attribs.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * builtins.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * coverage.c: Likewise. * cprop.c: Likewise. * data-streamer.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * domwalk.h: Likewise. * dse.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * dwarf2out.h: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genextract.c: Likewise. * genopinit.c: Likewise * ggc-common.c: Likewise. * ggc.h: Likewise. * gimple-low.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple.c: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graph.c: Likewise. * graphds.c: Likewise. * graphds.h: Likewise. * graphite-blocking.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-poly.h: Likewise. * graphite-scop-detection.c: Likewise. * graphite-scop-detection.h: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * godump.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * hw-doloop.h: Likewise. * ifcvt.c: Likewise. * insn-addr.h: Likewise. * ipa-cp.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-inline.h: Likewise. * ipa-prop.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref-inline.h: Likewise. * ipa-ref.c: Likewise. * ipa-ref.h: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira.c: Likewise. * loop-invariant.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-lives.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * mcf.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * opts-common.c: Likewise. * opts-global.c: Likewise. * opts.c: Likewise. * opts.h: Likewise. * passes.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * profile.h: Likewise. * read-rtl.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regrename.c: Likewise. * regrename.h: Likewise. * reload.c: Likewise. * reload.h: Likewise. * reload1.c: Likewise. * rtl.h: Likewise. * sched-deps.c: Likewise. * sched-int.h: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * sese.h: Likewise. * statistics.h: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * trans-mem.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-mudflap.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-streamer.h: Likewise. * tree-switch-conversion.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.h: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/pa.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/spu/spu-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. From-SVN: r193595
2012-10-22decl.c (gnat_to_gnu_entity): Force BLKmode on the type if it is passed by ↵Eric Botcazou1-4/+16
reference. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Force BLKmode on the type if it is passed by reference. <E_Array_Subtype>: Likewise. <E_Record_Type>: Guard the call to Is_By_Reference_Type predicate. <E_Record_Subtype>: Likewise. From-SVN: r192673
2012-10-22decl.c (gnat_to_gnu_entity): In type annotation mode, break circularities ↵Eric Botcazou1-8/+56
introduced by AI05-0151. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: In type annotation mode, break circularities introduced by AI05-0151. From-SVN: r192671
2012-10-22decl.c (gnat_to_gnu_entity): Do not generate the special PARM_DECL for an ↵Eric Botcazou1-1/+5
Out parameter in LTO mode. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Out_Parameter>: Do not generate the special PARM_DECL for an Out parameter in LTO mode. From-SVN: r192667
2012-10-02decl.c (elaborate_expression_1): Use the variable for bounds of loop ↵Eric Botcazou1-0/+1
iteraration scheme only for locally defined... * gcc-interfaces/decl.c (elaborate_expression_1): Use the variable for bounds of loop iteraration scheme only for locally defined subtypes. * gcc-interface/trans.c (gigi): Fix formatting. (build_return_expr): Apply the NRV optimization only for BLKmode. From-SVN: r191971
2012-09-10Remove unnecessary VEC function overloads.Diego Novillo1-9/+4
Several VEC member functions that accept an element 'T' used to have two overloads: one taking 'T', the second taking 'T *'. This used to be needed because of the interface dichotomy between vectors of objects and vectors of pointers. In the past, vectors of pointers would use pass-by-value semantics, but vectors of objects would use pass-by-reference semantics. This is no longer necessary, but the distinction had remained. The main side-effect of this change is some code reduction in code that manipulates vectors of objects. For instance, - struct iterator_use *iuse; - - iuse = VEC_safe_push (iterator_use, heap, iterator_uses, NULL); - iuse->iterator = iterator; - iuse->ptr = ptr; + struct iterator_use iuse = {iterator, ptr}; + VEC_safe_push (iterator_use, heap, iterator_uses, iuse); Compile time performance was not affected. Tested on x86_64 and ppc64. Also built all-gcc on all targets using VEC routines: arm, bfin, c6x, epiphany, ia64, mips, sh, spu, and vms. 2012-09-10 Diego Novillo <dnovillo@google.com> * vec.h (vec_t::quick_push): Remove overload that accepts 'T *'. Update all users. (vec_t::safe_push): Likewise. (vec_t::quick_insert): Likewise. (vec_t::lower_bound): Likewise. (vec_t::safe_insert): Likewise. (vec_t::replace): Change second argument to 'T &'. From-SVN: r191165
2012-08-19decl.c (gnat_to_gnu_entity): Use proper dummy type for the temporary ↵Eric Botcazou1-2/+3
COMPONENT_REF built for a derived... * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use proper dummy type for the temporary COMPONENT_REF built for a derived tagged type with discriminant. From-SVN: r190514
2012-07-19decl.c (gnat_to_gnu_entity): Try to ensure that an object of CW type ↵Eric Botcazou1-1/+12
initialized to a value is sufficiently... * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Try to ensure that an object of CW type initialized to a value is sufficiently aligned for this value. From-SVN: r189682
2012-07-19decl.c (gnat_to_gnu_entity): Do not look up the REP part of the base type in ↵Eric Botcazou1-6/+6
advance. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Do not look up the REP part of the base type in advance. Deal with that of the variant types. (get_rep_part): Be prepared for record types with fields. From-SVN: r189666
2012-07-16decl.c (intrin_return_compatible_p): Map Address to void *.Tristan Gingold1-0/+4
2012-07-16 Tristan Gingold <gingold@adacore.com> * decl.c (intrin_return_compatible_p): Map Address to void *. From-SVN: r189536
2012-07-03exp_disp.adb (Expand_Dispatching_Call): Propagate the convention on the ↵Eric Botcazou1-3/+49
designated subprogram type and also set... * exp_disp.adb (Expand_Dispatching_Call): Propagate the convention on the designated subprogram type and also set Is_Dispatch_Table_Entity. (Expand_Interface_Thunk): Propagate the convention on the thunk. (Set_CPP_Constructors_Old): Set Is_Constructor and Convention_CPP on the internal view of the constructors. (Set_CPP_Constructors): Likewise. * sem_prag.adb (Analyze_Pragma) <Pragma_CPP_Constructor>: Set the convention on the function. * gcc-interface/gigi.h (is_cplusplus_method): Declare. * gcc-interface/decl.c (Has_Thiscall_Convention): New macro. (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the `thiscall' calling convention (get_minimal_subprog_decl): Likewise. (is_cplusplus_method): New predicate. * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Access>: Issue an error on access to C++ constructor or member function. From-SVN: r189199
2012-06-13RevertEric Botcazou1-74/+3
2012-05-19 Eric Botcazou <ebotcazou@adacore.com> * gcc-interface/decl.c (Has_Thiscall_Convention): New macro. (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall calling convention (get_minimal_subprog_decl): Likewise. (gnat_first_param_is_class): New predicate. From-SVN: r188512
2012-06-11decl.c (gnat_to_gnu_entity): Convert GNU_SIZE to units before invoking ↵Eric Botcazou1-62/+54
allocatable_size_p on it. * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Convert GNU_SIZE to units before invoking allocatable_size_p on it. Remove orphaned comment. Do not use ssize_int. <E_Record_Subtype>: Traverse list in original order. Minor tweak. (allocatable_size_p): Adjust and simplify. (build_subst_list): Use consistent terminology throughout. (build_variant_list): Likewise. Traverse list in original order. (create_field_decl_from): Likewise. (copy_and_substitute_in_size): Likewise. (create_variant_part_from): Add comment about field list order. * gcc-interface/utils.c (build_vms_descriptor): Do not use ssize_int. * gcc-interface/utils2.c (build_allocator): Likewise. From-SVN: r188382
2012-06-11decl.c (gnat_to_gnu_entity): Do not specifically deal with external ↵Eric Botcazou1-3/+4
constants wrt force_global here... * gcc-interface/decl.c (gnat_to_gnu_entity): Do not specifically deal with external constants wrt force_global here... <E_Constant>: ...but here instead. * gcc-interface/utils.c (gnat_pushdecl): Do not put external DECLs onto the list of global DECLs. From-SVN: r188379
2012-06-11decl.c (gnat_to_gnu_entity): Translate the Esize on entry only for ↵Eric Botcazou1-8/+11
elementary types and abort if it is too large. * gcc-interface/decl.c (gnat_to_gnu_entity): Translate the Esize on entry only for elementary types and abort if it is too large. <E_Record_Type>: Make sure the Esize is known before using it. From-SVN: r188378
2012-05-26decl.c (variant_desc): Rename 'record' to 'new_type'.Eric Botcazou1-8/+15
* gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'. (build_variant_list): Adjust to above renaming. (gnat_to_gnu_entity) <E_Record_Subtype>: Likewise. Give a unique name to the type of the variant containers. (create_variant_part_from): Likewise. Give a unique name to the type of the variant part. From-SVN: r187908
2012-05-19decl.c (Has_Thiscall_Convention): New macro.Eric Botcazou1-3/+74
* gcc-interface/decl.c (Has_Thiscall_Convention): New macro. (gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall calling convention (get_minimal_subprog_decl): Likewise. (gnat_first_param_is_class): New predicate. * gcc-interface/misc.c (gnat_handle_option): Fix formatting. * gcc-interface/Makefile.in: Likewise. From-SVN: r187676
2012-05-18decl.c (gnat_to_gnu_entity): For an object at global level with ↵Eric Botcazou1-0/+8
unconstrained nominal subtype and a... * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an object at global level with unconstrained nominal subtype and a non-fixed size, make a variable for the size. From-SVN: r187666
2012-05-06decl.c (gnat_to_gnu_entity): In the renaming case...Eric Botcazou1-0/+8
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the renaming case, use the padded type if the renamed object has an unconstrained type with default discriminant. From-SVN: r187209
2012-05-06gigi.h (make_packable_type): Declare.Eric Botcazou1-658/+13
* gcc-interface/gigi.h (make_packable_type): Declare. (make_type_from_size): Likewise. (relate_alias_sets): Likewise. (maybe_pad_type): Adjust. (init_gnat_to_gnu): Delete. (destroy_gnat_to_gnu): Likewise. (init_dummy_type): Likewise. (destroy_dummy_type): Likewise. (init_gnat_utils): Declare. (destroy_gnat_utils): Likewise. (ceil_pow2): New inline function. * gcc-interface/decl.c (gnat_to_gnu_entity): Use ceil_pow2. <object>: Pass True for the final processing of alignment and size. <E_Subprogram_Type>: Only create the TYPE_DECL for a padded return type if necessary. (round_up_to_align): Delete. (ceil_alignment): Likewise. (relate_alias_sets): Move to... (make_aligning_type): Likewise. (make_packable_type): Likewise. (maybe_pad_type): Likewise. (make_type_from_size): Likewise. * gcc-interface/utils.c (MAX_BITS_PER_WORD): Delete. (struct pad_type_hash): New type. (pad_type_hash_table): New static variable. (init_gnat_to_gnu): Merge into... (init_dummy_type): Likewise. (init_gnat_utils): ...this. New function. (destroy_gnat_to_gnu): Merge into... (destroy_dummy_type): Likewise. (destroy_gnat_utils): ...this. New function. (pad_type_hash_marked_p): New function. (pad_type_hash_hash): Likewise. (pad_type_hash_eq): Likewise. (relate_alias_sets): ...here. (make_aligning_type): Likewise. (make_packable_type): Likewise. (maybe_pad_type): Likewise. Change same_rm_size parameter into set_rm_size; do not set TYPE_ADA_SIZE if it is false. Do not set null as Ada size. Do not set TYPE_VOLATILE on the padded type. If it is complete and has constant size, canonicalize it. Bail out earlier if a warning need not be issued. (make_type_from_size): Likewise. <INTEGER_TYPE>: Bail out if size is too large (gnat_types_compatible_p): Do not deal with padded types. (convert): Compare main variants for padded types. * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_utils. (gnat_to_gnu): Do not convert at the end for a call to a function that returns an unconstrained type with default discriminant. (Attribute_to_gnu) <Attr_Size>: Simplify handling of padded objects. * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Likewise. Do not use the padded type if it is BLKmode and the inner type is non-BLKmode. From-SVN: r187206
2012-04-30decl.c (gnat_to_gnu_entity): In type annotation mode...Eric Botcazou1-22/+42
* gcc-interface/decl.c (gnat_to_gnu_entity): In type annotation mode, do not adjust the size of a tagged type if there is a representation clause on it. Otherwise, round the adjustment up to the alignment of the first field and use the appropriate helper routine. (maybe_pad_type): Do not warn in type annotation mode on a tagged type. (gnat_to_gnu_field): Do not error out under the same circumstances. (annotate_rep): In type annotation mode, do not adjust the offset of components of a tagged type with representation clause. Otherwise, round the adjustment up to the alignment of the first field. From-SVN: r186961
2012-04-30gigi.h (mark_out_of_scope): Delete.Eric Botcazou1-38/+0
* gcc-interface/gigi.h (mark_out_of_scope): Delete. (destroy_gnat_to_gnu): Declare. (destroy_dummy_type): Likewise. * gcc-interface/decl.c (mark_out_of_scope): Delete. * gcc-interface/utils.c (destroy_gnat_to_gnu): New function. (destroy_dummy_type): Likewise. * gcc-interface/trans.c (gnat_validate_uc_list): New variable. (gigi): Call validate_unchecked_conversion on gnat_validate_uc_list after the translation is completed.  Call destroy_gnat_to_gnu and destroy_dummy_type at the end. (Subprogram_Body_to_gnu): Do not call mark_out_of_scope. (gnat_to_gnu) <N_Block_Statement>: Likewise. <N_Validate_Unchecked_Conversion>: Do not process the node, only push it onto gnat_validate_uc_list. (validate_unchecked_conversion): New function. From-SVN: r186956
2012-03-31RevertEric Botcazou1-18/+0
2012-03-25 Eric Botcazou <ebotcazou@adacore.com> * gcc-interface/decl.c (SS_MARK_NAME): New define. (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities whose name is SS_MARK_NAME. From-SVN: r186038