2016-10-07 Richard Biener <rguenther@suse.de>
* bitmap.c (bitmap_elem_to_freelist): Set indx to -1.
* bitmap.h (bmp_iter_set): When advancing to the next element
check that we didn't remove the current one.
(bmp_iter_and): Likewise.
(bmp_iter_and_compl): Likewise.
* tree-ssa.c (release_defs_bitset): Do not remove worklist bit
we currently iterate on but keep a one-level queue.
* sched-deps.c (remove_from_deps): Do not clear current bit
but keep a one-level queue.
From-SVN: r240859
PR tree-optimization/77664
* tree-ssa-reassoc.c (update_range_test): Also clear low and high
for the other ranges.
(optimize_range_tests_diff): Fix up formatting.
(optimize_range_tests_var_bound): New function.
(optimize_range_tests): Use it.
* gcc.dg/tree-ssa/pr77664.c: New test.
* gcc.dg/pr77664.c: New test.
From-SVN: r240858
2016-10-07 Richard Biener <rguenther@suse.de>
* gimple-low.c (lower_gimple_bind): Clear DECL_CHAIN of
vars in gimple_bind_vars but not in BLOCK_VARS.
From-SVN: r240855
During the lowering phase, the variable arguments to a varargs call are
packaged up into a temporary slice object; the storage for this slice
was being unconditionally allocated on the heap. Heap allocation is not
necessary, however, if the varargs call correspond to an "append", since
the append runtime routine only reads the slice storage (as opposed to
stashing away the storage pointer). Enhance the lowering code to keep
the slice storage on the stack for append() calls, to improve
performance.
Addresses issue golang/go#17304.
Reviewed-on: https://go-review.googlesource.com/30136
From-SVN: r240853
* config/rs6000/rs6000.c (rs6000_elf_asm_out_constructor)
(rs6000_elf_asm_out_destructor): increase size of buf to avoid
possible overflow.
From-SVN: r240852
* call.c (build_temp, convert_like_real): Don't re-copy
TARGET_EXPR. Handle packed fields.
(build_x_va_arg): Wrap it in a TARGET_EXPR.
(build_over_call): Add sanity check.
* cvt.c (early_elide_copy): New.
(ocp_convert): Use it.
* except.c (build_throw): Use it.
* init.c (get_nsdmi): Put back the TARGET_EXPR.
(expand_default_init): Call early_elide_copy.
* typeck.c (cp_build_modify_expr): Call early_elide_copy.
From-SVN: r240845
* doc/xml/manual/status_cxx2011.xml: Update status.
* include/std/scoped_allocator (__outer_allocator_t, __outermost_type):
New helpers for recursive OUTERMOST.
(__outermost): Use __outermost_type::_S_outermost.
(__do_outermost, scoped_allocator_adaptor::__outermost_type): Remove.
(scoped_allocator_adaptor::__outermost_alloc_traits): Use new
__outermost_type helper.
* testsuite/20_util/scoped_allocator/outermost.cc: New test.
From-SVN: r240844
PR tree-optimization/71661
* tree-cfgcleanup.c (remove_forwarder_block_with_phi): Handle case when
removal of a forwarder exposes a new natural loop.
PR tree-optimization/71661
* gcc.dg/tree-ssa/pr71661.c: New test.
From-SVN: r240836
2016-10-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/77855
* tree-ssa-pre.c (prune_clobbered_mems): Queue exprs to remove
instead of removing the current item while iterating over the set
which is not safe.
* gcc.dg/torture/pr77855.c: New testcase.
From-SVN: r240832
PR target/77759
* config/sparc/sparc.c (classify_data_t): Remove int_regs field.
(classify_registers): Don't set it
(function_arg_slotno): Don't initialize and test it. Tidy up.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r240830
* gcc.c: Set -fprofile-update=atomic when profiling is
enabled and -pthread is set. Warn when one combines
-pthread and -fprofile-update=single for an app using
profiling code.
From-SVN: r240828
There was a bug in the escape analysis that would cause
the slice implicitly created to hold varargs parameters to always
escape, as well as the appended to slice argument. The intended
behavior was that the elements of the appendee and appended to
slice would escape to the heap. Alongside of these issues,
the varargs slice would also have a chance to be initialized to an
invalid memory location if it were stack-allocated. This has been
fixed as well.
Reviewed-on: https://go-review.googlesource.com/30450
From-SVN: r240826
2016-10-05 Steven G. Kargl <kargls@gcc.gnu.org>
PR fortran/58991
PR fortran/58992
* resolve.c (resolve_assoc_var): Fix CHARACTER type-spec for a
selector in ASSOCIATE.
(resolve_fl_variable): Skip checks for an ASSOCIATE variable.
2016-10-05 Steven G. Kargl <kargls@gcc.gnu.org>
PR fortran/58991
PR fortran/58992
* gfortran.dg/associate_22.f90: New test.
From-SVN: r240812
2016-10-05 Fritz Reese <fritzoreese@gmail.com>
Fix ICE due to comparison between UNION components.
gcc/fortran/
* interface.c (gfc_compare_types): Don't compare BT_UNION components
until we know they're both UNIONs.
* interface.c (gfc_compare_union_types): Guard against empty
components.
gcc/testsuite/gfortran.dg/
* dec_union_9.f90: New testcase.
* dec_union_10.f90: New testcase.
From-SVN: r240810
PR sanitizer/66343
* ubsan.c (ubsan_ids): New GTY(()) array.
(ubsan_type_descriptor, ubsan_create_data): Use ubsan_ids
instead of static local counters.
* gcc.dg/pch/pr66343-1.c: New test.
* gcc.dg/pch/pr66343-1.hs: New file.
* gcc.dg/pch/pr66343-2.c: New test.
* gcc.dg/pch/pr66343-2.hs: New file.
From-SVN: r240803
2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
conditional expression in boolean context when only one arm is
non-boolean.
testsuite:
2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-c++-common/Wint-in-bool-context.c: Update test.
From-SVN: r240799
2016-10-05 Louis Krupp <louis.krupp@zoho.com>
PR fortran/67524
* gfortran.dg/pr67524.f90: New test.
2016-10-05 Louis Krupp <louis.krupp@zoho.com>
PR fortran/67524
* resolve.c (resolve_symbol): Don't apply default type rules to
mixed-entry master created for function entry points.
From-SVN: r240797
PR sanitizer/77823
* c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
is not integral.
* c-c++-common/ubsan/shift-9.c: New test.
From-SVN: r240796
The test assumes ints are atleast 32 bits wide. For the avr
target, ints are 16 bits wide. This leads VRP to conclude
that a right shift by 9 followed by an equality comparison
to 0x74 can never be true. VRP eliminates the conditional, and
the code ends up unconditionally calling __builtin_abort.
Fixed the testcase to use __INT32_TYPE__ for targets with less
than 32 bit wide integers, wherever the size happens to be
significant.
gcc/testsuite/ChangeLog
2016-10-05 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/torture/pr69941.c: Use __INT32_TYPE__ instead
of int if __SIZEOF_INT__ is less than 4 bytes.
From-SVN: r240795