Commit Graph

159746 Commits

Author SHA1 Message Date
Ian Lance Taylor
964c809fb2 compiler: in range, evaluate array if it has receives or calls
The last change was incomplete, in that it did not evaluate the array
    argument in some cases where it had to be evaluated.  This reuses the
    existing code for checking whether len/cap is constant.
    
    Also clean up the use of _ as the second variable in a for/range,
    which was previously inconsistent depending on whether the statement
    used = or :=.
    
    Updates golang/go#22313
    
    Reviewed-on: https://go-review.googlesource.com/91715

From-SVN: r257377
2018-02-05 01:50:22 +00:00
Ian Lance Taylor
4cff15eaca compiler: give error for non-int arguments to make
This implements a requirement of the language spec.
    
    While we're here fix the value returned by the type method of a
    builtin call expression to make, although this doesn't seem to make
    any difference anywhere since we lower this to a runtime call before
    the determine_types pass anyhow.
    
    There is already a test for this error in the master repository:
    test/fixedbugs/issue16949.go. It just hasn't made it into the gccgo
    testsuite yet.
    
    Fixes golang/go#16949
    
    Reviewed-on: https://go-review.googlesource.com/91697

From-SVN: r257376
2018-02-05 01:46:07 +00:00
Ian Lance Taylor
91cb7f7804 compiler: don't error for goto over type or const declaration
We should only issue an error for a goto over a var declaration.
    
    The test case for this is already in the master repository, at
    test/fixedbugs/issue8042.go.  It just hasn't been copied into the
    gccgo repository yet.
    
    Fixes golang/go#19089
    
    Reviewed-on: https://go-review.googlesource.com/91696

From-SVN: r257375
2018-02-05 01:43:24 +00:00
Ian Lance Taylor
6ac0aed815 compiler: correct parse of parenthesized select case
We used to mishandle `select { case (<-c): }` and friends.
    
    The test case for this is https://golang.org/cl/91657.
    
    Fixes golang/go#20923
    
    Reviewed-on: https://go-review.googlesource.com/91695

From-SVN: r257374
2018-02-05 01:40:51 +00:00
Ian Lance Taylor
59597e3735 cmd/go: don't lose last flag from _cgo_flags
The quoting code that read _cgo_flags, currently only in the gccgo
    version of cmd/go, was losing the last flag read from the file.
    
    Fixes golang/go#23666
    
    Reviewed-on: https://go-review.googlesource.com/91655

From-SVN: r257373
2018-02-05 01:38:34 +00:00
GCC Administrator
56d6cc37bd Daily bump.
From-SVN: r257372
2018-02-05 00:16:12 +00:00
Jan Hubicka
ca1ef73d52 re PR ipa/79966 (run time more than twice slower when using -fipa-cp-clone)
PR middle-end/79966
	* gfortran.dg/pr79966.f90: New testcase

From-SVN: r257367
2018-02-04 17:15:36 +00:00
Joseph Myers
08df0ee287 * es.po: Update.
From-SVN: r257366
2018-02-04 14:03:29 +00:00
Joseph Myers
e3f62e027f * ru.po: Update.
From-SVN: r257365
2018-02-04 14:01:51 +00:00
Dominique d'Humieres
22b128c53b re PR fortran/84094 (several correctness issues in gfortran.dg)
2018-02-04  Dominique d'Humieres <dominiq@gcc.gnu.org>

	PR fortran/84094
	* gfortran.dg/associate_23.f90: Fix invalid code.
	* gfortran.dg/intrinsic_actual_4.f90: Likewise.
	* gfortran.dg/matmul_3.f90: Likewise.
	* gfortran.dg/transfer_array_intrinsic_2.f90: Likewise.

From-SVN: r257364
2018-02-04 14:44:52 +01:00
Paul Thomas
26f822c249 re PR fortran/84115 (Failure in associate construct with concatenated character target)
2018-02-04  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/84115
	* trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
	'length' if the symbol charlen backend_decl is an indirect ref.

2018-02-04  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/84115
	* gfortran.dg/associate_34.f90: New test.
	* gfortran.dg/associate_35.f90: New test.

