gcc/ChangeLog:
2014-12-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* diagnostic.c (diagnostic_action_after_output): Make it extern.
Take diagnostic_t argument instead of diagnostic_info. Count also
DK_WERROR towards max_errors.
(diagnostic_report_diagnostic): Update call according to the above.
(error_recursion): Likewise.
* diagnostic.h (diagnostic_action_after_output): Declare.
* pretty-print.c (pp_formatted_text_data): Delete.
(pp_append_r): Call output_buffer_append_r.
(pp_formatted_text): Call output_buffer_formatted_text.
(pp_last_position_in_text): Call output_buffer_last_position_in_text.
* pretty-print.h (output_buffer_formatted_text): New.
(output_buffer_append_r): New.
(output_buffer_last_position_in_text): New.
gcc/fortran/ChangeLog:
2014-12-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* error.c (pp_error_buffer): New static variable.
(pp_warning_buffer): Make it a pointer.
(gfc_output_buffer_empty_p): New.
(gfc_error_init_1): Call gfc_buffer_error.
(gfc_buffer_error): Do not use pp_warning_buffer.flush_p as the
buffered_p flag.
(gfc_clear_warning): Likewise.
(gfc_warning_check): Call gfc_clear_warning. Only check the new
pp_warning_buffer if the old warning_buffer was empty. Call
diagnostic_action_after_output.
(gfc_error_1): Renamed from gfc_error.
(gfc_error): New.
(gfc_clear_error): Clear also pp_error_buffer.
(gfc_error_flag_test): Check also pp_error_buffer.
(gfc_error_check): Likewise. Only check the new pp_error_buffer
if the old error_buffer was empty.
(gfc_move_output_buffer_from_to): New.
(gfc_push_error): Use it here. Take also an output_buffer as argument.
(gfc_pop_error): Likewise.
(gfc_free_error): Likewise.
(gfc_diagnostics_init): Use XNEW and placement-new to init
pp_error_buffer and pp_warning_buffer. Set flush_p to false for
both pp_warning_buffer and pp_error_buffer.
* Update gfc_push_error, gfc_pop_error and gfc_free_error calls
according to the above changes.
* Use gfc_error_1 for all gfc_error calls that use multiple
locations.
* Use %qs instead of '%s' for many gfc_error calls.
From-SVN: r218627
2014-12-11 Andrew MacLeod <amacleod@redhat.com>
* config/tilepro/gen-mul-tables.cc: Add insn-codes.h to include list
for generator file. Add comment indicating it is a generated file.
* config/tilepro/mul-tables.c: Update generated file.
* config/tilegx/mul-tables.c: Likewise.
From-SVN: r218624
2014-12-11 Tobias Burnus <burnus@net-b.de>
Manuel López-Ibáñez <manu@gcc.gnu.org>
gcc/
* diagnostic.c (get_terminal_width): Renamed from
* getenv_columns,
removed static, and additionally use ioctl to get width.
(diagnostic_set_caret_max_width): Update call.
* diagnostic.h (get_terminal_width): Add prototype.
* opts.c (print_specific_help): Use it for x_help_columns.
* doc/invoke.texi (fdiagnostics-show-caret): Document how the
width is set.
gcc/fortran/
* error.c (gfc_get_terminal_width): Renamed from
get_terminal_width and use same-named common function.
(gfc_error_init_1): Update call.
Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>
From-SVN: r218619
Minor interface cleanups of libgccjit
* jit/jit-playback.c (convert_to_dso): Use auto_vec instead
of automatic array to build up command line.
* jit/jit-recording.c (recording::context::set_str_option):
Make copy of the string.
(recording::context::~context): Free string options.
* jit/jit-recording.h (recording::context): Adjust type
of m_str_options member.
* jit/libgccjit.h: Adjust comment about
gcc_jit_context_set_str_option parameter begin used after
the call.
Update comment now that all interfaces are copy strings
if necessary.
* jit/libgccjit++.h (gccjit::context): Add set_str_option
member function.
From-SVN: r218617
* doc/invoke.texi: (-devirtualize-at-ltrans): Document.
* lto-cgraph.c (lto_output_varpool_node): Mark initializer as removed
when it is not streamed to the given ltrans.
(compute_ltrans_boundary): Make code adding all polymorphic
call targets conditional with !flag_wpa || flag_ltrans_devirtualize.
* common.opt (fdevirtualize-at-ltrans): New flag.
From-SVN: r218609
gcc/
* varpool.c (varpool_node::get_create): Force output of vars with
"omp declare target" attribute.
libgomp/
* testsuite/libgomp.c/target-9.c: New test.
From-SVN: r218607
PR target/64252
* config/i386/i386.c (expand_vec_perm_pblendv): If not testing_p,
set dcopy.target to a new pseudo.
* gcc.dg/vect/pr64252.c: New test.
* gcc.dg/pr64252.c: New test.
* gcc.target/i386/avx2-pr64252.c: New test.
Co-Authored-By: Evgeny Stupachenko <evstupac@gmail.com>
From-SVN: r218602
gcc/jit/ChangeLog:
* docs/cp/index.rst: New file.
* docs/cp/intro/index.rst: New file.
* docs/cp/intro/tutorial01.rst: New file.
* docs/cp/intro/tutorial02.rst: New file.
* docs/cp/intro/tutorial03.rst: New file.
* docs/cp/intro/tutorial04.rst: New file.
* docs/cp/topics/contexts.rst: New file.
* docs/cp/topics/expressions.rst: New file.
* docs/cp/topics/functions.rst: New file.
* docs/cp/topics/index.rst: New file.
* docs/cp/topics/locations.rst: New file.
* docs/cp/topics/objects.rst: New file.
* docs/cp/topics/results.rst: New file.
* docs/cp/topics/types.rst: New file.
* docs/examples/tut01-hello-world.cc: New file.
* docs/examples/tut02-square.c: Fix missing newline in output.
* docs/examples/tut02-square.cc: New file.
* docs/examples/tut03-sum-of-squares.cc: New file.
* docs/examples/tut04-toyvm/toyvm.cc: New file.
* docs/index.rst: Move summary to above the table of contents.
Add text about the C vs C++ APIs.
* docs/topics/contexts.rst: Fix a typo.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* docs/_build/texinfo/factorial1.png: New file.
* docs/_build/texinfo/sum-of-squares1.png: New file.
From-SVN: r218588
2014-12-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR fortran/60718
* trans-expr.c (gfc_conv_procedure_call): Fix a strict aliasing
violation when passing a class object to a formal parameter which has
different pointer or allocatable attributes.
testsuite:
2014-12-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR fortran/60718
* gfortran.dg/class_alias.f90: New.
From-SVN: r218584
PR ipa/63909
* gimple-iterator.h (gsi_start_bb_nondebug): New function.
* ipa-icf-gimple.c (func_checker::compare_bb): Correct iteration
replaces loop based on precomputed number of non-debug statements.
* gcc.dg/ipa/pr63909.c: New test.
From-SVN: r218578