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
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
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
[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
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
* 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
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
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
* 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
* 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
* 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
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
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
* 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
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
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
* 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
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
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
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
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
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
* 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
[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
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
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
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).
Fixesgolang/go#17640
Reviewed-on: https://go-review.googlesource.com/32296
From-SVN: r241688
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
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