From-SVN: r257363
2018-02-04 13:18:33 +00:00
GCC Administrator
b27fe7a815 Daily bump.
From-SVN: r257362
2018-02-04 00:16:23 +00:00
Ian Lance Taylor
3df9a1fe73 go-gcc.cc (Gcc_backend::fill_in_struct): Mark struct types as using structural equality.
* go-gcc.cc (Gcc_backend::fill_in_struct): Mark struct types as
	using structural equality.

From-SVN: r257357
2018-02-03 17:01:46 +00:00
Paul Thomas
2c536ce7b6 re PR fortran/84141 (Internal error: type_name(): Bad type)
2018-02-03  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/84141
	PR fortran/84155
	* trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
	use gfc_get_dtype_rank_type.

2018-02-03  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/84141
	PR fortran/84155
	* gfortran.dg/pr84155.f90 : New test.

From-SVN: r257356
2018-02-03 14:06:44 +00:00
GCC Administrator
d97aee7416 Daily bump.
From-SVN: r257355
2018-02-03 00:16:13 +00:00
Joseph Myers
635ace2c87 * pt_BR.po: Update.
From-SVN: r257350
2018-02-02 21:30:48 +00:00
Paolo Carlini
7c30b12aaa c-common.h (DECL_UNNAMED_BIT_FIELD): New.
/c-family
2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* c-common.h (DECL_UNNAMED_BIT_FIELD): New.

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

	* c-typeck.c (really_start_incremental_init, push_init_level,
	set_nonincremental_init, output_init_element, process_init_element):
	Use DECL_UNNAMED_BIT_FIELD.

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

	* class.c (is_really_empty_class): Use DECL_UNNAMED_BIT_FIELD.
	* constexpr.c (cx_check_missing_mem_inits): Likewise.
	* decl.c (next_initializable_field, find_decomp_class_base,
	cp_finish_decomp): Likewise.
	* typeck2.c (process_init_constructor_record): Likewise.

From-SVN: r257348
2018-02-02 19:53:59 +00:00
Eric Botcazou
dacdc68f3b decl.c (array_type_has_nonaliased_component): Return false if the component type is a pointer.
* gcc-interface/decl.c (array_type_has_nonaliased_component): Return
	false if the component type is a pointer.

From-SVN: r257344
2018-02-02 18:09:58 +00:00
Eric Botcazou
ee034d3108 re PR lto/83954 (LTO: Bogus -Wlto-type-mismatch warning for array of pointer to incomplete type)
PR lto/83954
	* lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
	component type of array types with non-aliased component.

From-SVN: r257343
2018-02-02 18:09:32 +00:00
Andrew Jenner
aa81b142af powerpcspe.opt: Add Undocumented to irrelevant options.
* config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
       options.
       * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
       Remove all values except native, 8540 and 8548.

From-SVN: r257342
2018-02-02 17:31:20 +00:00
H.J. Lu
881574614d i386: Pass INVALID_REGNUM as invalid register number
* config/i386/i386.c (ix86_output_function_return): Pass
	INVALID_REGNUM, instead of -1, as invalid register number to
	indirect_thunk_name and output_indirect_thunk.

From-SVN: r257340
2018-02-02 08:43:46 -08:00
Jason Merrill
b7d8e7e5d3 PR c++/84181 - ICE with lambda parm in template argument.
* tree.c (strip_typedefs_expr): Use cp_tree_operand_length.

From-SVN: r257339
2018-02-02 11:42:46 -05:00
Uros Bizjak
113db47240 dec_parameter_1.f (sub1): Remove statement with no effect.
* gfortran.dg/dec_parameter_1.f (sub1): Remove statement with no effect.
	* gfortran.dg/dec_parameter_2.f90 (sub1): Ditto.

From-SVN: r257337
2018-02-02 17:01:49 +01:00
Will Schmidt
24fa220cff vec-cmpne-long.c: Add p8vector_hw require to dg-do run stanza.
[testsuite]

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

	* gcc.target/powerpc/vec-cmpne-long.c: Add p8vector_hw require to
	dg-do run stanza.

From-SVN: r257336
2018-02-02 16:00:28 +00:00
Will Schmidt
1785593510 fold-vec-abs-int.p9.c: Add powerpc_p9vector_ok requirement.
[testsuite]

