]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
7 years ago[LVU] set ppc64 blockage's length to zero
aoliva [Fri, 9 Feb 2018 10:39:28 +0000 (10:39 +0000)] 
[LVU] set ppc64 blockage's length to zero

LVU requires the zero-length (pseudo) insns's length to reflect
reality.  If they don't, it may assume there's a PC change where there
isn't any, and then a view-aware assembler will detect the problem and
complain about out-of-sync views.

ppc blockage pseudo-insns did not have the length attribute explicitly
set in them, so they inherited the attribute's default value, and that
was nonzero.

for  gcc/ChangeLog

* config/rs6000/rs6000.md (blockage): Set length to zero.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257520 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
ebotcazou [Fri, 9 Feb 2018 09:50:14 +0000 (09:50 +0000)] 
* expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257519 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-09 Richard Biener <rguenther@suse.de>
rguenth [Fri, 9 Feb 2018 09:19:34 +0000 (09:19 +0000)] 
2018-02-09  Richard Biener  <rguenther@suse.de>

PR tree-optimization/84278
* gcc.target/i386/pr84278.c: Adjust regex.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257518 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
ebotcazou [Fri, 9 Feb 2018 08:54:54 +0000 (08:54 +0000)] 
* c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
keyword for components.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257517 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR tree-optimization/84232
jakub [Fri, 9 Feb 2018 06:44:43 +0000 (06:44 +0000)] 
PR tree-optimization/84232
* gcc.dg/tree-ssa/ssa-dom-cse-2.c: Add -mtune-generic on x86.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257516 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR sanitizer/84285
jakub [Fri, 9 Feb 2018 06:44:06 +0000 (06:44 +0000)] 
PR sanitizer/84285
* gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
-static-lib*san.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257515 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR debug/84252
jakub [Fri, 9 Feb 2018 05:48:33 +0000 (05:48 +0000)] 
PR debug/84252
* var-tracking.c (vt_add_function_parameter): Punt for non-onepart
PARALLEL incoming that failed vt_get_decl_and_offset check.

* gcc.target/aarch64/pr84252.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257514 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR middle-end/84237
jakub [Fri, 9 Feb 2018 05:47:24 +0000 (05:47 +0000)] 
PR middle-end/84237
* output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
* varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
TREE_READONLY bit.
(get_variable_section): For decls in named .bss* sections pass true as
second argument to bss_initializer_p.

* gcc.dg/pr84237.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257513 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR c++/83659
jakub [Fri, 9 Feb 2018 05:46:18 +0000 (05:46 +0000)] 
PR c++/83659
* fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
Sync some changes from cxx_fold_indirect_ref.

* constexpr.c (cxx_fold_indirect_ref): Sync some changes from
fold_indirect_ref_1, including poly_*int64.  Verify first that
tree_fits_poly_int64_p (op01).  Formatting fixes.

* g++.dg/torture/pr83659.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257512 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[IEPM] Introduce inline entry point markers
aoliva [Fri, 9 Feb 2018 02:22:11 +0000 (02:22 +0000)] 
[IEPM] Introduce inline entry point markers

Output DW_AT_entry_pc based on markers.

Introduce DW_AT_GNU_entry_view as a DWARF extension.

If views are enabled are we're not in strict compliance mode, output
DW_AT_GNU_entry_view if it might be nonzero.

This patch depends on SFN and LVU patchsets, and on the IEPM patch that
introduces the inline_entry debug hook.

for  include/ChangeLog

* dwarf2.def (DW_AT_GNU_entry_view): New.

for  gcc/ChangeLog

