aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/trans.c
AgeCommit message (Collapse)AuthorFilesLines
2020-06-23Streamline implementation of renaming in gigiEric Botcazou1-35/+14
The main changes are 1) the bulk of the implementation is put back entirely in gnat_to_gnu_entity and 2) the handling of lvalues is unified, i.e. it no longer depends on the Materialize_Entity flag being present on the entity. gcc/ada/ChangeLog: * gcc-interface/ada-tree.h (DECL_RENAMED_OBJECT): Delete. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always use the stabilized reference directly for renaming and create a variable pointing to it separately if requested. * gcc-interface/misc.c (gnat_print_decl): Adjust for deletion. * gcc-interface/trans.c (Identifier_to_gnu): Likewise. (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not deal with side-effects here. <N_Exception_Renaming_Declaration>: Likewise.
2020-06-23Minor adjustment in assignment caseEric Botcazou1-4/+3
gcc/ada/ChangeLog: * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Do not test Is_Bit_Packed_Array in the memset path.
2020-06-19[Ada] Remove handling of 'Pos and 'Val attributes from gigiEric Botcazou1-13/+0
2020-06-19 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * gcc-interface/trans.c (lvalue_required_for_attribute_p): Do not deal with 'Pos or 'Val. (Attribute_to_gnu): Likewise. * gcc-interface/utils.c (create_field_decl): Small formatting fix.
2020-06-19[Ada] Consolidate handling of implicit dereferencesEric Botcazou1-55/+25
2020-06-19 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * gcc-interface/trans.c (adjust_for_implicit_deref): Delete. (maybe_implicit_deref): Likewise. (Attribute_to_gnu): Replace calls to maybe_implicit_deref by calls to maybe_padded_object. (Call_to_gnu): Likewise. (gnat_to_gnu) <N_Indexed_Component>: Likewise. <N_Slice>: Likewise. <N_Selected_Component>: Likewise. <N_Free_Statement>: Remove call to adjust_for_implicit_deref and manually make sure that the designated type is complete. * gcc-interface/utils2.c (build_simple_component_ref): Add comment.
2020-06-19[Ada] AI12-0028-1 Import of variadic C functionsEric Botcazou1-26/+116
2020-06-19 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_param): Tidy up. (gnat_to_gnu_subprog_type): For a variadic C function, do not build unnamed parameters and do not add final void node. * gcc-interface/misc.c: Include snames.h. * gcc-interface/trans.c (Attribute_to_gnu): Tidy up. (Call_to_gnu): Implement support for unnamed parameters in a variadic C function. * gcc-interface/utils.c: Include snames.h. (copy_type): Tidy up.
2020-06-04[Ada] Remove OpenACC supportArnaud Charlet1-671/+1
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * back_end.adb, opt.ads, par-prag.adb, sem_ch5.adb, sem_prag.adb, sinfo.adb, sinfo.ads, snames.ads-tmpl, doc/gnat_rm/implementation_defined_pragmas.rst: Remove experimental support for OpenACC. * gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/lang.opt: Ditto. * gnat_rm.texi: Regenerate. gcc/testsuite/ * gnat.dg/openacc1.adb: Remove testcase.
2020-05-25Fix wrong assignment to mutable Out parameter of task entryEric Botcazou1-4/+7
Under very specific circumstances the compiler can generate a wrong assignment to a mutable record object which contains an array component, because it does not correctly handle the update of the discriminant. gcc/ada/ChangeLog * gcc-interface/gigi.h (operand_type): New static inline function. * gcc-interface/trans.c (gnat_to_gnu): Do not suppress conversion to the resulty type at the end for array types. * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Do not remove conversions between array types on the LHS. gcc/testsuite/ChangeLog * gnat.dg/array39.adb: New test. * gnat.dg/array39_pkg.ads: New helper. * gnat.dg/array39_pkg.adb: Likewise.
2020-05-12Be prepared for more aggregates in gigiEric Botcazou1-2/+2
This makes sure that gigi is prepared to handle more aggregates in the special memset code path. * sem_aggr.ads (Is_Single_Aggregate): New function. * sem_aggr.adb (Is_Others_Aggregate): Use local variable. (Is_Single_Aggregate): New function to recognize an aggregate with a single association containing a single choice. * fe.h (Is_Others_Aggregate): Delete. (Is_Single_Aggregate): New declaration. * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Call Is_Single_Aggregate instead of Is_Others_Aggregate.
2020-05-09Update copyright yearEric Botcazou1-1/+1
2020-05-09Add assertion for access attributesEric Botcazou1-0/+3
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Access>: Assert that the prefix is not a type.
2020-05-09Do not make a local copy of large aggregateEric Botcazou1-13/+73
This prevents gigi from making a local copy of large aggregates. * gcc-interface/trans.c (lvalue_required_p) <N_Selected_Component>: Merge with N_Slice. <N_Allocator>: Move to... (lvalue_for_aggregate_p): ...here. New function. (Identifier_to_gnu): For an identifier with aggregate type, also call lvalue_for_aggregate_p if lvalue_required_p returned false before substituting the identifier with the constant.
2020-05-09Fix problematic cases of wrappingEric Botcazou1-2/+3
* gcc-interface/trans.c (gnat_to_gnu): Do not wrap boolean values if they appear in any kind of attribute references.
2020-05-09Accept qualified aggregates in memset pathEric Botcazou1-12/+16
Aggregates can be surrounded by a qualified expression and this prepares the support code in gigi for accepting them. * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Deal with qualified "others" aggregates in the memset case.
2020-05-09Small housekeeping work in gigiEric Botcazou1-54/+12
No functional changes. * gcc-interface/gigi.h (change_qualified_type): Move around. (maybe_vector_array): Likewise. (maybe_padded_object): New static line function. * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Component_Size>: Remove useless code. <Attr_Null_Parameter>: Remove obsolete code. (Call_to_gn): Likewise. Use maybe_padded_object to remove padding. (gnat_to_gnu): Likewise. <N_String_Literal>: Do not add a useless null character at the end. <N_Indexed_Component>: Likewise and remove obsolete code. (add_decl_expr): Likewise. (maybe_implicit_deref): Likewise. * gcc-interface/utils.c (maybe_unconstrained_array): Likewise. * gcc-interface/utils2.c (gnat_invariant_expr): Likewise.
2020-05-08Fix missing information in exception messages with -gnateEEric Botcazou1-25/+27
The information was missing in cases the front-end was able to turn the range comparison into a simple comparison. * gcc-interface/trans.c (Raise_Error_to_gnu): Always compute a lower bound and an upper bound for use by the -gnateE switch for range and comparison operators.
2019-12-18trans.c (Pragma_to_gnu): Push a diagnostics state for pragma Warnings (Off) ↵Eric Botcazou1-1/+15
before turning off all the... * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Push a diagnostics state for pragma Warnings (Off) before turning off all the warnings and only pop it for pragma Warnings (On). From-SVN: r279519
2019-12-16[Ada] Fully propagate representation aspects through renamingEric Botcazou1-2/+2
2019-12-16 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch8.adb (Analyze_Object_Renaming): Set Atomic, Independent and Volatile_Full_Access aspects on the entity of the renaming the same way as the Volatile aspect is set. * sem_util.ads (Is_Atomic_Object_Entity): Move declaration to... (Is_Independent_Object): New function. (Is_Volatile_Full_Access_Object): Likewise. * sem_util.adb (Is_Atomic_Object_Entity): ...here. (Prefix_Has_Atomic_Components): Minor tweak. (Is_Atomic_Object): Test Is_Atomic on the Etype uniformly. (Is_Atomic_Or_VFA_Object): Call Is_Volatile_Full_Access_Object. (Is_Independent_Object): New predicate. (Is_Subcomponent_Of_Atomic_Object): Remove redundant test. (Is_Volatile_Full_Access_Object): New predicate. (Is_Volatile_Prefix): Rename into... (Prefix_Has_Volatile_Components): ... and call Is_Volatile_Object. (Object_Has_Volatile_Components): Delete. (Is_Volatile_Object): Simplify. * gcc-interface/trans.c (node_is_volatile_full_access): Adjust comment. From-SVN: r279429
2019-12-16[Ada] Fix couple of oversights in the implementation of AI12-0128Eric Botcazou1-130/+145
2019-12-16 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_prag.adb (Atomic_Components): Remove local variable and fix consistency issues. Call Component_Type on the Etype of E. (Independent_Components): Remove local variable. * sem_util.adb (Is_Subcomponent_Of_Atomic_Object): Properly deal with prefixes that are access values. * gcc-interface/trans.c (atomic_acces_t): New enumeral type. (node_is_atomic) <N_Indexed_Component>: Test the prefix. (node_has_volatile_full_access): Rename into... (node_is_volatile_full_access): ...this. (node_is_component): New predicare. (gnat_strip_type_conversion): Delete. (outer_atomic_access_required_p): Likewise. (atomic_access_required_p): Rename into... (get_atomic_access): ...this. Implement the 3 different semantics of Atomic and Volatile_Full_Access. (simple_atomic_access_required_p): New predicate. (Call_to_gnu): Remove outer_atomic_access parameter and change the type of atomic_access parameter to atomic_acces_t. Replace call to atomic_access_required_p with simple_atomic_access_required_p for the in direction and call get_atomic_access for the out direction instead of [outer_]atomic_access_required_p. (lhs_or_actual_p): Constify local variables. (present_in_lhs_or_actual_p): Likewise. (gnat_to_gnu) <N_Identifier>: Replace call to atomic_access_required_p with simple_atomic_access_required_p. <N_Explicit_Dereference>: Likewise. <N_Indexed_Component>: Likewise. <N_Selected_Component>: Likewise. <N_Assignment_Statement>: Call get_atomic_access for the name instead of [outer_]atomic_access_required_p. Adjust call to Call_to_gnu. <N_Function_Call>: Adjust call to Call_to_gnu. (get_controlling_type): Fix typo in comment. From-SVN: r279427
2019-12-16[Ada] Implement RM C.6(19) clause entirely in the front-endEric Botcazou1-48/+6
2019-12-16 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_ch6.adb (Requires_Atomic_Or_Volatile_Copy): New predicate. (Expand_Actuals): Use it to decide whether to add call by copy code as per the RM C.6(19) clause. * fe.h (Is_Atomic_Object): Remove. (Is_Volatile_Object): Likewise. * sem_util.ads (Is_Atomic_Object): Remove WARNING note. (Is_Volatile_Object): Likewise. * gcc-interface/trans.c (atomic_or_volatile_copy_required_p): Delete. (Call_to_gnu): Do not implement the RM C.6(19) clause. From-SVN: r279414
2019-12-13[Ada] Deallocation of controlled type implementing interface typesJavier Miranda1-3/+4
2019-12-13 Javier Miranda <miranda@adacore.com> gcc/ada/ * exp_disp.ads (Expand_Interface_Thunk): Adding one formal (the interface type). * exp_disp.adb (Expand_Interface_Thunk): Using the added formal to ensure the correct profile of the thunk generated for predefined primitives; in addition, the added formal is also used to perform a check that ensures that the controlling type of the thunk is the one expected by the GCC backend. (Make_Secondary_DT, Register_Primitive): Adding the new formal to the calls to Expand_Interface_Thunk. * exp_ch6.adb (Register_Predefined_DT_Entry): Adding the new formal to the call to Expand_Interface_Thunk. * exp_intr.adb (Expand_Unc_Deallocation): When deallocating a controlled type and the call to unchecked deallocation is performed with a pointer to one of the convered interface types, displace the pointer to the object to reference the base of the object to deallocate its memory. * gcc-interface/trans.c (maybe_make_gnu_thunk): Assert that the controlling type of the thunk is an interface type. From-SVN: r279351
2019-11-25re PR ada/92362 (double elaboration of expression in Address aspect)Eric Botcazou1-4/+4
PR ada/92362 * gcc-interface/trans.c (gnat_to_gnu) <N_Attribute_Definition_Clause>: Use a temporary instead of clobbering the result with a freeze node. From-SVN: r278675
2019-10-11decl.c (elaborate_reference_1): Specifically deal with pointer displacement.Eric Botcazou1-2/+2
* gcc-interface/decl.c (elaborate_reference_1): Specifically deal with pointer displacement. * gcc-interface/decl.c (components_to_record): Use proper name. * gcc-interface/trans.c (Sloc_to_locus): Use standard types. From-SVN: r276874
2019-10-11decl.c (gnat_to_gnu_entity): New case to deal with the definition of named ↵Eric Botcazou1-8/+21
numbers. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Named_{Integer|Real}>: New case to deal with the definition of named numbers. <E_Variable>: Minor tweaks. Set DECL_IGNORED_P on the CONST_DECL if a corresponding variable is built. * gcc-interface/trans.c (gnat_to_gnu) <N_Integer_Literal>: Return error_mark_node instead of aborting on overflow for named numbers. <N_Number_Declaration>: Reuse the <N_Object_Declaration> case and deal with error_mark_node specifically. * gcc-interface/utils.c (create_var_decl): Do not set DECL_IGNORED_P on CONST_DECLs. (gnat_write_global_declarations): Output global constants. From-SVN: r276864
2019-09-23trans.c (Regular_Loop_to_gnu): Do not rotate the loop if -Og is enabled.Eric Botcazou1-4/+7
* gcc-interface/trans.c (Regular_Loop_to_gnu): Do not rotate the loop if -Og is enabled. (build_return_expr): Do not perform NRV if -Og is enabled. (Subprogram_Body_to_gnu): Likewise. (gnat_to_gnu) <N_Simple_Return_Statement>: Likewise. (Handled_Sequence_Of_Statements_to_gnu): Do not inline finalizers if -Og is enabled. * gcc-interface/utils.c (convert_to_index_type): Return early if -Og is enabled. From-SVN: r276047
2019-09-23trans.c (gnat_compile_time_expr_list): New variable.Eric Botcazou1-12/+32
* gcc-interface/trans.c (gnat_compile_time_expr_list): New variable. (Pragma_to_gnu): Rename local variable. Save the (first) expression of pragma Compile_Time_{Error|Warning} for later processing. (Compilation_Unit_to_gnu): Process the expressions saved above. From-SVN: r276045
2019-09-23trans.c (Attribute_to_gnu): Test Can_Use_Internal_Rep on the underlying type ↵Eric Botcazou1-25/+23
of the node. * gcc-interface/trans.c (Attribute_to_gnu): Test Can_Use_Internal_Rep on the underlying type of the node. (Call_to_gnu): Likewise with the type of the prefix. From-SVN: r276041
2019-08-30decl.c (maybe_saturate_size): New function.Eric Botcazou1-1/+1
* gcc-interface/decl.c (maybe_saturate_size): New function. (gnat_to_gnu_entity): Invoke it on the Esize of types before sending it for back-annotations. * gcc-interface/trans.c: Fix typo. From-SVN: r275200
2019-08-30ada-tree.h (DECL_FORCED_BY_REF_P): New macro.Eric Botcazou1-19/+11
* gcc-interface/ada-tree.h (DECL_FORCED_BY_REF_P): New macro. * gcc-interface/decl.c (gnat_to_gnu_param): Set it on parameters whose mechanism was forced to by-reference. * gcc-interface/trans.c (Call_to_gnu): Do not issue a warning about a misaligned actual parameter if it is based on a CONSTRUCTOR. Remove obsolete warning for users of Starlet. Issue a warning if a temporary is make around the call for a parameter with DECL_FORCED_BY_REF_P set. (addressable_p): Return true for REAL_CST and ADDR_EXPR. From-SVN: r275198
2019-08-30trans.c (gnat_to_gnu): Do not set the location on an expression used for a tag.Eric Botcazou1-2/+8
* gcc-interface/trans.c (gnat_to_gnu): Do not set the location on an expression used for a tag. From-SVN: r275197
2019-08-30trans.c (lvalue_required_p): Adjust GNU_TYPE in the recursive call.Eric Botcazou1-4/+6
* gcc-interface/trans.c (lvalue_required_p) <N_Slice>: Adjust GNU_TYPE in the recursive call. <N_Selected_Component>: Likewise. From-SVN: r275191
2019-08-30* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Add assertion.Eric Botcazou1-0/+3
From-SVN: r275187
2019-08-30gigi.h (gigi_checking_assert): New macro.Eric Botcazou1-123/+44
* gcc-interface/gigi.h (gigi_checking_assert): New macro. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>: Remove redundant test and adjust comments. Minor tweaks. * gcc-interface/trans.c (Call_to_gnu): Do not generate range checks, instead assert that the Do_Range_Check flag is not set. Adjust call to convert_with_check. (gnat_to_gnu): Likewise. (assoc_to_constructor): Likewise. (pos_to_constructor): Likewise. Remove GNAT_COMPONENT_TYPE parameter. (emit_range_check): Delete. (convert_with_check): Remove RANGE_P parameter and adjust. Do a single overflow check for modular types. From-SVN: r275174
2019-08-19[Ada] Fix thinko in Acc_Loop_to_gnuOlivier Hainque1-4/+1
This fixes a glitch introduced during the initial OpenACC work import process, causing crashes on any Acc_Parallel + Acc_Loop combination. 2019-08-19 Olivier Hainque <hainque@adacore.com> gcc/ada/ * gcc-interface/trans.c (Acc_Loop_to_gnu): Return the openacc BIND_EXPR node we have constructed on purpose. Remove unused variable. gcc/testsuite/ * gnat.dg/openacc1.adb: New testcase. From-SVN: r274638
2019-08-13Use checking forms of DECL_FUNCTION_CODE (PR 91421)Richard Sandiford1-5/+4
We were shoe-horning all built-in enumerations (including frontend and target-specific ones) into a field of type built_in_function. This was accessed as either an lvalue or an rvalue using DECL_FUNCTION_CODE. The obvious danger with this (as was noted by several ??? comments) is that the ranges have nothing to do with each other, and targets can easily have more built-in functions than generic code. But my patch to make the field bigger was the straw that finally made the problem visible. This patch therefore: - replaces the field with a plain unsigned int - turns DECL_FUNCTION_CODE into an rvalue-only accessor that checks that the function really is BUILT_IN_NORMAL - adds corresponding DECL_MD_FUNCTION_CODE and DECL_FE_FUNCTION_CODE accessors for BUILT_IN_MD and BUILT_IN_FRONTEND respectively - adds DECL_UNCHECKED_FUNCTION_CODE for places that need to access the underlying field (should be low-level code only) - adds new helpers for setting the built-in class and function code - makes DECL_BUILT_IN_CLASS an rvalue-only accessor too, since all assignments should go through the new helpers 2019-08-13 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR middle-end/91421 * tree-core.h (function_decl::function_code): Change type to unsigned int. * tree.h (DECL_FUNCTION_CODE): Rename old definition to... (DECL_UNCHECKED_FUNCTION_CODE): ...this. (DECL_BUILT_IN_CLASS): Make an rvalue macro only. (DECL_FUNCTION_CODE): New function. Assert that the built-in class is BUILT_IN_NORMAL. (DECL_MD_FUNCTION_CODE, DECL_FE_FUNCTION_CODE): New functions. (set_decl_built_in_function, copy_decl_built_in_function): Likewise. (fndecl_built_in_p): Change the type of the "name" argument to unsigned int. * builtins.c (expand_builtin): Move DECL_FUNCTION_CODE use after check for DECL_BUILT_IN_CLASS. * cgraphclones.c (build_function_decl_skip_args): Use set_decl_built_in_function. * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise. * ipa-split.c (split_function): Likewise. * langhooks.c (add_builtin_function_common): Likewise. * omp-simd-clone.c (simd_clone_create): Likewise. * tree-streamer-in.c (unpack_ts_function_decl_value_fields): Likewise. * config/darwin.c (darwin_init_cfstring_builtins): Likewise. (darwin_fold_builtin): Use DECL_MD_FUNCTION_CODE instead of DECL_FUNCTION_CODE. * fold-const.c (operand_equal_p): Compare DECL_UNCHECKED_FUNCTION_CODE instead of DECL_FUNCTION_CODE. * lto-streamer-out.c (hash_tree): Use DECL_UNCHECKED_FUNCTION_CODE instead of DECL_FUNCTION_CODE. * tree-streamer-out.c (pack_ts_function_decl_value_fields): Likewise. * print-tree.c (print_node): Use DECL_MD_FUNCTION_CODE when printing DECL_BUILT_IN_MD. Handle DECL_BUILT_IN_FRONTEND. * config/aarch64/aarch64-builtins.c (aarch64_expand_builtin) (aarch64_fold_builtin, aarch64_gimple_fold_builtin): Use DECL_MD_FUNCTION_CODE instead of DECL_FUNCTION_CODE. * config/aarch64/aarch64.c (aarch64_builtin_reciprocal): Likewise. * config/alpha/alpha.c (alpha_expand_builtin, alpha_fold_builtin): (alpha_gimple_fold_builtin): Likewise. * config/arc/arc.c (arc_expand_builtin): Likewise. * config/arm/arm-builtins.c (arm_expand_builtin): Likewise. * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise. * config/avr/avr.c (avr_expand_builtin, avr_fold_builtin): Likewise. * config/bfin/bfin.c (bfin_expand_builtin): Likewise. * config/c6x/c6x.c (c6x_expand_builtin): Likewise. * config/frv/frv.c (frv_expand_builtin): Likewise. * config/gcn/gcn.c (gcn_expand_builtin_1): Likewise. (gcn_expand_builtin): Likewise. * config/i386/i386-builtins.c (ix86_builtin_reciprocal): Likewise. (fold_builtin_cpu): Likewise. * config/i386/i386-expand.c (ix86_expand_builtin): Likewise. * config/i386/i386.c (ix86_fold_builtin): Likewise. (ix86_gimple_fold_builtin): Likewise. * config/ia64/ia64.c (ia64_fold_builtin): Likewise. (ia64_expand_builtin): Likewise. * config/iq2000/iq2000.c (iq2000_expand_builtin): Likewise. * config/mips/mips.c (mips_expand_builtin): Likewise. * config/msp430/msp430.c (msp430_expand_builtin): Likewise. * config/nds32/nds32-intrinsic.c (nds32_expand_builtin_impl): Likewise. * config/nios2/nios2.c (nios2_expand_builtin): Likewise. * config/nvptx/nvptx.c (nvptx_expand_builtin): Likewise. * config/pa/pa.c (pa_expand_builtin): Likewise. * config/pru/pru.c (pru_expand_builtin): Likewise. * config/riscv/riscv-builtins.c (riscv_expand_builtin): Likewise. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Likewise. * config/rs6000/rs6000-call.c (htm_expand_builtin): Likewise. (altivec_expand_dst_builtin, altivec_expand_builtin): Likewise. (rs6000_gimple_fold_builtin, rs6000_expand_builtin): Likewise. * config/rs6000/rs6000.c (rs6000_builtin_md_vectorized_function) (rs6000_builtin_reciprocal): Likewise. * config/rx/rx.c (rx_expand_builtin): Likewise. * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Likewise. * config/s390/s390.c (s390_expand_builtin): Likewise. * config/sh/sh.c (sh_expand_builtin): Likewise. * config/sparc/sparc.c (sparc_expand_builtin): Likewise. (sparc_fold_builtin): Likewise. * config/spu/spu-c.c (spu_resolve_overloaded_builtin): Likewise. * config/spu/spu.c (spu_expand_builtin): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin): Likewise. * config/tilegx/tilegx.c (tilegx_expand_builtin): Likewise. * config/tilepro/tilepro.c (tilepro_expand_builtin): Likewise. * config/xtensa/xtensa.c (xtensa_fold_builtin): Likewise. (xtensa_expand_builtin): Likewise. gcc/ada/ PR middle-end/91421 * gcc-interface/trans.c (gigi): Call set_decl_buillt_in_function. (Call_to_gnu): Use DECL_FE_FUNCTION_CODE instead of DECL_FUNCTION_CODE. gcc/c/ PR middle-end/91421 * c-decl.c (merge_decls): Use copy_decl_built_in_function. gcc/c-family/ PR middle-end/91421 * c-common.c (resolve_overloaded_builtin): Use copy_decl_built_in_function. gcc/cp/ PR middle-end/91421 * decl.c (duplicate_decls): Use copy_decl_built_in_function. * pt.c (declare_integer_pack): Use set_decl_built_in_function. gcc/d/ PR middle-end/91421 * intrinsics.cc (maybe_set_intrinsic): Use set_decl_built_in_function. gcc/jit/ PR middle-end/91421 * jit-playback.c (new_function): Use set_decl_built_in_function. gcc/lto/ PR middle-end/91421 * lto-common.c (compare_tree_sccs_1): Use DECL_UNCHECKED_FUNCTION_CODE instead of DECL_FUNCTION_CODE. * lto-symtab.c (lto_symtab_merge_p): Likewise. From-SVN: r274404
2019-08-02rework Ada EH Machine_Occurrence deallocationAlexandre Oliva1-44/+118
Introduce exception handler ABI #1 to ensure single release, no access after release of reraised Machine_Occurrences, and no failure to re-reraise a Machine_Occurrence. Unlike Ada exceptions, foreign exceptions do not get a new Machine_Occurrence upon reraise, but each handler would delete the exception upon completion, normal or exceptional, save for the case of a 'raise;' statement within the handler, that avoided the delete by clearing the exception pointer that the cleanup would use to release it. The cleared exception pointer might then be used by a subsequent reraise within the same handler. Get_Current_Excep.all would also expose the Machine_Occurrence to reuse by Reraise_Occurrence, even for native exceptions. Under ABI #1, Begin_Handler_v1 claims responsibility for releasing an exception by saving its cleanup and setting it to Claimed_Cleanup. End_Handler_v1 restores the cleanup and runs it, as long as it isn't still Claimed_Cleanup (which indicates an enclosing handler has already claimed responsibility for releasing it), and as long as the same exception is not being propagated up (the next handler of the propagating exception will then claim responsibility for releasing it), so reraise no longer needs to clear the exception pointer, and it can just propagate the exception, just like Reraise_Occurrence. ABI #1 is fully interoperable with ABI #0, i.e., exception handlers that call the #0 primitives can be linked together with ones that call the #1 primitives, and they will not misbehave. When a #1 handler claims responsibility for releasing an exception, even #0 reraises dynamically nested within it will refrain from releasing it. However, when a #0 handler is a handler of a foreign exception that would have been responsible for releasing it with #1, a Reraise_Occurrence of that foreign or other Machine_Occurrence-carrying exception may still cause the exception to be released multiple times, and to be used after it is first released, even if other handlers of the foreign exception use #1. for gcc/ada/ChangeLog * libgnat/a-exexpr.adb (Begin_Handler_v1, End_Handler_v1): New. (Claimed_Cleanup): New. (Begin_Handler, End_Handler): Document. * gcc-interface/trans.c (gigi): Switch to exception handler ABI #1. (Exception_Handler_to_gnu_gcc): Save the original cleanup returned by begin handler, pass it to end handler, and use EH_ELSE_EXPR to pass a propagating exception to end handler. (gnat_to_gnu): Leave the exception pointer alone for reraise. (add_cleanup): Handle EH_ELSE_EXPR, require it by itself. From-SVN: r274029
2019-07-08[Ada] Arrange not to set DECL_ARTIFICIAL on elab procsOlivier Hainque1-3/+7
Unlike, say, clones created internally by the compiler, elab procs materialize specific user code and flagging them artificial now takes elab code away from gcov's analysis, a regression compared to previous releases. On the testcase below: package Gcov_Q is function F (X : Integer) return Integer is (X + 1); end; with Gcov_Q; package Gcov_P is Y : Integer := Gcov_Q.F (X => 1); end; with Gcov_P; procedure Gcov_Test is begin if Gcov_P.Y /= 2 then raise Program_Error; end if; end; After compiling with: gnatmake -f -g gcov_test.adb \ -cargs -ftest-coverage -fprofile-arcs \ -largs -fprofile-generate and executing with ./gcov_test We expect gcov gcov_p to produce a gcov_p.ads.gcov report. 2019-07-08 Olivier Hainque <hainque@adacore.com> gcc/ada/ * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request DECL_ARTIFICIAL_P on elab proc declarations. From-SVN: r273207
2019-06-29trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on the main variant of a ↵Eric Botcazou1-1/+2
type, if any. * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on the main variant of a type, if any. From-SVN: r272815
2019-05-28trans.c (lvalue_required_for_attribute_p): Return 0 for 'Size too.Eric Botcazou1-18/+24
* gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0 for 'Size too. (Identifier_to_gnu): Use the actual subtype for a reference to a packed array in a return statement. (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from the prefix in every case. From-SVN: r271691
2019-05-28trans.c (gnat_to_gnu): Remove superfluous tests on ↵Eric Botcazou1-14/+11
Backend_Overflow_Checks_On_Target and rework comments. * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on Backend_Overflow_Checks_On_Target and rework comments. From-SVN: r271689
2019-05-28trans.c (walk_nesting_tree): New static function.Eric Botcazou1-5/+15
* gcc-interface/trans.c (walk_nesting_tree): New static function. (finalize_nrv): Use it to walk the entire nesting tree. From-SVN: r271685
2019-05-27trans.c (Call_to_gnu): Do not initialize the temporary created out of ↵Eric Botcazou1-6/+16
addressability concerns if... * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary created out of addressability concerns if it's for the _Init parameter of an initialization procedure. From-SVN: r271659
2019-05-27ada-builtin-types.def: New file.Eric Botcazou1-21/+56
* gcc-interface/ada-builtin-types.def: New file. * gcc-interface/ada-builtins.def: Likewise. * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro. (BUILT_IN_UNLIKELY): Likewise. * gcc-interface/trans.c (independent_iterations_p): Initialize the auto-vector to 16 elements. (Call_to_gnu): Remove local variable and change the vector of actual parameters to an auto-vector. Do not convert actual parameters to the argument type for front-end built-in functions. Add support for front-end built-in functions. (build_noreturn_cond): Use internal instead of built-in function. * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def (install_builtin_function_types): Likewise. (install_builtin_functions): Include ada-builtins.def first. From-SVN: r271658
2019-05-27trans.c (Identifier_to_gnu): Minor tweaks.Eric Botcazou1-7/+18
* gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks. (gnat_to_gnu): Do not convert the result if it is a reference to an unconstrained array used as the prefix of an attribute reference that requires an lvalue. From-SVN: r271653
2019-05-27trans.c (Gigi_Types_Compatible): New predicate.Eric Botcazou1-74/+86
* gcc-interface/trans.c (Gigi_Types_Compatible): New predicate. (Identifier_to_gnu): Use it to assert that the type of the identifier and that of its entity are compatible for gigi. Rename a couple of local variables and separate the processing of the result type. From-SVN: r271650
2019-05-27trans.c (Call_to_gnu): Use the unpadded type when putting back an ↵Eric Botcazou1-1/+1
intermediate conversion the type of... * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when putting back an intermediate conversion the type of the actuals. From-SVN: r271647
2019-05-27trans.c (gnat_to_gnu): Convert the count to the unsigned version of its base ↵Eric Botcazou1-29/+32
type before proceeding. * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the count to the unsigned version of its base type before proceeding. From-SVN: r271646
2019-05-17trans.c (check_inlining_for_nested_subprog): Quote reserved names.Martin Sebor1-2/+3
gcc/ada/ChangeLog: * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote reserved names. gcc/brig/ChangeLog: * brigfrontend/brig-control-handler.cc (brig_directive_control_handler::operator): Remove trailing newline from a diagnostic. * brigfrontend/brig-module-handler.cc (brig_directive_module_handler::operator): Remove a duplicated space from a diagnostic. gcc/c/ChangeLog: * c-decl.c (start_decl): Quote keywords, operators, and types in diagnostics. (finish_decl): Same. * c-parser.c (c_parser_asm_statement): Same. (c_parser_conditional_expression): Same. (c_parser_transaction_cancel): Same. * c-typeck.c (c_common_type): Same. (build_conditional_expr): Same. (digest_init): Same. (process_init_element): Same. (build_binary_op): Same. gcc/c-family/ChangeLog: * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers, keywords, operators, and types in diagnostics. (handle_scalar_storage_order_attribute): Same. (handle_mode_attribute): Same. (handle_visibility_attribute): Same. (handle_assume_aligned_attribute): Same. (handle_no_split_stack_attribute): Same. * c-common.c (shorten_compare): Same. (c_common_truthvalue_conversion): Same. (cb_get_source_date_epoch): Same. * c-lex.c (cb_def_pragma): Quote keywords, operators, and types in diagnostics. (interpret_float): Same. * c-omp.c (c_finish_omp_for): Same. * c-opts.c (c_common_post_options): Same. * c-pch.c (c_common_pch_pragma): Same. * c-pragma.c (pop_alignment): Same. (handle_pragma_pack): Same. (apply_pragma_weak): Same. (handle_pragma_weak): Same. (handle_pragma_scalar_storage_order): Same. (handle_pragma_redefine_extname): Same. (add_to_renaming_pragma_list): Same. (maybe_apply_renaming_pragma): Same. (push_visibility): Same. (handle_pragma_visibility): Same. (handle_pragma_optimize): Same. (handle_pragma_message): Same. * c-warn.c (warn_for_omitted_condop): Same. (lvalue_error): Same. gcc/cp/ChangeLog: * call.c (print_z_candidate): Wrap diagnostic text in a gettext macro. Adjust. (print_z_candidates): Same. (build_conditional_expr_1): Quote keywords, operators, and types in diagnostics. (build_op_delete_call): Same. (maybe_print_user_conv_context): Wrap diagnostic text in a gettext macro. (convert_like_real): Same. (convert_arg_to_ellipsis): Quote keywords, operators, and types in diagnostics. (build_over_call): Same. (joust): Break up an overlong line. Wrap diagnostic text in a gettext macro. * constexpr.c (cxx_eval_check_shift_p): Spell out >= in English. (cxx_eval_constant_expression): Quote keywords, operators, and types in diagnostics. (potential_constant_expression_1): Same. * cp-gimplify.c (cp_genericize_r): Same. * cvt.c (maybe_warn_nodiscard): Quote keywords, operators, and types in diagnostics. (type_promotes_to): Same. * decl.c (check_previous_goto_1): Same. (check_goto): Same. (start_decl): Same. (cp_finish_decl): Avoid parenthesizing a sentence for consistency. (grok_op_properties): Quote keywords, operators, and types in diagnostics. * decl2.c (grokfield): Same. (coerce_delete_type): Same. * except.c (is_admissible_throw_operand_or_catch_parameter): Same. * friend.c (do_friend): Quote C++ tokens. * init.c (build_new_1): Quote keywords, operators, and types in diagnostics. (build_vec_delete_1): Same. (build_delete): Same. * lex.c (parse_strconst_pragma): Same. (handle_pragma_implementation): Same. (unqualified_fn_lookup_error): Same. * mangle.c (write_type): Same. * method.c (defaulted_late_check): Avoid two consecutive punctuators. * name-lookup.c (cp_binding_level_debug): Remove a trailing newline. (pop_everything): Same. * parser.c (cp_lexer_start_debugging): Quote a macro name. in a diagnostic (cp_lexer_stop_debugging): Same. (cp_parser_userdef_numeric_literal): Quote a C++ header name in a diagnostic. (cp_parser_nested_name_specifier_opt): Quote keywords, operators, and types in diagnostics. (cp_parser_question_colon_clause): Same. (cp_parser_asm_definition): Same. (cp_parser_init_declarator): Same. (cp_parser_template_declaration_after_parameters): Avoid capitalizing a sentence in a diagnostic. (cp_parser_omp_declare_reduction): Quote keywords, operators, and types in diagnostics. (cp_parser_transaction): Same. * pt.c (maybe_process_partial_specialization): Replace second call to permerror with inform for consistency with other uses. (expand_integer_pack): Quote keywords, operators, and types in diagnostics. * rtti.c (get_typeid): Quote keywords, operators, and types in diagnostics. (build_dynamic_cast_1): Same. * semantics.c (finish_asm_stmt): Same. (finish_label_decl): Same. (finish_bases): Same. (finish_offsetof): Same. (cp_check_omp_declare_reduction): Same. (finish_decltype_type): Same. * tree.c (handle_init_priority_attribute): Same. Add detail to diagnostics. (maybe_warn_zero_as_null_pointer_constant): Same. * typeck.c (cp_build_binary_op): Quote keywords, operators, and types in diagnostics. (cp_build_unary_op): Same. (check_for_casting_away_constness): Same. (build_static_cast): Same. (build_const_cast_1): Same. (maybe_warn_about_returning_address_of_local): Same. (check_return_expr): Same. * typeck2.c (abstract_virtuals_error_sfinae): Same. (digest_init_r): Replace a tab with spaces in a diagnostic. (build_functional_cast): Quote keywords, operators, and types in diagnostics. gcc/d/ChangeLog: * d-builtins.cc (d_init_builtins): Quote keywords, operators, and types in diagnostics. * d-codegen.cc (get_array_length): Same. Replace can't with cannot. * d-convert.cc (convert_expr): Same. * d-frontend.cc (getTypeInfoType): Quote an option name in a diagnostic. * d-lang.cc (d_handle_option): Same. (d_parse_file): Same. * decl.cc: Remove a trailing period from a diagnostic. * expr.cc: Use a directive for an apostrophe. * toir.cc: Quote keywords, operators, and types in diagnostics. * typeinfo.cc (build_typeinfo): Quote an option name in a diagnostic. gcc/fortran/ChangeLog: * gfortranspec.c (append_arg): Spell out the word "argument." gcc/ChangeLog: * config/i386/i386-expand.c (get_element_number): Quote keywords and other internal names in diagnostics. Adjust other diagnostic formatting issues noted by -Wformat-diag. * config/i386/i386-features.c (ix86_mangle_function_version_assembler_name): Same. * config/i386/i386-options.c (ix86_handle_abi_attribute): Same. * config/i386/i386.c (ix86_function_type_abi): Same. (ix86_function_ms_hook_prologue): Same. (classify_argument): Same. (ix86_expand_prologue): Same. (ix86_md_asm_adjust): Same. (ix86_memmodel_check): Same. gcc/ChangeLog: * builtins.c (expand_builtin_atomic_always_lock_free): Quote identifiers, keywords, operators, and types in diagnostics. Correct quoting, spelling, and sentence capitalization issues. (expand_builtin_atomic_is_lock_free): Same. (fold_builtin_next_arg): Same. * cfgexpand.c (expand_one_var): Same. (tree_conflicts_with_clobbers_p): Same. (expand_asm_stmt): Same. (verify_loop_structure): Same. * cgraphunit.c (process_function_and_variable_attributes): Same. * collect-utils.c (collect_execute): Same. * collect2.c (maybe_run_lto_and_relink): Same. (is_lto_object_file): Same. (scan_prog_file): Same. * convert.c (convert_to_real_1): Same. * dwarf2out.c (dwarf2out_begin_prologue): Same. * except.c (verify_eh_tree): Same. * gcc.c (execute): Same. (eval_spec_function): Same. (run_attempt): Same. (driver::set_up_specs): Same. (compare_debug_auxbase_opt_spec_function): Same. * gcov-tool.c (unlink_gcda_file): Same. (do_merge): Same. (do_rewrite): Same. * gcse.c (gcse_or_cprop_is_too_expensive): Same. * gimplify.c (gimplify_asm_expr): Same. (gimplify_adjust_omp_clauses): Same. * hsa-gen.c (gen_hsa_addr_insns): Same. (gen_hsa_insns_for_load): Same. (gen_hsa_cmp_insn_from_gimple): Same. (gen_hsa_insns_for_operation_assignment): Same. (gen_get_level): Same. (gen_hsa_alloca): Same. (omp_simple_builtin::generate): Same. (gen_hsa_atomic_for_builtin): Same. (gen_hsa_insns_for_call): Same. * input.c (dump_location_info): Same. * ipa-devirt.c (compare_virtual_tables): Same. * ira.c (ira_setup_eliminable_regset): Same. * lra-assigns.c (lra_assign): Same. * lra-constraints.c (lra_constraints): Same. * lto-streamer-in.c (lto_input_mode_table): Same. * lto-wrapper.c (get_options_from_collect_gcc_options): Same. (merge_and_complain): Same. (compile_offload_image): Same. (compile_images_for_offload_targets): Same. (debug_objcopy): Same. (run_gcc): Same. (main): Same. * opts.c (print_specific_help): Same. (parse_no_sanitize_attribute): Same. (print_help): Same. (handle_param): Same. * plugin.c (add_new_plugin): Same. (parse_plugin_arg_opt): Same. (try_init_one_plugin): Same. * print-rtl.c (debug_bb_n_slim): Quote identifiers, keywords, operators, and types in diagnostics. Correct quoting and spelling issues. * read-rtl-function.c (parse_edge_flag_token): Same. (function_reader::parse_enum_value): Same. * reg-stack.c (check_asm_stack_operands): Same. * regcprop.c (validate_value_data): Same. * sched-rgn.c (make_pass_sched_fusion): Same. * stmt.c (check_unique_operand_names): Same. * targhooks.c (default_target_option_pragma_parse): Same. * tlink.c (recompile_files): Same. * toplev.c (process_options): Same. (do_compile): Same. * trans-mem.c (diagnose_tm_1): Same. (ipa_tm_scan_irr_block): Same. (ipa_tm_diagnose_transaction): Same. * tree-cfg.c (verify_address): Same. Use get_tree_code_name to format a tree code name in a diagnostic. (verify_types_in_gimple_min_lval): Same. (verify_types_in_gimple_reference): Same. (verify_gimple_call): Same. (verify_gimple_assign_unary): Same. (verify_gimple_assign_binary): Same. (verify_gimple_assign_ternary): Same. (verify_gimple_assign_single): Same. (verify_gimple_switch): Same. (verify_gimple_label): Same. (verify_gimple_phi): Same. (verify_gimple_in_seq): Same. (verify_eh_throw_stmt_node): Same. (collect_subblocks): Same. (gimple_verify_flow_info): Same. (do_warn_unused_result): Same. * tree-inline.c (expand_call_inline): Same. * tree-into-ssa.c (update_ssa): Same. * tree.c (tree_int_cst_elt_check_failed): Same. (tree_vec_elt_check_failed): Same. (omp_clause_operand_check_failed): Same. (verify_type_variant): Same. (verify_type): Same. * value-prof.c (verify_histograms): Same. * varasm.c (assemble_start_function): Same. gcc/lto/ChangeLog: * lto-dump.c (lto_main): Same. * lto.c (stream_out): Same. gcc/objc/ChangeLog: * objc-act.c (objc_begin_catch_clause): Quote keywords and options in diagnostics. (objc_build_throw_stmt): Same. (objc_finish_message_expr): Same. (get_super_receiver): Same. * objc-next-runtime-abi-01.c (objc_next_runtime_abi_01_init): Spell out "less than" in English./ * objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init): Spell out "greater" in English. gcc/testsuite/ChangeLog: * c-c++-common/Wbool-operation-1.c: Adjust text of expected diagnostics. * c-c++-common/Wvarargs-2.c: Same. * c-c++-common/Wvarargs.c: Same. * c-c++-common/pr51768.c: Same. * c-c++-common/tm/inline-asm.c: Same. * c-c++-common/tm/safe-1.c: Same. * g++.dg/asm-qual-1.C: Same. * g++.dg/asm-qual-3.C: Same. * g++.dg/conversion/dynamic1.C: Same. * g++.dg/cpp0x/constexpr-89599.C: Same. * g++.dg/cpp0x/constexpr-cast.C: Same. * g++.dg/cpp0x/constexpr-shift1.C: Same. * g++.dg/cpp0x/lambda/lambda-conv11.C: Same. * g++.dg/cpp0x/nullptr04.C: Same. * g++.dg/cpp0x/static_assert12.C: Same. * g++.dg/cpp0x/static_assert8.C: Same. * g++.dg/cpp1y/lambda-conv1.C: Same. * g++.dg/cpp1y/pr79393-3.C: Same. * g++.dg/cpp1y/static_assert1.C: Same. * g++.dg/cpp1z/constexpr-if4.C: Same. * g++.dg/cpp1z/constexpr-if5.C: Same. * g++.dg/cpp1z/constexpr-if9.C: Same. * g++.dg/eh/goto2.C: Same. * g++.dg/eh/goto3.C: Same. * g++.dg/expr/static_cast8.C: Same. * g++.dg/ext/flexary5.C: Same. * g++.dg/ext/utf-array-short-wchar.C: Same. * g++.dg/ext/utf-array.C: Same. * g++.dg/ext/utf8-2.C: Same. * g++.dg/gomp/loop-4.C: Same. * g++.dg/gomp/macro-4.C: Same. * g++.dg/gomp/udr-1.C: Same. * g++.dg/init/initializer-string-too-long.C: Same. * g++.dg/other/offsetof9.C: Same. * g++.dg/ubsan/pr63956.C: Same. * g++.dg/warn/Wbool-operation-1.C: Same. * g++.dg/warn/Wtype-limits-Wextra.C: Same. * g++.dg/warn/Wtype-limits.C: Same. * g++.dg/wrappers/pr88680.C: Same. * g++.old-deja/g++.mike/eh55.C: Same. * gcc.dg/Wsign-compare-1.c: Same. * gcc.dg/Wtype-limits-Wextra.c: Same. * gcc.dg/Wtype-limits.c: Same. * gcc.dg/Wunknownprag.c: Same. * gcc.dg/Wunsuffixed-float-constants-1.c: Same. * gcc.dg/asm-6.c: Same. * gcc.dg/asm-qual-1.c: Same. * gcc.dg/cast-1.c: Same. * gcc.dg/cast-2.c: Same. * gcc.dg/cast-3.c: Same. * gcc.dg/cpp/source_date_epoch-2.c: Same. * gcc.dg/debug/pr85252.c: Same. * gcc.dg/dfp/cast-bad.c: Same. * gcc.dg/format/gcc_diag-1.c: Same. * gcc.dg/format/gcc_diag-11.c: Same.New test. * gcc.dg/gcc_diag-11.c: Same.New test. * gcc.dg/gnu-cond-expr-2.c: Same. * gcc.dg/gnu-cond-expr-3.c: Same. * gcc.dg/gomp/macro-4.c: Same. * gcc.dg/init-bad-1.c: Same. * gcc.dg/init-bad-2.c: Same. * gcc.dg/init-bad-3.c: Same. * gcc.dg/pr27528.c: Same. * gcc.dg/pr48552-1.c: Same. * gcc.dg/pr48552-2.c: Same. * gcc.dg/pr59846.c: Same. * gcc.dg/pr61096-1.c: Same. * gcc.dg/pr8788-1.c: Same. * gcc.dg/pr90082.c: Same. * gcc.dg/simd-2.c: Same. * gcc.dg/spellcheck-params-2.c: Same. * gcc.dg/spellcheck-params.c: Same. * gcc.dg/strlenopt-49.c: Same. * gcc.dg/tm/pr52141.c: Same. * gcc.dg/torture/pr51106-1.c: Same. * gcc.dg/torture/pr51106-2.c: Same. * gcc.dg/utf-array-short-wchar.c: Same. * gcc.dg/utf-array.c: Same. * gcc.dg/utf8-2.c: Same. * gcc.dg/warn-sprintf-no-nul.c: Same. * gcc.target/i386/asm-flag-0.c: Same. * gcc.target/i386/inline_error.c: Same. * gcc.target/i386/pr30848.c: Same. * gcc.target/i386/pr39082-1.c: Same. * gcc.target/i386/pr39678.c: Same. * gcc.target/i386/pr57756.c: Same. * gcc.target/i386/pr68843-1.c: Same. * gcc.target/i386/pr79804.c: Same. * gcc.target/i386/pr82673.c: Same. * obj-c++.dg/class-protocol-1.mm: Same. * obj-c++.dg/exceptions-3.mm: Same. * obj-c++.dg/exceptions-4.mm: Same. * obj-c++.dg/exceptions-5.mm: Same. * obj-c++.dg/exceptions-6.mm: Same. * obj-c++.dg/method-12.mm: Same. * obj-c++.dg/method-13.mm: Same. * obj-c++.dg/method-6.mm: Same. * obj-c++.dg/method-7.mm: Same. * obj-c++.dg/method-9.mm: Same. * obj-c++.dg/method-lookup-1.mm: Same. * obj-c++.dg/proto-lossage-4.mm: Same. * obj-c++.dg/protocol-qualifier-2.mm: Same. * objc.dg/call-super-2.m: Same. * objc.dg/class-protocol-1.m: Same. * objc.dg/desig-init-1.m: Same. * objc.dg/exceptions-3.m: Same. * objc.dg/exceptions-4.m: Same. * objc.dg/exceptions-5.m: Same. * objc.dg/exceptions-6.m: Same. * objc.dg/method-19.m: Same. * objc.dg/method-2.m: Same. * objc.dg/method-5.m: Same. * objc.dg/method-6.m: Same. * objc.dg/method-7.m: Same. * objc.dg/method-lookup-1.m: Same. * objc.dg/proto-hier-1.m: Same. * objc.dg/proto-lossage-4.m: Same. From-SVN: r271338
2019-02-08trans.c (gnat_to_gnu): Minor tweak.Eric Botcazou1-5/+4
* gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak. * gcc-interface/utils.c (convert): Do not pad when doing an unchecked conversion here. Use TREE_CONSTANT throughout the function. (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the destination is a more aligned array type or a larger aggregate type, but not between original and packable versions of a type. From-SVN: r268679
2019-02-08trans.c (elaborate_all_entities): Do not elaborate the entities of a package ↵Eric Botcazou1-1/+2
renaming another one. * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the entities of a package renaming another one. From-SVN: r268674
2019-02-08trans.c (Regular_Loop_to_gnu): Replace tests on individual ↵Eric Botcazou1-6/+5
flag_unswitch_loops and flag_tree_loop_vectorize... * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on individual flag_unswitch_loops and flag_tree_loop_vectorize switches with test on global optimize switch. (Raise_Error_to_gnu): Likewise. From-SVN: r268671