2018-01-31  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/fold-vec-abs-int.p9.c: Add powerpc_p9vector_ok
	requirement.
	* gcc.target/powerpc/fold-vec-abs-int-fwrapv.p9.c: Same.
	* gcc.target/powerpc/fold-vec-cmp-char.p9.c: Same.
	* gcc.target/powerpc/fold-vec-neg-int.p9.c: Same.

From-SVN: r257335
2018-02-02 15:53:30 +00:00
Ian Lance Taylor
c2a0fe5690 go-gcc.cc (Gcc_backend::type_size): Return 0 for void_type_node.
* go-gcc.cc (Gcc_backend::type_size): Return 0 for
	void_type_node.
	(Gcc_backend::convert_expression): Don't convert if the type of
	expr_tree is void_type_node.
	(Gcc_backend::array_index_expression): Don't index if the type of
	the array expression is void_type_node.
	(Gcc_backend::init_statement): Don't initialize if the type of the
	initializer expression is void_type_node.
	(Gcc_backend::assignment_statement): Don't assign if the type of
	either the left or right hand side is void_type_node.
	(Gcc_backend::temporary_variable): Don't initialize if the type of
	the initializer expression is void_type_node.

From-SVN: r257334
2018-02-02 15:19:44 +00:00
Georg-Johann Lay
584d9d585b re PR testsuite/52641 (Test cases fail for 16-bit int targets)
PR testsuite/52641
	* gcc.c-torture/execute/pr83362.c: Make work for int16.
	* gcc.dg/Wsign-conversion.c: Dito.
	* gcc.dg/attr-alloc_size-4.c: Dito.
	* gcc.dg/pr81020.c: Dito.
	* gcc.dg/pr81192.c: Dito.
	* gcc.dg/pr83463.c (dg-options): Add -Wno-pointer-to-int-cast.
	* gcc.dg/attr-alloc_size-11.c: Also special-case avr.
	* gcc.dg/pr83844.c: Restrict to int32plus.
	* gcc.dg/attr-alloc_size-3.c: Restrict to size32plus.
	* gcc.dg/tree-ssa/ldist-25.c: Dito.
	* gcc.dg/tree-ssa/ldist-27.c: Dito.
	* gcc.dg/tree-ssa/ldist-28.c: Dito.
	* gcc.dg/tree-ssa/ldist-29.c: Dito.
	* gcc.dg/tree-ssa/ldist-30.c: Dito.
	* gcc.dg/tree-ssa/ldist-31.c: Dito.
	* gcc.dg/tree-ssa/ldist-32.c: Dito.
	* gcc.dg/tree-ssa/ldist-33.c: Dito.
	* gcc.dg/tree-ssa/ldist-34.c: Dito.
	* gcc.dg/tree-ssa/ldist-35.c: Dito.
	* gcc.dg/tree-ssa/ldist-36.c: Dito.

