platform/upstream/gcc.git
7 years agoc-cppbuiltin.c (c_cpp_builtins): Update __cpp_inheriting_constructors.
Jason Merrill [Wed, 2 Nov 2016 02:10:38 +0000 (22:10 -0400)]
c-cppbuiltin.c (c_cpp_builtins): Update __cpp_inheriting_constructors.

* c-cppbuiltin.c (c_cpp_builtins): Update
__cpp_inheriting_constructors.

From-SVN: r241766

7 years agoImplement P0136R1, Rewording inheriting constructors.
Jason Merrill [Wed, 2 Nov 2016 01:50:29 +0000 (21:50 -0400)]
Implement P0136R1, Rewording inheriting constructors.

gcc/c-family/
* c.opt (-fnew-inheriting-ctors): New.
* c-opts.c: Default to on for ABI 11+.
gcc/cp/
* call.c (enum rejection_reason_code): Add rr_inherited_ctor.
(inherited_ctor_rejection): New.
(add_function_candidate): Reject inherited ctors for copying.
(enforce_access): Use strip_inheriting_ctors.
(print_z_candidate): Likewise.  Handle rr_inherited_ctor.
(convert_like_real): Avoid copying inheriting ctor parameters.
(build_over_call): Likewise.  A base ctor inheriting from vbase
has no parms.  Sorry about varargs.
(joust): A local constructor beats inherited with the same convs.
* class.c (add_method): Handle hiding inheriting ctors.
(one_inherited_ctor): Handle new semantics.
(add_implicitly_declared_members): Pass using_decl down.
(build_clone): A base ctor inheriting from vbase has no parms.
* cp-tree.h (DECL_INHERITED_CTOR): Store this instead of the base.
(SET_DECL_INHERITED_CTOR): Likewise.
(DECL_INHERITED_CTOR_BASE): Adjust.
* constexpr.c: Adjust.
* error.c (dump_function_decl): Decorate inheriting ctors.
* init.c (emit_mem_initializers): Suppress access control in
inheriting ctor.
* mangle.c (write_special_name_constructor): Handle new inheriting
ctor mangling.
* method.c (strip_inheriting_ctors, inherited_ctor_binfo)
(ctor_omit_inherited_parms, binfo_inherited_from): New.
(synthesized_method_walk): Use binfo_inherited_from.  Suppress
access control in inheriting ctor.
(deduce_inheriting_ctor): Deleted if ambiguous ctor inheritance.
(maybe_explain_implicit_delete): Explain ambigous ctor inheritance.
(add_one_base_init, do_build_copy_constructor): Adjust.
(locate_fn_flags, explain_implicit_non_constexpr): Adjust.
(implicitly_declare_fn): Adjust.
(get_inherited_ctor): Remove.
* name-lookup.c (do_class_using_decl): Check for indirect ctor
inheritance.
* optimize.c (cdtor_comdat_group): Adjust for new mangling.
(maybe_clone_body): Handle omitted parms in base clone.
(maybe_thunk_body): Don't thunk if base clone omits parms.
* pt.c (tsubst_decl): Adjust.
(instantiate_template_1): Suppress access control in inheriting
ctor.
(fn_type_unification): Do deduction with inherited ctor.
* tree.c (special_function_p): Adjust.
gcc/
* tree-inline.c (copy_tree_body_r): Only copy the taken branch of
a COND_EXPR with constant condition.
libiberty/
* cp-demangle.c (d_ctor_dtor_name): Handle inheriting constructor.

From-SVN: r241765

