- 04 Dec, 2014 27 commits
-
-
PR bootstrap/64189 * configure.ac (HAVE_LD_PIE_COPYRELOC): Always define. * configure: Regenerated. From-SVN: r218408
H.J. Lu committed -
libcpp/ChangeLog: 2014-12-05 Manuel López-Ibáñez <manu@gcc.gnu.org> * line-map.c (linemap_position_for_loc_and_offset): Add new linemap_assert_fails. gcc/fortran/ChangeLog: 2014-12-05 Manuel López-Ibáñez <manu@gcc.gnu.org> * scanner.c (gfc_next_char_literal): Use gfc_warning_now. (load_file): Use the line length as the column hint for linemap_line_start. Reserve a location for the highest column of the line. From-SVN: r218407
Manuel López-Ibáñez committed -
gcc/ChangeLog: 2014-12-04 Manuel López-Ibáñez <manu@gcc.gnu.org> * diagnostic.c (diagnostic_color_init): New. * diagnostic.h: Declare. * gcc.c (driver::global_initializations): Use it. (driver_handle_option): Handle -fdiagnostics-color_. * toplev.c: Do not include diagnostic-color.h. (process_options): Do not initialize color diagnostics here. * common.opt (fdiagnostics-color=): Add Driver. * opts-global.c (init_options_once): Initialize color here. * opts.c (common_handle_option): Use diagnostics_color_init. * diagnostic-color.h: Fix comment. From-SVN: r218406
Manuel López-Ibáñez committed -
gcc/ChangeLog: * tree-pretty-print.c (INDENT): Rename "buffer" to "pp". (NIY): Likewise. (buffer): Rename this variable to... (tree_pp): ...this. (do_niy): Rename param from "buffer" to "pp". (dump_decl_name): Likewise. (dump_function_name): Likewise. (dump_function_declaration): Likewise. (dump_array_domain): Likewise. (dump_omp_clause): Likewise. (dump_omp_clauses): Likewise. (dump_location): Likewise. (dump_block_node): Likewise. (dump_generic_node): Likewise. (print_declaration): Likewise. (print_struct_decl): Likewise. (print_call_name): Likewise. (pretty_print_string): Likewise. (newline_and_indent): Likewise. (print_generic_decl): Update for renaming of "buffer" to "tree_pp". (print_generic_stmt): Likewise. (print_generic_stmt_indented): Likewise. (print_generic_expr): Likewise. (maybe_init_pretty_print): Likewise. From-SVN: r218405
David Malcolm committed -
gcc/ChangeLog: PR jit/63854 * tree-pretty-print.c: Eliminate include of <new>. (buffer): Convert this variable from a pretty_printer to a pretty_printer *. (initialized): Eliminate this variable in favor of the NULL-ness of "buffer". (print_generic_decl): Update for "buffer" becoming a pointer. (print_generic_stmt): Likewise. (print_generic_stmt_indented): Likewise. (print_generic_expr): Likewise. (maybe_init_pretty_print): Likewise, allocating "buffer" on the heap and using its non-NULL-ness to ensure idempotency. From-SVN: r218404
David Malcolm committed -
gcc/ChangeLog: PR jit/63854 * ipa-prop.c (ipa_register_cgraph_hooks): Guard insertion of ipa_add_new_function on function_insertion_hook_holder being non-NULL. * ipa-reference.c (ipa_reference_c_finalize): Remove node_removal_hook_holder and node_duplication_hook_holder if they've been added to symtab. * toplev.c (toplev::finalize): Call ipa_reference_c_finalize before cgraph_c_finalize so that the former can access "symtab". From-SVN: r218403
David Malcolm committed -
re PR c++/64029 (const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault) PR c++/64029 * decl.c (grok_reference_init): Complete array type. From-SVN: r218402
Jason Merrill committed -
PR c++/64080 * constexpr.c (cxx_eval_store_expression): Handle non-decl store targets. From-SVN: r218401
Jason Merrill committed -
From-SVN: r218400
Jason Merrill committed -
gcc/ChangeLog: * doc/cfg.texi (GIMPLE statement iterators): Add note about gphi_iterator, and use one in the example. * doc/gimple.texi (Tuple specific accessors): Add missing GIMPLE_GOTO section and menu item. (gimple_build_asm, gimple gimple_build_assign_with_ops) gimple_call_mark_uninlinable, gimple_call_cannot_inline_p): Remove description of removed functions. (gimple_build_assign, gimple_build_bind, gimple_build_call, gimple_build_call_from_tree, gimple_build_call_vec, gimple_build_catch, gimple_build_cond, gimple_build_cond_from_tree, gimple_build_debug_bind, gimple_build_eh_filter, gimple_build_label, gimple_build_goto, gimple_build_omp_atomic_load, gimple_build_omp_atomic_store, gimple_build_omp_continue, gimple_build_omp_critical, gimple_build_omp_for, gimple_build_omp_parallel, gimple_build_omp_sections, gimple_build_omp_single, gimple_build_return, gimple_build_resx, gimple_build_switch, gimple_build_try): Update return type within description to reflect changes in gimple.h to using gimple subclasses. (gimple_build_asm_vec): Update return type, params and description. (gimple_asm_ninputs): Update param. (gimple_asm_noutputs, gimple_asm_nclobbers, gimple_asm_input_op gimple_asm_set_input_op, gimple_asm_output_op gimple_asm_set_output_op, gimple_asm_clobber_op, gimple_asm_set_clobber_op, gimple_asm_string, gimple_asm_volatile_p, gimple_asm_set_volatile, gimple_bind_vars, gimple_bind_set_vars, gimple_bind_append_vars, gimple_bind_body, gimple_bind_set_body, gimple_bind_add_stmt, gimple_bind_add_seq, gimple_bind_block, gimple_bind_set_block, gimple_call_set_fn, gimple_call_return_type, gimple_call_set_chain, gimple_call_set_tail, gimple_call_tail_p, gimple_call_copy_skip_args, gimple_catch_types, gimple_catch_types_ptr, gimple_catch_handler, gimple_catch_set_types, gimple_catch_set_handler, gimple_cond_set_code, gimple_cond_set_lhs, gimple_cond_set_rhs, gimple_cond_true_label, gimple_cond_set_true_label, gimple_cond_set_false_label, gimple_cond_false_label, gimple_cond_make_false, gimple_cond_make_true, gimple_eh_filter_set_types, gimple_eh_filter_set_failure, gimple_eh_must_not_throw_fndecl, gimple_eh_must_not_throw_set_fndecl, gimple_label_label, gimple_label_set_label, gimple_goto_set_dest, gimple_omp_atomic_load_set_lhs, gimple_omp_atomic_load_lhs, gimple_omp_atomic_load_set_rhs, gimple_omp_atomic_load_rhs, gimple_omp_atomic_store_set_val, gimple_omp_atomic_store_val, gimple_omp_continue_control_def, gimple_omp_continue_control_def_ptr, gimple_omp_continue_set_control_def, gimple_omp_continue_control_use, gimple_omp_continue_control_use_ptr, gimple_omp_continue_set_control_use, gimple_omp_critical_name, gimple_omp_critical_name_ptr, gimple_omp_critical_set_name, gimple_omp_parallel_clauses_ptr, gimple_omp_parallel_set_clauses, gimple_omp_parallel_child_fn, gimple_omp_parallel_child_fn_ptr, gimple_omp_parallel_set_child_fn, gimple_omp_parallel_data_arg, gimple_omp_parallel_data_arg_ptr, gimple_omp_parallel_set_data_arg, gimple_omp_single_set_clauses, gimple_phi_set_result, gimple_phi_set_arg, gimple_resx_region, gimple_resx_set_region, gimple_return_retval, gimple_return_set_retval, gimple_switch_num_labels, gimple_switch_set_num_labels, gimple_switch_index, gimple_switch_set_index, gimple_switch_label, gimple_switch_set_label, gimple_switch_default_label, gimple_switch_set_default_label, gimple_try_set_eval, gimple_try_set_cleanup): Update initial param within description to reflect changes in gimple.h to using gimple subclasses. (Adding a new GIMPLE statement code): Update to reflect gimple statement subclassing. From-SVN: r218399
David Malcolm committed -
Normally, with -fPIE/-fpie, GCC accesses globals that are extern to the module using the GOT. This is two instructions, one to get the address of the global from the GOT and the other to get the value. If it turns out that the global gets defined in the executable at link-time, it still needs to go through the GOT as it is too late then to generate a direct access. Examples: foo.cc ------ int a_glob; int main () { return a_glob; // defined in this file } With -O2 -fpie -pie, the generated code directly accesses the global via PC-relative insn: 5e0 <main>: mov 0x165a(%rip),%eax # 1c40 <a_glob> foo.cc ------ extern int a_glob; int main () { return a_glob; // defined in this file } With -O2 -fpie -pie, the generated code accesses global via GOT using two memory loads: 6f0 <main>: mov 0x1609(%rip),%rax # 1d00 <_DYNAMIC+0x230> mov (%rax),%eax This is true even if in the latter case the global was defined in the executable through a different file. Some experiments on google benchmarks shows that the extra memory loads affects performance by 1% to 5%. Solution - Copy Relocations: When the linker supports copy relocations, GCC can always assume that the global will be defined in the executable. For globals that are truly extern (come from shared objects), the linker will create copy relocations and have them defined in the executable. Result is that no global access needs to go through the GOT and hence improves performance. This optimization only applies to undefined, non-weak global data. Undefined, weak global data access still must go through the GOT. This patch checks if linker supports PIE with copy reloc, which is enabled in gold and bfd linker in bininutils 2.25, at configure time and enables this optimization if the linker support is available. gcc/ * configure.ac (HAVE_LD_PIE_COPYRELOC): Defined to 1 if Linux/x86-64 linker supports PIE with copy reloc. * config.in: Regenerated. * configure: Likewise. * config/i386/i386.c (legitimate_pic_address_disp_p): Allow pc-relative address for undefined, non-weak, non-function symbol reference in 64-bit PIE if linker supports PIE with copy reloc. * doc/sourcebuild.texi: Document pie_copyreloc target. gcc/testsuite/ * gcc.target/i386/pie-copyrelocs-1.c: New test. * gcc.target/i386/pie-copyrelocs-2.c: Likewise. * gcc.target/i386/pie-copyrelocs-3.c: Likewise. * gcc.target/i386/pie-copyrelocs-4.c: Likewise. * lib/target-supports.exp (check_effective_target_pie_copyreloc): New procedure. Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com> From-SVN: r218397
Sriraman Tallam committed -
PR middle-end/56917 * fold-const.c (fold_unary_loc): Perform the negation in A's type when transforming ~ (A - 1) or ~ (A + -1) to -A. * c-c++-common/ubsan/pr56917.c: New test. From-SVN: r218395
Marek Polacek committed -
2014-12-04 Tobias Burnus <burnus@net-b.de> * Makefile.in: Remove CLOOGLIB and CLOOGINC. From-SVN: r218389
Tobias Burnus committed -
check_GNU_style.sh: Warn for incorrect number of spaces in function call only if 0 or 2+ spaces found. 2014-12-04 Thomas Preud'homme <thomas.preudhomme@arm.com> contrib/ * check_GNU_style.sh: Warn for incorrect number of spaces in function call only if 0 or 2+ spaces found. From-SVN: r218382
Thomas Preud'homme committed -
2014-12-04 Richard Biener <rguenther@suse.de> * doc/match-and-simplify.texi: Update for recent changes. From-SVN: r218372
Richard Biener committed -
2014-12-04 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (ipa_alignment): New type. (ipa_jump_func): New field alignment. (ipcp_transformation_summary) New type. (ipcp_grow_transformations_if_necessary): Declare. (ipa_node_agg_replacements): Removed. (ipcp_transformations): Declare. (ipcp_get_transformation_summary): New function. (ipa_get_agg_replacements_for_node): Use it. * ipa-cp.c (ipcp_param_lattices): New field alignment. (print_all_lattices): Also print alignment. (alignment_bottom_p): New function. (set_alignment_to_bottom): Likewise. (set_all_contains_variable): Also set alignment to bottom. (initialize_node_lattices): Likewise. (propagate_alignment_accross_jump_function): New function. (propagate_constants_accross_call): Call it. (ipcp_store_alignment_results): New function. (ipcp_driver): Call it. * ipa-prop.c (ipa_node_agg_replacements): Removed. (ipcp_transformations): New. (ipa_print_node_jump_functions_for_edge): Also print alignment. (ipa_set_jf_unknown): New function. (detect_type_change_from_memory_writes): Use ipa_set_jf_unknown. (ipa_compute_jump_functions_for_edge): Also calculate alignment. (update_jump_functions_after_inlining): Use ipa_set_jf_unknown. (ipcp_grow_transformations_if_necessary): New function. (ipa_set_node_agg_value_chain): Use ipcp_transformations. (ipa_node_removal_hook): Likewise. (ipa_node_duplication_hook): Also duplicate alignment results. (ipa_write_jump_function): Also stream alignments. (ipa_read_jump_function): Use ipa_set_jf_unknown, also stream alignments. (write_agg_replacement_chain): Renamed to write_ipcp_transformation_info, also stream alignments. (read_agg_replacement_chain): Renamed to read_ipcp_transformation_info, also stream alignments. (ipa_prop_write_all_agg_replacement): Renamed to ipcp_write_transformation_summaries. Stream always. (ipa_prop_read_all_agg_replacement): Renamed to ipcp_read_transformation_summaries. (ipcp_update_alignments): New function. (ipcp_transform_function): Call it, free also alignments. testsuite/ * gcc.dg/ipa/propalign-1.c: New test. * gcc.dg/ipa/propalign-2.c: Likewise. From-SVN: r218369
Martin Jambor committed -
2014-12-04 Richard Biener <rguenther@suse.de> * gimple-fold.c (replace_stmt_with_simplification): Properly fail when maybe_push_res_to_seq fails. From-SVN: r218353
Richard Biener committed -
From-SVN: r218349
Ganesh Gopalasubramanian committed -
* doc/install.texi: Remove mentions of cloog and ppl. * doc/invoke.texi: Likewise From-SVN: r218348
Francois-Xavier Coudert committed -
PR c++/56493 * convert.c (convert_to_real, convert_to_expr, convert_to_complex): Handle COMPOUND_EXPR. * c-c++-common/pr56493.c: New test. From-SVN: r218345
Jakub Jelinek committed -
* lib/target-supports.exp (check_effective_target_tiny): Cache predicate value. From-SVN: r218344
Kyrylo Tkachov committed -
2014-12-04 Richard Biener <rguenther@suse.de> * builtins.c (target_newline): Export. (target_percent_s_newline): Likewise. (fold_builtin_1): Do not fold printf functions here. (fold_builtin_2): Likewise. (fold_builtin_3): Likewise, do not fold strncat. (fold_builtin_strncat): Move to gimple-fold.c. (fold_builtin_printf): Likewise. * builtins.h (target_newline): Declare. (target_percent_s_newline): Likewise. * gimple-fold.c (gimple_fold_builtin_strncat): Move from builtins.c and gimplify. (gimple_fold_builtin_printf): Likewise. (gimple_fold_builtin): Fold strncat, printf, printf_unlocked, vprintf, printf_chk and vprintf_chk here. From-SVN: r218343
Richard Biener committed -
PR testsuite/64145 * gcc.dg/graphite/isl-codegen-loop-dumping.c: Restore -fgraphite-identity. From-SVN: r218342
Jack Howarth committed -
* config/isl.m4: Don't pass -DCLOOG_INT_GMP on islinc. * configure: Regenerated. From-SVN: r218341
Jack Howarth committed -
re PR libstdc++/64140 (match_results.prefix() returns an incorrect result if regex_iterator holds a zero-length match) PR libstdc++/64140 * include/bits/regex.tcc (regex_iterator<>::operator++): Update prefix.matched after modifying prefix.first. * testsuite/28_regex/iterators/regex_iterator/char/64140.cc: New testcase. From-SVN: r218340
Tim Shen committed -
* config/rs6000/rs6000.md (floatsidf2_internal): Use std::swap. (floatunssidf2_internal): Same. * config/rs6000/rs6000.c (rs6000_emit_vector_compare): Same. (rs6000_emit_int_cmove): Same. (rs6000_sched_reorder): Same. (altivec_expand_vec_perm_const): Same. (rs6000_expand_vec_perm_const_1): Same. From-SVN: r218339
David Edelsohn committed -
From-SVN: r218338
GCC Administrator committed
-
- 03 Dec, 2014 13 commits
-
-
re PR rtl-optimization/64010 ([msp430-elf] struct function dereference clobbers parameter passed to function) PR rtl-optimization/64010 * reload.c (push_reload): Before reusing a register contained in an operand as input reload register, ensure that it is not used in CALL_INSN_FUNCTION_USAGE. From-SVN: r218335
Ulrich Weigand committed -
* Makefile.in: Use $(LN_S) instead of $(LN) -s and remove file first if it exists. From-SVN: r218334
Ulrich Drepper committed -
From-SVN: r218332
Jakub Jelinek committed -
PR c/59708 * expmed.c (expand_widening_mult): Return const0_rtx if coeff is 0. From-SVN: r218331
Jakub Jelinek committed -
* doc/gimple.texi (gimple_build_assign_with_ops): Remove. (gimple_build_assign): Document the new overloads. From-SVN: r218330
Jakub Jelinek committed -
2014-12-03 François Dumont <fdumont@gcc.gnu.org> PR libstdc++/13631 * include/bits/codecvt.h (codecvt<char, char, mbstate_t>): friend class std::messages<char>. (codecvt<wchar_t, char, mbstate_t>): friend class std::messages<wchar_t>. * config/locale/gnu/messages_member.h (messages<char>::do_open): Specialized. (messages<char>::do_close): Likewise. (messages<wchar_t>::do_open): Likewise. (messages<wchar_t>::do_close): Likewise. * config/locale/gnu/messages_member.cc: (messages<char>::do_open): Implement. Use bind_textdomain_codeset based on codecvt<char, char, mbstate_t>._M_c_locale_codecvt code set. Use internal cache to keep opened domain name with locale information. (messages<wchar_t>::do_open): Likewise with codecvt<wchar_t, char, mbstate_t>. (messages<char>::do_close): Implement. Clean cache information. (messages<wchar_t>::do_close): Likewise. (get_glibc_msg): New. Use dgettext rather than gettext using cached domain name associated to catalog id. (messages<char>::do_get): Use latter. (messages<wchar_t>::do_get): Likewise and use also cached locale codecvt<wchar_t, char, mbstate_t> facet to convert wchar_t default value to char and the result back to wchar_t. * testsuite/22_locale/messages/13631.cc: New. * testsuite/22_locale/messages/members/char/2.cc: Use also fr_FR locale for charset conversion to get the expected accented character. From-SVN: r218329
François Dumont committed -
/cp 2014-12-03 Paolo Carlini <paolo.carlini@oracle.com> PR c++/63558 * decl.c (identify_goto): Return a bool if diagnostic is emitted. (check_previous_goto_1): Consistently emit permerror + inform. (check_goto): Likewise. /testsuite 2014-12-03 Paolo Carlini <paolo.carlini@oracle.com> PR c++/63558 * g++.dg/init/goto3.C: New. * g++.dg/eh/goto2.C: Adjust. * g++.dg/ext/vla14.C: Likewise. * g++.dg/gomp/block-1.C: Likewise. * g++.dg/gomp/block-2.C: Likewise. * g++.dg/gomp/block-3.C: Likewise. * g++.dg/gomp/block-5.C: Likewise. * g++.dg/gomp/target-1.C: Likewise. * g++.dg/gomp/target-2.C: Likewise. * g++.dg/gomp/taskgroup-1.C: Likewise. * g++.dg/gomp/teams-1.C: Likewise. * g++.dg/init/goto2.C: Likewise. * g++.dg/warn/pedantic1.C: Likewise. * g++.old-deja/g++.jason/jump.C: Likewise. * g++.old-deja/g++.law/arm6.C: Likewise. * g++.old-deja/g++.other/goto1.C: Likewise. * g++.old-deja/g++.other/goto3.C: Likewise. * g++.old-deja/g++.other/init9.C: Likewise. From-SVN: r218328
Paolo Carlini committed -
[gcc] 2014-12-03 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/64019 * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Do not create LO_SUM address for constant addresses if the type can go in Altivec registers. [gcc/testsuite] 2014-12-03 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/64019 * gcc.target/powerpc/pr64019.c: New file. From-SVN: r218327
Michael Meissner committed -
re PR fortran/44054 (Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$ diagnostic (pragmas) and color) gcc/testsuite/ChangeLog: 2014-12-03 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * gfortran.dg/warnings_are_errors_1.f90: Update warnings to errors. * gfortran.dg/warnings_are_errors_1.f: Likewise. gcc/fortran/ChangeLog: 2014-12-03 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * gfortran.h (gfc_warning): Now returns bool. Add overload that accepts opt. (gfc_warning_1): Declare. * error.c (pp_warning_buffer,warningcount_buffered,werrorcount_buffered): New. (gfc_buffer_error): Set pp_warning_buffer.flush_p. (gfc_clear_pp_buffer): New. (gfc_warning_1): Renamed from gfc_warning. (gfc_warning): Add three new overloads. One that takes just a format string and ellipsis, another that takes also a warning option, and another that takes also va_list instead of ellipsis. (gfc_clear_warning): Clear pp_warning_buffer. (gfc_warning_check): Flush pp_warning_buffer and update warning and werror counters. (gfc_diagnostics_init): Init pp_warning_buffer. * Update all gfc_warning calls that do not multiple locations to use %qs and OPT_W*, otherwise use gfc_warning_1. gcc/ChangeLog: 2014-12-03 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * pretty-print.c (output_buffer::output_buffer): Init flush_p to true. (pp_flush): Flush only if flush_p. (pp_really_flush): New. * pretty-print.h (struct output_buffer): Add flush_p. (pp_really_flush): Declare. From-SVN: r218326
Manuel López-Ibáñez committed -
* Makefile.in (ALL_HOST_BACKEND_OBJS): Add $(GENGTYPE_OBJS), gcc-ar.o, gcc-nm.o and gcc-ranlib.o. (GENGTYPE_OBJS): New. (gengtype-lex.o, gengtype-parse.o, gengtype-state.o, gengtype.o): Remove explicit dependencies. (CFLAGS-gengtype-lex.o, CFLAGS-gengtype-parse.o, CFLAGS-gengtype-state.o, CFLAGS-gengtype.o): Add -DHOST_GENERATOR_FILE instead of -DGENERATOR_FILE. (CFLAGS-errors.o): New. * gengtype.c: Instead of testing GENERATOR_FILE define, test HOST_GENERATOR_FILE. If defined, include config.h and define GENERATOR_FILE afterwards, otherwise include bconfig.h. * gengtype-parse.c: Likewise. * gengtype-state.c: Likewise. * gengtype-lex.l: Likewise. * errors.c: Likewise. From-SVN: r218325
Jakub Jelinek committed -
From-SVN: r218324
David Edelsohn committed -
epiphany.c (epiphany_override_options): If TARGET_SOFT_CMPSF is not enabled, set flag_finite_math_only. gcc: * config/epiphany/epiphany.c (epiphany_override_options): If TARGET_SOFT_CMPSF is not enabled, set flag_finite_math_only. * config/epiphany/epiphany.md (mov<mode>cc): Don't use reverse_condition_maybe_unordered if flag_finite_math_only is set. gcc/testsuite: * gcc.target/epiphany/fcmp-1.c: New test. From-SVN: r218323
Joern Rennecke committed -
* include/bits/regex_compiler.h (_S_cache_size): Multiply the RHS of the shift-expression by _UseCache::value. From-SVN: r218322
Marek Polacek committed
-