From-SVN: r257333
2018-02-02 15:07:37 +00:00
Julia Koval
02da1e9cae Add -march=icelake.
gcc/
	* config.gcc: Add -march=icelake.
	* config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
	* config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
	* config/i386/i386.c (processor_costs): Add m_ICELAKE.
	(PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
	PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
	(processor_target_table): Add icelake.
	(ix86_option_override_internal): Handle new PTAs.
	(get_builtin_code_for_version): Handle icelake.
	(M_INTEL_COREI7_ICELAKE): New.
	(fold_builtin_cpu): Handle icelake.
	* config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
	* doc/invoke.texi: Add -march=icelake.
gcc/testsuite/
	* gcc.target/i386/funcspec-56.inc: Handle new march.
	* g++.dg/ext/mv16.C: Ditto.
libgcc/
	* config/i386/cpuinfo.h (processor_subtypes): Add INTEL_COREI7_ICELAKE.

From-SVN: r257331
2018-02-02 14:45:57 +01:00
Ian Lance Taylor
31766e6833 compiler: don't incorrectly evaluate range variable
The language spec says that in `for i = range x`, in which there is no
    second iteration variable, if len(x) is constant, then x is not
    evaluated.  This only matters when x is an expression that panics but
    whose type is an array type; in such a case, we should not evaluate x,
    since len of any array type is a constant.
    
    Fixes golang/go#22313
    
    Reviewed-on: https://go-review.googlesource.com/91555

From-SVN: r257330
2018-02-02 13:44:41 +00:00
Julia Koval
eece7fe533 Move omp bitmask to general to use it in x86 backend.
gcc/c-family/
	* c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.

gcc/
	* config/i386/i386.c (ix86_option_override_internal): Change flags type
	to wide_int_bitmask.
	* wide-int-bitmask.h: New.

From-SVN: r257329
2018-02-02 14:39:30 +01:00
Georg-Johann Lay
ce2e607750 Reduce fallout for avr.
* lib/target-supports.exp
	(check_effective_target_keeps_null_pointer_checks): No more
	special-case avr.
	* gcc.dg/tree-ssa/pr21086.c (dg-final): Special-case avr.
	* gcc.dg/ifcvt-4.c: Skip avr.
	* gcc.dg/pr53037-1.c: Dito.
	* gcc.dg/pr53037-2.c: Dito.
	* gcc.dg/pr53037-3.c: Dito.
	* gcc.dg/pr63387-2.c: Dito.
	* gcc.dg/pr63387.c: Dito.
	* gcc.dg/sancov/cmp0.c: Dito.
	* gcc.dg/tree-ssa/loop-interchange-1.c: Dito.
	* gcc.dg/tree-ssa/loop-interchange-10.c: Dito.
	* gcc.dg/tree-ssa/loop-interchange-11.c: Dito.
	* gcc.dg/tree-ssa/loop-interchange-1b.c: Dito.
	* gcc.dg/tree-ssa/loop-interchange-2.c: Dito.
	* gcc.dg/tree-ssa/loop-interchange-3.c: Dito.
	* gcc.dg/tree-ssa/loop-interchange-4.c: Dito.
	* gcc.dg/tree-ssa/loop-interchange-5.c: Dito.
	* gcc.dg/tree-ssa/loop-interchange-6.c: Dito.
	* gcc.dg/tree-ssa/loop-interchange-7.c: Dito.
	* gcc.dg/tree-ssa/loop-interchange-8.c: Dito.
	* gcc.dg/tree-ssa/loop-interchange-9.c: Dito.
	* gcc.dg/tree-ssa/pr82059.c: Dito.
	* gcc.c-torture/execute/pr70460.c: Dito.

From-SVN: r257328
2018-02-02 12:24:34 +00:00
Georg-Johann Lay
5c1aec7e26 re PR testsuite/52641 (Test cases fail for 16-bit int targets)
PR testsuite/52641
	* gcc.c-torture/execute/pr81913.c: Use types that also work for int16.
	* gcc.c-torture/execute/20180112-1.c: Dito.
	* gcc.c-torture/execute/pr81503.c: Dito.
	* gcc.dg/store_merging_12.c: Dito.
	* gcc.dg/tree-ssa/loop-niter-1.c: Dito.
	* gcc.dg/tree-ssa/loop-niter-2.c: Dito.
	* gcc.dg/tree-ssa/pr80898.c: Dito.
	* gcc.dg/tree-ssa/pr82363.c: Dito.
	* gcc.dg/utf16-4.c: Also allow "short unsigned int" in dg-warning.
	* gcc.dg/tree-ssa/pr81346-5.c: Special-case int16.
	* gcc.dg/tree-ssa/ssa-sink-11.c: Dito.
	* gcc.dg/tree-ssa/ssa-sink-12.c: Dito.
	* gcc.dg/torture/pr81814.c: Restrict to int32plus.
	* gcc.dg/tree-ssa/pr80803.c: Dito.
	* gcc.dg/tree-ssa/pr80898-2.c: Dito.
	* gcc.dg/tree-ssa/pr81346-4.c: Dito.
	* gcc.dg/tree-ssa/vrp114.c: Dito.
	* gcc.dg/tree-ssa/pr82574.c: Restrict to size32plus.
	* gcc.dg/tree-ssa/ssa-dom-thread-13.c: Dito.
	* gcc.dg/tree-ssa/ssa-sink-15.c: Dito.

From-SVN: r257327
2018-02-02 11:36:54 +00:00
Igor Tsimbalist
e8a5a6f6e2 PR84066 Wrong shadow stack register size is saved for x32
x32 is a 64-bit process with 32-bit software pointer and kernel may
place x32 shadow stack above 4GB.  We need to save and restore 64-bit
shadow stack register for x32. builtin jmp buf size is 5 pointers.  We
have space to save 64-bit shadow stack pointers: 32-bit SP, 32-bit FP,
32-bit IP, 64-bit SSP for x32.

	PR target/84066
	* gcc/config/i386/i386.md: Replace Pmode with word_mode in
	builtin_setjmp_setup and builtin_longjmp to support x32.
	* gcc/testsuite/gcc.target/i386/cet-sjlj-6a.c: New test.
	* gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c: Likewise.

From-SVN: r257326
2018-02-02 11:06:39 +01:00
Jason Merrill
fe23b12a23 PR c++/84160 - ICE with nested variadic capture.
* lambda.c (is_capture_proxy_with_ref): New.
	(insert_capture_proxy): Don't set DECL_CAPTURED_VARIABLE from a
	COMPONENT_REF.
	* expr.c (mark_use): Use is_capture_proxy_with_ref.
	* constexpr.c (potential_constant_expression_1): Likewise.
	* semantics.c (process_outer_var_ref): Likewise.

From-SVN: r257325
2018-02-01 21:07:09 -05:00
Ian Lance Taylor
60a57222fe reflect: enable allocation tests
They were disabled due to the lack of escape analysis. Now that
    we have escape analysis, unskip these tests.
    
    Reviewed-on: https://go-review.googlesource.com/86248

From-SVN: r257324
2018-02-02 00:33:03 +00:00
Ian Lance Taylor
38f08ec0bd runtime: scan register backing store on ia64
On ia64, a separate stack is used for saving/restoring register frames,
    occupying the other end of the stack mapping. This must also be scanned
    for pointers into the heap.
    
    Reviewed-on: https://go-review.googlesource.com/85276

From-SVN: r257323
2018-02-02 00:16:43 +00:00
GCC Administrator
2e30f1ee86 Daily bump.
From-SVN: r257322
2018-02-02 00:16:28 +00:00
Cherry Zhang
2794baab68 compiler: turn on escape analysis by default
The escape analysis now runs by default. It can be disabled with
    the negative flag, -fno-go-optimize-allocs.
    
    Reviewed-on: https://go-review.googlesource.com/86247

	* lang.opt (fgo-optimize): Remove RejectNegative.
	* go-c.h (go_enable_optimize): Update declaration to take value
	argument.
	* go-lang.c (go_langhook_handle_option): Pass value to
	go_enable_optimize.
	* gccgo.texi (Invoking gccgo): Update -fgo-optimize-allocs doc.

From-SVN: r257319
2018-02-02 00:00:04 +00:00
Ian Lance Taylor
90bf94878b Change accidentally omitted from revision 257280.
From-SVN: r257313
2018-02-01 21:08:31 +00:00
Ian Lance Taylor
28f3c8143b math: adjust compilation flags, use them when testing
We were using special compilation flags for the math package, but we
    weren't using them when testing.  That meant that our tests were not
    checking the real code we were providing.  Fix that.
    
    Fixing that revealed that we were not using a good set of flags, or at
    least were not using flags that let the tests pass.  Adjust the flags
    to stop using -funsafe-math-optimizations on x86.  Instead always use
    -ffp-contract=off -fno-math-errno -fno-trapping-math for all targets.
    
    Fixes golang/go#23647
    
    Reviewed-on: https://go-review.googlesource.com/91355

From-SVN: r257312
2018-02-01 21:05:20 +00:00
Marek Polacek
d15f0fa7f9 re PR c++/84125 (ICE in generic lambda when static_assert argument is implicitly converted to bool)
PR c++/84125
	* typeck.c (build_address): Relax the assert when
	processing_template_decl.

	* g++.dg/cpp1y/lambda-generic-84125.C:New test.

From-SVN: r257311
2018-02-01 20:32:33 +00:00
Janne Blomqvist
ae976c332d PR 83975 Associate target with non-constant character length
When associating a variable of type character, if the length of the
target isn't known at compile time, generate an error. See PR 83344
for more details.

Regtested on x86_64-pc-linux-gnu.

gcc/fortran/ChangeLog:

2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>

	PR 83975
	PR 83344
	* resolve.c (resolve_assoc_var): Generate an error if
	target length unknown.

From-SVN: r257310
2018-02-01 21:47:15 +02:00
Jason Merrill
bfa2872474 PR c++/84126 - ICE with variadic generic lambda
PR c++/84036
	PR c++/82249
	* pt.c (tsubst_pack_expansion): Handle function parameter_packs in
	PACK_EXPANSION_EXTRA_ARGS.

From-SVN: r257307
2018-02-01 13:44:41 -05:00
Peter Bergner
6a92e0534b re PR target/56010 (Powerpc, -mcpu=native and -mtune=native use the wrong name for target 7450)
PR target/56010
	PR target/83743
	* config/rs6000/driver-rs6000.c: #include "diagnostic.h".
	#include "opts.h".
	(rs6000_supported_cpu_names): New static variable.
	(linux_cpu_translation_table): Likewise.
	(elf_platform) <cpu>: Define new static variable and use it.
	Translate kernel AT_PLATFORM name to canonical name if needed.
	Error if platform name is unknown.

From-SVN: r257305
2018-02-01 12:26:51 -06:00
Aldy Hernandez
177a970007 re PR middle-end/84089 (FAIL: g++.dg/cpp1y/lambda-generic-x.C -std=gnu++14 (internal compiler error))
PR target/84089
	* config/pa/predicates.md (base14_operand): Handle E_VOIDmode.

From-SVN: r257304
2018-02-01 17:12:28 +00:00
Jeff Law
89e06365db re PR target/84128 (i686: Stack spilling in -fstack-clash-protection prologue neglects %esp change)
PR target/84128
	* config/i386/i386.c (release_scratch_register_on_entry): Add new
	OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
	the scratch if RELEASE_VIA_POP is false.
	(ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
	If we have to save a temporary register, decrement SIZE appropriately.
	Pass new arguments to release_scratch_register_on_entry.
	(ix86_adjust_stack_and_probe): Likewise.
	(ix86_emit_probe_stack_range): Pass new arguments to
	release_scratch_register_on_entry.

	PR target/84128
	* gcc.target/i386/pr84128.c: New test.

From-SVN: r257303
2018-02-01 09:22:56 -07:00
Uros Bizjak
ff814010dd re PR rtl-optimization/84157 ([nvptx] ICE: RTL check: expected code 'reg', have 'lshiftrt')
PR rtl-optimization/84157
	* combine.c (change_zero_ext): Use REG_P predicate in
	front of HARD_REGISTER_P predicate.

From-SVN: r257302
2018-02-01 17:04:18 +01:00
Georg-Johann Lay
19416210b3 avr.c (avr_option_override): Move disabling of -fdelete-null-pointer-checks to...
gcc/
	* config/avr/avr.c (avr_option_override): Move disabling of
	-fdelete-null-pointer-checks to...
	* common/config/avr/avr-common.c (avr_option_optimization_table):
	...here.
testsuite/
	* gcc.dg/tree-ssa/vrp111.c (dg-options): Add
	-fdelete-null-pointer-checks.

From-SVN: r257301
2018-02-01 15:54:20 +00:00
Ian Lance Taylor
4d0bf3e1e1 compiler: omit field name for embedded fields in reflection string
This matches the gc compiler.
    
    The test case was sent for the master repo as
    https://golang.org/cl/91138.
    
    Fixes golang/go#23620
    
    Reviewed-on: https://go-review.googlesource.com/91139

From-SVN: r257300
2018-02-01 15:54:04 +00:00
Ian Lance Taylor
fc876f22b3 net: declare lib_getaddrinfo as returning int32
Otherwise on a 64-bit system we will read the 32-bit value as a 64-bit
    value.  Since getaddrinfo returns negative numbers as error values,
    these will be interpreted as numbers like 0xfffffffe rather than -2,
    and the comparisons with values like syscall.EAI_NONAME will fail.
    
    Fixes golang/go#23645
    
    Reviewed-on: https://go-review.googlesource.com/91296

From-SVN: r257299
2018-02-01 15:49:53 +00:00