7 years agoDaily bump.
GCC Administrator [Wed, 2 Nov 2016 00:16:21 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241764

7 years ago* gfortran.dg/pr70937.f90: require-effective-target lto.
David Edelsohn [Tue, 1 Nov 2016 23:31:44 +0000 (23:31 +0000)]
* gfortran.dg/pr70937.f90: require-effective-target lto.

From-SVN: r241761

7 years agolibiberty: Fix memory leak in ada_demangle when symbol cannot be demangled.
Mark Wielaard [Tue, 1 Nov 2016 23:13:10 +0000 (23:13 +0000)]
libiberty: Fix memory leak in ada_demangle when symbol cannot be demangled.

When a symbol cannot be demangled in ada_demangle a new demangled VEC
will be allocated without deleting the demangled VEC already in use.

Running testsuite/test-demangle under valgrind will show the leak for
this entry in testsuite/demangle-expected:

    # Elaborated flag (not demangled)
    --format=gnat
    x_E
    <x_E>

 11 bytes in 1 blocks are definitely lost in loss record 1 of 1
    at 0x4C27BE3: malloc (vg_replace_malloc.c:299)
    by 0x413FE7: xmalloc (xmalloc.c:148)
    by 0x4025EC: ada_demangle (cplus-dem.c:930)
    by 0x402C59: cplus_demangle (cplus-dem.c:892)
    by 0x400FEC: main (test-demangle.c:317)

libiberty/ChangeLog:

* cplus-dem.c (ada_demangle): Initialize demangled to NULL and
XDELETEVEC demangled when unknown.

From-SVN: r241760

7 years agodwarf2out.c (gen_variable_die): Remove again origin_die variable and its initialization.
Jakub Jelinek [Tue, 1 Nov 2016 22:56:48 +0000 (23:56 +0100)]
dwarf2out.c (gen_variable_die): Remove again origin_die variable and its initialization.

* dwarf2out.c (gen_variable_die): Remove again origin_die variable
and its initialization.

From-SVN: r241759

7 years agoFix dwarf2out.c non-HAVE_AS_LEB128 bootstrap failure
Rainer Orth [Tue, 1 Nov 2016 22:20:58 +0000 (22:20 +0000)]
Fix dwarf2out.c non-HAVE_AS_LEB128 bootstrap failure

* dwarf2out.c (output_rnglists): Wrap basebuf, len in
HAVE_AS_LEB128.

From-SVN: r241758

7 years agolibgo: fix GOARCH_PHYSPAGESIZE for ia64
Ian Lance Taylor [Tue, 1 Nov 2016 21:45:32 +0000 (21:45 +0000)]
libgo: fix GOARCH_PHYSPAGESIZE for ia64

    From Andreas Schwab.

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

From-SVN: r241757

7 years agore PR fortran/78178 (ICE in WHERE statement with diagnostic)
Thomas Koenig [Tue, 1 Nov 2016 21:16:46 +0000 (21:16 +0000)]
re PR fortran/78178 (ICE in WHERE statement with diagnostic)

2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/78178
* match.c (match_simple_where):  Fill in locus for assigment
in simple WHERE statement.

2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/69544
* gfortran.dg/where_6.f90:  New test.

From-SVN: r241756

7 years agodwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME argument, don...
Jakub Jelinek [Tue, 1 Nov 2016 18:35:06 +0000 (19:35 +0100)]
dwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME argument, don't call add_linkage_name if it is true.

* dwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME
argument, don't call add_linkage_name if it is true.
(gen_variable_die): For C++ inline static data members, consider the
initial call when old_die is NULL to be declaration and call
add_name_and_src_coords_attributes in that case with true as
NO_LINKAGE_NAME.  Add DW_AT_inline attribute if needed.
(gen_member_die): For C++ inline static data members, emit a
definition DIE right away in DW_TAG_compile_unit context.
cp/
* cp-objcp-common.c (cp_decl_dwarf_attribute): Handle DW_AT_inline.
testsuite/
* g++.dg/debug/dwarf2/inline-var-1.C: New test.

From-SVN: r241753

7 years agore PR target/78166 (hash.c:1887:1: error: unrecognizable insn)
John David Anglin [Tue, 1 Nov 2016 18:15:57 +0000 (18:15 +0000)]
re PR target/78166 (hash.c:1887:1: error: unrecognizable insn)

PR target/78166
* config/pa/pa.md: Add new shift/add patterns to handle
(plus (mult (reg) (mem_shadd_operand)) (reg)) source operand.

From-SVN: r241749

7 years agoxtensa: Fix PR target/78118
Max Filippov [Tue, 1 Nov 2016 17:16:33 +0000 (17:16 +0000)]
xtensa: Fix PR target/78118

It started failing after the following commit: 32e90dc6a0cda45 ("PR
rtl-optimization/61047").

The change that made xtensa backend go ICE looks completely unrelated,
and indeed, the issue is caused by the side effect of
compute_frame_size() function call hidden in the
INITIAL_ELIMINATION_OFFSET macro. This call updates the value of the
xtensa_current_frame_size static variable, used in "return" instruction
predicate. Prior to the change the value of xtensa_current_frame_size was
set to 0 after the end of epilogue generation, which enabled the "return"
instruction for the CALL0 ABI, but after the change the additional
INITIAL_ELIMINATION_OFFSET calls make xtensa_current_frame_size non-zero
and "return" pattern unavailable.

Get rid of the global xtensa_current_frame_size and
xtensa_callee_save_size variables by moving them into the
machine_function structure. Implement predicate for the "return" pattern
as a function. Don't communicate completion of epilogue generation
through zeroing of xtensa_current_frame_size, add explicit epilogue_done
variable to the machine_function structure. Don't update stack frame
layout after the completion of reload.

2016-11-01  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
* config/xtensa/xtensa-protos.h
(xtensa_use_return_instruction_p): New prototype.
* config/xtensa/xtensa.c (xtensa_current_frame_size,
xtensa_callee_save_size): Remove.
(struct machine_function): Add new fields: current_frame_size,
callee_save_size, frame_laid_out and epilogue_done.
(compute_frame_size, xtensa_expand_prologue,
xtensa_expand_epilogue): Replace xtensa_callee_save_size with
cfun->machine->callee_save_size and xtensa_current_frame_size
with cfun->machine->current_frame_size.
(compute_frame_size): Update cfun->machine->frame_laid_out and
don't update frame layout after reload completion.
(xtensa_expand_epilogue): Set cfun->machine->epilogue_done
instead of zeroing xtensa_current_frame_size.
(xtensa_use_return_instruction_p): New function.
* config/xtensa/xtensa.h (xtensa_current_frame_size): Remove
declaration.
(INITIAL_ELIMINATION_OFFSET): Use return value of
compute_frame_size instead of xtensa_current_frame_size value.
* config/xtensa/xtensa.md ("return" pattern): Use new predicate
function xtensa_use_return_instruction_p instead of inline code.

From-SVN: r241748

7 years agotree.h (BLOCK_IN_COLD_SECTION_P): Define.
Jakub Jelinek [Tue, 1 Nov 2016 16:54:49 +0000 (17:54 +0100)]
tree.h (BLOCK_IN_COLD_SECTION_P): Define.

* tree.h (BLOCK_IN_COLD_SECTION_P): Define.
* final.c (final_scan_insn): Set BLOCK_IN_COLD_SECTION_P.
* dwarf2out.c (rnglist_idx): New variable.
(struct dw_ranges): Add label, idx and maybe_new_sec fields.
(DEBUG_RNGLISTS_SECTION): Define.
(ranges_base_label): New variable.
(size_of_die) <case dw_val_class_range_list>: If using
DW_FORM_rnglistx, count size of uleb128 of range list index.
(value_format) <case dw_val_class_range_list>: For
-gdwarf-5 -gsplit-dwarf return DW_FORM_rnglistx.
(output_range_list_offset): Handle -gdwarf-5 .debug_rnglists
offsets.  Multiply dwarf < 5 offsets by 2 * DWARF_ADDR_SIZE.
(add_ranges_num): Remove useless prototype.  Don't multiply
by 2 * DWARF2_ADDR_SIZE.  Add maybe_new_sec argument, adjust
for new fields added to dw_ranges struct.
(add_ranges): Add maybe_new_sec argument and pass it
through to add_ranges_num.
(note_rnglist_head): New function.
(add_ranges_by_labels): Pass true as maybe_new_sec to
add_ranges_num, call note_rnglist_head on the head of the list.
(output_ranges): Add function comment.  Switch to
.debug_ranges section here and emit .Ldebug_ranges0 label.
(index_rnglists, output_rnglists): New functions.
(gen_subprogram_die): Formatting fixes.
(add_high_low_attributes): Don't divide offsets
by 2 * DWARF2_ADDR_SIZE.  Call note_rnglist_head on the
first list element or when pointing into the middle of
a list.  Pass true as second argument to add_ranges on the
first block fragment after cold/hot section switch.
(init_sections_and_labels): For -gdwarf-5 use .debug_rnglists
section instead of .debug_ranges.  Initialize
ranges_base_label if -gdwarf-5 -gsplit-dwarf.
(dwarf2out_finish): For -gdwarf-5 -gsplit-dwarf call
index_rnglists and add DW_AT_rnglists_base attr.  Don't switch
to dwarf_ranges_section here or emit .Ldebug_ranges0 label.
Call output_rnglists for -gdwarf-5.
(dwarf2out_c_finalize): Clear rnglist_idx.

From-SVN: r241747

7 years agohashtab.h: Use standard GPLv3 with runtime exception boilerplate.
Jakub Jelinek [Tue, 1 Nov 2016 16:47:50 +0000 (17:47 +0100)]
hashtab.h: Use standard GPLv3 with runtime exception boilerplate.

* hashtab.h: Use standard GPLv3 with runtime exception
boilerplate.

From-SVN: r241746

7 years agore PR fortran/69544 (Internal compiler error with -Wall and where)
Thomas Koenig [Tue, 1 Nov 2016 16:18:18 +0000 (16:18 +0000)]
re PR fortran/69544 (Internal compiler error with -Wall and where)

2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/69544
* match.c (gfc_match_where):  Fill in locus for assigment
in simple WHERE statement.

2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/69544
* gfortran.dg/where_5.f90:  New test.

From-SVN: r241745

7 years agoMark fallthrough cases with gcc_fallthrough.
Fritz Reese [Tue, 1 Nov 2016 15:29:51 +0000 (15:29 +0000)]
Mark fallthrough cases with gcc_fallthrough.

* gcc/combine.c (simplify_compare_const): Add gcc_fallthrough.

From-SVN: r241744

7 years agoruntime: recreate function called by cgo -gccgo
Ian Lance Taylor [Tue, 1 Nov 2016 14:07:43 +0000 (14:07 +0000)]
runtime: recreate function called by cgo -gccgo

    When using cgo -gccgo calls to C.GoString, C.GoStringN, and C.GoBytes
    are turned into calls to __go_byte_array_to_string and
    __go_string_to_byte_array.  Those functions were removed when the string
    code was copied from Go 1.7, but we still need them for cgo.  While cgo
    should be updated, old versions will exist for some time.

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

From-SVN: r241743

7 years agolibgo: only rebuild package if dependent .gox has changed
Ian Lance Taylor [Tue, 1 Nov 2016 13:54:21 +0000 (13:54 +0000)]
libgo: only rebuild package if dependent .gox has changed

    Use mvifdiff and stamp files to track whether a .gox file has changed.
    When package A depends on package B, and we rebuild package B, only
    rebuild package A if package B's .gox file changes.  This is safe
    because when package A imports package B it only reads package B's .gox
    file.  This means that changes that do not affect export information
    will not cause dependent packages to be recompiled.

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

From-SVN: r241742

7 years agolibgo: minor Makefile improvements
Ian Lance Taylor [Tue, 1 Nov 2016 13:50:03 +0000 (13:50 +0000)]
libgo: minor Makefile improvements

    Suggested by Ralph Corderoy.

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

From-SVN: r241741

7 years agore PR go/78145 (Several go.test tests fail with error: integer constant overflow...
Ian Lance Taylor [Tue, 1 Nov 2016 13:46:10 +0000 (13:46 +0000)]
re PR go/78145 (Several go.test tests fail with error: integer constant overflow on 32bit targets)

PR go/78145
    compiler: don't put print/println constants into temporaries

    It's not necessary, and it breaks setting their type to int64/uint64
    when appropriate.

    This fixes GCC PR 78145.

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

From-SVN: r241740

7 years ago* class.c (declared_access): Split out from handle_using_decl.
Jason Merrill [Tue, 1 Nov 2016 13:41:50 +0000 (09:41 -0400)]
* class.c (declared_access): Split out from handle_using_decl.

From-SVN: r241739

7 years ago* es.po: Update.
Joseph Myers [Tue, 1 Nov 2016 12:52:49 +0000 (12:52 +0000)]
* es.po: Update.

From-SVN: r241737

7 years agoarm-c.c (arm_cpu_builtins): New macro definition.
Bilyan Borisov [Tue, 1 Nov 2016 12:48:32 +0000 (12:48 +0000)]
arm-c.c (arm_cpu_builtins): New macro definition.

gcc/

2016-09-30  Bilyan Borisov  <bilyan.borisov@arm.com>
    Tamar Christina <tamar.christina@arm.com>

* config/arm/arm-c.c (arm_cpu_builtins): New macro definition.
* config/arm/arm_neon.h (vmaxnm_f32): New intrinsinc.
(vmaxnmq_f32): Likewise.
(vminnm_f32): Likewise.
(vminnmq_f32): Likewise.
* config/arm/arm_neon_builtins.def (vmaxnm): New builtin.
(vminnm): Likewise.
* config/arm/neon.md (neon_<fmaxmin_op><mode>, VCVTF): New
expander.

gcc/testsuite/

2016-09-30  Bilyan Borisov  <bilyan.borisov@arm.com>

* gcc.target/arm/simd/vmaxnm_f32_1.c: New.
* gcc.target/arm/simd/vmaxnmq_f32_1.c: Likewise.
* gcc.target/arm/simd/vminnm_f32_1.c: Likewise.
* gcc.target/arm/simd/vminnmq_f32_1.c: Likewise.

Co-Authored-By: Tamar Christina <tamar.christina@arm.com>
From-SVN: r241736

7 years agoMinor tweaks
Eric Botcazou [Tue, 1 Nov 2016 09:36:04 +0000 (09:36 +0000)]
Minor tweaks

From-SVN: r241734

7 years agotarget-supports.exp: Normalize order of i?86 and x86_64 targets.
Uros Bizjak [Tue, 1 Nov 2016 09:03:21 +0000 (10:03 +0100)]
target-supports.exp: Normalize order of i?86 and x86_64 targets.

* lib/target-supports.exp: Normalize order of i?86 and x86_64 targets.
Whitespace fixes.
(check_effective_target_vect_cmdline_needed): Check
is-effective-target ia32 for x86 targets.
(check_effective_target_vect_simd_clones): Simplify condition.
(check_effective_target_vect_double): Ditto.
(check_effective_target_vect_aligned_arrays): Check
is-effective-target ia32 for x86 targets.  Simplify condition.
(check_effective_target_vect_multiple_sizes): Simplify condition.
(check_effective_target_sqrt_insn): Add i?86-*-* target.
(check_effective_target_sync_int_128): Simplify condition.
(check_effective_target_sync_int_128_runtime): Ditto.
(check_effective_target_sync_long_long_runtime): Ditto.
(check_effective_target_divmod): Add i?86-*-* target.

From-SVN: r241733

7 years agovsx.md (VSX_EXTRACT_FL): New iterator for all binary floating point types supported...
Michael Meissner [Tue, 1 Nov 2016 00:41:30 +0000 (00:41 +0000)]
vsx.md (VSX_EXTRACT_FL): New iterator for all binary floating point types supported by the hardware...

[gcc]
2016-10-31  Michael Meissner  <meissner@linux.vnet.ibm.com>

* config/rs6000/vsx.md (VSX_EXTRACT_FL): New iterator for all
binary floating point types supported by the hardware except for
double.
(vsx_xvcvsxwdp_df): Provide scalar result alternative to the
vector instruction for optimizing extracting a SImode from a
V4SImode vector and converting it to floating point.
(vsx_xvcvuxwdp_df): Likewise.
(vsx_extract_si): On ISA 3.0, allow extract target and temporary
registers to be any VSX register.  Move stores to the end of the
constraints.
(vsx_extract_si_<uns>float_df): New combiner pattern and splitter
to optimize extracting a SImode from a V4SImode vector and
converting it to a binary floating point type supported by the
hardware.  Use the vector converts instead of extracting the
element, sign extending it, and then converting it to double.
Other floating point types  than double first convert to double,
then the double is converted to that type.
(vsx_extract_si_<uns>float_<mode>): Likewise.

[gcc/testsuite]
2016-10-31  Michael Meissner  <meissner@linux.vnet.ibm.com>

* gcc.target/powerpc/vsx-extract-4.c: New test.
* gcc.target/powerpc/vsx-extract-5.c: Likewise.

From-SVN: r241731

7 years agoDaily bump.
GCC Administrator [Tue, 1 Nov 2016 00:16:20 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241730

7 years agodriver-aarch64.c (host_detect_local_cpu): Rewrite handling of part num to handle...
Andrew Pinski [Mon, 31 Oct 2016 22:20:52 +0000 (22:20 +0000)]
driver-aarch64.c (host_detect_local_cpu): Rewrite handling of part num to handle the case where multiple implementers...

2016-10-31  Andrew Pinski  <apinski@cavium.com>

        * config/aarch64/driver-aarch64.c (host_detect_local_cpu):
        Rewrite handling of part num to handle the case where
        multiple implementers share the same part num.

From-SVN: r241726

7 years agodwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): Adjust for -gdwarf-5.
Jan Kratochvil [Mon, 31 Oct 2016 21:46:33 +0000 (21:46 +0000)]
dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): Adjust for -gdwarf-5.

* dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): Adjust for -gdwarf-5.
(DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Likewise.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r241725

7 years agodwarf2out.c (dwarf_AT): Handle DW_AT_dwo_name.
Jakub Jelinek [Mon, 31 Oct 2016 21:45:51 +0000 (22:45 +0100)]
dwarf2out.c (dwarf_AT): Handle DW_AT_dwo_name.

* dwarf2out.c (dwarf_AT): Handle DW_AT_dwo_name.
(use_debug_types): Adjust comment for DWARF5 DW_UT_type units.
(new_die): Handle DW_TAG_skeleton_unit like DW_TAG_compile_unit.
(is_cu_die, is_unit_die): Likewise.
(should_move_die_to_comdat, break_out_comdat_types): Adjust
comments for DWARF5 DW_UT_type units.
(output_compilation_unit_header): Add UT argument, output
start of DWARF5 .debug_info section header.
(output_comp_unit): Add dwo_id argument.  Adjust
output_compilation_unit_header caller, for DW_UT_split_compile
emit dwo_id field, otherwise padding1.  Emit padding2 field.
(add_top_level_skeleton_die_attrs): Add DW_AT_dwo_name
rather than DW_AT_GNU_dwo_name attr for -gdwarf-5.
(output_skeleton_debug_sections): Add dwo_id argument, for
-gdwarf-5 emit DWARF 5 DW_UT_skeleton header.
(output_comdat_type_unit): For -gdwarf-5 emit .debug_info
DW_UT_type or DW_UT_split_type units rather than .debug_types.
(dwarf2out_finish): Use DW_TAG_skeleton_unit rather than
DW_TAG_compile_unit for skeleton unit die.  Don't add
DW_AT_GNU_dwo_id attributes for -gdwarf-5, instead pass checksum
address to output_comp_unit and output_skeleton_debug_sections.

From-SVN: r241724

7 years agodwarf2out.c (debug_line_str_section): New variable.
Jakub Jelinek [Mon, 31 Oct 2016 21:44:53 +0000 (22:44 +0100)]
dwarf2out.c (debug_line_str_section): New variable.

* dwarf2out.c (debug_line_str_section): New variable.
(debug_line_str_hash): Likewise.
(DEBUG_LINE_STR_SECTION): Define.
(set_indirect_string): Handle DW_FORM_line_strp like
DW_FORM_strp.
(find_string_form): Fix up formatting.
(size_of_die): Handle DW_FORM_line_strp like DW_FORM_strp.
Fix up indentation.
(output_die): Handle DW_FORM_line_strp.
(DWARF5_USE_DEBUG_LINE_STR): Define.
(output_line_string): New function.
(output_file_names): Add -gdwarf-5 support.
(output_line_info): Likewise.
(init_sections_and_labels): Initialize debug_line_str_section.
(output_indirect_string): Change 2nd argument from void *
to enum dwarf_form form, compare with form rather than
DW_FORM_strp.
(output_indirect_strings): Pass DW_FORM_strp to
output_indirect_string traversion.
(dwarf2out_finish): Output .debug_line_str strings.
(dwarf2out_c_finalize): Clear debug_line_str_section and
debug_line_str_hash.

From-SVN: r241723

7 years agore PR debug/77315 (emit DW_OP_form_tls_address)
Tom Tromey [Mon, 31 Oct 2016 20:08:44 +0000 (20:08 +0000)]
re PR debug/77315 (emit DW_OP_form_tls_address)

PR debug/77315:
* dwarf2out.c (mem_loc_descriptor): Use DW_OP_form_tls_address.
(resolve_args_picking_1): Move DW_OP_form_tls_address case next to
DW_OP_GNU_push_tls_address case.
(loc_list_from_tree_1): Use DW_OP_form_tls_address.

From-SVN: r241721

7 years agore PR fortran/54679 (Erroneous "Expected P edit descriptor" in conjunction with L...
Jerry DeLisle [Mon, 31 Oct 2016 19:59:04 +0000 (19:59 +0000)]
re PR fortran/54679 (Erroneous "Expected P edit descriptor" in conjunction with L descriptor)

2016-10-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/54679
* io.c (check_format): Adjust checks for FMT_L to treat a zero
width as an extension, giving warnings or error as appropriate.
Improve messages.
PR libgfortran/54679
* io/format.c (parse_format_list): Adjust checks for FMT_L to
treat a zero width as an extension, giving warnings or error
as appropriate. Improve messages.
PR fortran/54679
* gfortran.dg/fmt_l.f90: Update test.
* gfortran.dg/fmt_l0.f90: New test.

From-SVN: r241720

7 years agodwarf2out.h (struct dw_loc_descr_node): Adjust comment for frame_offset_rel bit.
Jakub Jelinek [Mon, 31 Oct 2016 19:35:47 +0000 (20:35 +0100)]
dwarf2out.h (struct dw_loc_descr_node): Adjust comment for frame_offset_rel bit.

* dwarf2out.h (struct dw_loc_descr_node): Adjust comment
for frame_offset_rel bit.
(struct array_descr_info): Add rank field.
* dwarf2out.c (struct loc_descr_context): Add placeholder_arg
and placeholder_seen fields.
(resolve_args_picking_1): Handle also frame_offset_rel DW_OP_dup
and DW_OP_over.  Optimize DW_OP_pick 0 into DW_OP_dup and
DW_OP_pick 1 into DW_OP_over.
(function_to_dwarf_procedure, type_byte_size, field_byte_offset,
gen_variant_part): Clear placeholder_{arg,seen}.
(loc_list_from_tree_1): Drop const from context argument.
Handle integral PLACEHOLDER_EXPR if context->placeholder_arg.
(loc_list_for_address_of_addr_expr_of_indirect_ref,
loc_list_from_tree, loc_descriptor_from_tree): Drop const from
context argument.
(add_scalar_info): Drop const from context argument.  Handle
context->placeholder_arg.
(add_bound_info): Drop const from context argument.
(gen_descr_array_type_die): Drop const from ctx variable.
Initialize placeholder_arg and placeholder_seen.  Add DW_AT_rank
attribute and use a single DW_TAG_generic_subrange instead of
7 DW_TAG_subrange_type for assumed rank arrays.
fortran/
* trans-types.c (gfc_get_array_descr_info): For -gdwarf-5 or
-gno-strict-dwarf, handle assumed rank arrays the way dwarf2out
expects.
ada/
* gcc-interface/misc.c (gnat_get_array_descr_info): Clear rank
field.

From-SVN: r241719

7 years agodwarf2out.h (enum dw_val_class): Add dw_val_class_loclistsptr.
Jakub Jelinek [Mon, 31 Oct 2016 19:25:40 +0000 (20:25 +0100)]
dwarf2out.h (enum dw_val_class): Add dw_val_class_loclistsptr.

* dwarf2out.h (enum dw_val_class): Add dw_val_class_loclistsptr.
* dwarf2out.c (struct dw_loc_list_struct): Change emitted field
from bool to 1-bit uchar bitfield.  Add num_assigned and
offset_emitted bitfields.
(dw_val_equal_p): Compare v.val_lbl_id rather than v.val_unsigned
for dw_val_class_lineptr and dw_val_class_macptr.  Handle
dw_val_class_loclistsptr.
(new_addr_loc_descr): Fix up formatting.
(DEBUG_LOCLISTS_SECTION, DEBUG_DWO_LOCLISTS_SECTION): Define.
(add_AT_low_high_pc): Fix up formatting.
(add_AT_loclistsptr): New function.
(AT_lbl): Allow dw_val_class_loclistsptr.
(print_dw_val, attr_checksum, attr_checksum_ordered, same_dw_val_p):
Handle dw_val_class_loclistsptr.
(loc_list_idx): New variable.
(output_loclists_offsets, assign_location_list_indexes): New
functions.
(size_of_die): For dw_val_class_loc_list -gsplit-dwarf -gdwarf-5
add size_of_uleb128 of the index.  Drop never used
dwarf_split_debug_info AT_index handling.  Handle
dw_val_class_loclistsptr.
(value_format): Return DW_FORM_loclistsx for dw_val_class_loc_list
if -gsplit-dwarf -gdwarf-5.  Handle dw_val_class_loclistsptr.
(output_loc_list): Handle DWARF 5 .debug_loclists* format.
(output_loc_list_offset): Handle -gsplit-dwarf -gdwarf-5
DW_FORM_loclistx indexes.
(output_attr_index_or_value): Fix up formatting.  Don't handle
dw_val_class_loc_list here.
(output_die): Formatting fixes.  Handle dw_val_class_loclistsptr.
For dw_val_class_loc_list call output_loc_list_offset rather than
output_attr_index_or_value.
(init_sections_and_labels): For -gdwarf-5 use .debug_loclists
or .debug_loclists.dwo section name for debug_loc_section.
(resolve_addr_in_expr): Formatting fix.
(index_location_lists): Likewise.
(dwarf2out_finish): If there are any location lists, for
-gsplit-dwarf -gdwarf-5 add DW_AT_loclists_base attribute.  Call
index_location_lists only if have_location_lists.  Call
assign_location_list_indexes for -gsplit-dwarf -gdwarf-5.  Emit
.debug_loclists{,.dwo} section header for -gdwarf-5, for -gdwarf-5
-gsplit-dwarf also emit offset table.

From-SVN: r241718

7 years agodwarf2out.c (DWARF_LARGEST_DATA_FORM_BITS): Define.
Jakub Jelinek [Mon, 31 Oct 2016 17:22:30 +0000 (18:22 +0100)]
dwarf2out.c (DWARF_LARGEST_DATA_FORM_BITS): Define.

* dwarf2out.c (DWARF_LARGEST_DATA_FORM_BITS): Define.
(size_of_die, value_format, output_die): Use
DW_FORM_data16 for 128-bit dw_val_class_const_double or
dw_val_class_wide_int.

From-SVN: r241714

7 years agodwarf2out.c (dwarf_op): Renamed to ...
Jakub Jelinek [Mon, 31 Oct 2016 17:14:29 +0000 (18:14 +0100)]
dwarf2out.c (dwarf_op): Renamed to ...

* dwarf2out.c (dwarf_op): Renamed to ...
(dwarf_OP): ... this.
(convert_descriptor_to_mode, scompare_loc_descriptor,
minmax_loc_descriptor, typed_binop, mem_loc_descriptor,
implicit_ptr_descriptor, optimize_one_addr_into_implicit_ptr): Adjust
callers.
(dwarf_AT, dwarf_TAG): New functions.
(check_die): Disallow DW_AT_call_all_calls next to
DW_AT_GNU_all_call_sites.
(gen_call_site_die): Use dwarf_TAG and dwarf_AT with DWARF 5 tag
and attributes instead of the corresponding GNU tag and attributes.
(gen_subprogram_die): Likewise.  Emit call site information even
for -gdwarf-5 -gstrict-dwarf.  Replace DW_AT_GNU_defaulted with
DW_AT_defaulted in comment.
(resolve_addr): Handle DW_AT_call_origin attribute on
DW_TAG_call_site DIE like DW_AT_abstract_origin on
DW_TAG_GNU_call_site DIE.

From-SVN: r241713

7 years agodwarf2out.c (dwarf_op): New function.
Jakub Jelinek [Mon, 31 Oct 2016 17:12:56 +0000 (18:12 +0100)]
dwarf2out.c (dwarf_op): New function.

* dwarf2out.c (dwarf_op): New function.
(size_of_loc_descr): Handle DW_OP_{implicit_pointer,entry_value},
DW_OP_{const,regval,deref}_type and DW_OP_{convert,reinterpret}.
(output_loc_operands, output_loc_operands_raw): Likewise.
(resolve_args_picking_1, prune_unused_types_walk_loc_descr,
mark_base_types, hash_loc_operands, compare_loc_operands): Likewise.
(resolve_addr_in_expr): Likewise.  Only punt for !dwarf_strict
if dwarf_version < 5.
(convert_descriptor_to_mode): Use dwarf_op (DW_OP_xxx) instead of
DW_OP_GNU_xxx.
(scompare_loc_descriptor, ucompare_loc_descriptor,
minmax_loc_descriptor, typed_binop, mem_loc_descriptor,
implicit_ptr_descriptor, optimize_one_addr_into_implicit_ptr,
optimize_location_into_implicit_ptr): Likewise.  Only punt for
!dwarf_strict if dwarf_version < 5.
(string_cst_pool_decl): Adjust comment.
(non_dwarf_expression): Handle DW_OP_implicit_pointer.

From-SVN: r241712

7 years agore PR c++/77886 (-Wimplicit-fallthrough: breaks duff's device (in function templates))
Jakub Jelinek [Mon, 31 Oct 2016 17:10:30 +0000 (18:10 +0100)]
re PR c++/77886 (-Wimplicit-fallthrough: breaks duff's device (in function templates))

PR c++/77886
* pt.c (tsubst_expr) <case CASE_LABEL_EXPR> Copy over
FALLTHROUGH_LABEL_P flag to the new LABEL_DECL.
(tsubst_expr) <case LABEL_EXPR>: Likewise.

* g++.dg/warn/Wimplicit-fallthrough-2.C: New test.

From-SVN: r241711

7 years agore PR c++/78089 (__builtin_shuffle parsing bug)
Jakub Jelinek [Mon, 31 Oct 2016 17:08:36 +0000 (18:08 +0100)]
re PR c++/78089 (__builtin_shuffle parsing bug)

PR c++/78089
* parser.c (cp_parser_postfix_expression): Replace return statement in
the first switch with setting postfix_expression to the return
expression and break;.

* c-c++-common/builtin-shuffle-1.c: New test.
* g++.dg/cpp0x/addressof3.C: New test.

From-SVN: r241710

7 years agodwarf2out.h (enum dw_val_class): Add dw_val_class_const_implicit...
Jakub Jelinek [Mon, 31 Oct 2016 16:59:21 +0000 (17:59 +0100)]
dwarf2out.h (enum dw_val_class): Add dw_val_class_const_implicit...

* dwarf2out.h (enum dw_val_class): Add dw_val_class_const_implicit,
dw_val_class_unsigned_const_implicit and dw_val_class_file_implicit.
(struct dw_val_node): Add val_file_implicit field.
* dwarf2out.c (dw_val_equal_p, print_dw_val, attr_checksum,
attr_checksum_ordered, same_dw_val_p, size_of_die, value_format,
output_die): Handle dw_val_class_const_implicit,
dw_val_class_unsigned_const_implicit and dw_val_class_file_implicit.
(abbrev_die_table): Change into va_gc vec.
(abbrev_die_table_allocated, abbrev_die_table_in_use,
ABBREV_DIE_TABLE_INCREMENT): Remove.
(AT_int, AT_unsigned, AT_file): Allow dw_val_class_*_implicit.
(abbrev_opt_start, abbrev_usage_count, sorted_abbrev_dies): New
variables.
(build_abbrev_table): Adjust for abbrev_die_table being a va_gc vec.
If abbrev_opt_start, fill in abbrev_usage_count and abbrev_dies
vectors.
(die_abbrev_cmp, optimize_implicit_const, optimize_abbrev_table): New
functions.
(output_die_abbrevs): For DW_FORM_implicit_const emit sleb128 with
the implicit value.
(output_abbrev_section): Adjust for abbrev_die_table being a va_gc
vec.
(output_comp_unit): Initialize abbrev_opt_start if emitting the main
unit.  Call optimize_abbrev_table.
(dwarf2out_init, dwarf2out_finish, dwarf2out_c_finalize): Adjust for
abbrev_die_table being a va_gc vec.

From-SVN: r241709

7 years agoAdd tests for a const member and a reference member for launder.
Ville Voutilainen [Mon, 31 Oct 2016 16:52:23 +0000 (18:52 +0200)]
Add tests for a const member and a reference member for launder.

* g++.dg/cpp1z/launder3.C: New.
* g++.dg/cpp1z/launder4.C: Likewise.
* g++.dg/cpp1z/launder5.C: Likewise.
* g++.dg/cpp1z/launder5.cc: Likewise.
* g++.dg/cpp1z/launder5.h: Likewise.
* g++.dg/cpp1z/launder6.C: Likewise.
* g++.dg/cpp1z/launder6.cc: Likewise.
* g++.dg/cpp1z/launder6.h: Likewise.

From-SVN: r241708

7 years agore PR c++/77948 (Option processing of -std=c++11 -std=gnu++11 doesn't reset ext_numer...
Jakub Jelinek [Mon, 31 Oct 2016 16:38:21 +0000 (17:38 +0100)]
re PR c++/77948 (Option processing of -std=c++11 -std=gnu++11 doesn't reset ext_numeric_literals)

PR c++/77948
* c.opt (fext-numeric-literals): Add Var and Init.
* c-opts.c (c_common_handle_option): Don't clear
cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
(c_common_post_options): Clear it here if not set
explicitly.

* g++.dg/cpp0x/pr77948-1.C: New test.
* g++.dg/cpp0x/pr77948-2.C: New test.
* g++.dg/cpp0x/pr77948-3.C: New test.
* g++.dg/cpp0x/pr77948-4.C: New test.
* g++.dg/cpp0x/pr77948-5.C: New test.
* g++.dg/cpp0x/pr77948-6.C: New test.

From-SVN: r241707

7 years agore PR tree-optimization/77860 (ICE in gimple_build_assign_1, at gimple.c:420)
Jakub Jelinek [Mon, 31 Oct 2016 16:36:53 +0000 (17:36 +0100)]
re PR tree-optimization/77860 (ICE in gimple_build_assign_1, at gimple.c:420)

PR tree-optimization/77860
* tree-ssa-reassoc.c (eliminate_using_constants): Handle
also integral complex and vector constants.

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

From-SVN: r241706

7 years agodwarf2out.c (dwarf2out_define, [...]): Replace DW_MACRO_GNU_* constants with correspo...
Jakub Jelinek [Mon, 31 Oct 2016 16:32:20 +0000 (17:32 +0100)]
dwarf2out.c (dwarf2out_define, [...]): Replace DW_MACRO_GNU_* constants with corresponding DW_MACRO_* constants.

* dwarf2out.c (dwarf2out_define, dwarf2out_undef, output_macinfo_op,
optimize_macinfo_range, save_macinfo_strings): Replace
DW_MACRO_GNU_* constants with corresponding DW_MACRO_* constants.
(output_macinfo): Likewise.  Emit .debug_macro* rather than
.debug_macinfo* even for -gstrict-dwarf -gdwarf-5.
(init_sections_and_labels): Use .debug_macro* labels rather than
.debug_macinfo* labels even for -gstrict-dwarf -gdwarf-5.
(dwarf2out_finish): Use DW_AT_macros instead of DW_AT_macro_info
or DW_AT_GNU_macros for -gdwarf-5.

From-SVN: r241705

7 years agolinux.h (UCLIBC_DYNAMIC_LINKER): Define.
Waldemar Brodkorb [Mon, 31 Oct 2016 15:04:21 +0000 (15:04 +0000)]
linux.h (UCLIBC_DYNAMIC_LINKER): Define.

2016-10-31  Waldemar Brodkorb  <wbx@openadk.org>

* config/microblaze/linux.h (UCLIBC_DYNAMIC_LINKER): Define.

From-SVN: r241704

7 years agoIndex...
Carl Love [Mon, 31 Oct 2016 15:01:13 +0000 (15:01 +0000)]
Index...

Index: ChangeLog
===================================================================
--- ChangeLog (revision 241702)
+++ ChangeLog (working copy)
@@ -1,5 +1,10 @@
 2016-10-27  Carl Love  <cel@us.ibm.com>

+ * MAINTAINERS (Write After Approval): Fix my entry in the Write After
+ Approval list to make it alphabetical.
+
+2016-10-27  Carl Love  <cel@us.ibm.com>
+
  * MAINTAINERS (Write After Approval): Add myself.

 2016-10-27  Andrew Burgess  <andrew.burgess@embecosm.com>
Index: MAINTAINERS
===================================================================
--- MAINTAINERS (revision 241702)
+++ MAINTAINERS (working copy)
@@ -477,9 +477,9 @@
 Gabor Loki <loki@inf.u-szeged.hu>
 Sandra Loosemore <sandra@codesourcery.com>
 Manuel López-Ibáñez <manu@gcc.gnu.org>
+Carl Love <cel@us.ibm.com>
 Martin v. Löwis <loewis@informatik.hu-berlin.de>
 H.J. Lu <hjl.tools@gmail.com>
-Carl Love <cel@us.ibm.com>
 Christophe Lyon <christophe.lyon@st.com>
 Luis Machado <luisgpm@br.ibm.com>
 Ziga Mahkovec <ziga.mahkovec@klika.si>

From-SVN: r241703

7 years agoalpha-passes.def: Swap pass_convert_to_eh_region_ranges and pass_shorten_branches...
Uros Bizjak [Mon, 31 Oct 2016 14:56:49 +0000 (15:56 +0100)]
alpha-passes.def: Swap pass_convert_to_eh_region_ranges and pass_shorten_branches positions.

* config/alpha/alpha-passes.def: Swap pass_convert_to_eh_region_ranges
  and pass_shorten_branches positions.

From-SVN: r241702

7 years agoSkip gcc.dg/lto/pr60449_0.c for avr
Senthil Kumar Selvaraj [Mon, 31 Oct 2016 14:06:04 +0000 (14:06 +0000)]
Skip gcc.dg/lto/pr60449_0.c for avr

The testcase requires gettimeofday to be available for the target. The avr
target doesn't have an implementation, so the test always fails with a
linker error.

gcc/testsuite

2016-10-31  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

* gcc.dg/lto/pr60449_0.c: Skip for avr.

From-SVN: r241701

7 years agore PR c++/77886 (-Wimplicit-fallthrough: breaks duff's device (in function templates))
Jakub Jelinek [Mon, 31 Oct 2016 13:39:49 +0000 (14:39 +0100)]
re PR c++/77886 (-Wimplicit-fallthrough: breaks duff's device (in function templates))

PR c++/77886
* pt.c (tsubst_expr) <case CASE_LABEL_EXPR> Copy over
FALLTHROUGH_LABEL_P flag to the new LABEL_DECL.
(tsubst_expr) <case LABEL_EXPR>: Likewise.

* g++.dg/warn/Wimplicit-fallthrough-2.C: New test.

From-SVN: r241700

7 years agoAdd -Wshadow=global -Wshadow=local and -Wshadow=compatible-local.
Le-Chun Wu [Mon, 31 Oct 2016 13:21:59 +0000 (13:21 +0000)]
Add -Wshadow=global -Wshadow=local and -Wshadow=compatible-local.

This patch from Le-Chun Wu adds two new shadow warning flags for
C and C++:

  -Wshadow=local which warns if a local variable shadows another local
  variable or parameter,

  -Wshadow=compatible-local which warns if a local variable shadows
  another local variable or parameter whose type is compatible with
  that of the shadowing variable.

It is already on the google/main branch (Google ref 39127) and was
previously submitted by Diego Novillo and reviewed on
http://codereview.appspot.com/4452058

I addressed the review comments and made the following changes:
- Add -Wshadow=global (the default alias for -Wshadow).
- Make the documented options -Wshadow=global, -Wshadow=local
  and -Wshadow=compatible-local (with hidden undocumented aliases
  -Wshadow-local and -Wshadow-compatible-local for compatibility).
- The -Wshadow=global, -Wshadow=local and -Wshadow=compatible-local
  relationships are expressed in common.opt instead of in opts.c
  and documented in invoke.texi.
- The "previous declaration" warnings were turned into notes and use
  the (now) existing infrastructure instead of duplicating the warnings.
  The testcases have been adjusted to expect the notes.
- The conditional change in name-lookup.c for non-locals (where we
  don't want to change the warnings, but just check the global ones)
  has been dropped.
- Use warning_at in c-decl.c (warn_if_shadowing).

gcc/ChangeLog:
2016-10-30  Le-Chun Wu  <lcwu@google.com>
            Mark Wielaard  <mjw@redhat.com>

       * doc/invoke.texi: Document Wshadow-local and Wshadow-compatible-local.
       * common.opt (Wshadow=global): New option. Default for -Wshadow.
       (Wshadow=local): New option.
       (Wshadow-local): Hidden alias for -Wshadow=local.
       (Wshadow=compatible-local): New option.
       (Wshadow-compatible-local): Hidden alias for
       -Wshadow=compatible-local.
       * doc/invoke.texi: Document Wshadow=global, Wshadow=local and
       Wshadow=compatible-local.

gcc/c/ChangeLog:
2016-10-30  Le-Chun Wu  <lcwu@google.com>
            Mark Wielaard  <mjw@redhat.com>

       * c-decl.c (warn_if_shadowing): Use the warning code corresponding
       to the given -Wshadow= variant. Use warning_at.

gcc/cp/ChangeLog:
2016-10-30  Le-Chun Wu  <lcwu@google.com>
            Mark Wielaard  <mjw@redhat.com>

       * name-lookup.c (pushdecl_maybe_friend): When emitting a
       shadowing warning, use the code corresponding to the
       given -Wshadow= variant.

gcc/testsuite/ChangeLog
2016-10-30  Le-Chun Wu  <lcwu@google.com>
            Mark Wielaard  <mjw@redhat.com>

       * gcc.dg/Wshadow-compatible-local-1.c: New test.
       * gcc.dg/Wshadow-local-1.c: Likewise.
       * gcc.dg/Wshadow-local-2.c: Likewise.
       * g++.dg/warn/Wshadow-compatible-local-1.C: Likewise.
       * g++.dg/warn/Wshadow-local-1.C: Likewise.
       * g++.dg/warn/Wshadow-local-2.C: Likewise.

Co-Authored-By: Mark Wielaard <mjw@redhat.com>
From-SVN: r241699

7 years agore PR lto/78129 (-Werror=suggest-final-types leads to -ENOSPC.)
Richard Biener [Mon, 31 Oct 2016 12:52:23 +0000 (12:52 +0000)]
re PR lto/78129 (-Werror=suggest-final-types leads to -ENOSPC.)

2016-10-31  Richard Biener  <rguenther@suse.de>

PR lto/78129
* lto.c (do_whole_program_analysis): Bail out after errors
from WPA analysis.

From-SVN: r241698

7 years agotree-vect-slp.c (vect_get_and_check_slp_defs): New parameter SWAP.
Bin Cheng [Mon, 31 Oct 2016 09:30:47 +0000 (09:30 +0000)]
tree-vect-slp.c (vect_get_and_check_slp_defs): New parameter SWAP.

* tree-vect-slp.c (vect_get_and_check_slp_defs): New parameter SWAP.
Check slp defs for COND_EXPR by swapping/inverting operands if the
new parameter SWAP indicates so.
(vect_build_slp_tree_1): New parameter SWAP.  Check COND_EXPR stmt
is isomorphic to the first stmt via swapping/inverting.  Store swap
information in the new parameter SWAP.
(vect_build_slp_tree): New local array SWAP and pass it to function
vect_build_slp_tree_1.  Cleanup result handling code for function
call to vect_get_and_check_slp_defs.  Skip operand swapping if the
order of operands has been fixed as indicated by SWAP[i].

From-SVN: r241697

7 years agotree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip unnecessary data...
Bin Cheng [Mon, 31 Oct 2016 09:27:31 +0000 (09:27 +0000)]
tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip unnecessary data dependence check after visited store stmt.

* tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip
unnecessary data dependence check after visited store stmt.

From-SVN: r241696

7 years agore PR tree-optimization/71915 (A missed opportunity for SLSR)
Bill Schmidt [Mon, 31 Oct 2016 03:04:59 +0000 (03:04 +0000)]
re PR tree-optimization/71915 (A missed opportunity for SLSR)

[gcc]

2016-10-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/71915
PR tree-optimization/71490
* gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
stride_type field.
(find_basis_for_base_expr): Require stride types to match when
seeking a basis.
(alloc_cand_and_find_basis): Record the stride type.
(slsr_process_phi): Pass stride type to alloc_cand_and_find_basis.
(backtrace_base_for_ref): Pass types to legal_cast_p_1 rather than
the expressions having those types.
(slsr_process_ref): Pass stride type to alloc_cand_and_find_basis.
(create_mul_ssa_cand): Likewise.
(create_mul_imm_cand): Likewise.
(create_add_ssa_cand): Likewise.
(create_add_imm_cand): Likewise.
(legal_cast_p_1): Change interface to accept types rather than the
expressions having those types.
(legal_cast_p): Pass types to legal_cast_p_1.
(slsr_process_cast): Pass stride type to
alloc_cand_and_find_basis.
(slsr_process_copy): Likewise.
(dump_candidate): Display stride type when a cast exists.
(create_add_on_incoming_edge): Introduce a cast when necessary for
the stride type.
(analyze_increments): Change the code checking for invalid casts
to rely on the stride type, and update the documentation and
example.  Change the code checking for pointer multiplies to rely
on the stride type.
(insert_initializers): Introduce a cast when necessary for the
stride type.  Use the stride type for the type of the initializer.

[gcc/testsuite]

2016-10-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/71915
PR tree-optimization/71490
* gcc.dg/tree-ssa/pr54245.c: Delete.
* gcc.dg/tree-ssa/slsr-8.c: Adjust for new optimization and
document why.

From-SVN: r241695

7 years agoDaily bump.
GCC Administrator [Mon, 31 Oct 2016 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241694

7 years agore PR libfortran/78123 (Short reads with T edit descriptor not padding correctly)
Jerry DeLisle [Sun, 30 Oct 2016 22:14:01 +0000 (22:14 +0000)]
re PR libfortran/78123 (Short reads with T edit descriptor not padding correctly)

2016-10-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/78123
* io/transfer.c (formatted_transfer_scalar_read): Clear seen_eor
only if we have tabbed to left of current position.

* gfortran.dg/fmt_t_9.f: New test.

From-SVN: r241691

7 years agore PR fortran/67219 (Incorrect conversion warning)
Thomas Koenig [Sun, 30 Oct 2016 17:48:27 +0000 (17:48 +0000)]
re PR fortran/67219 (Incorrect conversion warning)

2016-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/67219
* arith.c (gfc_int2real):  Change gfc_warning_now
to gfc_warning.
* primary.c (match_complex_constant):  If there
is no comma, throw away any warning which might have
been issued by gfc_int2real.

2016-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/67219
* gfortran.dg/pr67219.f90:  New test.

From-SVN: r241689

7 years agocompiler: fix slice/array evaluation order bug
Ian Lance Taylor [Sun, 30 Oct 2016 16:48:37 +0000 (16:48 +0000)]
compiler: fix slice/array evaluation order bug

    There was a phase ordering issue in the handling of "keyed" array
    literal expressions: the lowering phase was canonicalizing the
    indices/vals before the phase that fixed evaluation order, meaning that
    the evaluation order was incorrect. The fix is to capture the orginal
    ordering and use that ordering when doing traversals (there is already
    something similar being done for struct literal expressions).

    Fixes golang/go#17640

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

From-SVN: r241688

7 years agolibgo: eliminate a lot of duplication in Makefile.am
Ian Lance Taylor [Sun, 30 Oct 2016 16:45:34 +0000 (16:45 +0000)]
libgo: eliminate a lot of duplication in Makefile.am

    I read through the GNU make manual.  I knew there had to be a way to do it.

    Remove the special netgo library.  The essential feature--using the Go
    DNS resolver--is now available by setting GODEBUG=netdns=go.

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

From-SVN: r241687

7 years agoarm.c (arm_const_not_ok_for_debug_p): Use VAR_P.
Prathamesh Kulkarni [Sun, 30 Oct 2016 14:06:16 +0000 (14:06 +0000)]
arm.c (arm_const_not_ok_for_debug_p): Use VAR_P.

2016-10-30  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

* config/arm/arm.c (arm_const_not_ok_for_debug_p): Use VAR_P.

From-SVN: r241686

7 years agoAdd missing name
Eric Botcazou [Sun, 30 Oct 2016 10:15:55 +0000 (10:15 +0000)]
Add missing name

From-SVN: r241685

7 years agoDaily bump.
GCC Administrator [Sun, 30 Oct 2016 00:16:15 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241684

7 years agore PR rtl-optimization/77919 (ICE converting DC to V2DF mode)
Jakub Jelinek [Sat, 29 Oct 2016 20:22:36 +0000 (22:22 +0200)]
re PR rtl-optimization/77919 (ICE converting DC to V2DF mode)

PR rtl-optimization/77919
* expr.c (expand_expr_real_1) <normal_inner_ref>: Only avoid forcing
into memory if both modes are complex and their inner modes have the
same precision.  If the two modes are different complex modes, convert
each part separately and generate a new CONCAT.

* g++.dg/torture/pr77919-2.C: New test.

From-SVN: r241681

7 years agopa64-hpux.h (FINI_SECTION_ASM_OP): Define to null string.
John David Anglin [Sat, 29 Oct 2016 16:25:49 +0000 (16:25 +0000)]
pa64-hpux.h (FINI_SECTION_ASM_OP): Define to null string.

* config/pa/pa64-hpux.h (FINI_SECTION_ASM_OP): Define to null string.

From-SVN: r241680

7 years agore PR tree-optimization/78148 (r241649 causes -fcompare-debug failure on ppc64le)
Jakub Jelinek [Sat, 29 Oct 2016 15:55:50 +0000 (17:55 +0200)]
re PR tree-optimization/78148 (r241649 causes -fcompare-debug failure on ppc64le)

PR target/78148
* gimple-ssa-store-merging.c
(imm_store_chain_info::output_merged_store): Use build_aligned_type
instead of SET_TYPE_ALIGN on shared integral type.

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

From-SVN: r241679

7 years agopa.h (BIGGEST_ALIGNMENT): Adjust comment.
John David Anglin [Sat, 29 Oct 2016 15:30:26 +0000 (15:30 +0000)]
pa.h (BIGGEST_ALIGNMENT): Adjust comment.

* config/pa/pa.h (BIGGEST_ALIGNMENT): Adjust comment.
(MALLOC_ABI_ALIGNMENT): Define to 128 on all targets except SOM.
Adjust comment.

From-SVN: r241676

7 years agovax.h (REGNO_REG_CLASS): Access the REGNO argument.
Jeff Law [Sat, 29 Oct 2016 04:23:33 +0000 (22:23 -0600)]
vax.h (REGNO_REG_CLASS): Access the REGNO argument.

* config/vax/vax.h (REGNO_REG_CLASS): Access the REGNO argument.
* config/spu/spu.h (REGNO_REG_CLASS): Likewise.

From-SVN: r241675

7 years ago* eo.po: Update.
Joseph Myers [Sat, 29 Oct 2016 01:38:09 +0000 (02:38 +0100)]
* eo.po: Update.

From-SVN: r241673

7 years agoDaily bump.
GCC Administrator [Sat, 29 Oct 2016 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241672

7 years agore PR fortran/71891 (fortran/symbol.c:4864: suspicious if ?)
Steven G. Kargl [Fri, 28 Oct 2016 23:37:03 +0000 (23:37 +0000)]
re PR fortran/71891 (fortran/symbol.c:4864: suspicious if ?)

2016-10-28  Steven G. Kargl <kargl@gcc.gnu.org>

PR fortran/71891
* symbol.c (gfc_type_compatible): Fix typo.

From-SVN: r241668

7 years agocompiler, runtime: copy slice code from Go 1.7 runtime
Ian Lance Taylor [Fri, 28 Oct 2016 22:34:47 +0000 (22:34 +0000)]
compiler, runtime: copy slice code from Go 1.7 runtime

    Change the compiler handle append as the gc compiler does: call a
    function to grow the slice, but otherwise assign the new elements
    directly to the final slice.

    For the current gccgo memory allocator the slice code has to call
    runtime_newarray, not mallocgc directly, so that the allocator sets the
    TypeInfo_Array bit in the type pointer.

    Rename the static function cnew to runtime_docnew, so that the stack
    trace ignores it when ignoring runtime functions.  This was needed to
    fix the runtime/pprof tests on 386.

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

From-SVN: r241667

7 years ago* doc/sourcebuild.texi (Ada Tests): Remove mention of gcc chapter.
Eric Botcazou [Fri, 28 Oct 2016 21:06:14 +0000 (21:06 +0000)]
* doc/sourcebuild.texi (Ada Tests): Remove mention of gcc chapter.

From-SVN: r241666

7 years agotarget.def (min_arithmetic_precision): New hook.
Eric Botcazou [Fri, 28 Oct 2016 21:04:51 +0000 (21:04 +0000)]
target.def (min_arithmetic_precision): New hook.

* target.def (min_arithmetic_precision): New hook.
* doc/tm.texi.in (Misc): Add TARGET_MIN_ARITHMETIC_PRECISION.
* doc/tm.texi: Regenerate.
* internal-fn.c (expand_arith_overflow): Adjust handling of target
dependent support by means of TARGET_MIN_ARITHMETIC_PRECISION.
* targhooks.c (default_min_arithmetic_precision): New function.
* targhooks.h (default_min_arithmetic_precision): Declare.
* config/sparc/sparc.c (TARGET_MIN_ARITHMETIC_PRECISION): Define.
(sparc_min_arithmetic_precision): New function.

From-SVN: r241665

7 years agocombine: Improve change_zero_ext (fixes PR71847)
Segher Boessenkool [Fri, 28 Oct 2016 20:56:28 +0000 (22:56 +0200)]
combine: Improve change_zero_ext (fixes PR71847)

This improves a few things in change_zero_ext.  Firstly, it should use
the passed in pattern in recog_for_combine, not the pattern of the insn
(they are not the same if the whole pattern was replaced).  Secondly,
it handled zero_ext of a subreg, but with hard registers we do not get
a subreg, instead the mode of the reg is changed.  So this handles that.
Thirdly, after changing a zero_ext to an AND, the resulting RTL may become
non-canonical, like (ior (ashift ..) (and ..)); the AND should be first,
it is commutative.  And lastly, zero_extract as a set_dest wasn't handled
at all, but now it is.

This fixes the testcase in PR71847, and improves code generation in some
other edge cases too.

PR target/71847
* combine.c (change_zero_ext): Handle zero_ext of hard registers.
Swap commutative operands in new RTL if needed.  Handle zero_ext
in the set_dest.
(recog_for_combine): Pass *pnewpat to change_zero_ext instead of
PATTERN (insn).

From-SVN: r241664

7 years agore PR go/78144 (FAIL: time on systems with tzdata2016g installed)
Ian Lance Taylor [Fri, 28 Oct 2016 20:21:52 +0000 (20:21 +0000)]
re PR go/78144 (FAIL: time on systems with tzdata2016g installed)

PR go/78144
    libgo: incorporate fix for timezone test

    This brings over the test-only fix for issue 17276 into gccgo/libgo
    (with tzdata-2016g there is a new zone abbreviation).  This is a
    copy of https://golang.org/cl/29995.

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

From-SVN: r241661

7 years agore PR tree-optimization/43721 (Failure to optimise (a/b) and (a%b) into single __aeab...
Prathamesh Kulkarni [Fri, 28 Oct 2016 19:05:12 +0000 (19:05 +0000)]
re PR tree-optimization/43721 (Failure to optimise (a/b) and (a%b) into single __aeabi_idivmod call)

2016-10-28  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
    Kugan Vivekanandarajah  <kuganv@linaro.org>
    Jim Wilson  <jim.wilson@linaro.org>

PR tree-optimization/43721
* target.def: New hook expand_divmod_libfunc.
* doc/tm.texi.in: Add hook for TARGET_EXPAND_DIVMOD_LIBFUNC
* doc/tm.texi: Regenerate.
* internal-fn.def: Add new entry for DIVMOD ifn.
* internal-fn.c (expand_DIVMOD): New.
* tree-ssa-math-opts.c: Include optabs-libfuncs.h, tree-eh.h,
targhooks.h.
(widen_mul_stats): Add new field divmod_calls_inserted.
(target_supports_divmod_p): New.
(divmod_candidate_p): Likewise.
(convert_to_divmod): Likewise.
(pass_optimize_widening_mul::execute): Call
calculate_dominance_info(), renumber_gimple_stmt_uids() at
beginning of function. Call convert_to_divmod()
and record stats for divmod.
* config/arm/arm.c (arm_expand_divmod_libfunc): Override hook
TARGET_EXPAND_DIVMOD_LIBFUNC.
* doc/sourcebuild.texi: Add items for arm_divmod_simode, divmod,
divmod_simode.

testsuite/
* lib/target-supports.exp (check_effective_target_divmod): New.
(check_effective_target_divmod_simode): Likewise.
(check_effective_target_arm_divmod_simode): Likewise.
* gcc.dg/divmod-1-simode.c: New test.
* gcc.dg/divmod-1.c: Likewise.
* gcc.dg/divmod-2-simode.c: Likewise.
* gcc.dg/divmod-2.c: Likewise.
* gcc.dg/divmod-3-simode.c: Likewise.
* gcc.dg/divmod-3.c: Likewise.
* gcc.dg/divmod-4-simode.c: Likewise.
* gcc.dg/divmod-4.c: Likewise.
* gcc.dg/divmod-5.c: Likewise.
* gcc.dg/divmod-6-simode.c: Likewise.
* gcc.dg/divmod-6.c: Likewise.
* gcc.dg/divmod-7.c: Likewise.

Co-Authored-By: Jim Wilson <jim.wilson@linaro.org>
Co-Authored-By: Kugan Vivekanandarajah <kuganv@linaro.org>
From-SVN: r241660

7 years agore PR go/78143 (bootstrap broken in libgo on powerpc-linux-gnu)
Ian Lance Taylor [Fri, 28 Oct 2016 18:57:36 +0000 (18:57 +0000)]
re PR go/78143 (bootstrap broken in libgo on powerpc-linux-gnu)

PR go/78143
    runtime: build lfstack_32bit.go on ppc

    Missed a build tag.  This is GCC PR 78143.

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

From-SVN: r241659

7 years agoMake filesystem::path work with basic_string_view (P0392R0)
Jonathan Wakely [Fri, 28 Oct 2016 18:48:43 +0000 (19:48 +0100)]
Make filesystem::path work with basic_string_view (P0392R0)

* include/experimental/bits/fs_path.h (__is_path_src)
(_S_range_begin, _S_range_end): Overload to treat string_view as a
Source object.
(path::operator+=, path::compare): Overload for basic_string_view.
* testsuite/experimental/filesystem/path/construct/string_view.cc:
New test.
* testsuite/experimental/filesystem/path/construct/
string_view_cxx17.cc: New test.

From-SVN: r241658

7 years agodojump.c (do_jump_by_parts_greater_rtx): Invert probability when swapping the arms...
Eric Botcazou [Fri, 28 Oct 2016 18:10:14 +0000 (18:10 +0000)]
dojump.c (do_jump_by_parts_greater_rtx): Invert probability when swapping the arms of the branch.

* dojump.c (do_jump_by_parts_greater_rtx): Invert probability when
swapping the arms of the branch.
* internal-fn.c (expand_addsub_overflow): Use a straight-line code
sequence for the generic signed-signed-signed case.

From-SVN: r241656

7 years agolibgo: redirect grep output in mkrsysinfo.sh to /dev/null
Ian Lance Taylor [Fri, 28 Oct 2016 17:55:13 +0000 (17:55 +0000)]
libgo: redirect grep output in mkrsysinfo.sh to /dev/null

    I noticed a stray useless output line when building libgo.

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

From-SVN: r241655

7 years agoFix filesystem::path for iterators with const value_type
Jonathan Wakely [Fri, 28 Oct 2016 17:47:57 +0000 (18:47 +0100)]
Fix filesystem::path for iterators with const value_type

* include/experimental/bits/fs_path.h
(path::_S_convert<_Iter>(_Iter, _Iter)): Remove cv-qualifiers from
iterator's value_type.
(path::_S_convert<_Iter>(_Iter __first, __null_terminated)): Likewise.
Do not use operation not supported by input iterators.
(path::__is_path_iter_src): Add partial specialization for const
encoded character types.
* testsuite/experimental/filesystem/path/construct/range.cc: Test
construction from input iterators with const value types.

From-SVN: r241654

7 years agore PR debug/77773 (Segfault when compiling __simd64_float16_t using arm-none-eabi...
Aldy Hernandez [Fri, 28 Oct 2016 16:41:29 +0000 (16:41 +0000)]
re PR debug/77773 (Segfault when compiling __simd64_float16_t using arm-none-eabi-g++ with debug information)

PR debug/77773
* c-pretty-print.c (simple_type_specifier): Do not dereference `t'
if NULL.

From-SVN: r241653

7 years agobfin.c (bfin_legitimate_address_p): Add missing fallthru comment.
Jeff Law [Fri, 28 Oct 2016 15:22:28 +0000 (09:22 -0600)]
bfin.c (bfin_legitimate_address_p): Add missing fallthru comment.

* config/bfin/bfin.c (bfin_legitimate_address_p): Add missing
fallthru comment.
* config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Likewise.

From-SVN: r241651

7 years agosched: Do not mix prologue and epilogue insns
Segher Boessenkool [Fri, 28 Oct 2016 14:39:28 +0000 (16:39 +0200)]
sched: Do not mix prologue and epilogue insns

This patch makes scheduling not reorder prologue insns relative to
epilogue insns and vice versa.  This fixes PR78029.

The problem in that PR:
We have two insns, in this order:

(insn/f 300 299 267 8 (set (reg:DI 65 lr)
        (reg:DI 0 0)) 579 {*movdi_internal64}
     (expr_list:REG_DEAD (reg:DI 0 0)
        (expr_list:REG_CFA_RESTORE (reg:DI 65 lr)
            (nil))))
...
(insn/f 310 268 134 8 (set (mem/c:DI (plus:DI (reg/f:DI 1 1)
                (const_int 144 [0x90])) [6  S8 A8])
        (reg:DI 0 0)) 579 {*movdi_internal64}
     (expr_list:REG_DEAD (reg:DI 0 0)
        (expr_list:REG_CFA_OFFSET (set (mem/c:DI (plus:DI (reg/f:DI 1 1)
                        (const_int 144 [0x90])) [6  S8 A8])
                (reg:DI 65 lr))
            (nil))))

and sched swaps them (when compiling for power6, it tries to put memory
stores together, so insn 310 is moved up past 300 to go together with
some other store).  But the REG_CFA_RESTORE and REG_CFA_OFFSET cannot be
swapped (they both say where the orig value of LR now lives).

PR rtl-optimization/78029
* function.c (prologue_contains, epilogue_contains): New functions.
(record_prologue_seq, record_epilogue_seq): New functions.
* function.h (prologue_contains, epilogue_contains,
record_prologue_seq, record_epilogue_seq): New declarations.
* sched-deps.c (sched_analyze_insn): Make dependencies to prevent
mixing prologue and epilogue insns.
(init_deps): Initialize the new fields in struct deps_desc.
* sched-int.h (struct deps_desc): New fields last_prologue,
last_epilogue, and last_logue_was_epilogue.
* shrink-wrap.c (emit_common_heads_for_components): Record all
emitted prologue and epilogue insns.
(emit_common_tails_for_components): Ditto.
(insert_prologue_epilogue_for_components): Ditto.

From-SVN: r241650

7 years agoGIMPLE store merging pass
Kyrylo Tkachov [Fri, 28 Oct 2016 14:18:50 +0000 (14:18 +0000)]
GIMPLE store merging pass

2016-10-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

PR middle-end/22141
* Makefile.in (OBJS): Add gimple-ssa-store-merging.o.
* common.opt (fstore-merging): New Optimization option.
* opts.c (default_options_table): Add entry for
OPT_ftree_store_merging.
* fold-const.h (can_native_encode_type_p): Declare prototype.
* fold-const.c (can_native_encode_type_p): Define.
* params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Define.
(PARAM_MAX_STORES_TO_MERGE): Likewise.
* timevar.def (TV_GIMPLE_STORE_MERGING): New timevar.
* passes.def: Insert pass_tree_store_merging.
* tree-pass.h (make_pass_store_merging): Declare extern
prototype.
* gimple-ssa-store-merging.c: New file.
* doc/invoke.texi (Optimization Options): Document
-fstore-merging.
(--param documentation): Document store-merging-allow-unaligned
and max-stores-to-merge.

2016-10-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
            Jakub Jelinek  <jakub@redhat.com>
            Andrew Pinski  <pinskia@gmail.com>

PR middle-end/22141
PR rtl-optimization/23684
* gcc.c-torture/execute/pr22141-1.c: New test.
* gcc.c-torture/execute/pr22141-2.c: Likewise.
* gcc.target/aarch64/ldp_stp_1.c: Adjust for -fstore-merging.
* gcc.target/aarch64/ldp_stp_4.c: Likewise.
* gcc.dg/store_merging_1.c: New test.
* gcc.dg/store_merging_2.c: Likewise.
* gcc.dg/store_merging_3.c: Likewise.
* gcc.dg/store_merging_4.c: Likewise.
* gcc.dg/store_merging_5.c: Likewise.
* gcc.dg/store_merging_6.c: Likewise.
* gcc.dg/store_merging_7.c: Likewise.
* gcc.target/i386/pr22141.c: Likewise.
* gcc.target/i386/pr34012.c: Add -fno-store-merging to dg-options.
* g++.dg/init/new17.C: Likewise.

Co-Authored-By: Andrew Pinski <pinskia@gmail.com>
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r241649

7 years agoImplement std::launder for C++17
Jonathan Wakely [Fri, 28 Oct 2016 14:09:33 +0000 (15:09 +0100)]
Implement std::launder for C++17

* doc/xml/manual/status_cxx2017.xml: Update status.
* doc/html/*: Regenerate.
* include/std/type_traits (has_unique_object_representations): Guard
with __has_builtin check.
* libsupc++/new (launder): Define for C++17.
* testsuite/18_support/launder/1.cc: New test.
* testsuite/18_support/launder/requirements.cc: New test.
* testsuite/18_support/launder/requirements_neg.cc: New test.

From-SVN: r241648

7 years agore PR middle-end/72747 (powerpc: wrong code generated for vec_splats in cascading...
Will Schmidt [Fri, 28 Oct 2016 13:28:46 +0000 (13:28 +0000)]
re PR middle-end/72747 (powerpc: wrong code generated for vec_splats in cascading assignment)

gcc:
2016-10-26  Will Schmidt <will_schmidt@vnet.ibm.com>

        PR middle-end/72747
        * gimplify.c (gimplify_init_constructor): Move emit of constructor
        assignment to earlier in the if/else logic.

testsuite:
2016-10-26  Will Schmidt <will_schmidt@vnet.ibm.com>

        PR middle-end/72747
        * c-c++-common/pr72747-1.c: New test.
        * c-c++-common/pr72747-2.c: Likewise.

From-SVN: r241647

7 years agore PR middle-end/78128 (fortran/resolve.c:resolve_operator miscompiled at -O2)
Richard Biener [Fri, 28 Oct 2016 13:07:59 +0000 (13:07 +0000)]
re PR middle-end/78128 (fortran/resolve.c:resolve_operator miscompiled at -O2)

2016-10-28  Richard Biener  <rguenther@suse.de>

PR middle-end/78128
PR middle-end/71002
* fold-const.c (make_bit_field_ref): Only adjust alias set
when the original alias set was zero.

From-SVN: r241645

7 years agoS/390: Add static OSC breaker if necessary.
Andreas Krebbel [Fri, 28 Oct 2016 12:31:37 +0000 (12:31 +0000)]
S/390: Add static OSC breaker if necessary.

This patch adds a magic OSC (operand store compare) break instruction
which is necessary if a store is followed closely by a load with same
base+indx+displ while either base or index get modified in between.

The patch improves several SpecCPU testcases running on IBM z13.

gcc/testsuite/ChangeLog:

2016-10-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* gcc.target/s390/oscbreak-1.c: New test.

gcc/ChangeLog:

2016-10-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* config/s390/s390.c (s390_adjust_loop_scan_osc): New function.
(s390_adjust_loops): New function.
(s390_reorg): Invoke s390_adjust_loops.
* config/s390/s390.md: (UNSPEC_OSC_BREAK): New constant.
("osc_break"): New insn definition.

From-SVN: r241644

7 years agoS/390: Add support for arch<n> arch/tune options.
Andreas Krebbel [Fri, 28 Oct 2016 12:28:24 +0000 (12:28 +0000)]
S/390: Add support for arch<n> arch/tune options.

This patch adds an alternate CPU level naming following the
architecture level number in the Principles of Operations manual.  So
instead of having z196, zEC12, and z13 you can use arch9, arch10, and
arch11.  The old cpu names stay valid and should preferably be used.

The alternate names are supposed to improve compatibility with the IBM
XL compiler toolchain which uses the arch numbering.

gcc/testsuite/ChangeLog:

2016-10-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* gcc.target/s390/target-attribute/tattr-m64-33.c: New test.

gcc/ChangeLog:

2016-10-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* config/s390/s390.opt: Support alternate cpu level naming (archXX).
* config.gcc: Support alternate archXX cpu levels with
--with-arch= and --with-tune=.
* config/s390/linux.h: Translate new archXX cpu levels to the
original names when calling GAS.
* config/s390/tpf.h: Likewise.
* doc/invoke.texi: Document the alternate cpu level names.

From-SVN: r241643

7 years agore PR rtl-optimization/77919 (ICE converting DC to V2DF mode)
Jakub Jelinek [Fri, 28 Oct 2016 08:11:57 +0000 (10:11 +0200)]
re PR rtl-optimization/77919 (ICE converting DC to V2DF mode)

PR rtl-optimization/77919
* expr.c (expand_expr_real_1) <normal_inner_ref>: Force CONCAT into
MEM if mode1 is not a complex mode.

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

From-SVN: r241642

7 years agore PR rtl-optimization/78132 (GCC produces invalid instruction (kmovd and kmovq)...
Jakub Jelinek [Fri, 28 Oct 2016 07:12:52 +0000 (09:12 +0200)]
re PR rtl-optimization/78132 (GCC produces invalid instruction (kmovd and kmovq) for KNL.)

PR rtl-optimization/78132
* ree.c (combine_reaching_defs): Give up if copy_needed and
!HARD_REGNO_MODE_OK (REGNO (src_reg), dst_mode).

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

From-SVN: r241641

7 years agoDaily bump.
GCC Administrator [Fri, 28 Oct 2016 00:16:16 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241640

7 years agoIndex...
Carl Love [Thu, 27 Oct 2016 23:21:54 +0000 (23:21 +0000)]
Index...

Index: ChangeLog
===================================================================
--- ChangeLog (revision 241636)
+++ ChangeLog (working copy)
@@ -1,3 +1,7 @@
+2016-10-27  Carl Love  <cel@us.ibm.com>
+
+ * MAINTAINERS (Write After Approval): Add myself.
+
 2016-10-27  Andrew Burgess  <andrew.burgess@embecosm.com>

  * MAINTAINERS (Reviewers): Add myself.
Index: MAINTAINERS
===================================================================
--- MAINTAINERS (revision 241636)
+++ MAINTAINERS (working copy)
@@ -479,6 +479,7 @@
 Manuel López-Ibáñez <manu@gcc.gnu.org>
 Martin v. Löwis <loewis@informatik.hu-berlin.de>
 H.J. Lu <hjl.tools@gmail.com>
+Carl Love <cel@us.ibm.com>
 Christophe Lyon <christophe.lyon@st.com>
 Luis Machado <luisgpm@br.ibm.com>
 Ziga Mahkovec <ziga.mahkovec@klika.si>

From-SVN: r241637

7 years ago* gcc.dg/vect/pr71264.c: XFAIL on SPARC.
Eric Botcazou [Thu, 27 Oct 2016 21:02:25 +0000 (21:02 +0000)]
* gcc.dg/vect/pr71264.c: XFAIL on SPARC.

From-SVN: r241634

7 years ago* config/sparc/sparc.md (<*vlop:code><VL:mode>3): Remove leading '*'.
Eric Botcazou [Thu, 27 Oct 2016 21:00:22 +0000 (21:00 +0000)]
* config/sparc/sparc.md (<*vlop:code><VL:mode>3): Remove leading '*'.

From-SVN: r241632

7 years agoconstraints.md (wH constraint): Add new constraints for allowing 32-bit integers...
Michael Meissner [Thu, 27 Oct 2016 20:52:07 +0000 (20:52 +0000)]
constraints.md (wH constraint): Add new constraints for allowing 32-bit integers (and eventually 8/16-bit...

[gcc]
2016-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>

* config/rs6000/constraints.md (wH constraint): Add new
constraints for allowing 32-bit integers (and eventually 8/16-bit
integers) into the vector registers.
(wI constraint): Likewise.
(wJ constraint): Likewise.
(wK constraint): Likewise.
* config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Add
-mvsx-small-integer as a default option for ISA 2.07
(i.e. power8).
(POWERPC_MASKS): Likewise.
* config/rs6000/rs6000.opt (-mvsx-small-integer): Add new debug
switch to turn off small integer support in vector registers.
* config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Eliminate
test for -mupper-regs-di, since it is already done with the
reg_add[mode].scalar_in_vsx_p.  Add support for the switch
-mvsx-small-integer.
(rs6000_debug_reg_global): Add support for wH, wI, wJ, and wK
constraints.
(rs6000_setup_reg_addr_masks): Likewise.
(rs6000_init_hard_regno_mode_ok): Likewise.
(rs6000_option_override_internal): Add consistency checks for
-mvsx-small-integer.
(rs6000_secondary_reload_simple_move): SImode is a simple move if
-mvsx-small-integer.
(rs6000_secondary_reload): Use std::swap.
(rs6000_preferred_reload_class): Don't prefer FLOAT_REGS over
VSX_REGS for small integers in vector registers, since there is no
D-FORM address mode for such types.
(rs6000_register_move_cost): Use FIRST_FPR_REGNO instead of 32.
(rs6000_opt_masks): Add -mvsx-small-integer.
* config/rs6000/vsx.md (VSINT_84): Add SImode for small integer
support.
(VSX_EXTRACT_I2): Clone VSX_EXTRACT_I, but drop V4SI since SImode
extracts can be done on ISA 2.07.
(vsx_extract_<mode>): Add support for small integers in vsx
registers.
(vsx_extract_<mode>_p9): Use 'v' instead of VSX_EX, since we no
longer support V4SImode in this pattern.
(vsx_extract_si): New insn to support extraction of SImode in ISA
2.07 using either xxextractuw or vspltw.
(vsx_extract_<mode>_p8): Use 'v' instead of VSX_EX, since we no
longer support V4SImode in this pattern.
* config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wH, wI,
wJ, and wK constraints.
* config/rs6000/rs6000.md (f32_sv): Use correct instruction for
storing SDmode with VSX instructions.
(zero_extendsi<mode>2): Reorder pattern, so RLDICL comes after the
GPR load and before the FPR and VSX loads.  Remove ??, ! from the
constraints.  Add MFVSRWZ and XXEXTRACTUW instructions to support
small integers in vector registers.
(extendsi<mode>2): Reorder pattern, so EXTSW comes after the GPR
load and before the FPR and VSX loads.  Remove ??, ! from the
constraints.  Add VEXTSW2D support for small integers in vector
registers.
(lfiwax): Remove ! constraint.  Add VEXTSW2D support for small
integers in vector registers.
(floatsi<mode>2_lfiwax): If -mvsx-small-integer issue a normal
move instead of using an UNSPEC.
(lfiwzx): Remove ! constraint.  Add XXEXTRACTUW support for small
integers in vector registers.
(floatunssi<mode>2_lfiwzx): If -mvsx-small-integer issue a normal
move instead of using an UNSPEC.
(movsi_internal1): Add support for -mvsx-small-integer.  Align
columns so that it is more readable.
(SImode splitter for ISA 3.0 constants): Add splitter for
-128..127 constants that can easily be constructed on ISA 3.0.
* doc/md.texi (PowerPC Constraints): Document wH, wI, wJ, and wK
constraints.

[gcc/testsuite]
2016-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>

* gcc.target/powerpc/vsx-simode.c: New test.
* gcc.target/powerpc/vsx-simode2.c: Likewise.
* gcc.target/powerpc/vsx-simode3.c: Likewise.

From-SVN: r241631

7 years agore PR fortran/78026 (ICE in gfc_resolve_omp_declare_simd, at fortran/openmp.c:5190)
Jakub Jelinek [Thu, 27 Oct 2016 19:55:12 +0000 (21:55 +0200)]
re PR fortran/78026 (ICE in gfc_resolve_omp_declare_simd, at fortran/openmp.c:5190)

PR fortran/78026
* parse.c (decode_statement): Don't create namespace for possible
select type here and destroy it afterwards.
(parse_select_type_block): Set gfc_current_ns to new_st.ext.block.ns.
(parse_executable, gfc_parse_file): Formatting fixes.
* match.c (gfc_match_select_type): Create namespace for select type
here, only after matching select type.  Formatting fixes.  Free that
namespace if not returning MATCH_YES, after gfc_undo_symbols,
otherwise remember it in new_st.ext.block.ns and switch to parent
namespace anyway.

* gfortran.dg/gomp/pr78026.f03: New test.
* gfortran.dg/select_type_38.f03: New test.

From-SVN: r241630

7 years agoPR70975 Pass valid offset argument to sendfile
Uros Bizjak [Thu, 27 Oct 2016 18:55:55 +0000 (20:55 +0200)]
PR70975 Pass valid offset argument to sendfile

PR libstdc++/70975
* src/filesystem/ops.cc (do_copy_file) [_GLIBCXX_USE_SENDFILE]:
Pass non-null pointer to sendfile for offset argument.

From-SVN: r241629