diff --git a/ChangeLog b/ChangeLog index 2d93178906f1..e0662790934c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-11-06 Hafiz Abid Qadeer + + * config/iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS. + Append $INCICONV to it. + 2018-11-04 Stafford Horne * MAINTAINERS (Write After Approval): Add myself. diff --git a/config/iconv.m4 b/config/iconv.m4 index 5f9304a6ba6f..f1e54c5aedc9 100644 --- a/config/iconv.m4 +++ b/config/iconv.m4 @@ -73,7 +73,7 @@ AC_DEFUN([AM_ICONV_LINK], if test "$am_cv_func_iconv" != yes; then am_save_CPPFLAGS="$CPPFLAGS" am_save_LIBS="$LIBS" - CPPFLAGS="$LIBS $INCICONV" + CPPFLAGS="$CPPFLAGS $INCICONV" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d30e600ec37..c3e77f3e27e5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,123 @@ +2018-11-08 David Malcolm + + PR ipa/86395 + * doc/invoke.texi (-fdump-ipa-): Document the "-optimized", + "-missed", "-note", and "-all" sub-options. + * ipa-inline.c (caller_growth_limits): Port from fprintf to dump + API. + (can_early_inline_edge_p): Likewise. + (want_early_inline_function_p): Likewise. + (want_inline_self_recursive_call_p): Likewise. + (recursive_inlining): Likewise. + (inline_small_functions): Likewise. + (flatten_function): Likewise. + (ipa_inline): Likewise. + (inline_always_inline_functions): Likewise. + (early_inline_small_functions): Likewise. + (early_inliner): Likewise. + * tree-inline.c (expand_call_inline): Likewise. + +2018-11-08 David Malcolm + + * pretty-print.c (pp_format): Handle %f. + (selftest::test_pp_format): Add test of %f. + * pretty-print.h (pp_double): New macro. + +2018-11-08 David Malcolm + + * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro. + * dumpfile.c (make_item_for_dump_cgraph_node): Move to before... + (dump_pretty_printer::decode_format): Implement "%C" for + cgraph_node *. + (selftest::test_capture_of_dump_calls): Rename "where" to + "stmt_loc". Convert test_decl to a function decl and set its + location. Add a symbol_table_test RAII instance and a + cgraph_node, using it to test "%C" and dump_symtab_node. + +2018-11-08 Eric Botcazou + + PR middle-end/87916 + * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P. + +2018-11-08 David Malcolm + + * cgraph.c: Include "selftest.h". + (saved_symtab): New variable. + (selftest::symbol_table_test::symbol_table_test): New ctor. + (selftest::symbol_table_test::~symbol_table_test): New dtor. + (selftest::test_symbol_table_test): New test. + (selftest::cgraph_c_tests): New. + * cgraph.h (saved_symtab): New decl. + (selftest::symbol_table_test): New class. + * selftest-run-tests.c (selftest::run_tests): Call + selftest::cgraph_c_tests. + * selftest.h (selftest::cgraph_c_tests): New decl. + +2018-11-08 Richard Biener + + * tree-data-ref.h (lambda_int): New typedef. + (lambda_vector_gcd): Adjust. + (lambda_vector_new): Likewise. + (lambda_matrix_new): Likewise. + * tree-data-ref.c (print_lambda_vector): Adjust. + +2018-11-08 Richard Biener + + PR tree-optimization/87929 + * tree-complex.c (expand_complex_comparison): Clean EH. + +2018-11-08 Martin Liska + + * doc/extend.texi: Reword. + * predict.c (expr_expected_value_1): Likewise. + +2018-11-08 Richard Biener + + PR tree-optimization/87913 + * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares + of extreme values to ordered comparisons. + +2018-11-07 Sandra Loosemore + + PR middle-end/42726 + * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior. + +2018-11-07 Sandra Loosemore + + * doc/invoke.texi: Remove leading dash from @opindex entries + throughout the file. + +2018-11-07 Sandra Loosemore + + PR driver/80828 + * doc/invoke.texi (Option Summary): Add -e and --entry. + (Link Options): Likewise. + +2018-11-07 Nathan Sidwell + + PR 87926 + * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak + --disable-checking bootstrap. + +2018-11-07 Hafiz Abid Qadeer + + * configure: Regenerated. + +2018-11-07 Jozef Lawrynowicz + + PR c/87691 + * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE + to the mode of the widest field iff the widest field has mode class + MODE_INT, or MODE_PARTIAL_INT and the union would be passed by + reference. + +2018-11-07 Nikolai Merinov + + * common.opt: Add -Wattribute-warning. + * doc/invoke.texi: Add documentation for -Wno-attribute-warning. + * expr.c (expand_expr_real_1): Add new attribute to warning_at + call to allow user configure behavior of "warning" attribute. + 2018-11-07 Segher Boessenkool * target.def: Put @: after every vs., e.g., and i.e. where it is diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index dccc96239d7e..6277b96be0a6 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20181107 +20181108 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 74e989562995..16c9ed6c5fd7 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -221,6 +221,7 @@ libgcov-merge-tool.o-warn = -Wno-error gimple-match.o-warn = -Wno-unused generic-match.o-warn = -Wno-unused dfp.o-warn = -Wno-strict-aliasing +bitmap.o-warn = -Wno-error # PR 87926 # All warnings have to be shut off in stage1 if the compiler used then # isn't gcc; configure determines that. WARN_CFLAGS will be either diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 73666129f555..ee8ba62756af 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,26 @@ +2018-11-08 Eric Botcazou + + * fe.h (Suppress_Checks): Declare. + * gcc-interface/misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions + only if checks are not suppressed and -faggressive-loop-optimizations + only if they are. + * gcc-interface/trans.c (struct loop_info_d): Remove has_checks and + warned_aggressive_loop_optimizations fields. + (gigi): Do not clear warn_aggressive_loop_optimizations here. + (Raise_Error_to_gnu): Do not set has_checks. + (gnat_to_gnu) : Remove support for aggressive + loop optimizations. + +2018-11-08 Eric Botcazou + + * gcc-interface/decl.c (components_to_record): Remove obsolete kludge. + * gcc-interface/utils.c (make_packable_type): Set TYPE_PACKED on the + new type but do not take into account the setting on the old type for + the new fields. Rename a local variable. + (finish_record_type): Clear DECL_BIT_FIELD_TYPE on a variant part at + offset 0, if any. + (create_field_decl): Tweak comment. + 2018-10-22 Eric Botcazou * gcc-interface/utils.c (unchecked_convert): Use local variables for diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h index b0ccbdc66d00..d4c426501b7e 100644 --- a/gcc/ada/fe.h +++ b/gcc/ada/fe.h @@ -193,6 +193,7 @@ extern Boolean In_Same_Source_Unit (Node_Id, Node_Id); #define GNAT_Mode opt__gnat_mode #define List_Representation_Info opt__list_representation_info #define No_Strict_Aliasing_CP opt__no_strict_aliasing +#define Suppress_Checks opt__suppress_checks typedef enum { Front_End_SJLJ, Back_End_ZCX, Back_End_SJLJ @@ -207,6 +208,7 @@ extern Boolean Generate_SCO_Instance_Table; extern Boolean GNAT_Mode; extern Int List_Representation_Info; extern Boolean No_Strict_Aliasing_CP; +extern Boolean Suppress_Checks; #define ZCX_Exceptions opt__zcx_exceptions #define SJLJ_Exceptions opt__sjlj_exceptions diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index c658aace36e7..d8fb8ee74b98 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -8146,23 +8146,7 @@ components_to_record (Node_Id gnat_component_list, Entity_Id gnat_record_type, /* Chain the variant part at the end of the field list. */ if (gnu_variant_part) - { - /* We make an exception if the variant part is at offset 0, has a fixed - size, and there is a single rep'ed field placed after it because, in - this case, there is an obvious order of increasing position. */ - if (variants_have_rep - && TREE_CODE (DECL_SIZE_UNIT (gnu_variant_part)) == INTEGER_CST - && gnu_rep_list - && gnu_field_list == gnu_rep_list - && !tree_int_cst_lt (DECL_FIELD_OFFSET (gnu_rep_list), - DECL_SIZE_UNIT (gnu_variant_part))) - { - DECL_CHAIN (gnu_variant_part) = gnu_field_list; - gnu_field_list = gnu_variant_part; - } - else - gnu_field_list = chainon (gnu_field_list, gnu_variant_part); - } + gnu_field_list = chainon (gnu_field_list, gnu_variant_part); if (cancel_alignment) SET_TYPE_ALIGN (gnu_record_type, 0); diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 98ec2778d56d..eadbd36f4a36 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -392,7 +392,7 @@ gnat_init_gcc_eh (void) using_eh_for_cleanups (); /* Turn on -fexceptions, -fnon-call-exceptions and -fdelete-dead-exceptions. - The first one triggers the generation of the necessary exception tables. + The first one activates the support for exceptions in the compiler. The second one is useful for two reasons: 1/ we map some asynchronous signals like SEGV to exceptions, so we need to ensure that the insns which can lead to such signals are correctly attached to the exception @@ -402,10 +402,18 @@ gnat_init_gcc_eh (void) for such calls to actually raise in Ada. The third one is an optimization that makes it possible to delete dead instructions that may throw exceptions, most notably loads and stores, - as permitted in Ada. */ + as permitted in Ada. + Turn off -faggressive-loop-optimizations because it may optimize away + out-of-bound array accesses that we want to be able to catch. + If checks are disabled, we use the same settings as the C++ compiler. */ flag_exceptions = 1; - flag_non_call_exceptions = 1; flag_delete_dead_exceptions = 1; + if (!Suppress_Checks) + { + flag_non_call_exceptions = 1; + flag_aggressive_loop_optimizations = 0; + warn_aggressive_loop_optimizations = 0; + } init_eh (); } diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index ce2d43f989e7..2cd710247a43 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -198,8 +198,6 @@ struct GTY(()) loop_info_d { tree high_bound; vec *checks; bool artificial; - bool has_checks; - bool warned_aggressive_loop_optimizations; }; typedef struct loop_info_d *loop_info; @@ -679,10 +677,6 @@ gigi (Node_Id gnat_root, /* Now translate the compilation unit proper. */ Compilation_Unit_to_gnu (gnat_root); - /* Disable -Waggressive-loop-optimizations since we implement our own - version of the warning. */ - warn_aggressive_loop_optimizations = 0; - /* Then process the N_Validate_Unchecked_Conversion nodes. We do this at the very end to avoid having to second-guess the front-end when we run into dummy nodes during the regular processing. */ @@ -5720,7 +5714,6 @@ Raise_Error_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p) rci->inserted_cond = build1 (SAVE_EXPR, boolean_type_node, boolean_true_node); vec_safe_push (loop->checks, rci); - loop->has_checks = true; gnu_cond = build_noreturn_cond (gnat_to_gnu (gnat_cond)); if (flag_unswitch_loops) gnu_cond = build_binary_op (TRUTH_ANDIF_EXPR, @@ -5733,14 +5726,6 @@ Raise_Error_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p) gnu_cond, rci->inserted_cond); } - - /* Or else, if aggressive loop optimizations are enabled, we just - record that there are checks applied to iteration variables. */ - else if (optimize - && flag_aggressive_loop_optimizations - && inside_loop_p () - && (loop = find_loop_for (gnu_index))) - loop->has_checks = true; } break; @@ -6359,45 +6344,9 @@ gnat_to_gnu (Node_Id gnat_node) gcc_assert (TREE_CODE (gnu_type) == ARRAY_TYPE); gnat_temp = gnat_expr_array[i]; gnu_expr = maybe_character_value (gnat_to_gnu (gnat_temp)); - struct loop_info_d *loop; gnu_result = build_binary_op (ARRAY_REF, NULL_TREE, gnu_result, gnu_expr); - - /* Array accesses are bound-checked so they cannot trap, but this - is valid only if they are not hoisted ahead of the check. We - need to mark them as no-trap to get decent loop optimizations - in the presence of -fnon-call-exceptions, so we do it when we - know that the original expression had no side-effects. */ - if (TREE_CODE (gnu_result) == ARRAY_REF - && !(Nkind (gnat_temp) == N_Identifier - && Ekind (Entity (gnat_temp)) == E_Constant)) - TREE_THIS_NOTRAP (gnu_result) = 1; - - /* If aggressive loop optimizations are enabled, we warn for loops - overrunning a simple array of size 1 not at the end of a record. - This is aimed to catch misuses of the trailing array idiom. */ - if (optimize - && flag_aggressive_loop_optimizations - && inside_loop_p () - && TREE_CODE (TREE_TYPE (gnu_type)) != ARRAY_TYPE - && TREE_CODE (gnu_array_object) != ARRAY_REF - && tree_int_cst_equal (TYPE_MIN_VALUE (TYPE_DOMAIN (gnu_type)), - TYPE_MAX_VALUE (TYPE_DOMAIN (gnu_type))) - && !array_at_struct_end_p (gnu_result) - && (loop = find_loop_for (gnu_expr)) - && !loop->artificial - && !loop->has_checks - && tree_int_cst_equal (TYPE_MIN_VALUE (TYPE_DOMAIN (gnu_type)), - loop->low_bound) - && can_be_lower_p (loop->low_bound, loop->high_bound) - && !loop->warned_aggressive_loop_optimizations - && warning (OPT_Waggressive_loop_optimizations, - "out-of-bounds access may be optimized away")) - { - inform (EXPR_LOCATION (loop->stmt), "containing loop"); - loop->warned_aggressive_loop_optimizations = true; - } } gnu_result_type = get_unpadded_type (Etype (gnat_node)); diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index e7dfb41d1415..05959d6427bd 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -973,6 +973,7 @@ make_packable_type (tree type, bool in_record, unsigned int max_align) Note that we rely on the pointer equality created here for TYPE_NAME to look through conversions in various places. */ TYPE_NAME (new_type) = TYPE_NAME (type); + TYPE_PACKED (new_type) = 1; TYPE_JUSTIFIED_MODULAR_P (new_type) = TYPE_JUSTIFIED_MODULAR_P (type); TYPE_CONTAINS_TEMPLATE_P (new_type) = TYPE_CONTAINS_TEMPLATE_P (type); TYPE_REVERSE_STORAGE_ORDER (new_type) = TYPE_REVERSE_STORAGE_ORDER (type); @@ -1018,7 +1019,7 @@ make_packable_type (tree type, bool in_record, unsigned int max_align) for (tree field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) { tree new_field_type = TREE_TYPE (field); - tree new_field, new_size; + tree new_field, new_field_size; if (RECORD_OR_UNION_TYPE_P (new_field_type) && !TYPE_FAT_POINTER_P (new_field_type) @@ -1034,14 +1035,15 @@ make_packable_type (tree type, bool in_record, unsigned int max_align) && !TYPE_FAT_POINTER_P (new_field_type) && !TYPE_CONTAINS_TEMPLATE_P (new_field_type) && TYPE_ADA_SIZE (new_field_type)) - new_size = TYPE_ADA_SIZE (new_field_type); + new_field_size = TYPE_ADA_SIZE (new_field_type); else - new_size = DECL_SIZE (field); + new_field_size = DECL_SIZE (field); + /* This is a layout with full representation, alignment and size clauses + so we simply pass 0 as PACKED like gnat_to_gnu_field in this case. */ new_field = create_field_decl (DECL_NAME (field), new_field_type, new_type, - new_size, bit_position (field), - TYPE_PACKED (type), + new_field_size, bit_position (field), 0, !DECL_NONADDRESSABLE_P (field)); DECL_INTERNAL_P (new_field) = DECL_INTERNAL_P (field); @@ -1896,6 +1898,14 @@ finish_record_type (tree record_type, tree field_list, int rep_level, DECL_BIT_FIELD (field) = 0; } + /* Clear DECL_BIT_FIELD_TYPE for a variant part at offset 0, it's simply + not supported by the DECL_BIT_FIELD_REPRESENTATIVE machinery because + the variant part is always the last field in the list. */ + if (DECL_INTERNAL_P (field) + && TREE_CODE (TREE_TYPE (field)) == QUAL_UNION_TYPE + && integer_zerop (pos)) + DECL_BIT_FIELD_TYPE (field) = NULL_TREE; + /* If we still have DECL_BIT_FIELD set at this point, we know that the field is technically not addressable. Except that it can actually be addressed if it is BLKmode and happens to be properly aligned. */ @@ -2725,9 +2735,9 @@ create_field_decl (tree name, tree type, tree record_type, tree size, tree pos, size = round_up (size, BITS_PER_UNIT); } - /* If we may, according to ADDRESSABLE, make a bitfield if a size is + /* If we may, according to ADDRESSABLE, make a bitfield when the size is specified for two reasons: first if the size differs from the natural - size. Second, if the alignment is insufficient. There are a number of + size; second, if the alignment is insufficient. There are a number of ways the latter can be true. We never make a bitfield if the type of the field has a nonconstant size, @@ -2735,7 +2745,7 @@ create_field_decl (tree name, tree type, tree record_type, tree size, tree pos, We do *preventively* make a bitfield when there might be the need for it but we don't have all the necessary information to decide, as is the case - of a field with no specified position in a packed record. + of a field in a packed record. We also don't look at STRICT_ALIGNMENT here, and rely on later processing in layout_decl or finish_record_type to clear the bit_field indication if diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index fbafb9da2fb0..ac2353978b11 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,17 @@ +2018-11-08 David Malcolm + + * c-format.c (gcc_dump_printf_char_table): Add entry for %f. + +2018-11-08 David Malcolm + + * c-format.c (local_cgraph_node_ptr_node): New variable. + (gcc_dump_printf_char_table): Add entry for %C. + (get_pointer_to_named_type): New function, taken from the handling + code for "gimple *" from... + (init_dynamic_diag_info): ...here. Add handling for + "cgraph_node *". + * c-format.h (T_CGRAPH_NODE): New. + 2018-10-19 Jason Merrill * c-cppbuiltin.c (c_cpp_builtins): Add diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c index dc937c6cabaf..6613092c6fdc 100644 --- a/gcc/c-family/c-format.c +++ b/gcc/c-family/c-format.c @@ -60,6 +60,7 @@ struct function_format_info /* Initialized in init_dynamic_diag_info. */ static GTY(()) tree local_tree_type_node; static GTY(()) tree local_gimple_ptr_node; +static GTY(()) tree local_cgraph_node_ptr_node; static GTY(()) tree locus; static bool decode_format_attr (tree, function_format_info *, int); @@ -803,9 +804,15 @@ static const format_char_info gcc_dump_printf_char_table[] = /* E and G require a "gimple *" argument at runtime. */ { "EG", 1, STD_C89, { T89_G, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "\"", NULL }, + /* C requires a "cgraph_node *" argument at runtime. */ + { "C", 1, STD_C89, { T_CGRAPH_NODE, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "\"", NULL }, + /* T requires a "tree" at runtime. */ { "T", 1, STD_C89, { T89_T, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "\"", NULL }, + /* %f requires a "double"; it doesn't support modifiers. */ + { "f", 0, STD_C89, { T89_D, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "\"", NULL }, + { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL } }; @@ -3882,6 +3889,33 @@ init_dynamic_gfc_info (void) } } +/* Lookup the type named NAME and return a pointer-to-NAME type if found. + Otherwise, return void_type_node if NAME has not been used yet, or NULL_TREE if + NAME is not a type (issuing an error). */ + +static tree +get_pointer_to_named_type (const char *name) +{ + tree result; + if ((result = maybe_get_identifier (name))) + { + result = identifier_global_value (result); + if (result) + { + if (TREE_CODE (result) != TYPE_DECL) + { + error ("%qs is not defined as a type", name); + result = NULL_TREE; + } + else + result = TREE_TYPE (result); + } + } + else + result = void_type_node; + return result; +} + /* Determine the types of "tree" and "location_t" in the code being compiled for use in GCC's diagnostic custom format attributes. You must have set dynamic_format_types before calling this function. */ @@ -3935,25 +3969,12 @@ init_dynamic_diag_info (void) /* Similar to the above but for gimple*. */ if (!local_gimple_ptr_node || local_gimple_ptr_node == void_type_node) - { - if ((local_gimple_ptr_node = maybe_get_identifier ("gimple"))) - { - local_gimple_ptr_node - = identifier_global_value (local_gimple_ptr_node); - if (local_gimple_ptr_node) - { - if (TREE_CODE (local_gimple_ptr_node) != TYPE_DECL) - { - error ("% is not defined as a type"); - local_gimple_ptr_node = 0; - } - else - local_gimple_ptr_node = TREE_TYPE (local_gimple_ptr_node); - } - } - else - local_gimple_ptr_node = void_type_node; - } + local_gimple_ptr_node = get_pointer_to_named_type ("gimple"); + + /* Similar to the above but for cgraph_node*. */ + if (!local_cgraph_node_ptr_node + || local_cgraph_node_ptr_node == void_type_node) + local_cgraph_node_ptr_node = get_pointer_to_named_type ("cgraph_node"); static tree hwi; diff --git a/gcc/c-family/c-format.h b/gcc/c-family/c-format.h index d984d10e2fa0..eabb4f02f151 100644 --- a/gcc/c-family/c-format.h +++ b/gcc/c-family/c-format.h @@ -299,6 +299,7 @@ struct format_kind_info #define T99_UC { STD_C99, NULL, T_UC } #define T_V &void_type_node #define T89_G { STD_C89, NULL, &local_gimple_ptr_node } +#define T_CGRAPH_NODE { STD_C89, NULL, &local_cgraph_node_ptr_node } #define T89_T { STD_C89, NULL, &local_tree_type_node } #define T89_V { STD_C89, NULL, T_V } #define T_W &wchar_type_node diff --git a/gcc/cgraph.c b/gcc/cgraph.c index b432f7e65007..b3dd4296ea0b 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -62,6 +62,7 @@ along with GCC; see the file COPYING3. If not see #include "gimplify.h" #include "stringpool.h" #include "attribs.h" +#include "selftest.h" /* FIXME: Only for PROP_loops, but cgraph shouldn't have to know about this. */ #include "tree-pass.h" @@ -3765,4 +3766,70 @@ cgraph_edge::sreal_frequency () : caller->count); } +/* A stashed copy of "symtab" for use by selftest::symbol_table_test. + This needs to be a global so that it can be a GC root, and thus + prevent the stashed copy from being garbage-collected if the GC runs + during a symbol_table_test. */ + +symbol_table *saved_symtab; + +#if CHECKING_P + +namespace selftest { + +/* class selftest::symbol_table_test. */ + +/* Constructor. Store the old value of symtab, and create a new one. */ + +symbol_table_test::symbol_table_test () +{ + gcc_assert (saved_symtab == NULL); + saved_symtab = symtab; + symtab = new (ggc_cleared_alloc ()) symbol_table (); +} + +/* Destructor. Restore the old value of symtab. */ + +symbol_table_test::~symbol_table_test () +{ + gcc_assert (saved_symtab != NULL); + symtab = saved_symtab; + saved_symtab = NULL; +} + +/* Verify that symbol_table_test works. */ + +static void +test_symbol_table_test () +{ + /* Simulate running two selftests involving symbol tables. */ + for (int i = 0; i < 2; i++) + { + symbol_table_test stt; + tree test_decl = build_decl (UNKNOWN_LOCATION, FUNCTION_DECL, + get_identifier ("test_decl"), + build_function_type_list (void_type_node, + NULL_TREE)); + cgraph_node *node = cgraph_node::get_create (test_decl); + gcc_assert (node); + + /* Verify that the node has order 0 on both iterations, + and thus that nodes have predictable dump names in selftests. */ + ASSERT_EQ (node->order, 0); + ASSERT_STREQ (node->dump_name (), "test_decl/0"); + } +} + +/* Run all of the selftests within this file. */ + +void +cgraph_c_tests () +{ + test_symbol_table_test (); +} + +} // namespace selftest + +#endif /* CHECKING_P */ + #include "gt-cgraph.h" diff --git a/gcc/cgraph.h b/gcc/cgraph.h index c13d79850fa8..021552251c4f 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -3353,4 +3353,27 @@ xstrdup_for_dump (const char *transient_str) return ggc_strdup (transient_str); } +extern GTY(()) symbol_table *saved_symtab; + +#if CHECKING_P + +namespace selftest { + +/* An RAII-style class for use in selftests for temporarily using a different + symbol_table, so that such tests can be isolated from each other. */ + +class symbol_table_test +{ + public: + /* Constructor. Override "symtab". */ + symbol_table_test (); + + /* Destructor. Restore the saved_symtab. */ + ~symbol_table_test (); +}; + +} // namespace selftest + +#endif /* CHECKING_P */ + #endif /* GCC_CGRAPH_H */ diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c index e17959c0ca61..0fbc7a919bde 100644 --- a/gcc/cgraphclones.c +++ b/gcc/cgraphclones.c @@ -321,6 +321,10 @@ duplicate_thunk_for_node (cgraph_node *thunk, cgraph_node *node) "artificial_thunk"); SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl)); + /* We need to force DECL_IGNORED_P because the new thunk is created after + early debug was run. */ + DECL_IGNORED_P (new_decl) = 1; + new_thunk = cgraph_node::create (new_decl); set_new_clone_decl_and_node_flags (new_thunk); new_thunk->definition = true; diff --git a/gcc/common.opt b/gcc/common.opt index 2971dc21b1fe..5a5d33205a46 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -571,6 +571,10 @@ Wcpp Common Var(warn_cpp) Init(1) Warning Warn when a #warning directive is encountered. +Wattribute-warning +Common Var(warn_attribute_warning) Init(1) Warning +Warn about uses of __attribute__((warning)) declarations. + Wdeprecated-declarations Common Var(warn_deprecated_decl) Init(1) Warning Warn about uses of __attribute__((deprecated)) declarations. diff --git a/gcc/configure b/gcc/configure index a24221d580c2..b814484ea25b 100755 --- a/gcc/configure +++ b/gcc/configure @@ -10833,7 +10833,7 @@ rm -f core conftest.err conftest.$ac_objext \ if test "$am_cv_func_iconv" != yes; then am_save_CPPFLAGS="$CPPFLAGS" am_save_LIBS="$LIBS" - CPPFLAGS="$LIBS $INCICONV" + CPPFLAGS="$CPPFLAGS $INCICONV" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 8de92da93fb0..dc8fc6e2c4ac 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -12047,7 +12047,7 @@ This function has the same semantics as @code{__builtin_expect}, but the caller provides the expected probability that @var{exp} == @var{c}. The last argument, @var{probability}, is a floating-point value in the range 0.0 to 1.0, inclusive. The @var{probability} argument must be -a compiler time constant. +constant floating-point expression. @end deftypefn @deftypefn {Built-in Function} void __builtin_trap (void) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 5f67982cb90d..24136eb5cc74 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -292,6 +292,7 @@ Objective-C and Objective-C++ Dialects}. -Wclobbered -Wcomment -Wconditionally-supported @gol -Wconversion -Wcoverage-mismatch -Wno-cpp -Wdangling-else -Wdate-time @gol -Wdelete-incomplete @gol +-Wno-attribute-warning @gol -Wno-deprecated -Wno-deprecated-declarations -Wno-designated-init @gol -Wdisabled-optimization @gol -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol @@ -523,6 +524,7 @@ Objective-C and Objective-C++ Dialects}. @xref{Link Options,,Options for Linking}. @gccoptlist{@var{object-file-name} -fuse-ld=@var{linker} -l@var{library} @gol -nostartfiles -nodefaultlibs -nolibc -nostdlib @gol +-e @var{entry} --entry=@var{entry} @gol -pie -pthread -r -rdynamic @gol -s -static -static-pie -static-libgcc -static-libstdc++ @gol -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol @@ -2932,7 +2934,7 @@ union U @{ @item -Wabi-tag @r{(C++ and Objective-C++ only)} @opindex Wabi-tag -@opindex -Wabi-tag +@opindex Wabi-tag Warn when a type with an ABI tag is used in a context that does not have that ABI tag. See @ref{C++ Attributes} for more information about ABI tags. @@ -3843,7 +3845,7 @@ a left margin is printed, showing line numbers. This option suppresses this left margin. @item -fdiagnostics-minimum-margin-width=@var{width} -@opindex -fdiagnostics-minimum-margin-width +@opindex fdiagnostics-minimum-margin-width This option controls the minimum width of the left margin printed by @option{-fdiagnostics-show-line-numbers}. It defaults to 6. @@ -5732,8 +5734,8 @@ larger. This option warns on all uses of @code{alloca} in the source. @item -Walloca-larger-than=@var{byte-size} -@opindex -Walloca-larger-than= -@opindex -Wno-alloca-larger-than +@opindex Walloca-larger-than= +@opindex Wno-alloca-larger-than This option warns on calls to @code{alloca} with an integer argument whose value is either zero, or that is not bounded by a controlling predicate that limits its value to at most @var{byte-size}. It also warns for calls @@ -6659,8 +6661,8 @@ real to lower precision real values. This option is also enabled by @option{-Wconversion}. @item -Wno-scalar-storage-order -@opindex -Wno-scalar-storage-order -@opindex -Wscalar-storage-order +@opindex Wno-scalar-storage-order +@opindex Wscalar-storage-order Do not warn on suspicious constructs involving reverse scalar storage order. @item -Wsized-deallocation @r{(C++ and Objective-C++ only)} @@ -6978,6 +6980,15 @@ confused with the digit 0, and so is not the default, but may be useful as a local coding convention if the programming environment cannot be fixed to display these characters distinctly. +@item -Wno-attribute-warning +@opindex Wno-attribute-warning +@opindex Wattribute-warning +Do not warn about usage of functions (@pxref{Function Attributes}) +declared with @code{warning} attribute. By default, this warning is +enabled. @option{-Wno-attribute-warning} can be used to disable the +warning or @option{-Wno-error=attribute-warning} can be used to +disable the error when compiled with @option{-Werror} flag. + @item -Wno-deprecated @opindex Wno-deprecated @opindex Wdeprecated @@ -7252,8 +7263,8 @@ Warn if a variable-length array is used in the code. the variable-length array. @item -Wvla-larger-than=@var{byte-size} -@opindex -Wvla-larger-than= -@opindex -Wno-vla-larger-than +@opindex Wvla-larger-than= +@opindex Wno-vla-larger-than If this option is used, the compiler will warn for declarations of variable-length arrays whose size is either unbounded, or bounded by an argument that allows the array size to exceed @var{byte-size} @@ -8931,13 +8942,13 @@ it may significantly increase code size This flag is enabled by default at @option{-O3}. @item -fipa-bit-cp -@opindex -fipa-bit-cp +@opindex fipa-bit-cp When enabled, perform interprocedural bitwise constant propagation. This flag is enabled by default at @option{-O2}. It requires that @option{-fipa-cp} is enabled. @item -fipa-vrp -@opindex -fipa-vrp +@opindex fipa-vrp When enabled, perform interprocedural propagation of value ranges. This flag is enabled by default at @option{-O2}. It requires that @option{-fipa-cp} is enabled. @@ -12548,7 +12559,7 @@ object file names should not be used as arguments. @xref{Overall Options}. @item -flinker-output=@var{type} -@opindex -flinker-output +@opindex flinker-output This option controls the code generation of the link time optimizer. By default the linker output is determined by the linker plugin automatically. For debugging the compiler and in the case of incremental linking to non-lto object @@ -12702,6 +12713,15 @@ library subroutines. constructors are called; @pxref{Collect2,,@code{collect2}, gccint, GNU Compiler Collection (GCC) Internals}.) +@item -e @var{entry} +@itemx --entry=@var{entry} +@opindex e +@opindex entry + +Specify that the program entry point is @var{entry}. The argument is +interpreted by the linker; the GNU linker accepts either a symbol name +or an address. + @item -pie @opindex pie Produce a dynamically linked position independent executable on targets @@ -13274,7 +13294,7 @@ C, and on some targets may carry a speed or code size penalty on variable references. The @option{-fno-common} option specifies that the compiler should instead -place uninitialized global variables in the data section of the object file. +place uninitialized global variables in the BSS section of the object file. This inhibits the merging of tentative definitions by the linker so you get a multiple-definition error if the same variable is defined in more than one compilation unit. @@ -14065,6 +14085,7 @@ instruction numbers for the links to the previous and next instructions in a sequence. @item -fdump-ipa-@var{switch} +@itemx -fdump-ipa-@var{switch}-@var{options} @opindex fdump-ipa Control the dumping at various stages of inter-procedural analysis language tree to a file. The file name is generated by appending a @@ -14085,6 +14106,18 @@ Dump after function inlining. @end table +Additionally, the options @option{-optimized}, @option{-missed}, +@option{-note}, and @option{-all} can be provided, with the same meaning +as for @option{-fopt-info}, defaulting to @option{-optimized}. + +For example, @option{-fdump-ipa-inline-optimized-missed} will emit +information on callsites that were inlined, along with callsites +that were not inlined. + +By default, the dump will contain messages about successful +optimizations (equivalent to @option {-optimized}) together with +low-level details about the analysis. + @item -fdump-lang-all @itemx -fdump-lang-@var{switch} @itemx -fdump-lang-@var{switch}-@var{options} @@ -15085,8 +15118,8 @@ single precision and to 32 bits for double precision. @item -mlow-precision-sqrt @itemx -mno-low-precision-sqrt -@opindex -mlow-precision-sqrt -@opindex -mno-low-precision-sqrt +@opindex mlow-precision-sqrt +@opindex mno-low-precision-sqrt Enable or disable the square root approximation. This option only has an effect if @option{-ffast-math} or @option{-funsafe-math-optimizations} is used as well. Enabling this reduces @@ -15096,8 +15129,8 @@ If enabled, it implies @option{-mlow-precision-recip-sqrt}. @item -mlow-precision-div @itemx -mno-low-precision-div -@opindex -mlow-precision-div -@opindex -mno-low-precision-div +@opindex mlow-precision-div +@opindex mno-low-precision-div Enable or disable the division approximation. This option only has an effect if @option{-ffast-math} or @option{-funsafe-math-optimizations} is used as well. Enabling this reduces @@ -18089,11 +18122,11 @@ Specify the C-SKY target processor. Valid values for @var{cpu} are: @item -mbig-endian @opindex mbig-endian @itemx -EB -@opindex -EB +@opindex EB @itemx -mlittle-endian @opindex mlittle-endian @itemx -EL -@opindex -EL +@opindex EL Select big- or little-endian code. The default is little-endian. @@ -27930,7 +27963,7 @@ preferred alignment to @option{-mpreferred-stack-boundary=2}. @opindex mvaes @need 200 @itemx -mwaitpkg -@opindex -mwaitpkg +@opindex mwaitpkg @need 200 @itemx -mvpclmulqdq @opindex mvpclmulqdq @@ -28516,7 +28549,7 @@ prevents the compiler from using floating-point, vector, mask and bound registers. @item -mindirect-branch=@var{choice} -@opindex -mindirect-branch +@opindex mindirect-branch Convert indirect call and jump with @var{choice}. The default is @samp{keep}, which keeps indirect call and jump unmodified. @samp{thunk} converts indirect call and jump to call and return thunk. @@ -28536,7 +28569,7 @@ Note that @option{-mindirect-branch=thunk-extern} is incompatible with to disable control-flow check. @item -mfunction-return=@var{choice} -@opindex -mfunction-return +@opindex mfunction-return Convert function return with @var{choice}. The default is @samp{keep}, which keeps function return unmodified. @samp{thunk} converts function return to call and return thunk. @samp{thunk-inline} converts function @@ -28553,7 +28586,7 @@ not be reachable in the large code model. @item -mindirect-branch-register -@opindex -mindirect-branch-register +@opindex mindirect-branch-register Force indirect call and jump via register. @end table diff --git a/gcc/dump-context.h b/gcc/dump-context.h index 3a45f2301053..ace139cdc09c 100644 --- a/gcc/dump-context.h +++ b/gcc/dump-context.h @@ -251,6 +251,14 @@ verify_item (const location &loc, (EXPECTED_LOCATION), (EXPECTED_TEXT)); \ SELFTEST_END_STMT +/* Verify that ITEM is a symtab node, with the expected values. */ + +#define ASSERT_IS_SYMTAB_NODE(ITEM, EXPECTED_LOCATION, EXPECTED_TEXT) \ + SELFTEST_BEGIN_STMT \ + verify_item (SELFTEST_LOCATION, (ITEM), OPTINFO_ITEM_KIND_SYMTAB_NODE, \ + (EXPECTED_LOCATION), (EXPECTED_TEXT)); \ + SELFTEST_END_STMT + } // namespace selftest #endif /* CHECKING_P */ diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c index 0b140ffb8bec..09c24905f52a 100644 --- a/gcc/dumpfile.c +++ b/gcc/dumpfile.c @@ -748,6 +748,18 @@ dump_context::dump_generic_expr_loc (dump_flags_t dump_kind, dump_generic_expr (dump_kind, extra_dump_flags, t); } +/* Make an item for the given dump call. */ + +static optinfo_item * +make_item_for_dump_symtab_node (symtab_node *node) +{ + location_t loc = DECL_SOURCE_LOCATION (node->decl); + optinfo_item *item + = new optinfo_item (OPTINFO_ITEM_KIND_SYMTAB_NODE, loc, + xstrdup (node->dump_name ())); + return item; +} + /* dump_pretty_printer's ctor. */ dump_pretty_printer::dump_pretty_printer (dump_context *context, @@ -881,6 +893,8 @@ dump_pretty_printer::format_decoder_cb (pretty_printer *pp, text_info *text, Supported format codes (in addition to the standard pretty_printer ones) are: + %C: cgraph_node *: + Equivalent to: dump_symtab_node (MSG_*, node) %E: gimple *: Equivalent to: dump_gimple_expr (MSG_*, TDF_SLIM, stmt, 0) %G: gimple *: @@ -888,7 +902,9 @@ dump_pretty_printer::format_decoder_cb (pretty_printer *pp, text_info *text, %T: tree: Equivalent to: dump_generic_expr (MSG_*, arg, TDF_SLIM). - FIXME: add symtab_node? + TODO: add a format code that can handle (symtab_node*) *and* both + subclasses (presumably means teaching -Wformat about non-virtual + subclasses). These format codes build optinfo_item instances, thus capturing metadata about the arguments being dumped, as well as the textual output. */ @@ -901,6 +917,16 @@ dump_pretty_printer::decode_format (text_info *text, const char *spec, for later use (to capture metadata, rather than plain text). */ switch (*spec) { + case 'C': + { + cgraph_node *node = va_arg (*text->args_ptr, cgraph_node *); + + /* Make an item for the node, and stash it. */ + optinfo_item *item = make_item_for_dump_symtab_node (node); + stash_item (buffer_ptr, item); + return true; + } + case 'E': { gimple *stmt = va_arg (*text->args_ptr, gimple *); @@ -1023,18 +1049,6 @@ dump_context::dump_dec (dump_flags_t dump_kind, const poly_int &value) delete item; } -/* Make an item for the given dump call. */ - -static optinfo_item * -make_item_for_dump_symtab_node (symtab_node *node) -{ - location_t loc = DECL_SOURCE_LOCATION (node->decl); - optinfo_item *item - = new optinfo_item (OPTINFO_ITEM_KIND_SYMTAB_NODE, loc, - xstrdup (node->dump_name ())); - return item; -} - /* Output the name of NODE on appropriate dump streams. */ void @@ -2067,18 +2081,26 @@ test_capture_of_dump_calls (const line_table_case &case_) linemap_add (line_table, LC_ENTER, false, "test.txt", 0); linemap_line_start (line_table, 5, 100); linemap_add (line_table, LC_LEAVE, false, NULL, 0); - location_t where = linemap_position_for_column (line_table, 10); - if (where > LINE_MAP_MAX_LOCATION_WITH_COLS) + location_t decl_loc = linemap_position_for_column (line_table, 8); + location_t stmt_loc = linemap_position_for_column (line_table, 10); + if (stmt_loc > LINE_MAP_MAX_LOCATION_WITH_COLS) return; - dump_location_t loc = dump_location_t::from_location_t (where); + dump_location_t loc = dump_location_t::from_location_t (stmt_loc); gimple *stmt = gimple_build_return (NULL); - gimple_set_location (stmt, where); + gimple_set_location (stmt, stmt_loc); - tree test_decl = build_decl (UNKNOWN_LOCATION, VAR_DECL, + tree test_decl = build_decl (decl_loc, FUNCTION_DECL, get_identifier ("test_decl"), - integer_type_node); + build_function_type_list (void_type_node, + NULL_TREE)); + + symbol_table_test tmp_symtab; + + cgraph_node *node = cgraph_node::get_create (test_decl); + gcc_assert (node); + /* Run all tests twice, with and then without optinfo enabled, to ensure that immediate destinations vs optinfo-based destinations both work, independently of each other, with no leaks. */ @@ -2135,7 +2157,7 @@ test_capture_of_dump_calls (const line_table_case &case_) ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE); ASSERT_EQ (info->num_items (), 2); ASSERT_IS_TEXT (info->get_item (0), "gimple: "); - ASSERT_IS_GIMPLE (info->get_item (1), where, "return;"); + ASSERT_IS_GIMPLE (info->get_item (1), stmt_loc, "return;"); } } @@ -2153,7 +2175,25 @@ test_capture_of_dump_calls (const line_table_case &case_) ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE); ASSERT_EQ (info->num_items (), 2); ASSERT_IS_TEXT (info->get_item (0), "gimple: "); - ASSERT_IS_GIMPLE (info->get_item (1), where, "return;\n"); + ASSERT_IS_GIMPLE (info->get_item (1), stmt_loc, "return;\n"); + } + } + + /* Test of dump_printf with %C. */ + { + temp_dump_context tmp (with_optinfo, true, + MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING); + dump_printf (MSG_NOTE, "node: %C", node); + + ASSERT_DUMPED_TEXT_EQ (tmp, "node: test_decl/0"); + if (with_optinfo) + { + optinfo *info = tmp.get_pending_optinfo (); + ASSERT_TRUE (info != NULL); + ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE); + ASSERT_EQ (info->num_items (), 2); + ASSERT_IS_TEXT (info->get_item (0), "node: "); + ASSERT_IS_SYMTAB_NODE (info->get_item (1), decl_loc, "test_decl/0"); } } @@ -2184,8 +2224,8 @@ test_capture_of_dump_calls (const line_table_case &case_) ASSERT_IS_TEXT (info->get_item (2), " and "); ASSERT_IS_TREE (info->get_item (3), UNKNOWN_LOCATION, "test_decl"); ASSERT_IS_TEXT (info->get_item (4), " 42 consecutive "); - ASSERT_IS_GIMPLE (info->get_item (5), where, "return;"); - ASSERT_IS_GIMPLE (info->get_item (6), where, "return;"); + ASSERT_IS_GIMPLE (info->get_item (5), stmt_loc, "return;"); + ASSERT_IS_GIMPLE (info->get_item (6), stmt_loc, "return;"); ASSERT_IS_TEXT (info->get_item (7), " after\n"); } } @@ -2202,7 +2242,7 @@ test_capture_of_dump_calls (const line_table_case &case_) { optinfo *info = tmp.get_pending_optinfo (); ASSERT_TRUE (info != NULL); - ASSERT_EQ (info->get_location_t (), where); + ASSERT_EQ (info->get_location_t (), stmt_loc); ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE); ASSERT_EQ (info->num_items (), 2); ASSERT_IS_TEXT (info->get_item (0), "test of tree: "); @@ -2221,7 +2261,7 @@ test_capture_of_dump_calls (const line_table_case &case_) { optinfo *info = tmp.get_pending_optinfo (); ASSERT_TRUE (info != NULL); - ASSERT_EQ (info->get_location_t (), where); + ASSERT_EQ (info->get_location_t (), stmt_loc); ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE); ASSERT_EQ (info->num_items (), 1); ASSERT_IS_TREE (info->get_item (0), UNKNOWN_LOCATION, "1"); @@ -2242,7 +2282,7 @@ test_capture_of_dump_calls (const line_table_case &case_) optinfo *info = tmp.get_pending_optinfo (); ASSERT_TRUE (info != NULL); ASSERT_EQ (info->num_items (), 1); - ASSERT_IS_GIMPLE (info->get_item (0), where, "return;\n"); + ASSERT_IS_GIMPLE (info->get_item (0), stmt_loc, "return;\n"); } } @@ -2258,7 +2298,7 @@ test_capture_of_dump_calls (const line_table_case &case_) optinfo *info = tmp.get_pending_optinfo (); ASSERT_TRUE (info != NULL); ASSERT_EQ (info->num_items (), 1); - ASSERT_IS_GIMPLE (info->get_item (0), where, "return;\n"); + ASSERT_IS_GIMPLE (info->get_item (0), stmt_loc, "return;\n"); } } @@ -2274,7 +2314,7 @@ test_capture_of_dump_calls (const line_table_case &case_) optinfo *info = tmp.get_pending_optinfo (); ASSERT_TRUE (info != NULL); ASSERT_EQ (info->num_items (), 1); - ASSERT_IS_GIMPLE (info->get_item (0), where, "return;"); + ASSERT_IS_GIMPLE (info->get_item (0), stmt_loc, "return;"); } } @@ -2290,11 +2330,28 @@ test_capture_of_dump_calls (const line_table_case &case_) optinfo *info = tmp.get_pending_optinfo (); ASSERT_TRUE (info != NULL); ASSERT_EQ (info->num_items (), 1); - ASSERT_IS_GIMPLE (info->get_item (0), where, "return;"); + ASSERT_IS_GIMPLE (info->get_item (0), stmt_loc, "return;"); } } } + /* symtab_node. */ + { + temp_dump_context tmp (with_optinfo, true, + MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING); + dump_symtab_node (MSG_NOTE, node); + + ASSERT_DUMPED_TEXT_EQ (tmp, "test_decl/0"); + if (with_optinfo) + { + optinfo *info = tmp.get_pending_optinfo (); + ASSERT_TRUE (info != NULL); + ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE); + ASSERT_EQ (info->num_items (), 1); + ASSERT_IS_SYMTAB_NODE (info->get_item (0), decl_loc, "test_decl/0"); + } + } + /* poly_int. */ { temp_dump_context tmp (with_optinfo, true, diff --git a/gcc/expr.c b/gcc/expr.c index 03e5dc458e17..6341c5a0bdb6 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -10930,7 +10930,8 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, DECL_ATTRIBUTES (fndecl))) != NULL) { const char *ident = lang_hooks.decl_printable_name (fndecl, 1); - warning_at (tree_nonartificial_location (exp), 0, + warning_at (tree_nonartificial_location (exp), + OPT_Wattribute_warning, "%Kcall to %qs declared with attribute warning: %s", exp, identifier_to_locale (ident), TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr)))); diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index bcd165374618..e04ede774cf8 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -227,20 +227,21 @@ caller_growth_limits (struct cgraph_edge *e) static void report_inline_failed_reason (struct cgraph_edge *e) { - if (dump_file) + if (dump_enabled_p ()) { - fprintf (dump_file, " not inlinable: %s -> %s, %s\n", - e->caller->dump_name (), - e->callee->dump_name (), - cgraph_inline_failed_string (e->inline_failed)); + dump_printf_loc (MSG_MISSED_OPTIMIZATION, e->call_stmt, + " not inlinable: %C -> %C, %s\n", + e->caller, e->callee, + cgraph_inline_failed_string (e->inline_failed)); if ((e->inline_failed == CIF_TARGET_OPTION_MISMATCH || e->inline_failed == CIF_OPTIMIZATION_MISMATCH) && e->caller->lto_file_data && e->callee->ultimate_alias_target ()->lto_file_data) { - fprintf (dump_file, " LTO objects: %s, %s\n", - e->caller->lto_file_data->file_name, - e->callee->ultimate_alias_target ()->lto_file_data->file_name); + dump_printf_loc (MSG_MISSED_OPTIMIZATION, e->call_stmt, + " LTO objects: %s, %s\n", + e->caller->lto_file_data->file_name, + e->callee->ultimate_alias_target ()->lto_file_data->file_name); } if (e->inline_failed == CIF_TARGET_OPTION_MISMATCH) cl_target_option_print_diff @@ -569,8 +570,9 @@ can_early_inline_edge_p (struct cgraph_edge *e) if (!gimple_in_ssa_p (DECL_STRUCT_FUNCTION (e->caller->decl)) || !gimple_in_ssa_p (DECL_STRUCT_FUNCTION (callee->decl))) { - if (dump_file) - fprintf (dump_file, " edge not inlinable: not in SSA form\n"); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, e->call_stmt, + " edge not inlinable: not in SSA form\n"); return false; } if (!can_inline_edge_p (e, true, true) @@ -630,34 +632,34 @@ want_early_inline_function_p (struct cgraph_edge *e) else if (!e->maybe_hot_p () && growth > 0) { - if (dump_file) - fprintf (dump_file, " will not early inline: %s->%s, " - "call is cold and code would grow by %i\n", - e->caller->dump_name (), - callee->dump_name (), - growth); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, e->call_stmt, + " will not early inline: %C->%C, " + "call is cold and code would grow by %i\n", + e->caller, callee, + growth); want_inline = false; } else if (growth > PARAM_VALUE (PARAM_EARLY_INLINING_INSNS)) { - if (dump_file) - fprintf (dump_file, " will not early inline: %s->%s, " - "growth %i exceeds --param early-inlining-insns\n", - e->caller->dump_name (), - callee->dump_name (), - growth); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, e->call_stmt, + " will not early inline: %C->%C, " + "growth %i exceeds --param early-inlining-insns\n", + e->caller, callee, + growth); want_inline = false; } else if ((n = num_calls (callee)) != 0 && growth * (n + 1) > PARAM_VALUE (PARAM_EARLY_INLINING_INSNS)) { - if (dump_file) - fprintf (dump_file, " will not early inline: %s->%s, " - "growth %i exceeds --param early-inlining-insns " - "divided by number of calls\n", - e->caller->dump_name (), - callee->dump_name (), - growth); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, e->call_stmt, + " will not early inline: %C->%C, " + "growth %i exceeds --param early-inlining-insns " + "divided by number of calls\n", + e->caller, callee, + growth); want_inline = false; } } @@ -936,8 +938,9 @@ want_inline_self_recursive_call_p (struct cgraph_edge *edge, want_inline = false; } } - if (!want_inline && dump_file) - fprintf (dump_file, " not inlining recursively: %s\n", reason); + if (!want_inline && dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, edge->call_stmt, + " not inlining recursively: %s\n", reason); return want_inline; } @@ -1562,14 +1565,14 @@ recursive_inlining (struct cgraph_edge *edge, if (!master_clone) return false; - if (dump_file) - fprintf (dump_file, - "\n Inlined %i times, " - "body grown from size %i to %i, time %f to %f\n", n, - ipa_fn_summaries->get (master_clone)->size, - ipa_fn_summaries->get (node)->size, - ipa_fn_summaries->get (master_clone)->time.to_double (), - ipa_fn_summaries->get (node)->time.to_double ()); + if (dump_enabled_p ()) + dump_printf_loc (MSG_NOTE, edge->call_stmt, + "\n Inlined %i times, " + "body grown from size %i to %i, time %f to %f\n", n, + ipa_fn_summaries->get (master_clone)->size, + ipa_fn_summaries->get (node)->size, + ipa_fn_summaries->get (master_clone)->time.to_double (), + ipa_fn_summaries->get (node)->time.to_double ()); /* Remove master clone we used for inlining. We rely that clones inlined into master clone gets queued just before master clone so we don't @@ -2078,17 +2081,20 @@ inline_small_functions (void) update_callee_keys (&edge_heap, n, updated_nodes); bitmap_clear (updated_nodes); - if (dump_file) + if (dump_enabled_p ()) { ipa_fn_summary *s = ipa_fn_summaries->get (edge->caller); - fprintf (dump_file, - " Inlined %s into %s which now has time %f and size %i, " - "net change of %+i.\n", - xstrdup_for_dump (edge->callee->name ()), - xstrdup_for_dump (edge->caller->name ()), - s->time.to_double (), - s->size, - overall_size - old_size); + + /* dump_printf can't handle %+i. */ + char buf_net_change[100]; + snprintf (buf_net_change, sizeof buf_net_change, "%+i", + overall_size - old_size); + + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, edge->call_stmt, + " Inlined %C into %C which now has time %f and " + "size %i, net change of %s.\n", + edge->callee, edge->caller, + s->time.to_double (), s->size, buf_net_change); } if (min_size > overall_size) { @@ -2101,11 +2107,11 @@ inline_small_functions (void) } free_growth_caches (); - if (dump_file) - fprintf (dump_file, - "Unit growth for small function inlining: %i->%i (%i%%)\n", - initial_size, overall_size, - initial_size ? overall_size * 100 / (initial_size) - 100: 0); + if (dump_enabled_p ()) + dump_printf (MSG_NOTE, + "Unit growth for small function inlining: %i->%i (%i%%)\n", + initial_size, overall_size, + initial_size ? overall_size * 100 / (initial_size) - 100: 0); symtab->remove_edge_removal_hook (edge_removal_hook_holder); } @@ -2130,11 +2136,10 @@ flatten_function (struct cgraph_node *node, bool early) /* We've hit cycle? It is time to give up. */ if (callee->aux) { - if (dump_file) - fprintf (dump_file, - "Not inlining %s into %s to avoid cycle.\n", - xstrdup_for_dump (callee->name ()), - xstrdup_for_dump (e->caller->name ())); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, e->call_stmt, + "Not inlining %C into %C to avoid cycle.\n", + callee, e->caller); if (cgraph_inline_failed_type (e->inline_failed) != CIF_FINAL_ERROR) e->inline_failed = CIF_RECURSIVE_INLINING; continue; @@ -2159,25 +2164,27 @@ flatten_function (struct cgraph_node *node, bool early) if (e->recursive_p ()) { - if (dump_file) - fprintf (dump_file, "Not inlining: recursive call.\n"); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, e->call_stmt, + "Not inlining: recursive call.\n"); continue; } if (gimple_in_ssa_p (DECL_STRUCT_FUNCTION (node->decl)) != gimple_in_ssa_p (DECL_STRUCT_FUNCTION (callee->decl))) { - if (dump_file) - fprintf (dump_file, "Not inlining: SSA form does not match.\n"); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, e->call_stmt, + "Not inlining: SSA form does not match.\n"); continue; } /* Inline the edge and flatten the inline clone. Avoid recursing through the original node if the node was cloned. */ - if (dump_file) - fprintf (dump_file, " Inlining %s into %s.\n", - xstrdup_for_dump (callee->name ()), - xstrdup_for_dump (e->caller->name ())); + if (dump_enabled_p ()) + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, e->call_stmt, + " Inlining %C into %C.\n", + callee, e->caller); orig_callee = callee; inline_call (e, true, NULL, NULL, false); if (e->callee != orig_callee) @@ -2589,13 +2596,12 @@ ipa_inline (void) /* Free ipa-prop structures if they are no longer needed. */ ipa_free_all_structures_after_iinln (); + if (dump_enabled_p ()) + dump_printf (MSG_NOTE, + "\nInlined %i calls, eliminated %i functions\n\n", + ncalls_inlined, nfunctions_inlined); if (dump_file) - { - fprintf (dump_file, - "\nInlined %i calls, eliminated %i functions\n\n", - ncalls_inlined, nfunctions_inlined); - dump_inline_stats (); - } + dump_inline_stats (); if (dump_file) ipa_dump_fn_summaries (dump_file); @@ -2618,9 +2624,10 @@ inline_always_inline_functions (struct cgraph_node *node) if (e->recursive_p ()) { - if (dump_file) - fprintf (dump_file, " Not inlining recursive call to %s.\n", - e->callee->name ()); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, e->call_stmt, + " Not inlining recursive call to %C.\n", + e->callee); e->inline_failed = CIF_RECURSIVE_INLINING; continue; } @@ -2636,10 +2643,10 @@ inline_always_inline_functions (struct cgraph_node *node) continue; } - if (dump_file) - fprintf (dump_file, " Inlining %s into %s (always_inline).\n", - xstrdup_for_dump (e->callee->name ()), - xstrdup_for_dump (e->caller->name ())); + if (dump_enabled_p ()) + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, e->call_stmt, + " Inlining %C into %C (always_inline).\n", + e->callee, e->caller); inline_call (e, true, NULL, NULL, false); inlined = true; } @@ -2675,27 +2682,29 @@ early_inline_small_functions (struct cgraph_node *node) && !opt_for_fn (node->decl, flag_inline_functions)) continue; - if (dump_file) - fprintf (dump_file, "Considering inline candidate %s.\n", - callee->name ()); + if (dump_enabled_p ()) + dump_printf_loc (MSG_NOTE, e->call_stmt, + "Considering inline candidate %C.\n", + callee); if (!can_early_inline_edge_p (e)) continue; if (e->recursive_p ()) { - if (dump_file) - fprintf (dump_file, " Not inlining: recursive call.\n"); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, e->call_stmt, + " Not inlining: recursive call.\n"); continue; } if (!want_early_inline_function_p (e)) continue; - if (dump_file) - fprintf (dump_file, " Inlining %s into %s.\n", - xstrdup_for_dump (callee->name ()), - xstrdup_for_dump (e->caller->name ())); + if (dump_enabled_p ()) + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, e->call_stmt, + " Inlining %C into %C.\n", + callee, e->caller); inline_call (e, true, NULL, NULL, false); inlined = true; } @@ -2755,9 +2764,9 @@ early_inliner (function *fun) { /* When the function is marked to be flattened, recursively inline all calls in it. */ - if (dump_file) - fprintf (dump_file, - "Flattening %s\n", node->name ()); + if (dump_enabled_p ()) + dump_printf (MSG_OPTIMIZED_LOCATIONS, + "Flattening %C\n", node); flatten_function (node, true); inlined = true; } diff --git a/gcc/predict.c b/gcc/predict.c index 80a8d6846f78..8482737ab272 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -2470,8 +2470,8 @@ expr_expected_value_1 (tree type, tree op0, enum tree_code code, if (TREE_CODE (r) != REAL_CST) { error_at (gimple_location (def), - "probability argument %qE must be a compile " - "time constant", prob); + "probability %qE must be " + "constant floating-point expression", prob); return NULL; } HOST_WIDE_INT probi @@ -2483,8 +2483,8 @@ expr_expected_value_1 (tree type, tree op0, enum tree_code code, } else error_at (gimple_location (def), - "probability argument %qE must be a in the " - "range 0.0 to 1.0", prob); + "probability %qE is outside " + "the range [0.0, 1.0]", prob); return gimple_call_arg (def, 1); } diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c index 7dd900b3bbf6..19ef75bdfcf6 100644 --- a/gcc/pretty-print.c +++ b/gcc/pretty-print.c @@ -977,6 +977,7 @@ pp_indent (pretty_printer *pp) %ld, %li, %lo, %lu, %lx: long versions of the above. %lld, %lli, %llo, %llu, %llx: long long versions. %wd, %wi, %wo, %wu, %wx: HOST_WIDE_INT versions. + %f: double %c: character. %s: string. %p: pointer (printed in a host-dependent manner). @@ -1307,6 +1308,10 @@ pp_format (pretty_printer *pp, text_info *text) (pp, *text->args_ptr, precision, unsigned, "u"); break; + case 'f': + pp_double (pp, va_arg (*text->args_ptr, double)); + break; + case 'Z': { int *v = va_arg (*text->args_ptr, int *); @@ -2160,6 +2165,7 @@ test_pp_format () ASSERT_PP_FORMAT_2 ("17 12345678", "%wo %x", (HOST_WIDE_INT)15, 0x12345678); ASSERT_PP_FORMAT_2 ("0xcafebabe 12345678", "%wx %x", (HOST_WIDE_INT)0xcafebabe, 0x12345678); + ASSERT_PP_FORMAT_2 ("1.000000 12345678", "%f %x", 1.0, 0x12345678); ASSERT_PP_FORMAT_2 ("A 12345678", "%c %x", 'A', 0x12345678); ASSERT_PP_FORMAT_2 ("hello world 12345678", "%s %x", "hello world", 0x12345678); diff --git a/gcc/pretty-print.h b/gcc/pretty-print.h index 2decc516b1f0..a6e60f110f07 100644 --- a/gcc/pretty-print.h +++ b/gcc/pretty-print.h @@ -330,6 +330,7 @@ pp_get_prefix (const pretty_printer *pp) { return pp->prefix; } pp_string (PP, pp_buffer (PP)->digit_buffer); \ } \ while (0) +#define pp_double(PP, F) pp_scalar (PP, "%f", F) #define pp_pointer(PP, P) pp_scalar (PP, "%p", P) #define pp_identifier(PP, ID) pp_string (PP, (pp_translate_identifiers (PP) \ diff --git a/gcc/selftest-run-tests.c b/gcc/selftest-run-tests.c index 562ada74a5f5..6d65d2491d35 100644 --- a/gcc/selftest-run-tests.c +++ b/gcc/selftest-run-tests.c @@ -73,6 +73,7 @@ selftest::run_tests () unique_ptr_tests_cc_tests (); opt_proposer_c_tests (); json_cc_tests (); + cgraph_c_tests (); optinfo_emit_json_cc_tests (); opt_problem_cc_tests (); diff --git a/gcc/selftest.h b/gcc/selftest.h index 8da7c4ae1c0f..4e4c755f9b09 100644 --- a/gcc/selftest.h +++ b/gcc/selftest.h @@ -215,6 +215,7 @@ class test_runner alphabetical order. */ extern void attribute_c_tests (); extern void bitmap_c_tests (); +extern void cgraph_c_tests (); extern void diagnostic_c_tests (); extern void diagnostic_show_locus_c_tests (); extern void dumpfile_c_tests (); diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 42df25755689..4f323171397b 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1834,7 +1834,13 @@ compute_record_mode (tree type) /* If this field is the whole struct, remember its mode so that, say, we can put a double in a class into a DF register instead of forcing it to live in the stack. */ - if (simple_cst_equal (TYPE_SIZE (type), DECL_SIZE (field))) + if (simple_cst_equal (TYPE_SIZE (type), DECL_SIZE (field)) + /* Partial int types (e.g. __int20) may have TYPE_SIZE equal to + wider types (e.g. int32), despite precision being less. Ensure + that the TYPE_MODE of the struct does not get set to the partial + int mode if there is a wider type also in the struct. */ + && known_gt (GET_MODE_PRECISION (DECL_MODE (field)), + GET_MODE_PRECISION (mode))) mode = DECL_MODE (field); /* With some targets, it is sub-optimal to access an aligned @@ -1844,10 +1850,17 @@ compute_record_mode (tree type) } /* If we only have one real field; use its mode if that mode's size - matches the type's size. This only applies to RECORD_TYPE. This - does not apply to unions. */ + matches the type's size. This generally only applies to RECORD_TYPE. + For UNION_TYPE, if the widest field is MODE_INT then use that mode. + If the widest field is MODE_PARTIAL_INT, and the union will be passed + by reference, then use that mode. */ poly_uint64 type_size; - if (TREE_CODE (type) == RECORD_TYPE + if ((TREE_CODE (type) == RECORD_TYPE + || (TREE_CODE (type) == UNION_TYPE + && (GET_MODE_CLASS (mode) == MODE_INT + || (GET_MODE_CLASS (mode) == MODE_PARTIAL_INT + && targetm.calls.pass_by_reference (pack_cumulative_args (0), + mode, type, 0))))) && mode != VOIDmode && poly_int_tree_p (TYPE_SIZE (type), &type_size) && known_eq (GET_MODE_BITSIZE (mode), type_size)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9bb807e71411..5d2447315953 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,149 @@ +2018-11-08 Uros Bizjak + + * gcc.dg/pr87874.c (em): Declare uint64_max as + const unsigned long long int. + +2018-11-08 Jozef Lawrynowicz + + * gcc.dg/attr-alloc_size-10.c: Fix calculation of USHRT_MAX to prevent + integer overflow when sizeof(short) == sizeof(int). + * gcc.dg/attr-alloc_size-11.c: Likewise. + * gcc.dg/attr-alloc_size-3.c: Likewise. + * gcc.dg/attr-alloc_size-5.c: Likewise. + * gcc.dg/builtin-stringop-chk-7.c: Likewise. + +2018-11-08 Jozef Lawrynowicz + + * c-c++-common/patchable_function_entry-decl.c: Add regex to search for + uppercase "NOP" instructions in assembler output. + * c-c++-common/patchable_function_entry-default.c: Likewise. + * c-c++-common/patchable_function_entry-definition.c: Likewise. + +2018-11-08 Jozef Lawrynowicz + + * c-c++-common/pr27336.c: Skip test if the target keeps null pointer + checks. + * gcc.dg/addr_equal-1.c: Likewise. + * gcc.dg/tree-ssa/pr78154.c: Likewise. + * gcc.dg/tree-ssa/vrp111.c: Likewise. + +2018-11-08 Jozef Lawrynowicz + + * lib/gcc-dg.exp (gcc-dg-prune): Add new regexps for when the size of + an output section is too large for a memory region, or a memory + region overflows. + +2018-11-08 Eric Botcazou + + * gnat.dg/null_pointer_deref1.adb: Remove -gnatp and add pragma. + * gnat.dg/null_pointer_deref2.adb: Likewise. + * gnat.dg/null_pointer_deref3.adb: Likewise. + * gnat.dg/opt74.adb: New test. + * gnat.dg/opt74_pkg.ad[sb]: New helper. + * gnat.dg/warn12.adb: Delete. + * gnat.dg/warn12_pkg.ads: Likewise. + +2018-11-08 David Malcolm + + PR ipa/86395 + * g++.dg/ipa/devirt-12.C: Add "-all" suffix to + "-fdump-ipa-inline". + * g++.dg/ipa/imm-devirt-1.C: Add "-optimized" suffix to + "-fdump-tree-einline". + * g++.dg/tree-prof/inline_mismatch_args.C: Add "-all" suffix to + "-fdump-tree-einline". + * g++.dg/tree-ssa/inline-1.C: Add "-optimized" suffix to + "-fdump-tree-einline". + * g++.dg/tree-ssa/inline-2.C: Likewise. + * g++.dg/tree-ssa/inline-3.C: Likewise. + * g++.dg/tree-ssa/inline-4.C: New test, based on inline-1.C, but + using "-fopt-info-inline". + * gcc.dg/ipa/fopt-info-inline-1.c: New test. + * gcc.dg/ipa/inline-4.c: Add "-all" suffix to + "-fdump-ipa-inline". Add "-fopt-info-inline" and dg-optimized + directive. + * gcc.dg/ipa/inline-7.c: Add "-optimized" suffix to + "-fdump-tree-einline". Add "-fopt-info-inline" and dg-optimized + directive. Update scan-tree-dump-times to reflect /order + suffixes. + * gcc.dg/ipa/inlinehint-4.c: Update scan-tree-dump-times to + reflect /order suffixes. + * gcc.dg/plugin/dump-1.c: Add "-loop" to "-fopt-info-note" to + avoid getting extra messages from inliner. + * gcc.dg/plugin/dump-2.c: Likewise. + * gcc.dg/pr26570.c: Add dg-prune-output to ignore new + "function body not available" missed optimization messages. + * gcc.dg/pr71969-2.c: Update scan-tree-dump-times to reflect + /order suffixes. + * gcc.dg/pr71969-3.c: Likewise. + * gcc.dg/tree-ssa/inline-11.c: Add "-all" suffix to + "-fdump-tree-einline". + * gcc.dg/tree-ssa/inline-3.c: Add "-optimized" suffix to + "-fdump-tree-einline". Update scan-tree-dump-times to reflect + /order suffixes. + * gcc.dg/tree-ssa/inline-4.c: Add "-optimized" suffix to + "-fdump-tree-einline". Add "-fopt-info-inline" and dg-optimized + directive. + * gcc.dg/tree-ssa/inline-8.c: Add "-optimized" suffix to + "-fdump-tree-einline". + * gfortran.dg/pr79966.f90: Update scan-ipa-dump to reflect /order + suffixes. + +2018-11-08 David Malcolm + + * gcc.dg/format/gcc_diag-10.c: Add coverage for %f. + +2018-11-08 David Malcolm + + * gcc.dg/format/gcc_diag-10.c (cgraph_node): New typedef. + (test_dump): Add testing of %C. + +2018-11-08 Eric Botcazou + + * g++.dg/other/pr87916.C: New test. + +2018-11-08 Richard Biener + + PR tree-optimization/87929 + * gcc.dg/pr87929.c: New testcase. + +2018-11-08 Martin Liska + + * gcc.dg/pr87811.c: Update scanned pattern. + * gcc.dg/pr87811-2.c: Likewise. + +2018-11-08 Rainer Orth + + * g++.dg/lto/pr87906_0.C: Use moon instead of possibly predefined + sun. + * g++.dg/lto/pr87906_1.C: Likewise. + +2018-11-08 Richard Biener + + PR tree-optimization/87913 + * gcc.dg/tree-ssa/phi-opt-20.c: New testcase. + +2018-11-08 Chenghua Xu + + * gcc.target/mips/mips.exp (mips-dg-options): + Add mips_option_dependency msoft-float vs no-mmi and + mips16/micromips vs no-mmi/ext/ext2 only gcc + config with Loongson target. + +2018-11-07 Jozef Lawrynowicz + + * gcc.c-torture/compile/pr65595.c: Change type of "num" argument to + memcpy from "unsigned long" to __SIZE_TYPE__. + +2018-11-07 Jozef Lawrynowicz + + PR c/87691 + * gcc.target/msp430/pr87691.c: New test. + +2018-11-07 Nikolai Merinov + + * gcc.dg/Wno-attribute-warning.c: New test. + 2018-11-07 Nathan Sidwell PR c++/87904 diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c index 32e2c06eae39..3bfb7568bee8 100644 --- a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c +++ b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c @@ -1,6 +1,6 @@ /* { dg-do compile { target { ! nvptx*-*-* } } } */ /* { dg-options "-O2 -fpatchable-function-entry=3,1" } */ -/* { dg-final { scan-assembler-times "nop" 2 { target { ! { alpha*-*-* visium-*-* } } } } } */ +/* { dg-final { scan-assembler-times "nop|NOP" 2 { target { ! { alpha*-*-* visium-*-* } } } } } */ /* { dg-final { scan-assembler-times "bis" 2 { target alpha*-*-* } } } */ /* { dg-final { scan-assembler-times "nop" 3 { target visium-*-* } } } */ diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c index be88e431e30a..bd7c6e98fc65 100644 --- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c +++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c @@ -1,6 +1,6 @@ /* { dg-do compile { target { ! nvptx*-*-* } } } */ /* { dg-options "-O2 -fpatchable-function-entry=3,1" } */ -/* { dg-final { scan-assembler-times "nop" 3 { target { ! { alpha*-*-* visium-*-* } } } } } */ +/* { dg-final { scan-assembler-times "nop|NOP" 3 { target { ! { alpha*-*-* visium-*-* } } } } } */ /* { dg-final { scan-assembler-times "bis" 3 { target alpha*-*-* } } } */ /* { dg-final { scan-assembler-times "nop" 4 { target visium-*-* } } } */ diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c index af18dbcd5e63..709113890eff 100644 --- a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c +++ b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c @@ -1,6 +1,6 @@ /* { dg-do compile { target { ! nvptx*-*-* } } } */ /* { dg-options "-O2 -fpatchable-function-entry=3,1" } */ -/* { dg-final { scan-assembler-times "nop" 1 { target { ! { alpha*-*-* visium-*-* } } } } } */ +/* { dg-final { scan-assembler-times "nop|NOP" 1 { target { ! { alpha*-*-* visium-*-* } } } } } */ /* { dg-final { scan-assembler-times "bis" 1 { target alpha*-*-* } } } */ /* { dg-final { scan-assembler-times "nop" 2 { target visium-*-* } } } */ diff --git a/gcc/testsuite/c-c++-common/pr27336.c b/gcc/testsuite/c-c++-common/pr27336.c index ce6855989a2c..4ecc232b6241 100644 --- a/gcc/testsuite/c-c++-common/pr27336.c +++ b/gcc/testsuite/c-c++-common/pr27336.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdelete-null-pointer-checks -fdump-tree-vrp1" } */ +/* { dg-skip-if "" { keeps_null_pointer_checks } } */ struct B { int x; }; extern void g3(struct B *that) __attribute__((nonnull)); diff --git a/gcc/testsuite/g++.dg/ipa/devirt-12.C b/gcc/testsuite/g++.dg/ipa/devirt-12.C index 93ce251a3cba..60271a0d7583 100644 --- a/gcc/testsuite/g++.dg/ipa/devirt-12.C +++ b/gcc/testsuite/g++.dg/ipa/devirt-12.C @@ -1,5 +1,5 @@ // { dg-do compile { target c++11 } } -// { dg-options "-O -fdump-ipa-inline" } +// { dg-options "-O -fdump-ipa-inline-all" } class Foo { diff --git a/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C b/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C index 37b7d87299e1..00ac61e7f384 100644 --- a/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C +++ b/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C @@ -1,7 +1,7 @@ /* Verify that virtual calls are folded even early inlining puts them into one function with the definition. */ /* { dg-do run } */ -/* { dg-options "-O2 -fdump-tree-einline" } */ +/* { dg-options "-O2 -fdump-tree-einline-optimized" } */ extern "C" void abort (void); diff --git a/gcc/testsuite/g++.dg/lto/pr87906_0.C b/gcc/testsuite/g++.dg/lto/pr87906_0.C index 08e7ed3ba07f..31b62dad0e0e 100644 --- a/gcc/testsuite/g++.dg/lto/pr87906_0.C +++ b/gcc/testsuite/g++.dg/lto/pr87906_0.C @@ -3,13 +3,13 @@ // { dg-extra-ld-options "-shared -nostdlib" } namespace com { -namespace sun { +namespace moon { namespace star {} -} // namespace sun +} // namespace moon } // namespace com -namespace a = com::sun::star; +namespace a = com::moon::star; namespace com { -namespace sun { +namespace moon { namespace star { namespace uno { class a { @@ -28,7 +28,7 @@ class c { class RuntimeException : b {}; } // namespace uno } // namespace star -} // namespace sun +} // namespace moon } // namespace com template void d(int) { throw a::uno::RuntimeException(); } int f; diff --git a/gcc/testsuite/g++.dg/lto/pr87906_1.C b/gcc/testsuite/g++.dg/lto/pr87906_1.C index ee5849fd604a..561087693dfa 100644 --- a/gcc/testsuite/g++.dg/lto/pr87906_1.C +++ b/gcc/testsuite/g++.dg/lto/pr87906_1.C @@ -1,5 +1,5 @@ namespace com { -namespace sun { +namespace moon { namespace star { namespace uno { class a { @@ -15,9 +15,9 @@ class RuntimeException : b {}; } // namespace uno class C : uno::RuntimeException {}; } // namespace star -} // namespace sun +} // namespace moon } // namespace com -using com::sun::star::C; -using com::sun::star::uno::RuntimeException; +using com::moon::star::C; +using com::moon::star::uno::RuntimeException; void d() { throw RuntimeException(); } void e() { C(); } diff --git a/gcc/testsuite/g++.dg/other/pr87916.C b/gcc/testsuite/g++.dg/other/pr87916.C new file mode 100644 index 000000000000..5c6947824301 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/pr87916.C @@ -0,0 +1,45 @@ +// PR middle-end/87916 +// Testcase by Martin Liška + +// { dg-do compile } +// { dg-options "-O2 -g" } +// { dg-additional-options "-fPIC" { target fpic } } + +struct a { + virtual ~a(); +}; +template class c { +public: + class d { + public: + d(c); + b *operator->(); + }; +}; +int e, f; +class g { +public: + class h { + public: + virtual void j(g &, int &, bool) = 0; + }; + c k(); + int *l(); + int *m(); +}; +int *g::l() try { + for (c::d i(k());;) + i->j(*this, e, true); +} catch (int) { + return 0; +} +int *g::m() try { + for (c::d i(k());;) + i->j(*this, f, false); +} catch (int) { + return 0; +} +struct n : a, g::h { + void o(); + void j(g &, int &, bool) { o(); } +}; diff --git a/gcc/testsuite/g++.dg/tree-prof/inline_mismatch_args.C b/gcc/testsuite/g++.dg/tree-prof/inline_mismatch_args.C index 2156cec1d2a3..b65d9153572d 100644 --- a/gcc/testsuite/g++.dg/tree-prof/inline_mismatch_args.C +++ b/gcc/testsuite/g++.dg/tree-prof/inline_mismatch_args.C @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-einline" } */ +/* { dg-options "-O2 -fdump-tree-einline-all" } */ class DocId { public: DocId() { } diff --git a/gcc/testsuite/g++.dg/tree-ssa/inline-1.C b/gcc/testsuite/g++.dg/tree-ssa/inline-1.C index 4497facb87b8..9c49ddb912a3 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/inline-1.C +++ b/gcc/testsuite/g++.dg/tree-ssa/inline-1.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=3" } */ +/* { dg-options "-O2 -fdump-tree-einline-optimized --param max-early-inliner-iterations=3" } */ /* { dg-add-options bind_pic_locally } */ namespace std { diff --git a/gcc/testsuite/g++.dg/tree-ssa/inline-2.C b/gcc/testsuite/g++.dg/tree-ssa/inline-2.C index 79f807cd2204..b72f6523bead 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/inline-2.C +++ b/gcc/testsuite/g++.dg/tree-ssa/inline-2.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=3" } */ +/* { dg-options "-O2 -fdump-tree-einline-optimized --param max-early-inliner-iterations=3" } */ /* { dg-add-options bind_pic_locally } */ namespace std { diff --git a/gcc/testsuite/g++.dg/tree-ssa/inline-3.C b/gcc/testsuite/g++.dg/tree-ssa/inline-3.C index 0ad366e7daf6..131f12df9d48 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/inline-3.C +++ b/gcc/testsuite/g++.dg/tree-ssa/inline-3.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=5" } */ +/* { dg-options "-O2 -fdump-tree-einline-optimized --param max-early-inliner-iterations=5" } */ /* { dg-add-options bind_pic_locally } */ #include diff --git a/gcc/testsuite/g++.dg/tree-ssa/inline-4.C b/gcc/testsuite/g++.dg/tree-ssa/inline-4.C new file mode 100644 index 000000000000..1dd81409cf3d --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/inline-4.C @@ -0,0 +1,32 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fopt-info-inline --param max-early-inliner-iterations=3" } */ +/* { dg-add-options bind_pic_locally } */ + +namespace std { + extern "C" int puts(const char *s); +} + +template void +foreach (T b, T e, void (*ptr)(E)) +{ + for (; b != e; b++) + ptr(*b); // { dg-optimized "Inlining void inline_me\[^\\n\]* into int main\[^\\n\]*" } +} + +void +inline_me (char *x) +{ + std::puts(x); +} + +static void +inline_me_too (char *x) +{ + std::puts(x); +} + +int main(int argc, char **argv) +{ + foreach (argv, argv + argc, inline_me); // { dg-optimized "Inlining void foreach\[^\\n\]* into int main\[^\\n\]*" } + foreach (argv, argv + argc, inline_me_too); // { dg-optimized "Inlining void foreach\[^\\n\]* into int main\[^\\n\]*" } +} diff --git a/gcc/testsuite/gcc.c-torture/compile/pr65595.c b/gcc/testsuite/gcc.c-torture/compile/pr65595.c index 0ab716120c9e..b6a0aa4002a0 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr65595.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr65595.c @@ -1,4 +1,4 @@ -extern void *memcpy(void *, const void *, unsigned long); +extern void *memcpy(void *, const void *, __SIZE_TYPE__); struct in6_addr { struct { int u6_addr32[4]; diff --git a/gcc/testsuite/gcc.dg/Wno-attribute-warning.c b/gcc/testsuite/gcc.dg/Wno-attribute-warning.c new file mode 100644 index 000000000000..247530475748 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wno-attribute-warning.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-Werror -Wno-error=attribute-warning" } */ + +int f1(void) __attribute__ ((warning("Please avoid f1"))); +int func1(void) +{ + return f1(); /* { dg-warning "'f1' declared with attribute warning: Please avoid f1" } */ +} diff --git a/gcc/testsuite/gcc.dg/addr_equal-1.c b/gcc/testsuite/gcc.dg/addr_equal-1.c index 70fa35464c11..18b0dc9e6c2f 100644 --- a/gcc/testsuite/gcc.dg/addr_equal-1.c +++ b/gcc/testsuite/gcc.dg/addr_equal-1.c @@ -4,6 +4,7 @@ /* { dg-require-alias "" } */ /* { dg-options "-O2 -fdelete-null-pointer-checks" } */ /* { dg-skip-if "" { powerpc-ibm-aix* } } */ +/* { dg-skip-if "function pointers can be NULL" { keeps_null_pointer_checks } } */ void abort (void); extern int undef_var0, undef_var1; extern __attribute__ ((weak)) int weak_undef_var0; diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-10.c b/gcc/testsuite/gcc.dg/attr-alloc_size-10.c index 40807171ff07..071c6aa1e3ba 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-10.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-10.c @@ -13,7 +13,7 @@ #define SHRT_MAX __SHRT_MAX__ #define SHRT_MIN (-SHRT_MAX - 1) -#define USHRT_MAX (SHRT_MAX * 2 + 1) +#define USHRT_MAX (SHRT_MAX * 2U + 1) #define INT_MAX __INT_MAX__ #define INT_MIN (-INT_MAX - 1) diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-11.c b/gcc/testsuite/gcc.dg/attr-alloc_size-11.c index 301a06fd4644..7f2fc49b740a 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-11.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-11.c @@ -11,7 +11,7 @@ #define SHRT_MAX __SHRT_MAX__ #define SHRT_MIN (-SHRT_MAX - 1) -#define USHRT_MAX (SHRT_MAX * 2 + 1) +#define USHRT_MAX (SHRT_MAX * 2U + 1) #define INT_MAX __INT_MAX__ #define INT_MIN (-INT_MAX - 1) diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-3.c b/gcc/testsuite/gcc.dg/attr-alloc_size-3.c index 96ff077ef20f..7e8c22fc66dc 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-3.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-3.c @@ -14,7 +14,7 @@ #define SHRT_MAX __SHRT_MAX__ #define SHRT_MIN (-SHRT_MAX - 1) -#define USHRT_MAX (SHRT_MAX * 2 + 1) +#define USHRT_MAX (SHRT_MAX * 2U + 1) #define INT_MAX __INT_MAX__ #define INT_MIN (-INT_MAX - 1) diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-5.c b/gcc/testsuite/gcc.dg/attr-alloc_size-5.c index f9884ed72f7a..26ee43f87dee 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-5.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-5.c @@ -12,7 +12,7 @@ #define SHRT_MAX __SHRT_MAX__ #define SHRT_MIN (-SHRT_MAX - 1) -#define USHRT_MAX (SHRT_MAX * 2 + 1) +#define USHRT_MAX (SHRT_MAX * 2U + 1) #define INT_MAX __INT_MAX__ #define INT_MIN (-INT_MAX - 1) diff --git a/gcc/testsuite/gcc.dg/builtin-stringop-chk-7.c b/gcc/testsuite/gcc.dg/builtin-stringop-chk-7.c index 173e4ff7e2af..d3908a2cd09d 100644 --- a/gcc/testsuite/gcc.dg/builtin-stringop-chk-7.c +++ b/gcc/testsuite/gcc.dg/builtin-stringop-chk-7.c @@ -9,7 +9,7 @@ #define UCHAR_MAX (SCHAR_MAX * 2 + 1) #define SHRT_MAX __SHRT_MAX__ -#define USHRT_MAX (SHRT_MAX * 2 + 1) +#define USHRT_MAX (SHRT_MAX * 2U + 1) #define INT_MAX __INT_MAX__ #define UINT_MAX (INT_MAX * 2U + 1) diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-10.c b/gcc/testsuite/gcc.dg/format/gcc_diag-10.c index 2f6a002a47f9..ba2629b3ecba 100644 --- a/gcc/testsuite/gcc.dg/format/gcc_diag-10.c +++ b/gcc/testsuite/gcc.dg/format/gcc_diag-10.c @@ -20,7 +20,7 @@ typedef union tree_node *tree; typedef struct gimple gimple; /* Likewise for gimple. */ -typedef struct gimple gimple; +typedef struct cgraph_node cgraph_node; #define FORMAT(kind) __attribute__ ((format (__gcc_## kind ##__, 1, 2))) @@ -162,7 +162,7 @@ void test_cxxdiag (tree t, gimple *gc) cxxdiag ("%<%X%>", t); } -void test_dump (tree t, gimple *stmt) +void test_dump (tree t, gimple *stmt, cgraph_node *node) { dump ("%<"); /* { dg-warning "unterminated quoting directive" } */ dump ("%>"); /* { dg-warning "unmatched quoting directive " } */ @@ -182,4 +182,7 @@ void test_dump (tree t, gimple *stmt) dump ("%E", stmt); dump ("%T", t); dump ("%G", stmt); + dump ("%C", node); + dump ("%f", 1.0); + dump ("%4.2f", 1.0); /* { dg-warning "format" } */ } diff --git a/gcc/testsuite/gcc.dg/ipa/fopt-info-inline-1.c b/gcc/testsuite/gcc.dg/ipa/fopt-info-inline-1.c new file mode 100644 index 000000000000..4032ad13e196 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/fopt-info-inline-1.c @@ -0,0 +1,44 @@ +/* { dg-options "-O3 -fopt-info-inline-optimized-missed" } */ + +static int foo (int a) +{ + return a + 10; +} + +static int bar (int b) +{ + return b - 20; +} + +static int boo (int a, int b) +{ + return (foo (a) /* { dg-optimized "Inlining foo/\[0-9\]+ into boo/\[0-9\]+" } */ + + bar (b)); /* { dg-optimized "Inlining bar/\[0-9\]+ into boo/\[0-9\]+" } */ +} + +extern int v_a, v_b; +extern int result; + +int compute () +{ + result = boo (v_a, v_b); /* { dg-optimized "Inlining boo/\[0-9\]+ into compute/\[0-9\]+" } */ + + return result; +} + +extern void not_available(int); + +int __attribute__ ((noinline,noclone)) get_input(void) +{ + return 1; +} + +int test_1 () +{ + return get_input (); /* { dg-missed "not inlinable: test_1/\[0-9\]+ -> get_input/\[0-9\]+, function not inlinable" } */ +} + +void test_2 (int v) +{ + not_available (1); /* { dg-missed "not inlinable: test_2/\[0-9\]+ -> not_available/\[0-9\]+, function body not available" } */ +} diff --git a/gcc/testsuite/gcc.dg/ipa/inline-4.c b/gcc/testsuite/gcc.dg/ipa/inline-4.c index fdb44653e88d..db4cfc6b8add 100644 --- a/gcc/testsuite/gcc.dg/ipa/inline-4.c +++ b/gcc/testsuite/gcc.dg/ipa/inline-4.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-Os -c -fdump-ipa-inline -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */ +/* { dg-options "-Os -c -fdump-ipa-inline-all -fopt-info-inline -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */ /* { dg-add-options bind_pic_locally } */ void work_hard (void); @@ -20,7 +20,7 @@ void do_something (int shall_i_work) } int foo (int invariant) { - do_something (0); + do_something (0); // { dg-optimized "Inlined do_something/\[0-9]+ into foo/\[0-9]+" } do_something (1); } diff --git a/gcc/testsuite/gcc.dg/ipa/inline-7.c b/gcc/testsuite/gcc.dg/ipa/inline-7.c index 5002aa098f3e..7dabb14f6b1a 100644 --- a/gcc/testsuite/gcc.dg/ipa/inline-7.c +++ b/gcc/testsuite/gcc.dg/ipa/inline-7.c @@ -1,6 +1,6 @@ /* Check that early inliner works out that a is empty of parameter 0. */ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-einline -fno-partial-inlining" } */ +/* { dg-options "-O2 -fdump-tree-einline-optimized -fopt-info-inline -fno-partial-inlining" } */ void t(void); int a (int b) { @@ -18,7 +18,7 @@ int a (int b) void m() { - a(1); + a(1); /* { dg-optimized "Inlining a/\[0-9\]* into m/\[0-9\]*" } */ a(0); } -/* { dg-final { scan-tree-dump-times "Inlining a into m" 1 "einline" } } */ +/* { dg-final { scan-tree-dump-times "Inlining a.* into m.*" 1 "einline" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/inlinehint-4.c b/gcc/testsuite/gcc.dg/ipa/inlinehint-4.c index 656260a551a2..ecb9a293d1c9 100644 --- a/gcc/testsuite/gcc.dg/ipa/inlinehint-4.c +++ b/gcc/testsuite/gcc.dg/ipa/inlinehint-4.c @@ -35,5 +35,5 @@ test (int i) lookup (9 * i); } /* { dg-final { scan-ipa-dump "Wrapper penalty" "inline" } } */ -/* { dg-final { scan-ipa-dump-not "Inlined lookup_slow into lookup" "inline" } } */ -/* { dg-final { scan-ipa-dump "Inlined lookup into test" "inline" } } */ +/* { dg-final { scan-ipa-dump-not "Inlined lookup_slow/\[0-9\]* into lookup/\[0-9\]*" "inline" } } */ +/* { dg-final { scan-ipa-dump "Inlined lookup/\[0-9\]* into test/\[0-9\]*" "inline" } } */ diff --git a/gcc/testsuite/gcc.dg/plugin/dump-1.c b/gcc/testsuite/gcc.dg/plugin/dump-1.c index 95bd7a4224dd..1538bf6ccd6f 100644 --- a/gcc/testsuite/gcc.dg/plugin/dump-1.c +++ b/gcc/testsuite/gcc.dg/plugin/dump-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fopt-info-note" } */ +/* { dg-options "-fopt-info-loop-note" } */ extern void test_string_literal (void); extern void test_tree (void); diff --git a/gcc/testsuite/gcc.dg/plugin/dump-2.c b/gcc/testsuite/gcc.dg/plugin/dump-2.c index 961a3d3c02ae..04b82e5038be 100644 --- a/gcc/testsuite/gcc.dg/plugin/dump-2.c +++ b/gcc/testsuite/gcc.dg/plugin/dump-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fopt-info-note-internals" } */ +/* { dg-options "-fopt-info-loop-note-internals" } */ extern void test_string_literal (void); extern void test_tree (void); diff --git a/gcc/testsuite/gcc.dg/pr26570.c b/gcc/testsuite/gcc.dg/pr26570.c index 87b644a1d8fd..d29bc3585334 100644 --- a/gcc/testsuite/gcc.dg/pr26570.c +++ b/gcc/testsuite/gcc.dg/pr26570.c @@ -6,3 +6,4 @@ unsigned test (unsigned a, unsigned b) { return a / b; } /* { dg-missed "\[^\n\]*execution counts estimated" } */ +/* { dg-prune-output "function body not available" } */ diff --git a/gcc/testsuite/gcc.dg/pr71969-2.c b/gcc/testsuite/gcc.dg/pr71969-2.c index f434fd0debdf..73839a6d0e80 100644 --- a/gcc/testsuite/gcc.dg/pr71969-2.c +++ b/gcc/testsuite/gcc.dg/pr71969-2.c @@ -20,4 +20,4 @@ main () return 0; } -/* { dg-final { scan-tree-dump-times "Inlining foo into main" 4 "einline" } } */ +/* { dg-final { scan-tree-dump-times "Inlining foo/\[0-9\]* into main/\[0-9\]*" 4 "einline" } } */ diff --git a/gcc/testsuite/gcc.dg/pr71969-3.c b/gcc/testsuite/gcc.dg/pr71969-3.c index 583d89d68dac..189adfd45800 100644 --- a/gcc/testsuite/gcc.dg/pr71969-3.c +++ b/gcc/testsuite/gcc.dg/pr71969-3.c @@ -35,4 +35,4 @@ main () } /* { dg-final { scan-tree-dump-times "will not early inline" 8 "einline" } } */ -/* { dg-final { scan-tree-dump-times "Inlining foo into main" 4 "einline" } } */ +/* { dg-final { scan-tree-dump-times "Inlining foo/\[0-9\]* into main/\[0-9\]*" 4 "einline" } } */ diff --git a/gcc/testsuite/gcc.dg/pr87811-2.c b/gcc/testsuite/gcc.dg/pr87811-2.c index aa30ddff47bf..8b0818756e24 100644 --- a/gcc/testsuite/gcc.dg/pr87811-2.c +++ b/gcc/testsuite/gcc.dg/pr87811-2.c @@ -6,7 +6,7 @@ void bar (void); void foo (int i) { - if (__builtin_expect_with_probability (i, 0, 2.0f)) /* { dg-error "probability argument .* must be a in the range 0\\\.0 to 1\\\.0" } */ + if (__builtin_expect_with_probability (i, 0, 2.0f)) /* { dg-error "probability .* is outside the range \\\[0\\\.0, 1\\\.0\\\]" } */ bar (); } diff --git a/gcc/testsuite/gcc.dg/pr87811.c b/gcc/testsuite/gcc.dg/pr87811.c index 9045c8ea9573..110b38359751 100644 --- a/gcc/testsuite/gcc.dg/pr87811.c +++ b/gcc/testsuite/gcc.dg/pr87811.c @@ -6,7 +6,7 @@ void bar (void); void foo (int i, double d) { - if (__builtin_expect_with_probability (i, 0, d)) /* { dg-error "probability argument .d. must be a compile time constant" } */ + if (__builtin_expect_with_probability (i, 0, d)) /* { dg-error "probability .d. must be constant floating-point expression" } */ bar (); } diff --git a/gcc/testsuite/gcc.dg/pr87874.c b/gcc/testsuite/gcc.dg/pr87874.c index 1480a5e54937..80debe0b4806 100644 --- a/gcc/testsuite/gcc.dg/pr87874.c +++ b/gcc/testsuite/gcc.dg/pr87874.c @@ -16,7 +16,7 @@ em (int u5, int fo, int s7) if (es == 0) if (nb == *vk) { - const unsigned long int uint64_max = 18446744073709551615ul; + const unsigned long long int uint64_max = 18446744073709551615ull; __int128 ks = uint64_max / 2 + 1; while (s7 < 1) diff --git a/gcc/testsuite/gcc.dg/pr87929.c b/gcc/testsuite/gcc.dg/pr87929.c new file mode 100644 index 000000000000..f64f7ada442b --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr87929.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-fexceptions -fnon-call-exceptions -fsignaling-nans" } */ + +#define complex __complex__ +#define _Complex_I (1.0iF) + +extern void f2c_4d__( complex float *, complex float *); +extern void abort (void); + +void f2c_4c__(void) +{ + complex float x,ret_val; + x = 1234 + 5678 * _Complex_I; + f2c_4d__(&ret_val,&x); + if ( x != ret_val ) abort(); +} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/inline-11.c b/gcc/testsuite/gcc.dg/tree-ssa/inline-11.c index 6f0ff681fe48..5673c32f7570 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/inline-11.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/inline-11.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-weak "" } */ -/* { dg-options "-O2 -fdump-tree-einline" } */ +/* { dg-options "-O2 -fdump-tree-einline-all" } */ int w; int bar (void) __attribute__ ((weak)); int bar (){ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c b/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c index 299898993151..cd441aff6c5d 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=2" } */ +/* { dg-options "-O2 -fdump-tree-einline-optimized --param max-early-inliner-iterations=2" } */ /* { dg-add-options bind_pic_locally } */ extern void inlined (); @@ -27,5 +27,5 @@ inline_me_too (void) { inlined(); } -/* { dg-final { scan-tree-dump-times "Inlining inline_me " 1 "einline"} } */ -/* { dg-final { scan-tree-dump-times "Inlining inline_me_too " 1 "einline"} } */ +/* { dg-final { scan-tree-dump-times "Inlining inline_me/\[0-9\]* " 1 "einline"} } */ +/* { dg-final { scan-tree-dump-times "Inlining inline_me_too/\[0-9\]* " 1 "einline"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/inline-4.c b/gcc/testsuite/gcc.dg/tree-ssa/inline-4.c index c9f79782744b..93412fa697f5 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/inline-4.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/inline-4.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-einline" } */ +/* { dg-options "-O2 -fdump-tree-einline-optimized -fopt-info-inline" } */ /* { dg-add-options bind_pic_locally } */ extern int rand(void); @@ -13,7 +13,7 @@ int my_id; int main() { - int res = get_data_for (my_id); + int res = get_data_for (my_id); /* { dg-optimized "Inlining get_data_for/\[0-9\]+ into main/\[0-9\]+." } */ switch (res) { case 0: @@ -23,4 +23,4 @@ int main() } } -/* { dg-final { scan-tree-dump "Inlining get_data_for into main" "einline" } } */ +/* { dg-final { scan-tree-dump "Inlining get_data_for/\[0-9\]* into main/\[0-9\]*" "einline" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/inline-8.c b/gcc/testsuite/gcc.dg/tree-ssa/inline-8.c index 6da886e88630..f87e0b58e99b 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/inline-8.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/inline-8.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O -finline-small-functions --param early-inlining-insns=0 -fdump-tree-einline" } */ +/* { dg-options "-O -finline-small-functions --param early-inlining-insns=0 -fdump-tree-einline-optimized" } */ int foo0(); void bar0() { foo0(); } diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-20.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-20.c new file mode 100644 index 000000000000..c310308e3a65 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-20.c @@ -0,0 +1,25 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-phiopt1" } */ + +unsigned int f(unsigned int num) +{ + return num < 1 ? 1 : num; +} + +unsigned int g(unsigned int num) +{ + return num > (unsigned)__INT_MAX__ * 2 ? (unsigned)__INT_MAX__ * 2 : num; +} + +int h(int num) +{ + return num < -__INT_MAX__ ? -__INT_MAX__ : num; +} + +int i(int num) +{ + return num > __INT_MAX__-1 ? __INT_MAX__-1 : num; +} + +/* { dg-final { scan-tree-dump-times "MAX_EXPR" 2 "phiopt1" } } */ +/* { dg-final { scan-tree-dump-times "MIN_EXPR" 2 "phiopt1" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr78154.c b/gcc/testsuite/gcc.dg/tree-ssa/pr78154.c index b561503a0009..3ba8f64e2664 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr78154.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr78154.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-evrp-slim -fdelete-null-pointer-checks" } */ +/* { dg-skip-if "" { keeps_null_pointer_checks } } */ void f(void *d, const void *s, __SIZE_TYPE__ n) { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp111.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp111.c index 631442358be2..cae2bc75aff9 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp111.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp111.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-evrp -fdelete-null-pointer-checks" } */ +/* { dg-skip-if "" { keeps_null_pointer_checks } } */ void foo (void *p) __attribute__((nonnull(1))); diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp index e70d416d0ddd..002cc280e307 100644 --- a/gcc/testsuite/gcc.target/mips/mips.exp +++ b/gcc/testsuite/gcc.target/mips/mips.exp @@ -1054,10 +1054,19 @@ proc mips-dg-options { args } { mips_option_dependency options "-mno-plt" "addressing=unknown" mips_option_dependency options "-mabicalls" "-G0" mips_option_dependency options "-mno-gpopt" "-mexplicit-relocs" - mips_option_dependency options "-mips16" "-mno-loongson-mmi" - mips_option_dependency options "-mmicromips" "-mno-loongson-mmi" - mips_option_dependency options "-msoft-float" "-mno-loongson-mmi" - mips_option_dependency options "-mmicromips" "-mno-loongson-ext" + + if { [check_configured_with "with-arch=loongson3a"] + || [check_configured_with "with-arch=gs464"] + || [check_configured_with "with-arch=gs464e"] + || [check_configured_with "with-arch=gs264e"] } { + mips_option_dependency options "-msoft-float" "-mno-loongson-mmi" + mips_option_dependency options "-mips16" "-mno-loongson-mmi" + mips_option_dependency options "-mips16" "-mno-loongson-ext" + mips_option_dependency options "-mips16" "-mno-loongson-ext2" + mips_option_dependency options "-mmicromips" "-mno-loongson-mmi" + mips_option_dependency options "-mmicromips" "-mno-loongson-ext" + mips_option_dependency options "-mmicromips" "-mno-loongson-ext2" + } # Work out information about the current ABI. set abi_test_option_p [mips_test_option_p options abi] diff --git a/gcc/testsuite/gcc.target/msp430/pr87691.c b/gcc/testsuite/gcc.target/msp430/pr87691.c new file mode 100644 index 000000000000..c00425d2452c --- /dev/null +++ b/gcc/testsuite/gcc.target/msp430/pr87691.c @@ -0,0 +1,41 @@ +/* PR 87691 - Test that a union containing __int20 and a float is not treated as + 20-bits in size. */ + +/* { dg-do compile } */ +/* { dg-skip-if "no __int20 for mcpu=msp430" { *-*-* } { "-mcpu=msp430" } { "" } } */ +/* { dg-final { scan-assembler-not "MOVX.A" } } */ + +/* To move a 20-bit value from memory (using indexed or indirect register + mode), onto the stack (also addressed using indexed or indirect register + mode), MOVX.A must be used. MOVA does not support these addressing modes. + Therefore, to check that the union is not manipulated as a 20-bit type, + test that no MOVX.A instructions are present in the assembly. + + MOVA is used to fill/spill u.i, but if the union is treated as 20 bits in + size, MOVX.A would be used. No other __int20 operations are present + in the source, so there will be no valid uses of MOVX.A in the resulting + assembly. */ + +union U1 +{ + float f; + __int20 i; +}; + +union U2 +{ + __int20 i; + float f; +}; + +float foo1 (union U1 u) +{ + u.i += 42; + return u.f; +} + +float foo2 (union U2 u) +{ + u.i += 42; + return u.f; +} diff --git a/gcc/testsuite/gfortran.dg/pr79966.f90 b/gcc/testsuite/gfortran.dg/pr79966.f90 index eee43fb24977..2170afd049a3 100644 --- a/gcc/testsuite/gfortran.dg/pr79966.f90 +++ b/gcc/testsuite/gfortran.dg/pr79966.f90 @@ -109,4 +109,4 @@ contains call RunTPTests() end program -! { dg-final { scan-ipa-dump "Inlined tp_sum into runtptests" "inline" } } +! { dg-final { scan-ipa-dump "Inlined tp_sum/\[0-9\]+ into runtptests/\[0-9\]+" "inline" } } diff --git a/gcc/testsuite/gnat.dg/null_pointer_deref1.adb b/gcc/testsuite/gnat.dg/null_pointer_deref1.adb index ec7f94605596..0f030b001bd1 100644 --- a/gcc/testsuite/gnat.dg/null_pointer_deref1.adb +++ b/gcc/testsuite/gnat.dg/null_pointer_deref1.adb @@ -1,11 +1,13 @@ -- { dg-do run } --- { dg-options "-gnatp" } -- This test requires architecture- and OS-specific support code for unwinding -- through signal frames (typically located in *-unwind.h) to pass. Feel free -- to disable it if this code hasn't been implemented yet. procedure Null_Pointer_Deref1 is + + pragma Suppress (All_Checks); + type Int_Ptr is access all Integer; function Ident return Int_Ptr is diff --git a/gcc/testsuite/gnat.dg/null_pointer_deref2.adb b/gcc/testsuite/gnat.dg/null_pointer_deref2.adb index 284762216c56..2a4ed0954bb1 100644 --- a/gcc/testsuite/gnat.dg/null_pointer_deref2.adb +++ b/gcc/testsuite/gnat.dg/null_pointer_deref2.adb @@ -1,5 +1,4 @@ -- { dg-do run } --- { dg-options "-gnatp" } -- This test requires architecture- and OS-specific support code for unwinding -- through signal frames (typically located in *-unwind.h) to pass. Feel free @@ -7,6 +6,8 @@ procedure Null_Pointer_Deref2 is + pragma Suppress (All_Checks); + task T; task body T is diff --git a/gcc/testsuite/gnat.dg/null_pointer_deref3.adb b/gcc/testsuite/gnat.dg/null_pointer_deref3.adb index f92242e7e679..c8e66a6c94aa 100644 --- a/gcc/testsuite/gnat.dg/null_pointer_deref3.adb +++ b/gcc/testsuite/gnat.dg/null_pointer_deref3.adb @@ -1,5 +1,4 @@ -- { dg-do run } --- { dg-options "-O -gnatp" } -- This test requires architecture- and OS-specific support code for unwinding -- through signal frames (typically located in *-unwind.h) to pass. Feel free @@ -7,6 +6,8 @@ procedure Null_Pointer_Deref3 is + pragma Suppress (All_Checks); + procedure Leaf is type Int_Ptr is access all Integer; function n return Int_Ptr is diff --git a/gcc/testsuite/gnat.dg/opt74.adb b/gcc/testsuite/gnat.dg/opt74.adb new file mode 100644 index 000000000000..8eacaa5b49e2 --- /dev/null +++ b/gcc/testsuite/gnat.dg/opt74.adb @@ -0,0 +1,13 @@ +-- { dg-do run } +-- { dg-options "-O2" } + +with Opt74_Pkg; use Opt74_Pkg; + +procedure Opt74 is + Index, Found : Integer; +begin + Proc (Found, Index); + if Found = 1 then + raise Program_Error; + end if; +end; diff --git a/gcc/testsuite/gnat.dg/opt74_pkg.adb b/gcc/testsuite/gnat.dg/opt74_pkg.adb new file mode 100644 index 000000000000..4d5ce4fa822b --- /dev/null +++ b/gcc/testsuite/gnat.dg/opt74_pkg.adb @@ -0,0 +1,16 @@ +package body Opt74_Pkg is + + procedure Proc (Found : out Integer; Index : out Integer) is + begin + Index := 1; + Found := 0; + while (Index <= A'Last) and (Found = 0) loop + if A (Index) = 2 then + Found := 1; + else + Index := Index + 1; + end if; + end loop; + end; + +end Opt74_Pkg; diff --git a/gcc/testsuite/gnat.dg/opt74_pkg.ads b/gcc/testsuite/gnat.dg/opt74_pkg.ads new file mode 100644 index 000000000000..7c8e85e85d76 --- /dev/null +++ b/gcc/testsuite/gnat.dg/opt74_pkg.ads @@ -0,0 +1,7 @@ +package Opt74_Pkg is + + A : array (1 .. 10) of Integer := (others => 0); + + procedure Proc (Found : out Integer; Index : out Integer); + +end Opt74_Pkg; diff --git a/gcc/testsuite/gnat.dg/warn12.adb b/gcc/testsuite/gnat.dg/warn12.adb deleted file mode 100644 index 8ffd0c7dff08..000000000000 --- a/gcc/testsuite/gnat.dg/warn12.adb +++ /dev/null @@ -1,48 +0,0 @@ --- { dg-do compile } --- { dg-options "-O2" } - -with Text_IO; use Text_IO; -with System.Storage_Elements; use System.Storage_Elements; -with Warn12_Pkg; use Warn12_Pkg; - -procedure Warn12 (N : Natural) is - - Buffer_Size : constant Storage_Offset - := Token_Groups'Size/System.Storage_Unit + 4096; - - Buffer : Storage_Array (1 .. Buffer_Size); - for Buffer'Alignment use 8; - - Tg1 : Token_Groups; - for Tg1'Address use Buffer'Address; - - Tg2 : Token_Groups; - pragma Warnings (Off, Tg2); - - sid : Sid_And_Attributes; - - pragma Suppress (Index_Check, Sid_And_Attributes_Array); - -begin - - for I in 0 .. 7 loop - sid := Tg1.Groups(I); -- { dg-bogus "out-of-bounds access" } - Put_Line("Iteration"); - end loop; - - for I in 0 .. N loop - sid := Tg1.Groups(I); -- { dg-bogus "out-of-bounds access" } - Put_Line("Iteration"); - end loop; - - for I in 0 .. 7 loop - sid := Tg2.Groups(I); -- { dg-warning "out-of-bounds access" } - Put_Line("Iteration"); - end loop; - - for I in 0 .. N loop - sid := Tg2.Groups(I); -- { dg-warning "out-of-bounds access" } - Put_Line("Iteration"); - end loop; - -end; diff --git a/gcc/testsuite/gnat.dg/warn12_pkg.ads b/gcc/testsuite/gnat.dg/warn12_pkg.ads deleted file mode 100644 index b3191cc304f6..000000000000 --- a/gcc/testsuite/gnat.dg/warn12_pkg.ads +++ /dev/null @@ -1,21 +0,0 @@ -with Interfaces.C; use Interfaces.C; -with System; - -package Warn12_Pkg is - - Anysize_Array: constant := 0; - - type Sid_And_Attributes is record - Sid : System.Address; - Attributes : Interfaces.C.Unsigned_Long; - end record; - - type Sid_And_Attributes_Array - is array (Integer range 0..Anysize_Array) of aliased Sid_And_Attributes; - - type Token_Groups is record - GroupCount : Interfaces.C.Unsigned_Long; - Groups : Sid_And_Attributes_Array; - end record; - -end Warn12_Pkg; diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index c33a50c0b133..305dd3c82508 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -394,6 +394,14 @@ proc gcc-dg-prune { system text } { return "::unsupported::memory full" } + if [regexp "(^|\n)\[^\n\]* section.*will not fit in region" $text] { + return "::unsupported::memory full" + } + + if [regexp "(^|\n)\[^\n\]* region.*overflowed by" $text] { + return "::unsupported::memory full" + } + # Likewise, if we see ".text exceeds local store range" or # similar. if {[string match "spu-*" $system] && \ diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index 49088081bb09..4bf644f9473b 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -1558,6 +1558,8 @@ expand_complex_comparison (gimple_stmt_iterator *gsi, tree ar, tree ai, } update_stmt (stmt); + if (maybe_clean_eh_stmt (stmt)) + gimple_purge_dead_eh_edges (gimple_bb (stmt)); } /* Expand inline asm that sets some complex SSA_NAMEs. */ diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 66e780d635a1..6019c6168bfc 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -393,7 +393,7 @@ print_lambda_vector (FILE * outfile, lambda_vector vector, int n) int i; for (i = 0; i < n; i++) - fprintf (outfile, "%3d ", vector[i]); + fprintf (outfile, "%3d ", (int)vector[i]); fprintf (outfile, "\n"); } diff --git a/gcc/tree-data-ref.h b/gcc/tree-data-ref.h index 525d27f04b96..439a8b986dd8 100644 --- a/gcc/tree-data-ref.h +++ b/gcc/tree-data-ref.h @@ -138,7 +138,8 @@ struct dr_alias space. A vector space is a set that is closed under vector addition and scalar multiplication. In this vector space, an element is a list of integers. */ -typedef int *lambda_vector; +typedef HOST_WIDE_INT lambda_int; +typedef lambda_int *lambda_vector; /* An integer matrix. A matrix consists of m vectors of length n (IE all vectors are the same length). */ @@ -611,11 +612,11 @@ void split_constant_offset (tree , tree *, tree *); /* Compute the greatest common divisor of a VECTOR of SIZE numbers. */ -static inline int +static inline lambda_int lambda_vector_gcd (lambda_vector vector, int size) { int i; - int gcd1 = 0; + lambda_int gcd1 = 0; if (size > 0) { @@ -632,7 +633,7 @@ static inline lambda_vector lambda_vector_new (int size) { /* ??? We shouldn't abuse the GC allocator here. */ - return ggc_cleared_vec_alloc (size); + return ggc_cleared_vec_alloc (size); } /* Clear out vector VEC1 of length SIZE. */ @@ -686,7 +687,7 @@ lambda_matrix_new (int m, int n, struct obstack *lambda_obstack) mat = XOBNEWVEC (lambda_obstack, lambda_vector, m); for (i = 0; i < m; i++) - mat[i] = XOBNEWVEC (lambda_obstack, int, n); + mat[i] = XOBNEWVEC (lambda_obstack, lambda_int, n); return mat; } diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 8a36379dd97e..5aa782b1edbd 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -4674,14 +4674,20 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id) /* Add local vars in this inlined callee to caller. */ add_local_variables (id->src_cfun, cfun, id); - if (dump_file && (dump_flags & TDF_DETAILS)) + if (dump_enabled_p ()) { - fprintf (dump_file, "Inlining %s to %s with frequency %4.2f\n", - id->src_node->dump_name (), - id->dst_node->dump_name (), - cg_edge->sreal_frequency ().to_double ()); - id->src_node->dump (dump_file); - id->dst_node->dump (dump_file); + char buf[128]; + snprintf (buf, sizeof(buf), "%4.2f", + cg_edge->sreal_frequency ().to_double ()); + dump_printf_loc (MSG_NOTE | MSG_PRIORITY_INTERNALS, + call_stmt, + "Inlining %C to %C with frequency %s\n", + id->src_node, id->dst_node, buf); + if (dump_file && (dump_flags & TDF_DETAILS)) + { + id->src_node->dump (dump_file); + id->dst_node->dump (dump_file); + } } /* This is it. Duplicate the callee body. Assume callee is diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index 07845101b86d..64039e2484ea 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -1204,7 +1204,7 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, edge e0, edge e1, gimple *phi, tree arg0, tree arg1) { - tree result, type; + tree result, type, rhs; gcond *cond; gassign *new_stmt; edge true_edge, false_edge; @@ -1220,6 +1220,25 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, cond = as_a (last_stmt (cond_bb)); cmp = gimple_cond_code (cond); + rhs = gimple_cond_rhs (cond); + + /* Turn EQ/NE of extreme values to order comparisons. */ + if ((cmp == NE_EXPR || cmp == EQ_EXPR) + && TREE_CODE (rhs) == INTEGER_CST) + { + if (wi::eq_p (wi::to_wide (rhs), wi::min_value (TREE_TYPE (rhs)))) + { + cmp = (cmp == EQ_EXPR) ? LT_EXPR : GE_EXPR; + rhs = wide_int_to_tree (TREE_TYPE (rhs), + wi::min_value (TREE_TYPE (rhs)) + 1); + } + else if (wi::eq_p (wi::to_wide (rhs), wi::max_value (TREE_TYPE (rhs)))) + { + cmp = (cmp == EQ_EXPR) ? GT_EXPR : LE_EXPR; + rhs = wide_int_to_tree (TREE_TYPE (rhs), + wi::max_value (TREE_TYPE (rhs)) - 1); + } + } /* This transformation is only valid for order comparisons. Record which operand is smaller/larger if the result of the comparison is true. */ @@ -1228,7 +1247,7 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, if (cmp == LT_EXPR || cmp == LE_EXPR) { smaller = gimple_cond_lhs (cond); - larger = gimple_cond_rhs (cond); + larger = rhs; /* If we have smaller < CST it is equivalent to smaller <= CST-1. Likewise smaller <= CST is equivalent to smaller < CST+1. */ if (TREE_CODE (larger) == INTEGER_CST) @@ -1255,7 +1274,7 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, } else if (cmp == GT_EXPR || cmp == GE_EXPR) { - smaller = gimple_cond_rhs (cond); + smaller = rhs; larger = gimple_cond_lhs (cond); /* If we have larger > CST it is equivalent to larger >= CST+1. Likewise larger >= CST is equivalent to larger > CST-1. */ diff --git a/intl/ChangeLog b/intl/ChangeLog index f4ae3e5ffcb9..8c936960c30e 100644 --- a/intl/ChangeLog +++ b/intl/ChangeLog @@ -1,3 +1,7 @@ +2018-11-07 Hafiz Abid Qadeer + + * configure: Regenerated. + 2018-10-31 Joseph Myers PR bootstrap/82856 diff --git a/intl/configure b/intl/configure index 5881cff2d896..2f35993148e5 100755 --- a/intl/configure +++ b/intl/configure @@ -5639,7 +5639,7 @@ rm -f core conftest.err conftest.$ac_objext \ if test "$am_cv_func_iconv" != yes; then am_save_CPPFLAGS="$CPPFLAGS" am_save_LIBS="$LIBS" - CPPFLAGS="$LIBS $INCICONV" + CPPFLAGS="$CPPFLAGS $INCICONV" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 4f280471ba42..a3d3dd6596d5 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,7 @@ +2018-11-07 Hafiz Abid Qadeer + + * configure: Regenerated. + 2018-11-05 Martin Liska * symtab.c (ht_dump_statistics): Replace %zu with %lu format. diff --git a/libcpp/configure b/libcpp/configure index 2e98fd109516..a7aa35c5be0f 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -7165,7 +7165,7 @@ rm -f core conftest.err conftest.$ac_objext \ if test "$am_cv_func_iconv" != yes; then am_save_CPPFLAGS="$CPPFLAGS" am_save_LIBS="$LIBS" - CPPFLAGS="$LIBS $INCICONV" + CPPFLAGS="$CPPFLAGS $INCICONV" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 72f24d2dd5cb..de81188f7993 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,94 @@ +2018-11-08 Kito Cheng + + * soft-fp/adddf3.c: Update from glibc. + * soft-fp/addsf3.c: Likewise. + * soft-fp/addtf3.c: Likewise. + * soft-fp/divdf3.c: Likewise. + * soft-fp/divsf3.c: Likewise. + * soft-fp/divtf3.c: Likewise. + * soft-fp/double.h: Likewise. + * soft-fp/eqdf2.c: Likewise. + * soft-fp/eqsf2.c: Likewise. + * soft-fp/eqtf2.c: Likewise. + * soft-fp/extenddftf2.c: Likewise. + * soft-fp/extended.h: Likewise. + * soft-fp/extendhftf2.c: Likewise. + * soft-fp/extendsfdf2.c: Likewise. + * soft-fp/extendsftf2.c: Likewise. + * soft-fp/extendxftf2.c: Likewise. + * soft-fp/fixdfdi.c: Likewise. + * soft-fp/fixdfsi.c: Likewise. + * soft-fp/fixdfti.c: Likewise. + * soft-fp/fixhfti.c: Likewise. + * soft-fp/fixsfdi.c: Likewise. + * soft-fp/fixsfsi.c: Likewise. + * soft-fp/fixsfti.c: Likewise. + * soft-fp/fixtfdi.c: Likewise. + * soft-fp/fixtfsi.c: Likewise. + * soft-fp/fixtfti.c: Likewise. + * soft-fp/fixunsdfdi.c: Likewise. + * soft-fp/fixunsdfsi.c: Likewise. + * soft-fp/fixunsdfti.c: Likewise. + * soft-fp/fixunshfti.c: Likewise. + * soft-fp/fixunssfdi.c: Likewise. + * soft-fp/fixunssfsi.c: Likewise. + * soft-fp/fixunssfti.c: Likewise. + * soft-fp/fixunstfdi.c: Likewise. + * soft-fp/fixunstfsi.c: Likewise. + * soft-fp/fixunstfti.c: Likewise. + * soft-fp/floatdidf.c: Likewise. + * soft-fp/floatdisf.c: Likewise. + * soft-fp/floatditf.c: Likewise. + * soft-fp/floatsidf.c: Likewise. + * soft-fp/floatsisf.c: Likewise. + * soft-fp/floatsitf.c: Likewise. + * soft-fp/floattidf.c: Likewise. + * soft-fp/floattihf.c: Likewise. + * soft-fp/floattisf.c: Likewise. + * soft-fp/floattitf.c: Likewise. + * soft-fp/floatundidf.c: Likewise. + * soft-fp/floatundisf.c: Likewise. + * soft-fp/floatunditf.c: Likewise. + * soft-fp/floatunsidf.c: Likewise. + * soft-fp/floatunsisf.c: Likewise. + * soft-fp/floatunsitf.c: Likewise. + * soft-fp/floatuntidf.c: Likewise. + * soft-fp/floatuntihf.c: Likewise. + * soft-fp/floatuntisf.c: Likewise. + * soft-fp/floatuntitf.c: Likewise. + * soft-fp/gedf2.c: Likewise. + * soft-fp/gesf2.c: Likewise. + * soft-fp/getf2.c: Likewise. + * soft-fp/half.h: Likewise. + * soft-fp/ledf2.c: Likewise. + * soft-fp/lesf2.c: Likewise. + * soft-fp/letf2.c: Likewise. + * soft-fp/muldf3.c: Likewise. + * soft-fp/mulsf3.c: Likewise. + * soft-fp/multf3.c: Likewise. + * soft-fp/negdf2.c: Likewise. + * soft-fp/negsf2.c: Likewise. + * soft-fp/negtf2.c: Likewise. + * soft-fp/op-1.h: Likewise. + * soft-fp/op-2.h: Likewise. + * soft-fp/op-4.h: Likewise. + * soft-fp/op-8.h: Likewise. + * soft-fp/op-common.h: Likewise. + * soft-fp/quad.h: Likewise. + * soft-fp/single.h: Likewise. + * soft-fp/soft-fp.h: Likewise. + * soft-fp/subdf3.c: Likewise. + * soft-fp/subsf3.c: Likewise. + * soft-fp/subtf3.c: Likewise. + * soft-fp/truncdfsf2.c: Likewise. + * soft-fp/trunctfdf2.c: Likewise. + * soft-fp/trunctfhf2.c: Likewise. + * soft-fp/trunctfsf2.c: Likewise. + * soft-fp/trunctfxf2.c: Likewise. + * soft-fp/unorddf2.c: Likewise. + * soft-fp/unordsf2.c: Likewise. + * soft-fp/unordtf2.c: Likewise. + 2018-11-04 Venkataramanan Kumar * config/i386/cpuinfo.c: (get_amd_cpu): Add znver2. diff --git a/libgcc/soft-fp/adddf3.c b/libgcc/soft-fp/adddf3.c index 358b38d40b14..993790f26db7 100644 --- a/libgcc/soft-fp/adddf3.c +++ b/libgcc/soft-fp/adddf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a + b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/addsf3.c b/libgcc/soft-fp/addsf3.c index 0135b3d64888..ae16ae2002a1 100644 --- a/libgcc/soft-fp/addsf3.c +++ b/libgcc/soft-fp/addsf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a + b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/addtf3.c b/libgcc/soft-fp/addtf3.c index 13cee7176739..905f913c5c96 100644 --- a/libgcc/soft-fp/addtf3.c +++ b/libgcc/soft-fp/addtf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a + b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/divdf3.c b/libgcc/soft-fp/divdf3.c index ded0ad06a4f3..703e1416e5ef 100644 --- a/libgcc/soft-fp/divdf3.c +++ b/libgcc/soft-fp/divdf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a / b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/divsf3.c b/libgcc/soft-fp/divsf3.c index 46fe9ad16383..282cbf1cdaa3 100644 --- a/libgcc/soft-fp/divsf3.c +++ b/libgcc/soft-fp/divsf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a / b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/divtf3.c b/libgcc/soft-fp/divtf3.c index e03889c8628f..885c70e29924 100644 --- a/libgcc/soft-fp/divtf3.c +++ b/libgcc/soft-fp/divtf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a / b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/double.h b/libgcc/soft-fp/double.h index 88d4bd7b7a32..23d11ccf7269 100644 --- a/libgcc/soft-fp/double.h +++ b/libgcc/soft-fp/double.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Double Precision - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -89,7 +89,7 @@ union _FP_UNION_D unsigned exp : _FP_EXPBITS_D; unsigned sign : 1; # endif - } bits __attribute__ ((packed)); + } bits; }; # define FP_DECL_D(X) _FP_DECL (2, X) @@ -210,7 +210,7 @@ union _FP_UNION_D unsigned exp : _FP_EXPBITS_D; unsigned sign : 1; # endif - } bits __attribute__ ((packed)); + } bits; }; # define FP_DECL_D(X) _FP_DECL (1, X) diff --git a/libgcc/soft-fp/eqdf2.c b/libgcc/soft-fp/eqdf2.c index 951f86dd0774..5bc9b5243db6 100644 --- a/libgcc/soft-fp/eqdf2.c +++ b/libgcc/soft-fp/eqdf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 0 iff a == b, 1 otherwise - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/eqsf2.c b/libgcc/soft-fp/eqsf2.c index 89bdc364a841..0d87f95a1eb1 100644 --- a/libgcc/soft-fp/eqsf2.c +++ b/libgcc/soft-fp/eqsf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 0 iff a == b, 1 otherwise - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/eqtf2.c b/libgcc/soft-fp/eqtf2.c index f91720e9e0ee..57666856b818 100644 --- a/libgcc/soft-fp/eqtf2.c +++ b/libgcc/soft-fp/eqtf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 0 iff a == b, 1 otherwise - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/extenddftf2.c b/libgcc/soft-fp/extenddftf2.c index 94e55276eb06..31c7263efa55 100644 --- a/libgcc/soft-fp/extenddftf2.c +++ b/libgcc/soft-fp/extenddftf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a converted to IEEE quad - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/extended.h b/libgcc/soft-fp/extended.h index 7b19e835f7a5..d2794320fa11 100644 --- a/libgcc/soft-fp/extended.h +++ b/libgcc/soft-fp/extended.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Extended Precision. - Copyright (C) 1999-2016 Free Software Foundation, Inc. + Copyright (C) 1999-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek (jj@ultra.linux.cz). @@ -88,7 +88,7 @@ union _FP_UNION_E unsigned exp : _FP_EXPBITS_E; unsigned sign : 1; # endif /* not bigendian */ - } bits __attribute__ ((packed)); + } bits; }; diff --git a/libgcc/soft-fp/extendhftf2.c b/libgcc/soft-fp/extendhftf2.c index 6ff6438e6d24..7f1f89ed66fd 100644 --- a/libgcc/soft-fp/extendhftf2.c +++ b/libgcc/soft-fp/extendhftf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return an IEEE half converted to IEEE quad - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/libgcc/soft-fp/extendsfdf2.c b/libgcc/soft-fp/extendsfdf2.c index 221584cbcc27..6baab1176c70 100644 --- a/libgcc/soft-fp/extendsfdf2.c +++ b/libgcc/soft-fp/extendsfdf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a converted to IEEE double - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/extendsftf2.c b/libgcc/soft-fp/extendsftf2.c index 6eab3a64385d..e3f2e950bf15 100644 --- a/libgcc/soft-fp/extendsftf2.c +++ b/libgcc/soft-fp/extendsftf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a converted to IEEE quad - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/extendxftf2.c b/libgcc/soft-fp/extendxftf2.c index 1975d672a89a..2d12da1dde69 100644 --- a/libgcc/soft-fp/extendxftf2.c +++ b/libgcc/soft-fp/extendxftf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a converted to IEEE quad - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/fixdfdi.c b/libgcc/soft-fp/fixdfdi.c index d697fc48a07e..e29139d519a8 100644 --- a/libgcc/soft-fp/fixdfdi.c +++ b/libgcc/soft-fp/fixdfdi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 64bit signed integer - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/fixdfsi.c b/libgcc/soft-fp/fixdfsi.c index 3e312aa99ede..9bce678c1dee 100644 --- a/libgcc/soft-fp/fixdfsi.c +++ b/libgcc/soft-fp/fixdfsi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 32bit signed integer - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/fixdfti.c b/libgcc/soft-fp/fixdfti.c index 07d7a82cfc75..ef31b16185db 100644 --- a/libgcc/soft-fp/fixdfti.c +++ b/libgcc/soft-fp/fixdfti.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert IEEE double to 128bit signed integer - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/fixhfti.c b/libgcc/soft-fp/fixhfti.c index 3610f4cc3124..76e5166e3391 100644 --- a/libgcc/soft-fp/fixhfti.c +++ b/libgcc/soft-fp/fixhfti.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert IEEE half to 128bit signed integer - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/libgcc/soft-fp/fixsfdi.c b/libgcc/soft-fp/fixsfdi.c index cd37e8edd326..d90ec6e213a3 100644 --- a/libgcc/soft-fp/fixsfdi.c +++ b/libgcc/soft-fp/fixsfdi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 64bit signed integer - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/fixsfsi.c b/libgcc/soft-fp/fixsfsi.c index 6417bd436ba8..367f68b34853 100644 --- a/libgcc/soft-fp/fixsfsi.c +++ b/libgcc/soft-fp/fixsfsi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 32bit signed integer - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/fixsfti.c b/libgcc/soft-fp/fixsfti.c index 0ff3b9a1f908..bfe861a9a847 100644 --- a/libgcc/soft-fp/fixsfti.c +++ b/libgcc/soft-fp/fixsfti.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert IEEE single to 128bit signed integer - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/fixtfdi.c b/libgcc/soft-fp/fixtfdi.c index 1ea4ad91174c..7ea934d9c13c 100644 --- a/libgcc/soft-fp/fixtfdi.c +++ b/libgcc/soft-fp/fixtfdi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 64bit signed integer - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/fixtfsi.c b/libgcc/soft-fp/fixtfsi.c index e4f8be190c34..f71f1d5300a7 100644 --- a/libgcc/soft-fp/fixtfsi.c +++ b/libgcc/soft-fp/fixtfsi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 32bit signed integer - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/fixtfti.c b/libgcc/soft-fp/fixtfti.c index d4acebaf4921..7dd97b474681 100644 --- a/libgcc/soft-fp/fixtfti.c +++ b/libgcc/soft-fp/fixtfti.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert IEEE quad to 128bit signed integer - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/fixunsdfdi.c b/libgcc/soft-fp/fixunsdfdi.c index 5ae4c2c4111e..d66df51bb178 100644 --- a/libgcc/soft-fp/fixunsdfdi.c +++ b/libgcc/soft-fp/fixunsdfdi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 64bit unsigned integer - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/fixunsdfsi.c b/libgcc/soft-fp/fixunsdfsi.c index 96bf6db3d731..0367fe1b6859 100644 --- a/libgcc/soft-fp/fixunsdfsi.c +++ b/libgcc/soft-fp/fixunsdfsi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 32bit unsigned integer - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/fixunsdfti.c b/libgcc/soft-fp/fixunsdfti.c index 942334169bd2..ffa7c2026839 100644 --- a/libgcc/soft-fp/fixunsdfti.c +++ b/libgcc/soft-fp/fixunsdfti.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert IEEE double to 128bit unsigned integer - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/fixunshfti.c b/libgcc/soft-fp/fixunshfti.c index 30edbfe5d893..81aee8946e1d 100644 --- a/libgcc/soft-fp/fixunshfti.c +++ b/libgcc/soft-fp/fixunshfti.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert IEEE half to 128bit unsigned integer - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/libgcc/soft-fp/fixunssfdi.c b/libgcc/soft-fp/fixunssfdi.c index fe8a3fa66492..9e6851f2ab42 100644 --- a/libgcc/soft-fp/fixunssfdi.c +++ b/libgcc/soft-fp/fixunssfdi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 64bit unsigned integer - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/fixunssfsi.c b/libgcc/soft-fp/fixunssfsi.c index bd40ba25704e..c1940e8c6d12 100644 --- a/libgcc/soft-fp/fixunssfsi.c +++ b/libgcc/soft-fp/fixunssfsi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 32bit unsigned integer - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/fixunssfti.c b/libgcc/soft-fp/fixunssfti.c index e630ac39a916..22b0705f34fb 100644 --- a/libgcc/soft-fp/fixunssfti.c +++ b/libgcc/soft-fp/fixunssfti.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert IEEE single to 128bit unsigned integer - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/fixunstfdi.c b/libgcc/soft-fp/fixunstfdi.c index 788cbe4fce9b..453fa3d4f792 100644 --- a/libgcc/soft-fp/fixunstfdi.c +++ b/libgcc/soft-fp/fixunstfdi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 64bit unsigned integer - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/fixunstfsi.c b/libgcc/soft-fp/fixunstfsi.c index 25d6f58172d9..b8081466e3ea 100644 --- a/libgcc/soft-fp/fixunstfsi.c +++ b/libgcc/soft-fp/fixunstfsi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a to 32bit unsigned integer - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/fixunstfti.c b/libgcc/soft-fp/fixunstfti.c index f4dd876aa18b..13653b047110 100644 --- a/libgcc/soft-fp/fixunstfti.c +++ b/libgcc/soft-fp/fixunstfti.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert IEEE quad to 128bit unsigned integer - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/floatdidf.c b/libgcc/soft-fp/floatdidf.c index afd31d34ad35..a8601f33a3d8 100644 --- a/libgcc/soft-fp/floatdidf.c +++ b/libgcc/soft-fp/floatdidf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 64bit signed integer to IEEE double - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/floatdisf.c b/libgcc/soft-fp/floatdisf.c index 30e2c712e4da..efc2bda28700 100644 --- a/libgcc/soft-fp/floatdisf.c +++ b/libgcc/soft-fp/floatdisf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 64bit signed integer to IEEE single - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/floatditf.c b/libgcc/soft-fp/floatditf.c index dd088d5622d5..e98b3fe55918 100644 --- a/libgcc/soft-fp/floatditf.c +++ b/libgcc/soft-fp/floatditf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 64bit signed integer to IEEE quad - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/floatsidf.c b/libgcc/soft-fp/floatsidf.c index a9b0a71fc589..d37f680adaef 100644 --- a/libgcc/soft-fp/floatsidf.c +++ b/libgcc/soft-fp/floatsidf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 32bit signed integer to IEEE double - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/floatsisf.c b/libgcc/soft-fp/floatsisf.c index 5196818b7fe0..f9b5975b7826 100644 --- a/libgcc/soft-fp/floatsisf.c +++ b/libgcc/soft-fp/floatsisf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 32bit signed integer to IEEE single - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/floatsitf.c b/libgcc/soft-fp/floatsitf.c index 42f950fafebc..07ea026af85b 100644 --- a/libgcc/soft-fp/floatsitf.c +++ b/libgcc/soft-fp/floatsitf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 32bit signed integer to IEEE quad - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/floattidf.c b/libgcc/soft-fp/floattidf.c index fdc61330f092..b5d0396ea16a 100644 --- a/libgcc/soft-fp/floattidf.c +++ b/libgcc/soft-fp/floattidf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 128bit signed integer to IEEE double - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/floattihf.c b/libgcc/soft-fp/floattihf.c index 74ac83a739b5..fdc4e84bd7a8 100644 --- a/libgcc/soft-fp/floattihf.c +++ b/libgcc/soft-fp/floattihf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 128bit signed integer to IEEE half - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/libgcc/soft-fp/floattisf.c b/libgcc/soft-fp/floattisf.c index bc173e9ecf40..619e6f98079a 100644 --- a/libgcc/soft-fp/floattisf.c +++ b/libgcc/soft-fp/floattisf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 128bit signed integer to IEEE single - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/floattitf.c b/libgcc/soft-fp/floattitf.c index f2bf410bc1ba..78319a2affdb 100644 --- a/libgcc/soft-fp/floattitf.c +++ b/libgcc/soft-fp/floattitf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 128bit signed integer to IEEE quad - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/floatundidf.c b/libgcc/soft-fp/floatundidf.c index 093d594ea841..85b6fc735bab 100644 --- a/libgcc/soft-fp/floatundidf.c +++ b/libgcc/soft-fp/floatundidf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 64bit unsigned integer to IEEE double - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/floatundisf.c b/libgcc/soft-fp/floatundisf.c index 56fa9daee339..8896ebc46950 100644 --- a/libgcc/soft-fp/floatundisf.c +++ b/libgcc/soft-fp/floatundisf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 64bit unsigned integer to IEEE single - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/floatunditf.c b/libgcc/soft-fp/floatunditf.c index 106d06ee36b7..d1c1ca97ec7a 100644 --- a/libgcc/soft-fp/floatunditf.c +++ b/libgcc/soft-fp/floatunditf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 64bit unsigned integer to IEEE quad - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/floatunsidf.c b/libgcc/soft-fp/floatunsidf.c index b116695af231..a28f29869255 100644 --- a/libgcc/soft-fp/floatunsidf.c +++ b/libgcc/soft-fp/floatunsidf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 32bit unsigned integer to IEEE double - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/floatunsisf.c b/libgcc/soft-fp/floatunsisf.c index fc2a6d65d7c8..8cede278ca60 100644 --- a/libgcc/soft-fp/floatunsisf.c +++ b/libgcc/soft-fp/floatunsisf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 32bit unsigned integer to IEEE single - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/floatunsitf.c b/libgcc/soft-fp/floatunsitf.c index 000423d9d85b..671755f35159 100644 --- a/libgcc/soft-fp/floatunsitf.c +++ b/libgcc/soft-fp/floatunsitf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 32bit unsigned integer to IEEE quad - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/floatuntidf.c b/libgcc/soft-fp/floatuntidf.c index 0236bd5dc53d..8b1eff7d78bb 100644 --- a/libgcc/soft-fp/floatuntidf.c +++ b/libgcc/soft-fp/floatuntidf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 128bit unsigned integer to IEEE double - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/floatuntihf.c b/libgcc/soft-fp/floatuntihf.c index 90e77c2c00f4..34700d933b10 100644 --- a/libgcc/soft-fp/floatuntihf.c +++ b/libgcc/soft-fp/floatuntihf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 128bit unsigned integer to IEEE half. - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/libgcc/soft-fp/floatuntisf.c b/libgcc/soft-fp/floatuntisf.c index e4b953189f1e..4b618205c97a 100644 --- a/libgcc/soft-fp/floatuntisf.c +++ b/libgcc/soft-fp/floatuntisf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 128bit unsigned integer to IEEE single - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/floatuntitf.c b/libgcc/soft-fp/floatuntitf.c index 69727e58b5e0..13cd8732b50d 100644 --- a/libgcc/soft-fp/floatuntitf.c +++ b/libgcc/soft-fp/floatuntitf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 128bit unsigned integer to IEEE quad - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/gedf2.c b/libgcc/soft-fp/gedf2.c index f466cc934184..840c9fb1e638 100644 --- a/libgcc/soft-fp/gedf2.c +++ b/libgcc/soft-fp/gedf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/gesf2.c b/libgcc/soft-fp/gesf2.c index 2e516e54604d..7a3ae253035e 100644 --- a/libgcc/soft-fp/gesf2.c +++ b/libgcc/soft-fp/gesf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/getf2.c b/libgcc/soft-fp/getf2.c index e302629f613e..f418de2a07b4 100644 --- a/libgcc/soft-fp/getf2.c +++ b/libgcc/soft-fp/getf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/half.h b/libgcc/soft-fp/half.h index ba752978380e..a1fea7b0075e 100644 --- a/libgcc/soft-fp/half.h +++ b/libgcc/soft-fp/half.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Half Precision. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -75,7 +75,7 @@ union _FP_UNION_H unsigned exp : _FP_EXPBITS_H; unsigned sign : 1; #endif - } bits __attribute__ ((packed)); + } bits; }; #define FP_DECL_H(X) _FP_DECL (1, X) diff --git a/libgcc/soft-fp/ledf2.c b/libgcc/soft-fp/ledf2.c index 2f4d69822f2e..b323b8ec5ceb 100644 --- a/libgcc/soft-fp/ledf2.c +++ b/libgcc/soft-fp/ledf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/lesf2.c b/libgcc/soft-fp/lesf2.c index 67aa9c83f33b..2c96c2327a1a 100644 --- a/libgcc/soft-fp/lesf2.c +++ b/libgcc/soft-fp/lesf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/letf2.c b/libgcc/soft-fp/letf2.c index 4a5630523411..7e7b244cd274 100644 --- a/libgcc/soft-fp/letf2.c +++ b/libgcc/soft-fp/letf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/muldf3.c b/libgcc/soft-fp/muldf3.c index 644e810ac683..b2df20c978f6 100644 --- a/libgcc/soft-fp/muldf3.c +++ b/libgcc/soft-fp/muldf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a * b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/mulsf3.c b/libgcc/soft-fp/mulsf3.c index e551331ea754..6c5c44e7b44e 100644 --- a/libgcc/soft-fp/mulsf3.c +++ b/libgcc/soft-fp/mulsf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a * b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/multf3.c b/libgcc/soft-fp/multf3.c index baab3774a893..75971c67cdf4 100644 --- a/libgcc/soft-fp/multf3.c +++ b/libgcc/soft-fp/multf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a * b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/negdf2.c b/libgcc/soft-fp/negdf2.c index a4b2dea46871..f6fe2727b29c 100644 --- a/libgcc/soft-fp/negdf2.c +++ b/libgcc/soft-fp/negdf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return -a - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/negsf2.c b/libgcc/soft-fp/negsf2.c index 825b76f642b4..1ce0090ccf32 100644 --- a/libgcc/soft-fp/negsf2.c +++ b/libgcc/soft-fp/negsf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return -a - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/negtf2.c b/libgcc/soft-fp/negtf2.c index 892c923ae3d7..3b7f27c939b7 100644 --- a/libgcc/soft-fp/negtf2.c +++ b/libgcc/soft-fp/negtf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return -a - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/op-1.h b/libgcc/soft-fp/op-1.h index b4d611df1197..bafa7f46e675 100644 --- a/libgcc/soft-fp/op-1.h +++ b/libgcc/soft-fp/op-1.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Basic one-word fraction declaration and manipulation. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), diff --git a/libgcc/soft-fp/op-2.h b/libgcc/soft-fp/op-2.h index 5c5f4fc4221a..6020d663d437 100644 --- a/libgcc/soft-fp/op-2.h +++ b/libgcc/soft-fp/op-2.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Basic two-word fraction declaration and manipulation. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), diff --git a/libgcc/soft-fp/op-4.h b/libgcc/soft-fp/op-4.h index b2df519c1ae9..b42980168720 100644 --- a/libgcc/soft-fp/op-4.h +++ b/libgcc/soft-fp/op-4.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Basic four-word fraction declaration and manipulation. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -696,39 +696,46 @@ #endif #ifndef __FP_FRAC_SUB_3 -# define __FP_FRAC_SUB_3(r2, r1, r0, x2, x1, x0, y2, y1, y0) \ - do \ - { \ - _FP_W_TYPE __FP_FRAC_SUB_3_c1, __FP_FRAC_SUB_3_c2; \ - r0 = x0 - y0; \ - __FP_FRAC_SUB_3_c1 = r0 > x0; \ - r1 = x1 - y1; \ - __FP_FRAC_SUB_3_c2 = r1 > x1; \ - r1 -= __FP_FRAC_SUB_3_c1; \ - __FP_FRAC_SUB_3_c2 |= __FP_FRAC_SUB_3_c1 && (y1 == x1); \ - r2 = x2 - y2 - __FP_FRAC_SUB_3_c2; \ - } \ +# define __FP_FRAC_SUB_3(r2, r1, r0, x2, x1, x0, y2, y1, y0) \ + do \ + { \ + _FP_W_TYPE __FP_FRAC_SUB_3_tmp[2]; \ + _FP_W_TYPE __FP_FRAC_SUB_3_c1, __FP_FRAC_SUB_3_c2; \ + __FP_FRAC_SUB_3_tmp[0] = x0 - y0; \ + __FP_FRAC_SUB_3_c1 = __FP_FRAC_SUB_3_tmp[0] > x0; \ + __FP_FRAC_SUB_3_tmp[1] = x1 - y1; \ + __FP_FRAC_SUB_3_c2 = __FP_FRAC_SUB_3_tmp[1] > x1; \ + __FP_FRAC_SUB_3_tmp[1] -= __FP_FRAC_SUB_3_c1; \ + __FP_FRAC_SUB_3_c2 |= __FP_FRAC_SUB_3_c1 && (y1 == x1); \ + r2 = x2 - y2 - __FP_FRAC_SUB_3_c2; \ + r1 = __FP_FRAC_SUB_3_tmp[1]; \ + r0 = __FP_FRAC_SUB_3_tmp[0]; \ + } \ while (0) #endif #ifndef __FP_FRAC_SUB_4 # define __FP_FRAC_SUB_4(r3, r2, r1, r0, x3, x2, x1, x0, y3, y2, y1, y0) \ - do \ - { \ - _FP_W_TYPE __FP_FRAC_SUB_4_c1, __FP_FRAC_SUB_4_c2; \ - _FP_W_TYPE __FP_FRAC_SUB_4_c3; \ - r0 = x0 - y0; \ - __FP_FRAC_SUB_4_c1 = r0 > x0; \ - r1 = x1 - y1; \ - __FP_FRAC_SUB_4_c2 = r1 > x1; \ - r1 -= __FP_FRAC_SUB_4_c1; \ - __FP_FRAC_SUB_4_c2 |= __FP_FRAC_SUB_4_c1 && (y1 == x1); \ - r2 = x2 - y2; \ - __FP_FRAC_SUB_4_c3 = r2 > x2; \ - r2 -= __FP_FRAC_SUB_4_c2; \ - __FP_FRAC_SUB_4_c3 |= __FP_FRAC_SUB_4_c2 && (y2 == x2); \ - r3 = x3 - y3 - __FP_FRAC_SUB_4_c3; \ - } \ + do \ + { \ + _FP_W_TYPE __FP_FRAC_SUB_4_tmp[3]; \ + _FP_W_TYPE __FP_FRAC_SUB_4_c1, __FP_FRAC_SUB_4_c2; \ + _FP_W_TYPE __FP_FRAC_SUB_4_c3; \ + __FP_FRAC_SUB_4_tmp[0] = x0 - y0; \ + __FP_FRAC_SUB_4_c1 = __FP_FRAC_SUB_4_tmp[0] > x0; \ + __FP_FRAC_SUB_4_tmp[1] = x1 - y1; \ + __FP_FRAC_SUB_4_c2 = __FP_FRAC_SUB_4_tmp[1] > x1; \ + __FP_FRAC_SUB_4_tmp[1] -= __FP_FRAC_SUB_4_c1; \ + __FP_FRAC_SUB_4_c2 |= __FP_FRAC_SUB_4_c1 && (y1 == x1); \ + __FP_FRAC_SUB_4_tmp[2] = x2 - y2; \ + __FP_FRAC_SUB_4_c3 = __FP_FRAC_SUB_4_tmp[2] > x2; \ + __FP_FRAC_SUB_4_tmp[2] -= __FP_FRAC_SUB_4_c2; \ + __FP_FRAC_SUB_4_c3 |= __FP_FRAC_SUB_4_c2 && (y2 == x2); \ + r3 = x3 - y3 - __FP_FRAC_SUB_4_c3; \ + r2 = __FP_FRAC_SUB_4_tmp[2]; \ + r1 = __FP_FRAC_SUB_4_tmp[1]; \ + r0 = __FP_FRAC_SUB_4_tmp[0]; \ + } \ while (0) #endif diff --git a/libgcc/soft-fp/op-8.h b/libgcc/soft-fp/op-8.h index 6b63c229932a..4871c49ea9c0 100644 --- a/libgcc/soft-fp/op-8.h +++ b/libgcc/soft-fp/op-8.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Basic eight-word fraction declaration and manipulation. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz) and @@ -35,6 +35,7 @@ /* We need just a few things from here for op-4, if we ever need some other macros, they can be added. */ #define _FP_FRAC_DECL_8(X) _FP_W_TYPE X##_f[8] +#define _FP_FRAC_SET_8(X, I) __FP_FRAC_SET_8 (X, I) #define _FP_FRAC_HIGH_8(X) (X##_f[7]) #define _FP_FRAC_LOW_8(X) (X##_f[0]) #define _FP_FRAC_WORD_8(X, w) (X##_f[w]) @@ -147,4 +148,91 @@ } \ while (0) +#define _FP_FRAC_ADD_8(R, X, Y) \ + do \ + { \ + _FP_W_TYPE _FP_FRAC_ADD_8_c = 0; \ + _FP_I_TYPE _FP_FRAC_ADD_8_i; \ + for (_FP_FRAC_ADD_8_i = 0; _FP_FRAC_ADD_8_i < 8; ++_FP_FRAC_ADD_8_i) \ + { \ + R##_f[_FP_FRAC_ADD_8_i] \ + = (X##_f[_FP_FRAC_ADD_8_i] + Y##_f[_FP_FRAC_ADD_8_i] \ + + _FP_FRAC_ADD_8_c); \ + _FP_FRAC_ADD_8_c \ + = (_FP_FRAC_ADD_8_c \ + ? R##_f[_FP_FRAC_ADD_8_i] <= X##_f[_FP_FRAC_ADD_8_i] \ + : R##_f[_FP_FRAC_ADD_8_i] < X##_f[_FP_FRAC_ADD_8_i]); \ + } \ + } \ + while (0) + +#define _FP_FRAC_SUB_8(R, X, Y) \ + do \ + { \ + _FP_W_TYPE _FP_FRAC_SUB_8_tmp[8]; \ + _FP_W_TYPE _FP_FRAC_SUB_8_c = 0; \ + _FP_I_TYPE _FP_FRAC_SUB_8_i; \ + for (_FP_FRAC_SUB_8_i = 0; _FP_FRAC_SUB_8_i < 8; ++_FP_FRAC_SUB_8_i) \ + { \ + _FP_FRAC_SUB_8_tmp[_FP_FRAC_SUB_8_i] \ + = (X##_f[_FP_FRAC_SUB_8_i] - Y##_f[_FP_FRAC_SUB_8_i] \ + - _FP_FRAC_SUB_8_c); \ + _FP_FRAC_SUB_8_c \ + = (_FP_FRAC_SUB_8_c \ + ? (_FP_FRAC_SUB_8_tmp[_FP_FRAC_SUB_8_i] \ + >= X##_f[_FP_FRAC_SUB_8_i]) \ + : (_FP_FRAC_SUB_8_tmp[_FP_FRAC_SUB_8_i] \ + > X##_f[_FP_FRAC_SUB_8_i])); \ + } \ + for (_FP_FRAC_SUB_8_i = 0; _FP_FRAC_SUB_8_i < 8; ++_FP_FRAC_SUB_8_i) \ + R##_f[_FP_FRAC_SUB_8_i] = _FP_FRAC_SUB_8_tmp[_FP_FRAC_SUB_8_i]; \ + } \ + while (0) + +#define _FP_FRAC_CLZ_8(R, X) \ + do \ + { \ + _FP_I_TYPE _FP_FRAC_CLZ_8_i; \ + for (_FP_FRAC_CLZ_8_i = 7; _FP_FRAC_CLZ_8_i > 0; _FP_FRAC_CLZ_8_i--) \ + if (X##_f[_FP_FRAC_CLZ_8_i]) \ + break; \ + __FP_CLZ ((R), X##_f[_FP_FRAC_CLZ_8_i]); \ + (R) += _FP_W_TYPE_SIZE * (7 - _FP_FRAC_CLZ_8_i); \ + } \ + while (0) + +#define _FP_MINFRAC_8 0, 0, 0, 0, 0, 0, 0, 1 + +#define _FP_FRAC_NEGP_8(X) ((_FP_WS_TYPE) X##_f[7] < 0) +#define _FP_FRAC_ZEROP_8(X) \ + ((X##_f[0] | X##_f[1] | X##_f[2] | X##_f[3] \ + | X##_f[4] | X##_f[5] | X##_f[6] | X##_f[7]) == 0) +#define _FP_FRAC_HIGHBIT_DW_8(fs, X) \ + (_FP_FRAC_HIGH_DW_##fs (X) & _FP_HIGHBIT_DW_##fs) + +#define _FP_FRAC_COPY_4_8(D, S) \ + do \ + { \ + D##_f[0] = S##_f[0]; \ + D##_f[1] = S##_f[1]; \ + D##_f[2] = S##_f[2]; \ + D##_f[3] = S##_f[3]; \ + } \ + while (0) + +#define _FP_FRAC_COPY_8_4(D, S) \ + do \ + { \ + D##_f[0] = S##_f[0]; \ + D##_f[1] = S##_f[1]; \ + D##_f[2] = S##_f[2]; \ + D##_f[3] = S##_f[3]; \ + D##_f[4] = D##_f[5] = D##_f[6] = D##_f[7]= 0; \ + } \ + while (0) + +#define __FP_FRAC_SET_8(X, I7, I6, I5, I4, I3, I2, I1, I0) \ + (X##_f[7] = I7, X##_f[6] = I6, X##_f[5] = I5, X##_f[4] = I4, \ + X##_f[3] = I3, X##_f[2] = I2, X##_f[1] = I1, X##_f[0] = I0) + #endif /* !SOFT_FP_OP_8_H */ diff --git a/libgcc/soft-fp/op-common.h b/libgcc/soft-fp/op-common.h index f52194ecd1c7..d6f32aef3319 100644 --- a/libgcc/soft-fp/op-common.h +++ b/libgcc/soft-fp/op-common.h @@ -1,5 +1,5 @@ /* Software floating-point emulation. Common operations. - Copyright (C) 1997-2017 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -2041,6 +2041,27 @@ } \ while (0) +/* Truncate from a wider floating-point format to a narrower one. + Input and output are cooked. */ +#define FP_TRUNC_COOKED(dfs, sfs, dwc, swc, D, S) \ + do \ + { \ + _FP_STATIC_ASSERT (_FP_FRACBITS_##sfs >= _FP_FRACBITS_##dfs, \ + "destination mantissa wider than source"); \ + if (S##_c == FP_CLS_NAN) \ + _FP_FRAC_SRL_##swc (S, (_FP_WFRACBITS_##sfs \ + - _FP_WFRACBITS_##dfs)); \ + else \ + _FP_FRAC_SRS_##swc (S, (_FP_WFRACBITS_##sfs \ + - _FP_WFRACBITS_##dfs), \ + _FP_WFRACBITS_##sfs); \ + _FP_FRAC_COPY_##dwc##_##swc (D, S); \ + D##_e = S##_e; \ + D##_c = S##_c; \ + D##_s = S##_s; \ + } \ + while (0) + /* Helper primitives. */ /* Count leading zeros in a word. */ diff --git a/libgcc/soft-fp/quad.h b/libgcc/soft-fp/quad.h index a09b95ff37a7..9a9e4e71f737 100644 --- a/libgcc/soft-fp/quad.h +++ b/libgcc/soft-fp/quad.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Quad Precision. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -93,7 +93,7 @@ union _FP_UNION_Q unsigned exp : _FP_EXPBITS_Q; unsigned sign : 1; # endif /* not bigendian */ - } bits __attribute__ ((packed)); + } bits; }; diff --git a/libgcc/soft-fp/single.h b/libgcc/soft-fp/single.h index 42691a8e847b..d5c4a6d4a1e1 100644 --- a/libgcc/soft-fp/single.h +++ b/libgcc/soft-fp/single.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Single Precision. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -82,7 +82,7 @@ union _FP_UNION_S unsigned exp : _FP_EXPBITS_S; unsigned sign : 1; #endif - } bits __attribute__ ((packed)); + } bits; }; #define FP_DECL_S(X) _FP_DECL (1, X) diff --git a/libgcc/soft-fp/soft-fp.h b/libgcc/soft-fp/soft-fp.h index 7fe3ae374dd1..a7a01334b794 100644 --- a/libgcc/soft-fp/soft-fp.h +++ b/libgcc/soft-fp/soft-fp.h @@ -1,5 +1,5 @@ /* Software floating-point emulation. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), diff --git a/libgcc/soft-fp/subdf3.c b/libgcc/soft-fp/subdf3.c index 1c3162928bc7..10035f40e7b3 100644 --- a/libgcc/soft-fp/subdf3.c +++ b/libgcc/soft-fp/subdf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a - b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/subsf3.c b/libgcc/soft-fp/subsf3.c index 0a81916595f1..b0ecd7caa55b 100644 --- a/libgcc/soft-fp/subsf3.c +++ b/libgcc/soft-fp/subsf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a - b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/subtf3.c b/libgcc/soft-fp/subtf3.c index 6a93fce17a76..090f4afda0b4 100644 --- a/libgcc/soft-fp/subtf3.c +++ b/libgcc/soft-fp/subtf3.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a - b - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/truncdfsf2.c b/libgcc/soft-fp/truncdfsf2.c index 4c757f56e0ab..4db07c5d3330 100644 --- a/libgcc/soft-fp/truncdfsf2.c +++ b/libgcc/soft-fp/truncdfsf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Truncate IEEE double into IEEE single - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/trunctfdf2.c b/libgcc/soft-fp/trunctfdf2.c index 837267f525b0..c0d1d34841a3 100644 --- a/libgcc/soft-fp/trunctfdf2.c +++ b/libgcc/soft-fp/trunctfdf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Truncate IEEE quad into IEEE double - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/trunctfhf2.c b/libgcc/soft-fp/trunctfhf2.c index 0500b141850a..8eddd14b2f47 100644 --- a/libgcc/soft-fp/trunctfhf2.c +++ b/libgcc/soft-fp/trunctfhf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Truncate IEEE quad into IEEE half. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/libgcc/soft-fp/trunctfsf2.c b/libgcc/soft-fp/trunctfsf2.c index 8cf829e548a6..4b04d698d24f 100644 --- a/libgcc/soft-fp/trunctfsf2.c +++ b/libgcc/soft-fp/trunctfsf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Truncate IEEE quad into IEEE single - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/libgcc/soft-fp/trunctfxf2.c b/libgcc/soft-fp/trunctfxf2.c index db411d05b076..391de243ce37 100644 --- a/libgcc/soft-fp/trunctfxf2.c +++ b/libgcc/soft-fp/trunctfxf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Truncate IEEE quad into IEEE extended - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Uros Bizjak (ubizjak@gmail.com). diff --git a/libgcc/soft-fp/unorddf2.c b/libgcc/soft-fp/unorddf2.c index ffdbc6b3490b..c11066a59a7f 100644 --- a/libgcc/soft-fp/unorddf2.c +++ b/libgcc/soft-fp/unorddf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 1 iff a or b is a NaN, 0 otherwise. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Joseph Myers (joseph@codesourcery.com). diff --git a/libgcc/soft-fp/unordsf2.c b/libgcc/soft-fp/unordsf2.c index e3f3bd979a9c..b262e180b215 100644 --- a/libgcc/soft-fp/unordsf2.c +++ b/libgcc/soft-fp/unordsf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 1 iff a or b is a NaN, 0 otherwise. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Joseph Myers (joseph@codesourcery.com). diff --git a/libgcc/soft-fp/unordtf2.c b/libgcc/soft-fp/unordtf2.c index dd75985530b8..3d0abe5f38ba 100644 --- a/libgcc/soft-fp/unordtf2.c +++ b/libgcc/soft-fp/unordtf2.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 1 iff a or b is a NaN, 0 otherwise. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Joseph Myers (joseph@codesourcery.com). diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index bdff0310e232..11cceda2188b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2018-11-07 Hafiz Abid Qadeer + + * configure: Regenerated. + 2018-11-07 Jonathan Wakely * config/abi/pre/gnu.ver: Fix patterns for size_t parameters. diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 34620592cc21..39f83e239d7d 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -28980,7 +28980,7 @@ rm -f core conftest.err conftest.$ac_objext \ if test "$am_cv_func_iconv" != yes; then am_save_CPPFLAGS="$CPPFLAGS" am_save_LIBS="$LIBS" - CPPFLAGS="$LIBS $INCICONV" + CPPFLAGS="$CPPFLAGS $INCICONV" LIBS="$LIBS $LIBICONV" if test x$gcc_no_link = xyes; then as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 @@ -41274,7 +41274,7 @@ rm -f core conftest.err conftest.$ac_objext \ if test "$am_cv_func_iconv" != yes; then am_save_CPPFLAGS="$CPPFLAGS" am_save_LIBS="$LIBS" - CPPFLAGS="$LIBS $INCICONV" + CPPFLAGS="$CPPFLAGS $INCICONV" LIBS="$LIBS $LIBICONV" if test x$gcc_no_link = xyes; then as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 @@ -47392,7 +47392,7 @@ rm -f core conftest.err conftest.$ac_objext \ if test "$am_cv_func_iconv" != yes; then am_save_CPPFLAGS="$CPPFLAGS" am_save_LIBS="$LIBS" - CPPFLAGS="$LIBS $INCICONV" + CPPFLAGS="$CPPFLAGS $INCICONV" LIBS="$LIBS $LIBICONV" if test x$gcc_no_link = xyes; then as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 @@ -60238,7 +60238,7 @@ rm -f core conftest.err conftest.$ac_objext \ if test "$am_cv_func_iconv" != yes; then am_save_CPPFLAGS="$CPPFLAGS" am_save_LIBS="$LIBS" - CPPFLAGS="$LIBS $INCICONV" + CPPFLAGS="$CPPFLAGS $INCICONV" LIBS="$LIBS $LIBICONV" if test x$gcc_no_link = xyes; then as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5