* cfgexpand.c (expand_gimple_basic_block): Handle inline entry
markers.
* dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
(BLOCK_INLINE_ENTRY_LABEL): New.
(dwarf2out_var_location): Disregard inline entry markers.
(inline_entry_data): New struct.
(inline_entry_data_hasher): New hashtable type.
(inline_entry_data_hasher::hash): New.
(inline_entry_data_hasher::equal): New.
(inline_entry_data_table): New variable.
(add_high_low_attributes): Add DW_AT_entry_pc and
DW_AT_GNU_entry_view attributes if a pending entry is found
in inline_entry_data_table.  Add old entry_pc attribute only
if debug nonbinding markers are disabled.
(gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
markers are enabled.
(block_within_block_p, dwarf2out_inline_entry): New.
(dwarf2out_finish): Check that no entries remained in
inline_entry_data_table.
* final.c (reemit_insn_block_notes): Handle inline entry notes.
(final_scan_insn, notice_source_line): Likewise.
(rest_of_clean_state): Skip inline entry markers.
* gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
markers.
* gimple.c (gimple_build_debug_inline_entry): New.
* gimple.h (enum gimple_debug_subcode): Add
GIMPLE_DEBUG_INLINE_ENTRY.
(gimple_build_debug_inline_entry): Declare.
(gimple_debug_inline_entry_p): New.
(gimple_debug_nonbind_marker_p): Adjust.
* insn-notes.def (INLINE_ENTRY): New.
* print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
inline entry marker notes.
(print_insn): Likewise.
* rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
(INSN_DEBUG_MARKER_KIND): Likewise.
(GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
* tree-inline.c (expand_call_inline): Build and insert
debug_inline_entry stmt.
* tree-ssa-live.c (remove_unused_scope_block_p): Preserve
inline entry blocks early, if nonbind markers are enabled.
(dump_scope_block): Dump fragment info.
* var-tracking.c (reemit_marker_as_note): Handle inline entry note.
* doc/gimple.texi (gimple_debug_inline_entry_p): New.
(gimple_build_debug_inline_entry): New.
* doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
Enable/disable inline entry points too.
* doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
(DEBUG_INSN): Describe inline entry markers.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257511 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[LVU] Introduce location views
aoliva [Fri, 9 Feb 2018 02:21:57 +0000 (02:21 +0000)] 
[LVU] Introduce location views

This patch introduces an option to enable the generation of location
views along with location lists.  The exact format depends on the
DWARF version: it can be a separate attribute (DW_AT_GNU_locviews) or
(DW_LLE_view_pair) entries in DWARF5+ loclists.

Line number tables are also affected.  If the assembler is found, at
compiler build time, to support .loc views, we use them and
assembler-computed view labels, otherwise we output compiler-generated
line number programs with conservatively-computed view labels.  In
either case, we output view information next to line number changes
when verbose assembly output is requested.

This patch requires an LVU patch that modifies the exported API of
final_scan_insn.  It also expects the entire SFN patchset to be
installed first, although SFN is not a requirement for LVU.

for  include/ChangeLog

* dwarf2.def (DW_AT_GNU_locviews): New.
* dwarf2.h (enum dwarf_location_list_entry_type): Add
DW_LLE_GNU_view_pair.
(DW_LLE_view_pair): Define.

for  gcc/ChangeLog

* common.opt (gvariable-location-views): New.
(gvariable-location-views=incompat5): New.
* config.in: Rebuilt.
* configure: Rebuilt.
* configure.ac: Test assembler for view support.
* dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
* dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
* dwarf2out.c (var_loc_view): New typedef.
(struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
(dwarf2out_locviews_in_attribute): New.
(dwarf2out_locviews_in_loclist): New.
(dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
(enum dw_line_info_opcode): Add LI_adv_address.
(struct dw_line_info_table): Add view.
(RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
(DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
(zero_view_p): New variable.
(ZERO_VIEW_P): New macro.
(output_asm_line_debug_info): New.
(struct var_loc_node): Add view.
(add_AT_view_list, AT_loc_list): New.
(add_var_loc_to_decl): Add view param.  Test it against last.
(new_loc_list): Add view params.  Record them.
(AT_loc_list_ptr): Handle loc and view lists.
(view_list_to_loc_list_val_node): New.
(print_dw_val): Handle dw_val_class_view_list.
(size_of_die): Likewise.
(value_format): Likewise.
(loc_list_has_views): New.
(gen_llsym): Set vl_symbol too.
(maybe_gen_llsym, skip_loc_list_entry): New.
(dwarf2out_maybe_output_loclist_view_pair): New.
(output_loc_list): Output view list or entries too.
(output_view_list_offset): New.
(output_die): Handle dw_val_class_view_list.
(output_dwarf_version): New.
(output_compilation_unit_header): Use it.
(output_skeleton_debug_sections): Likewise.
(output_rnglists, output_line_info): Likewise.
(output_pubnames, output_aranges): Update version comments.
(output_one_line_info_table): Output view numbers in asm comments.
(dw_loc_list): Determine current endview, pass it to new_loc_list.
Call maybe_gen_llsym.
(loc_list_from_tree_1): Adjust.
(add_AT_location_description): Create view list attribute if
needed, check it's absent otherwise.
(convert_cfa_to_fb_loc_list): Adjust.
(maybe_emit_file): Call output_asm_line_debug_info for test.
(dwarf2out_var_location): Reset views as needed.  Precompute
add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
attribute.  Set view.
(new_line_info_table): Reset next view.
(set_cur_line_info_table): Call output_asm_line_debug_info for test.
(dwarf2out_source_line): Likewise.  Output view resets and labels to
the assembler, or select appropriate line info opcodes.
(prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
(optimize_string_length): Catch it.  Adjust.
(resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
dw_val_class_view_list, and remove it if no longer needed.
(hash_loc_list): Hash view numbers.
(loc_list_hasher::equal): Compare them.
(optimize_location_lists): Check whether a view list symbol is
needed, and whether the locview attribute is present, and
whether they match.  Remove the locview attribute if no longer
needed.
(index_location_lists): Call skip_loc_list_entry for test.
(dwarf2out_finish): Call output_asm_line_debug_info for test.
Use output_dwarf_version.
* dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
(struct dw_val_node): Add val_view_list.
* final.c (SEEN_NEXT_VIEW): New.
(set_next_view_needed): New.
(clear_next_view_needed): New.
(maybe_output_next_view): New.
(final_start_function): Rename to...
(final_start_function_1): ... this.  Take pointer to FIRST,
add SEEN parameter.  Emit param bindings in the initial view.
(final_start_function): Reintroduce SEEN-less interface.
(final): Rename to...
(final_1): ... this.  Take SEEN parameter.  Output final pending
next view at the end.
(final): Reintroduce seen-less interface.
(final_scan_insn): Output pending next view before switching
sections or ending a block.  Mark the next view as needed when
outputting variable locations.  Notify debug backend of section
changes, and of location view changes.
(rest_of_handle_final): Adjust.
* toplev.c (process_options): Autodetect value for debug variable
location views option.  Warn on incompat5 without -gdwarf-5.
* doc/invoke.texi (gvariable-location-views): New.
(gvariable-location-views=incompat5): New.
(gno-variable-location-views): New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257510 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoFix ICE in find_taken_edge_computed_goto (PR 84136)
dmalcolm [Fri, 9 Feb 2018 01:07:11 +0000 (01:07 +0000)] 
Fix ICE in find_taken_edge_computed_goto (PR 84136)

PR 84136 reports an ICE within sccvn_dom_walker when handling a
C/C++ source file that overuses the labels-as-values extension.
The code in question stores a jump label into a global, and then
jumps to it from another function, which ICEs after inlining:

void* a;

void foo() {
  if ((a = &&l))
      return;

  l:;
}

int main() {
  foo();
  goto *a;

  return 0;
}

This appears to be far beyond what we claim to support in this
extension - but we shouldn't ICE.

What's happening is that, after inlining, we have usage of a *copy*
of the label, which optimizes away the if-return logic, turning it
into an infinite loop.

On entry to the sccvn_dom_walker we have this gimple:

main ()
{
  void * a.0_1;

  <bb 2> [count: 0]:
  a = &l;

  <bb 3> [count: 0]:
l:
  a.0_1 = a;
  goto a.0_1;
}

and:
  edge taken = find_taken_edge (bb, vn_valueize (val));
reasonably valueizes the:
  goto a.0_1;
after the:
  a = &l;
  a.0_1 = a;
as if it were:
  goto *&l;

find_taken_edge_computed_goto then has:

2380   dest = label_to_block (val);
2381   if (dest)
2382     {
2383       e = find_edge (bb, dest);
2384       gcc_assert (e != NULL);
2385     }

which locates dest as a self-jump from block 3 back to itself.

However, the find_edge call returns NULL - it has a predecessor edge
from block 2, but no successor edges.

Hence the assertion fails and we ICE.

A successor edge from the computed goto could have been created by
make_edges if the label stmt had been in the function, but make_edges
only looks in the current function when handling computed gotos, and
the label only appeared after inlining.

The following patch removes the assertion, fixing the ICE.

gcc/testsuite/ChangeLog:
PR tree-optimization/84136
* gcc.c-torture/compile/pr84136.c: New test.

gcc/ChangeLog:
PR tree-optimization/84136
* tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
that the result of find_edge is non-NULL.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257509 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoDaily bump.
gccadmin [Fri, 9 Feb 2018 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257508 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR target/83008
uros [Thu, 8 Feb 2018 22:31:15 +0000 (22:31 +0000)] 
PR target/83008
* config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
storing integer register in SImode.  Fix cost of 256 and 512
byte aligned SSE register store.

* config/i386/i386.c (ix86_multiplication_cost): Fix
multiplication cost for TARGET_AVX512DQ.

testsuite/ChangeLog:

PR target/83008
* gcc.target/i386/pr83008.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257505 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR target/81143
bergner [Thu, 8 Feb 2018 20:40:32 +0000 (20:40 +0000)] 
PR target/81143
* gcc.target/powerpc/pr79799-2.c: Use __LITTLE_ENDIAN__.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257504 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-08 Paolo Carlini <paolo.carlini@oracle.com>
paolo [Thu, 8 Feb 2018 18:56:17 +0000 (18:56 +0000)] 
2018-02-08  Paolo Carlini  <paolo.carlini@oracle.com>

* constexpr.c (cxx_eval_component_reference): Use INDIRECT_REF_P.
* lambda.c (build_capture_proxy): Likewise.
* search.c (field_access_p): Likewise.
* semantics.c (omp_clause_decl, omp_privatize_field,
finish_omp_clauses): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257503 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago/cp
paolo [Thu, 8 Feb 2018 18:54:39 +0000 (18:54 +0000)] 
/cp
2018-02-08  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/83806
* typeck.c (decay_conversion): Use mark_rvalue_use for the special
case of nullptr too.

/testsuite
2018-02-08  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/83806
* g++.dg/warn/Wunused-parm-11.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257502 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoMark previous change with:
mrs [Thu, 8 Feb 2018 18:39:43 +0000 (18:39 +0000)] 
Mark previous change with:
PR target/84113

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257500 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR tree-optimization/84238
mpolacek [Thu, 8 Feb 2018 16:18:04 +0000 (16:18 +0000)] 
PR tree-optimization/84238
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
get_range_strlen.

* gcc.dg/Wstringop-overflow-3.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257497 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[C++ PATCH] initializer_list diagnostic
nathan [Thu, 8 Feb 2018 16:11:39 +0000 (16:11 +0000)] 
[C++ PATCH] initializer_list diagnostic

https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00434.html
* class.c (finish_struct): Fix std:initializer_list diagnostic
formatting.

* g++.dg/cpp0x/initlist93.C: Adjust diagnostic.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257496 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago runtime: get missing function name from symbol table
ian [Thu, 8 Feb 2018 15:37:43 +0000 (15:37 +0000)] 
runtime: get missing function name from symbol table

    If we trace back through code that has no debug info, as when calling
    through C code compiled with -g0, we won't have a function name.
    Try to fetch the function name using the symbol table.

    Adding the test case revealed that gotest failed to use the gccgo tag
    when matching files, so add that.

    Reviewed-on: https://go-review.googlesource.com/92756

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257495 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * Makefile.am (check-gccgo, check-gcc): Add options to pick up
ian [Thu, 8 Feb 2018 15:34:42 +0000 (15:34 +0000)] 
* Makefile.am (check-gccgo, check-gcc): Add options to pick up
target libstdc++, to permit tests that use C++.
* Makefile.in: Rebuild.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257494 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago libgo: update to Go1.10rc2
ian [Thu, 8 Feb 2018 15:30:22 +0000 (15:30 +0000)] 
libgo: update to Go1.10rc2

    Reviewed-on: https://go-review.googlesource.com/92736

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257493 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoAnother fix for single-element permutes (PR 84265)
rsandifo [Thu, 8 Feb 2018 15:17:20 +0000 (15:17 +0000)] 
Another fix for single-element permutes (PR 84265)

PR83753 was about a case in which we ended up trying to "vectorise"
a group of loads ore stores using single-element vectors.  The problem
was that we were classifying the load or store as VMAT_CONTIGUOUS_PERMUTE
rather than VMAT_CONTIGUOUS, even though it doesn't make sense to permute
a single-element vector.

In that PR it was enough to change get_group_load_store_type,
because vectorisation ended up being unprofitable and so we didn't
take things further.  But when vectorisation is profitable, the same
fix is needed in vectorizable_load and vectorizable_store.

2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR tree-optimization/84265
* tree-vect-stmts.c (vectorizable_store): Don't treat
VMAT_CONTIGUOUS accesses as grouped.
(vectorizable_load): Likewise.

gcc/testsuite/
PR tree-optimization/84265
* gcc.dg/vect/pr84265.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257492 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoUse nonzero bits to refine range in split_constant_offset (PR 81635)
rsandifo [Thu, 8 Feb 2018 15:16:29 +0000 (15:16 +0000)] 
Use nonzero bits to refine range in split_constant_offset (PR 81635)

This patch is part 2 of the fix for PR 81635.  It means that
split_constant_offset can handle loops like:

  for (unsigned int i = 0; i < n; i += 4)
    {
      a[i] = ...;
      a[i + 1] = ...;
    }

CCP records that "i" must have its low 2 bits clear, but we don't
include this information in the range of "i", which remains [0, +INF].
I tried making set_nonzero_bits update the range info in the same
way that set_range_info updates the nonzero bits, but it regressed
cases like vrp117.c and made some other tests worse.

vrp117.c has a multiplication by 10, so CCP can infer that the low bit
of the result is clear.  If we included that in the range, the range
would go from [-INF, +INF] to [-INF, not-quite-+INF].  However,
the multiplication is also known to overflow in all cases, so VRP
saturates the result to [INT_MAX, INT_MAX].  This obviously creates a
contradiction with the nonzero bits, and intersecting the new saturated
range with an existing not-quite-+INF range would make us drop to
VR_UNDEFINED.  We're prepared to fold a comparison with an [INT_MAX,
INT_MAX] value but not with a VR_UNDEFINED value.

The other problems were created when intersecting [-INF, not-quite-+INF]
with a useful VR_ANTI_RANGE like ~[-1, 1].  The intersection would
keep the former range rather than the latter.

The patch therefore keeps the adjustment local to split_constant_offset
for now, but adds a helper routine so that it's easy to move this later.

2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR tree-optimization/81635
* wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
* wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
(test_round_for_mask): New functions.
(wide_int_cc_tests): Call test_round_for_mask.
* tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
* tree-vrp.c (intersect_range_with_nonzero_bits): New function.
* tree-data-ref.c (split_constant_offset_1): Use it to refine the
range returned by get_range_info.

gcc/testsuite/
PR tree-optimization/81635
* gcc.dg/vect/bb-slp-pr81635-3.c: New test.
* gcc.dg/vect/bb-slp-pr81635-4.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257491 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR ipa/81360
hubicka [Thu, 8 Feb 2018 14:51:51 +0000 (14:51 +0000)] 
PR ipa/81360
* cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
* symtab.c: Include builtins.h
(symtab_node::output_to_lto_symbol_table_p): Move here
from lto-streamer-out.c:output_symbol_p.
* lto-streamer-out.c (write_symbol): Turn early exit to assert.
(output_symbol_p): Move all logic to symtab.c
(produce_symtab): Update.

* lto.c (unify_scc): Register prevailing trees, not trees to be freed.
(read_cgraph_and_symbols): Use
symtab_node::output_to_lto_symbol_table_p.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257490 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoS/390: Disable prediction of indirect branches
krebbel [Thu, 8 Feb 2018 14:45:53 +0000 (14:45 +0000)] 
S/390: Disable prediction of indirect branches

This patch implements GCC support for mitigating vulnerability
CVE-2017-5715 known as Spectre #2 on IBM Z.

In order to disable prediction of indirect branches the implementation
makes use of an IBM Z specific feature - the execute instruction.
Performing an indirect branch via execute prevents the branch from
being subject to dynamic branch prediction.

The implementation tries to stay close to the x86 solution regarding
user interface.

x86 style options supported (without thunk-inline):

-mindirect-branch=(keep|thunk|thunk-extern)
-mfunction-return=(keep|thunk|thunk-extern)

IBM Z specific options:

-mindirect-branch-jump=(keep|thunk|thunk-extern|thunk-inline)
-mindirect-branch-call=(keep|thunk|thunk-extern)
-mfunction-return-reg=(keep|thunk|thunk-extern)
-mfunction-return-mem=(keep|thunk|thunk-extern)

These options allow us to enable/disable the branch conversion at a
finer granularity.

-mindirect-branch sets the value of -mindirect-branch-jump and
 -mindirect-branch-call.

-mfunction-return sets the value of -mfunction-return-reg and
 -mfunction-return-mem.

All these options are supported on GCC command line as well as
function attributes.

'thunk' triggers the generation of out of line thunks (expolines) and
replaces the formerly indirect branch with a direct branch to the
thunk.  Depending on the -march= setting two different types of thunks
are generated.  With -march=z10 or higher exrl (execute relative long)
is being used while targeting older machines makes use of larl/ex
instead.  From a security perspective the exrl variant is preferable.

'thunk-extern' does the branch replacement like 'thunk' but does not
emit the thunks.

'thunk-inline' is only available for indirect jumps.  It should be used
in environments where correct CFI is important - known as user space.

Additionally the patch introduces the -mindirect-branch-table option
which generates tables pointing to the locations which have been
modified.  This is supposed to allow reverting the changes without
re-compilation in situations where it isn't required. The sections are
split up into one section per option.

gcc/ChangeLog:

2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* config/s390/s390-opts.h (enum indirect_branch): Define.
* config/s390/s390-protos.h (s390_return_addr_from_memory)
(s390_indirect_branch_via_thunk)
(s390_indirect_branch_via_inline_thunk): Add function prototypes.
(enum s390_indirect_branch_type): Define.
* config/s390/s390.c (struct s390_frame_layout, struct
machine_function): Remove.
(indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
(indirect_branch_table_label_no, indirect_branch_table_name):
Define variables.
(INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
(enum s390_indirect_branch_option): Define.
(s390_return_addr_from_memory): New function.
(s390_handle_string_attribute): New function.
(s390_attribute_table): Add new attribute handler.
(s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
(s390_indirect_branch_via_thunk): New function.
(s390_indirect_branch_via_inline_thunk): New function.
(s390_function_ok_for_sibcall): When jumping via thunk disallow
sibling call optimization for non z10 compiles.
(s390_emit_call): Force indirect branch target to be a single
register.  Add r1 clobber for non-z10 compiles.
(s390_emit_epilogue): Emit return jump via return_use expander.
(s390_reorg): Handle JUMP_INSNs as execute targets.
(s390_option_override_internal): Perform validity checks for the
new command line options.
(s390_indirect_branch_attrvalue): New function.
(s390_indirect_branch_settings): New function.
(s390_set_current_function): Invoke s390_indirect_branch_settings.
(s390_output_indirect_thunk_function):  New function.
(s390_code_end): Implement target hook.
(s390_case_values_threshold): Implement target hook.
(TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
macros.
* config/s390/s390.h (struct s390_frame_layout)
(struct machine_function): Move here from s390.c.
(TARGET_INDIRECT_BRANCH_NOBP_RET)
(TARGET_INDIRECT_BRANCH_NOBP_JUMP)
(TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
(TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
(TARGET_INDIRECT_BRANCH_NOBP_CALL)
(TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
(TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
(TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
(TARGET_INDIRECT_BRANCH_TABLE): Define macros.
* config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
(INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
(mnemonic attribute): Add values which aren't recognized
automatically.
("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
pattern for branch conversion.  Fix mnemonic attribute.
("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
indirect branch via thunk if requested.
("indirect_jump", "<code>"): Expand patterns for branch conversion.
("*indirect_jump"): Disable for branch conversion using out of
line thunks.
("indirect_jump_via_thunk<mode>_z10")
("indirect_jump_via_thunk<mode>")
("indirect_jump_via_inlinethunk<mode>_z10")
("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
("casesi_jump_via_inlinethunk<mode>_z10")
("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
("*indirect2_jump"): Disable for branch conversion.
("casesi_jump"): Turn into expander and expand patterns for branch
conversion.
("return_use"): New expander.
("*return"): Emit return via thunk and rename it to ...
("*return<mode>"): ... this one.
* config/s390/s390.opt: Add new options and and enum for the
option values.

gcc/testsuite/ChangeLog:

2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* gcc.target/s390/nobp-function-pointer-attr.c: New test.
* gcc.target/s390/nobp-function-pointer-nothunk.c: New test.
* gcc.target/s390/nobp-function-pointer-z10.c: New test.
* gcc.target/s390/nobp-function-pointer-z900.c: New test.
* gcc.target/s390/nobp-indirect-jump-attr.c: New test.
* gcc.target/s390/nobp-indirect-jump-inline-attr.c: New test.
* gcc.target/s390/nobp-indirect-jump-inline-z10.c: New test.
* gcc.target/s390/nobp-indirect-jump-inline-z900.c: New test.
* gcc.target/s390/nobp-indirect-jump-nothunk.c: New test.
* gcc.target/s390/nobp-indirect-jump-z10.c: New test.
* gcc.target/s390/nobp-indirect-jump-z900.c: New test.
* gcc.target/s390/nobp-return-attr-all.c: New test.
* gcc.target/s390/nobp-return-attr-neg.c: New test.
* gcc.target/s390/nobp-return-mem-attr.c: New test.
* gcc.target/s390/nobp-return-mem-nothunk.c: New test.
* gcc.target/s390/nobp-return-mem-z10.c: New test.
* gcc.target/s390/nobp-return-mem-z900.c: New test.
* gcc.target/s390/nobp-return-reg-attr.c: New test.
* gcc.target/s390/nobp-return-reg-mixed.c: New test.
* gcc.target/s390/nobp-return-reg-nothunk.c: New test.
* gcc.target/s390/nobp-return-reg-z10.c: New test.
* gcc.target/s390/nobp-return-reg-z900.c: New test.
* gcc.target/s390/nobp-table-jump-inline-z10.c: New test.
* gcc.target/s390/nobp-table-jump-inline-z900.c: New test.
* gcc.target/s390/nobp-table-jump-z10.c: New test.
* gcc.target/s390/nobp-table-jump-z900.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257489 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoSimplify LRA lowpart subreg fix
rsandifo [Thu, 8 Feb 2018 13:50:16 +0000 (13:50 +0000)] 
Simplify LRA lowpart subreg fix

r257177 made the else arms equivalent to the if arms.

2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* lra-constraints.c (match_reload): Unconditionally use
gen_lowpart_SUBREG, rather than selecting between that
and equivalent gen_rtx_SUBREG code.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257488 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-08 Richard Biener <rguenther@suse.de>
rguenth [Thu, 8 Feb 2018 13:29:15 +0000 (13:29 +0000)] 
2018-02-08  Richard Biener  <rguenther@suse.de>

PR tree-optimization/84233
* tree-ssa-phiprop.c (propagate_with_phi): Use separate
changed flag instead of boguously re-using phi_inserted.

* g++.dg/torture/pr84233.C: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257486 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[hsa] Fix PR82416 testcase
jamborm [Thu, 8 Feb 2018 13:06:26 +0000 (13:06 +0000)] 
[hsa] Fix PR82416 testcase

2018-02-08  Martin Jambor  <mjambor@suse.cz>

* testsuite/libgomp.hsa.c/pr82416.c: Make the function with target
clonable.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257485 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[hsa] Set program allocation for static local variables
jamborm [Thu, 8 Feb 2018 13:03:52 +0000 (13:03 +0000)] 
[hsa] Set program allocation for static local variables

2018-02-08  Martin Jambor  <mjambor@suse.cz>

* hsa-gen.c (get_symbol_for_decl): Set program allocation for
static local variables.

libgomp/
* testsuite/libgomp.hsa.c/staticvar.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257484 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-08 Richard Biener <rguenther@suse.de>
rguenth [Thu, 8 Feb 2018 12:53:19 +0000 (12:53 +0000)] 
2018-02-08  Richard Biener  <rguenther@suse.de>

PR tree-optimization/84278
* tree-vect-stmts.c (vectorizable_store): When looking for
smaller vector types to perform grouped strided loads/stores
make sure the mode is supported by the target.
(vectorizable_load): Likewise.

* gcc.target/i386/pr84278.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257483 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[AArch64] Use more LDP/STP in shrinkwrapping
wilco [Thu, 8 Feb 2018 12:32:51 +0000 (12:32 +0000)] 
[AArch64] Use more LDP/STP in shrinkwrapping

The shrinkwrap optimization added in GCC 7 allows each callee-save to
be delayed and done only across blocks which need a particular callee-save.
Although this reduces unnecessary memory traffic on code paths that need
few callee-saves, it typically uses LDR/STR rather than LDP/STP.  This
means more memory accesses and increased codesize, ~1.0% on average.

To improve this, if a particular callee-save must be saved/restored, also
add the adjacent callee-save to allow use of LDP/STP.  This significantly
reduces codesize (for example gcc_r, povray_r, parest_r, xalancbmk_r are
1% smaller).  This is a simple fix which can be backported.  A more advanced
approach would scan blocks for pairs of callee-saves, but that requires a
full rewrite of all the callee-save code which is too late at this stage.

An example epilog in a shrinkwrapped function before:

ldp    x21, x22, [sp,#16]
ldr    x23, [sp,#32]
ldr    x24, [sp,#40]
ldp    x25, x26, [sp,#48]
ldr    x27, [sp,#64]
ldr    x28, [sp,#72]
ldr    x30, [sp,#80]
ldr    d8, [sp,#88]
ldp    x19, x20, [sp],#96
ret

And after this patch:

ldr    d8, [sp,#88]
ldp    x21, x22, [sp,#16]
ldp    x23, x24, [sp,#32]
ldp    x25, x26, [sp,#48]
ldp    x27, x28, [sp,#64]
ldr    x30, [sp,#80]
ldp    x19, x20, [sp],#96
ret

    gcc/
* config/aarch64/aarch64.c (aarch64_components_for_bb):
Increase LDP/STP opportunities by adding adjacent callee-saves.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257482 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoPR84068, PR83459: Fix sort order of SCHED_PRESSURE_MODEL
wilco [Thu, 8 Feb 2018 12:29:28 +0000 (12:29 +0000)] 
PR84068, PR83459: Fix sort order of SCHED_PRESSURE_MODEL

The comparison function for SCHED_PRESSURE_MODEL is incorrect.  If either
instruction is not in target_bb, the ordering is not well defined.
Since all instructions outside the target_bb get the highest model_index,
all we need to do is sort on model_index.  If the model_index is the same
we defer to RFS_DEP_COUNT and/or RFS_TIE.

    gcc/
PR rtl-optimization/84068
PR rtl-optimization/83459
* haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.

    gcc/testsuite
PR rtl-optimization/84068
PR rtl-optimization/83459
* gcc.dg/pr84068.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257481 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR tree-optimization/84224
aldyh [Thu, 8 Feb 2018 11:16:25 +0000 (11:16 +0000)] 
PR tree-optimization/84224
* gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
* calls.c (gimple_alloca_call_p): Only return TRUE when we have
non-zero arguments.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257480 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-08 Richard Biener <rguenther@suse.de>
rguenth [Thu, 8 Feb 2018 10:52:00 +0000 (10:52 +0000)] 
2018-02-08  Richard Biener  <rguenther@suse.de>

* g++.dg/vect/slp-pr56812.cc: Allow either basic-block or
loop vectorization to happen.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257479 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago/cp
paolo [Thu, 8 Feb 2018 09:06:33 +0000 (09:06 +0000)] 
/cp
2018-02-08  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/83204
* pt.c (tsubst_copy_and_build): Use force_paren_expr for INDIRECT_REF.

/testsuite
2018-02-08  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/83204
* g++.dg/cpp0x/lambda/lambda-ice25.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257478 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoDaily bump.
gccadmin [Thu, 8 Feb 2018 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257477 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
meissner [Wed, 7 Feb 2018 23:58:28 +0000 (23:58 +0000)] 
2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

* doc/install.texi (Configuration): Document the
--with-long-double-format={ibm,ieee} PowerPC configuration
options.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257473 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-07 Iain Sandoe <iain@codesourcery.com>
mrs [Wed, 7 Feb 2018 23:42:51 +0000 (23:42 +0000)] 
2018-02-07  Iain Sandoe  <iain@codesourcery.com>

* config/rs6000/altivec.md (*restore_world): Remove LR use.
* config/rs6000/predicates.md (restore_world_operation): Adjust op
count, remove one USE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257472 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[testsuite]
willschm [Wed, 7 Feb 2018 23:02:00 +0000 (23:02 +0000)] 
[testsuite]

2018-02-07  Will Schmidt  <will_schmidt@vnet.ibm.com>

* gcc.target/powerpc/vsxcopy.c: Update scan-assembler stanzas.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257471 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[gcc]
meissner [Wed, 7 Feb 2018 22:54:59 +0000 (22:54 +0000)] 
[gcc]
2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/84154
* config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
Convert from define_expand to be define_insn_and_split.  Rework
float/double/_Float128 conversions to QI/HI/SImode to work with
both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
conversions to QI/HImode types did a store and then a load to
truncate the value.  For conversions to VSX registers, don't split
the insn, instead emit the code directly.  Use the code iterator
any_fix to combine signed and unsigned conversions.
(fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
(fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
(fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
(fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
(fix_<mode>di2_hw): Likewise.
(fixuns_<mode>di2_hw): Likewise.
(fix_<mode>si2_hw): Likewise.
(fixuns_<mode>si2_hw): Likewise.
(fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
(fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
(fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
fix<uns>_trunc<SFDF:mode>si2_p8.
(fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
used.
(fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
(fix<uns>_<mode>_mem): Likewise.
(fctiw<u>z_<mode>_mem): Likewise.
(fix<uns>_<mode>_mem): Likewise.
(fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
the register allocator from doing a direct move to the GPRs to do
a store, and instead use the ISA 3.0 store byte/half-word from
vector register instruction.  For IEEE 128-bit floating point,
also optimize stores of 32-bit ints.
(fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.

[gcc/testsuite]
2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/84154
* gcc.target/powerpc/pr84154-1.c: New tests.
* gcc.target/powerpc/pr84154-2.c: Likewise.
* gcc.target/powerpc/pr84154-3.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257470 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[testsuite]
willschm [Wed, 7 Feb 2018 22:46:16 +0000 (22:46 +0000)] 
[testsuite]

2018-02-07  Will Schmidt  <will_schmidt@vnet.ibm.com>

* gcc.target/powerpc/builtins-mergew-mergeow.c:  Update dg-requires.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257469 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR c++/84082
jakub [Wed, 7 Feb 2018 22:30:51 +0000 (22:30 +0000)] 
PR c++/84082
* parser.c (cp_parser_dot_deref_incomplete): New function.
(cp_parser_postfix_dot_deref_expression): Use it.

* g++.dg/template/incomplete11.C: New test.
* g++.dg/parse/crash67.C: Expect an incomplete type diagnostics too.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257466 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Wed, 7 Feb 2018 22:29:22 +0000 (22:29 +0000)] 
2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/82994
* match.c (gfc_match_deallocate): Check for NULL pointer.

2018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/82994
* gfortran.dg/deallocate_error_3.f90: New test.
* gfortran.dg/deallocate_error_4.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257465 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * es.po: Update.
jsm28 [Wed, 7 Feb 2018 22:20:39 +0000 (22:20 +0000)] 
* es.po: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257464 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago runtime: don't call funcPC from a function
ian [Wed, 7 Feb 2018 22:04:55 +0000 (22:04 +0000)] 
runtime: don't call funcPC from a function

    The escape analysis support is not yet good enough to avoid escaping
    the argument to funcPC.  This causes unnecessary and often harmful
    memory allocation.  E.g., (*cpuProfile).addExtra can be called from a
    signal handler, and it must not allocate memory.

    Move the calls to funcPC to use variables instead.  This was done in
    the original migration to using funcPC, but was not done for newer code.

    In one case, in signal handling code, use getSigtramp.

    Reviewed-on: https://go-review.googlesource.com/92735

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257463 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
tkoenig [Wed, 7 Feb 2018 21:08:51 +0000 (21:08 +0000)] 
2018-02-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/68560
* trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
(gfc_conv_intrinsic_function): Call it.

2018-02-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/68560
* gfortran.dg/shape_9.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257462 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-06 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Wed, 7 Feb 2018 20:43:33 +0000 (20:43 +0000)] 
2018-02-06  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/82049
* match.c (gfc_match_type_spec): If the charlen is non-NULL, then
try to resolve it.  While here return early if possible.

2018-02-06  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/82049
* gfortran.dg/assumed_charlen_parameter.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257459 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoFix libgomp.oacc-c-c++-common/pr84217.c for C++
ro [Wed, 7 Feb 2018 19:32:21 +0000 (19:32 +0000)] 
Fix libgomp.oacc-c-c++-common/pr84217.c for C++

* testsuite/libgomp.oacc-c-c++-common/pr84217.c (abort)
[__cplusplus]: Declare extern "C".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257457 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoC++: avoid most reserved words as misspelling suggestions (PR c++/81610 and PR c...
dmalcolm [Wed, 7 Feb 2018 17:55:54 +0000 (17:55 +0000)] 
C++: avoid most reserved words as misspelling suggestions (PR c++/81610 and PR c++/80567)

lookup_name_fuzzy can offer some reserved words as suggestions for
misspelled words, helping with "singed"/"signed" typos.

PR c++/81610 and PR c++/80567 report problems where the C++ frontend
suggested "if", "for" and "else" as corrections for misspelled variable
names.

The root cause is that in r247233
  ("Fix spelling suggestions for reserved words (PR c++/80177)")
I loosened the conditions on these reserved words, adding this condition:
   if (kind == FUZZY_LOOKUP_TYPENAME)
to the logic for rejecting words that don't start decl-specifiers, to
allow for "static_assert" to be offered.

This is too loose a condition: we don't want to suggest *any* reserved word
when we're in a context where we don't know we expect a typename.

For the kinds of error-recover situations where we're suggesting
spelling corrections we don't have much contextual information, so it
seems prudent to be stricter about which reserved words we offer
as spelling suggestions; I don't think it makes sense for us to
suggest e.g. "for".

This patch implements that by effectively reinstating the old logic,
but special-casing RID_STATIC_ASSERT, moving the logic to a new
subroutine (in case we want to allow for other special-cases).

I attempted to add suggestions for the various RID_*CAST, to cope
with e.g. "reinterptet_cast" (I can never type that correctly on the
first try), but the following '<' token confuses the error-recovery
enough that the suggestion code isn't triggered.

gcc/cp/ChangeLog:
PR c++/81610
PR c++/80567
* name-lookup.c (suggest_rid_p): New function.
(lookup_name_fuzzy): Replace enum-rid-filtering logic with call to
suggest_rid_p.

gcc/testsuite/ChangeLog:
PR c++/81610
PR c++/80567
* g++.dg/spellcheck-reswords.C: New test case.
* g++.dg/spellcheck-stdlib.C: Remove xfail from dg-bogus
suggestion of "if".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257456 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoSupport >26 operands in generation code.
alahay01 [Wed, 7 Feb 2018 16:25:28 +0000 (16:25 +0000)] 
Support >26 operands in generation code.

2018-02-07  Alan Hayward  <alan.hayward@arm.com>

        * genextract.c (push_pathstr_operand): New function to support [a-zA-Z].
        (walk_rtx): Call push_pathstr_operand.
        (print_path): Support [a-zA-Z].

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257455 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR c++/84182 - ICE with captured lambda
jason [Wed, 7 Feb 2018 16:02:50 +0000 (16:02 +0000)] 
PR c++/84182 - ICE with captured lambda

PR c++/84181
* pt.c (extract_locals_r, extract_local_specs): New.
(tsubst_pack_expansion): Use them.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257454 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-07 Richard Biener <rguenther@suse.de>
rguenth [Wed, 7 Feb 2018 15:46:17 +0000 (15:46 +0000)] 
2018-02-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/84037
* tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
(cse_and_gimplify_to_preheader): Declare.
(vect_get_place_in_interleaving_chain): Likewise.
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
ivexpr_map.
(_loop_vec_info::~_loop_vec_info): Delete it.
(cse_and_gimplify_to_preheader): New function.
* tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
* tree-vect-stmts.c (vectorizable_store): CSE base and steps.
(vectorizable_load): Likewise.  For grouped stores always base
the IV on the first element.
* tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
condition before gimplifying.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257453 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoRevert behavior to r251316.
marxin [Wed, 7 Feb 2018 13:16:04 +0000 (13:16 +0000)] 
Revert behavior to r251316.

2018-02-07  Martin Liska  <mliska@suse.cz>

PR c++/84059.
* class.c (add_method): Append argument value.
* cp-tree.h (maybe_version_functions): Add new argument.
* decl.c (decls_match): Call it if a declaration does not
have DECL_FUNCTION_VERSIONED.
(maybe_version_functions): record argument is added.
2018-02-07  Martin Liska  <mliska@suse.cz>

PR c++/84059.
* g++.dg/ext/mv26.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257451 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
jakub [Wed, 7 Feb 2018 12:53:31 +0000 (12:53 +0000)] 
* tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
*DIV_EXPR and *MOD_EXPR.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257450 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[testsuite] Require alloca in gcc.dg/pr83844.c
vries [Wed, 7 Feb 2018 11:35:30 +0000 (11:35 +0000)] 
[testsuite] Require alloca in gcc.dg/pr83844.c

2018-02-07  Tom de Vries  <tom@codesourcery.com>

* gcc.dg/pr83844.c: Require effective target alloca.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257447 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[testsuite] Require global_constructor in gcc.dg/torture/pr83055.c
vries [Wed, 7 Feb 2018 11:35:18 +0000 (11:35 +0000)] 
[testsuite] Require global_constructor in gcc.dg/torture/pr83055.c

2018-02-07  Tom de Vries  <tom@codesourcery.com>

* gcc.dg/torture/pr83055.c: Require effective target global_constructor.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257446 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoUse -fcf-protection=return in cet-intrin-4.c
hjl [Wed, 7 Feb 2018 10:49:53 +0000 (10:49 +0000)] 
Use -fcf-protection=return in cet-intrin-4.c

Since -fcf-protection requires both -mshstk and -mibt, use
-fcf-protection=return with -mshstk in cet-intrin-4.c.

PR target/84243
* gcc.target/i386/cet-intrin-4.c (dg-options): Use
-fcf-protection=return.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257445 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoi386: Mask out the CF_SET bit for -fcf-protection check
hjl [Wed, 7 Feb 2018 10:48:39 +0000 (10:48 +0000)] 
i386: Mask out the CF_SET bit for -fcf-protection check

Since ix86_option_override_internal sets the CF_SET bit in
flag_cf_protection and it can be called more than once via pragma,
we need to mask out the CF_SET bit when checking flag_cf_protection.

PR target/84248
* config/i386/i386.c (ix86_option_override_internal): Mask out
the CF_SET bit when checking -fcf-protection.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257444 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[openacc] Fix diff_type in expand_oacc_collapse_init
vries [Wed, 7 Feb 2018 10:37:55 +0000 (10:37 +0000)] 
[openacc] Fix diff_type in expand_oacc_collapse_init

2018-02-07  Tom de Vries  <tom@codesourcery.com>

PR libgomp/84217
* omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
enough.

* c-c++-common/goacc/pr84217.c: New test.
* gfortran.dg/goacc/pr84217.f90: New test.

* testsuite/libgomp.oacc-c-c++-common/pr84217.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257443 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * lto.c (register_resolution): Remove forgotten sanity check.
hubicka [Wed, 7 Feb 2018 10:20:03 +0000 (10:20 +0000)] 
* lto.c (register_resolution): Remove forgotten sanity check.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257442 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-07 Richard Biener <rguenther@suse.de>
rguenth [Wed, 7 Feb 2018 10:14:25 +0000 (10:14 +0000)] 
2018-02-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/84204
* tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
this place.

* gcc.dg/graphite/pr84204.c: New testcase.

PR tree-optimization/84205
* graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
special-case isl_ast_op_zdiv_r.

* gcc.dg/graphite/pr84205.c: New testcase.

PR tree-optimization/84223
* graphite-scop-detection.c (gather_bbs::before_dom_children):
Only add conditions from within the region.
(gather_bbs::after_dom_children): Adjust.

* gfortran.dg/graphite/pr84223.f90: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257441 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR target/84209
denisc [Wed, 7 Feb 2018 09:59:52 +0000 (09:59 +0000)] 
PR target/84209
* config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
* config/avr/avr.md: Only post-reload split REG-REG moves if
either register is REGERAL_REG_P.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257440 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-07 Paolo Carlini <paolo.carlini@oracle.com>
paolo [Wed, 7 Feb 2018 09:35:10 +0000 (09:35 +0000)] 
2018-02-07  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71662
* g++.dg/cpp0x/scoped_enum7.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257439 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[testsuite] Fix gcc.dg/cse_recip.c for AArch64 after r257181.
clyon [Wed, 7 Feb 2018 09:12:48 +0000 (09:12 +0000)] 
[testsuite] Fix gcc.dg/cse_recip.c for AArch64 after r257181.

2018-02-07  Christophe Lyon <christophe.lyon@linaro.org>

PR tree-optimization/83008
* gcc.dg/cse_recip.c: Add -fno-tree-slp-vectorize.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257438 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR tree-optimization/84235
jakub [Wed, 7 Feb 2018 08:29:58 +0000 (08:29 +0000)] 
PR tree-optimization/84235
* tree-ssa-scopedtables.c
(avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
if the subtraction is performed in floating point type where NaNs are
honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
build 1.  Formatting fix.

* gcc.c-torture/execute/ieee/pr84235.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257437 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago compiler: make single Btype for methods table of identical interface type
ian [Wed, 7 Feb 2018 01:52:48 +0000 (01:52 +0000)] 
compiler: make single Btype for methods table of identical interface type

    Normally we ensure to build a single Btype for identical types.
    We did not do this for methods table of identical interface
    types, however. If there are two identical interface type I, I2,
    they have the same Btype BI, but different Btypes for their
    methods tables, BM and BM2. From the backend's point of view
    only one of them is linked to BI. This can cause inconsitency
    in the backend's type system, like unresolved placeholder. This
    CL ensures we create a single Btype for methods table of
    identical interface type.

    Reviewed-on: https://go-review.googlesource.com/92436

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257436 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoDaily bump.
gccadmin [Wed, 7 Feb 2018 00:16:28 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257435 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoDon't pass x86-only options on non-x86 targets in c-c++-common/fcf-protection-[67...
ro [Tue, 6 Feb 2018 23:31:09 +0000 (23:31 +0000)] 
Don't pass x86-only options on non-x86 targets in c-c++-common/fcf-protection-[67].c (PR testsuite/84243)

PR testsuite/84243
* c-c++-common/fcf-protection-6.c: Only pass -mshstk on x86
targets.
* c-c++-common/fcf-protection-7.c: Likewise for -mibt.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257432 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR target/84146
jakub [Tue, 6 Feb 2018 20:32:45 +0000 (20:32 +0000)] 
PR target/84146
* config/i386/i386.c (rest_of_insert_endbranch): Only skip
NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
and skip it regardless of bb boundaries.  Use CALL_P macro,
don't test INSN_P (insn) together with CALL_P or JUMP_P check
unnecessarily, formatting fix.

* gcc.target/i386/pr84146.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257431 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-06 Michael Collison <michael.collison@arm.com>
collison [Tue, 6 Feb 2018 20:27:08 +0000 (20:27 +0000)] 
2018-02-06  Michael Collison  <michael.collison@arm.com>

* config/arm/thumb2.md:
(*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
(*thumb_mov_notscc): Ditto.
* gcc.target/arm/pr7676.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257430 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
meissner [Tue, 6 Feb 2018 20:15:40 +0000 (20:15 +0000)] 
2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/84154
* config/rs6000/rs6000.md (su code attribute): Use "u" for
unsigned_fix, not "s".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257429 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoFix HAVE_GAS_CFI_DIRECTIVE for x86_64-pc-solaris2.*
ro [Tue, 6 Feb 2018 18:33:19 +0000 (18:33 +0000)] 
Fix HAVE_GAS_CFI_DIRECTIVE for x86_64-pc-solaris2.*

* configure.ac (gcc_fn_eh_frame_ro): New function.
(gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
correct .eh_frame permissions.
* configure: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257424 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove irrelevant...
andrewjenner [Tue, 6 Feb 2018 17:37:46 +0000 (17:37 +0000)] 
   * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove irrelevant options.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257422 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoPR tree-optimization/84225
aldyh [Tue, 6 Feb 2018 17:11:01 +0000 (17:11 +0000)] 
PR tree-optimization/84225
Add test for previous commit for PR84225.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257420 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[gcc]
wschmidt [Tue, 6 Feb 2018 16:55:01 +0000 (16:55 +0000)] 
[gcc]

2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/rs6000.c (rs6000_option_override_internal):
Display warning message for -mno-speculate-indirect-jumps.

[gcc/testsuite]

2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* gcc.target/powerpc/safe-indirect-jump-1.c: Detect deprecation
warning for -mno-speculate-indirect-jumps.
* gcc.target/powerpc/safe-indirect-jump-2.c: Likewise.
* gcc.target/powerpc/safe-indirect-jump-3.c: Likewise.
* gcc.target/powerpc/safe-indirect-jump-4.c: Likewise.
* gcc.target/powerpc/safe-indirect-jump-5.c: Likewise.
* gcc.target/powerpc/safe-indirect-jump-6.c: Likewise.
* gcc.target/powerpc/safe-indirect-jump-7.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257419 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
andrewjenner [Tue, 6 Feb 2018 16:10:43 +0000 (16:10 +0000)] 
   * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
       Undocumented.
       * config/powerpcspe/sysv4.opt (mbit-align): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257417 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR tree-optimization/84225
aldyh [Tue, 6 Feb 2018 15:44:51 +0000 (15:44 +0000)] 
PR tree-optimization/84225
* tree-eh.c (find_trapping_overflow): Only call
operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257416 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago compiler: avoid negative zero in float constants
ian [Tue, 6 Feb 2018 15:30:06 +0000 (15:30 +0000)] 
compiler: avoid negative zero in float constants

    Check for negative numbers with very small magnitudes that will round
    to negative zero, and force them to positive zero instead.

    This implements the spec clarification in https://golang.org/cl/14727.
    The test is in https://golang.org/cl/91895.

    Fixes golang/go#12621

    Reviewed-on: https://go-review.googlesource.com/92175

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257415 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoFix checking -mibt and -mshstk options for control flow protection
itsimbal [Tue, 6 Feb 2018 15:25:31 +0000 (15:25 +0000)] 
Fix checking -mibt and -mshstk options for control flow protection

PR target/84145
* config/i386/i386.c: Reimplement the check of possible options
-mibt/-mshstk conbination. Change error messages.
* doc/invoke.texi: Fix a typo: remove extra '='.
* c-c++-common/fcf-protection-1.c: Change a compared message.
* c-c++-common/fcf-protection-2.c: Likewise.
* c-c++-common/fcf-protection-3.c: Likewise.
* c-c++-common/fcf-protection-5.c: Likewise.
* c-c++-common/fcf-protection-6.c: New test.
* c-c++-common/fcf-protection-7.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257414 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago runtime: correct runtime structfield type to match reflect
ian [Tue, 6 Feb 2018 15:18:50 +0000 (15:18 +0000)] 
runtime: correct runtime structfield type to match reflect

    The offset field in structfield has changed to offsetAnon, and now
    requires a shift to get the actual offset value.

    Fixes golang/go#23391

    Reviewed-on: https://go-review.googlesource.com/92275

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257413 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR lto/81004
hubicka [Tue, 6 Feb 2018 13:27:04 +0000 (13:27 +0000)] 
PR lto/81004
* lto.c: Include builtins.h
(register_resolution): Merge resolutions in case trees was
merged across units.
(lto_maybe_register_decl): Break out from ...
(lto_read_decls): ... here.
(unify_scc): Also register decls here.
(read_cgraph_and_symbols): Sanity check that all resolutions was
read.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257412 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR tree-optimization/84228
mpolacek [Tue, 6 Feb 2018 13:25:54 +0000 (13:25 +0000)] 
PR tree-optimization/84228
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.

* c-c++-common/Wstringop-truncation-3.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257411 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-06 Tamar Christina <tamar.christina@arm.com>
tnfchris [Tue, 6 Feb 2018 11:20:55 +0000 (11:20 +0000)] 
2018-02-06  Tamar Christina  <tamar.christina@arm.com>

PR target/82641
* config/arm/arm.c (arm_print_asm_arch_directives): Record already
emitted arch directives.
* config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
__ARM_FEATURE_COPROC before changing architectures.

gcc/testsuite
2018-02-06  Tamar Christina  <tamar.christina@arm.com>

PR target/82641
* gcc.target/arm/pragma_arch_switch_2.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257410 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoAvoid cc1 SEGV in gcc.dg/rtl/x86_64/final.c (PR target/79975)
ro [Tue, 6 Feb 2018 10:28:47 +0000 (10:28 +0000)] 
Avoid cc1 SEGV in gcc.dg/rtl/x86_64/final.c (PR target/79975)

PR target/79975
* gcc.dg/rtl/x86_64/final.c: Add -fdwarf2-cfi-asm to dg-options.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257408 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-06 Richard Biener <rguenther@suse.de>
rguenth [Tue, 6 Feb 2018 09:26:48 +0000 (09:26 +0000)] 
2018-02-06  Richard Biener  <rguenther@suse.de>

* config/i386/i386.c (print_reg): Fix typo.
(ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257407 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoconfig/
ebotcazou [Tue, 6 Feb 2018 08:30:53 +0000 (08:30 +0000)] 
config/
* gcc-plugin.m4 (GCC_ENABLE_PLUGINS): Remove -q option passed to grep.
gcc/
* configure: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257406 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoAdd upstream svn rev for PR sanitizer/82825.
ro [Tue, 6 Feb 2018 08:16:22 +0000 (08:16 +0000)] 
Add upstream svn rev for PR sanitizer/82825.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257405 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoDaily bump.
gccadmin [Tue, 6 Feb 2018 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257404 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * sv.po: Update.
jsm28 [Mon, 5 Feb 2018 23:47:14 +0000 (23:47 +0000)] 
* sv.po: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257401 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoPR tree-optimization/83369 - Missing diagnostics during inlining
msebor [Mon, 5 Feb 2018 22:45:04 +0000 (22:45 +0000)] 
PR tree-optimization/83369 - Missing diagnostics during inlining

gcc/ChangeLog:

PR tree-optimization/83369
* tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
inlining context.

gcc/testsuite/ChangeLog:

PR tree-optimization/83369
gcc.dg/Wnonnull.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257400 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoMake lto.exp work with Tcl 8.4
rsandifo [Mon, 5 Feb 2018 21:34:46 +0000 (21:34 +0000)] 
Make lto.exp work with Tcl 8.4

"dict" was added in Tcl 8.5, but until a couple of weeks ago the
testsuite had worked with 8.4.

This patch uses arrays instead, like we do for the caching in
target-supports.exp.  It is a bit uglier than using dicts was,
but hopefully not too bad...

2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/testsuite/
* lib/lto.exp (lto_handle_diagnostics): Remove messages_by_file
argument and use dg-messages-by-file instead.  Expect it to be
an array rather than a dict.
(lto-link-and-maybe-run): Remove messages_by_file argument and
use an upvar for dg-messages-by-file.  Update call to
lto_handle_diagnostics.
(lt-get-options): Treat dg-messages-by-file as an array
rather than a dict.
(lto-get-options-main): Likewise.  Set the entry rather than appending.
(lto-execute): Treat dg-messages-by-file as an array rather than
a dict.  Update call to lto-link-and-maybe-run.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257397 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago compiler: rollback "avoid negative zero in float constants"
ian [Mon, 5 Feb 2018 19:26:29 +0000 (19:26 +0000)] 
compiler: rollback "avoid negative zero in float constants"

    It uses functions that are not available in MPFR 2.4.2, which is the
    current version supported by GCC.

    Original change description:

        compiler: avoid negative zero in float constants

        Check for negative numbers with very small magnitudes that will round
        to negative zero, and force them to positive zero instead.

        This implements the spec clarification in https://golang.org/cl/14727.
        The test is in https://golang.org/cl/91895.

        Fixes golang/go#12621

    Updates golang/go#12621

    Reviewed-on: https://go-review.googlesource.com/92055

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257393 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago compiler: avoid negative zero in float constants
ian [Mon, 5 Feb 2018 15:28:59 +0000 (15:28 +0000)] 
compiler: avoid negative zero in float constants

    Check for negative numbers with very small magnitudes that will round
    to negative zero, and force them to positive zero instead.

    This implements the spec clarification in https://golang.org/cl/14727.
    The test is in https://golang.org/cl/91895.

    Fixes golang/go#12621

    Reviewed-on: https://go-review.googlesource.com/91915

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257390 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * class.c: Remove unused global variables.
mpolacek [Mon, 5 Feb 2018 11:47:48 +0000 (11:47 +0000)] 
* class.c: Remove unused global variables.
        (build_primary_vtable): Don't gather statistics.
(print_class_statistics): Remove.
* cp-tree.h (print_class_statistics): Remove.
* tree.c (cxx_print_statistics): Don't call print_class_statistics.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257389 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-02-05 Paolo Carlini <paolo.carlini@oracle.com>
paolo [Mon, 5 Feb 2018 11:15:55 +0000 (11:15 +0000)] 
2018-02-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/82782
* g++.dg/cpp1z/inline-var4.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257388 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoCherry-pick libsanitizer pointer-pair tristate option.
marxin [Mon, 5 Feb 2018 11:01:50 +0000 (11:01 +0000)] 
Cherry-pick libsanitizer pointer-pair tristate option.

2018-02-05  Martin Liska  <mliska@suse.cz>

* doc/invoke.texi: Cherry-pick upstream r323995.
2018-02-05  Martin Liska  <mliska@suse.cz>

* c-c++-common/asan/pointer-compare-1.c: Adjust ASAN_OPTIONS
options.
* c-c++-common/asan/pointer-compare-2.c: Likewise.
* c-c++-common/asan/pointer-subtract-1.c: Likewise.
* c-c++-common/asan/pointer-subtract-2.c: Likewise.
* c-c++-common/asan/pointer-subtract-3.c: Likewise.
* c-c++-common/asan/pointer-subtract-4.c: Likewise.
* c-c++-common/asan/pointer-compare-3.c: New test.
2018-02-05  Martin Liska  <mliska@suse.cz>

* asan/asan_flags.inc: Cherry-pick upstream r323995.
* asan/asan_report.cc (CheckForInvalidPointerPair):
Cherry-pick upstream r323995.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257387 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[AArch64] Remove SVE XFAILs
rsandifo [Mon, 5 Feb 2018 10:48:49 +0000 (10:48 +0000)] 
[AArch64] Remove SVE XFAILs

These tests started passing after r257293, which had the side-effect
of renumbering the SSA names and leaving the COND_EXPRs in their
natural order.

This does show a deeper underlying issue that code generation is too
sensitive to internal things like SSA_NAME versions, but it no longer
affects these particular tests (for now).

2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/testsuite/
* gcc.target/aarch64/sve/vcond_4.c: Remove XFAILs.
* gcc.target/aarch64/sve/vcond_5.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257386 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoAdjust ira_init_register_move_cost comment
rsandifo [Mon, 5 Feb 2018 10:47:56 +0000 (10:47 +0000)] 
Adjust ira_init_register_move_cost comment

2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* ira.c (ira_init_register_move_cost): Adjust comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257385 138bc75d-0d04-0410-961f-82ee72b054a4