Jeff Law [Mon, 3 Oct 2016 19:37:08 +0000 (13:37 -0600)]
MAINTAINERS: Move several inactive maintainers to the write-after-approval section.
* MAINTAINERS: Move several inactive maintainers to the
write-after-approval section.
From-SVN: r240729
Jeff Law [Mon, 3 Oct 2016 19:28:24 +0000 (13:28 -0600)]
re PR tree-optimization/71550 (wrong code at -O3 on x86_64-linux-gnu)
PR tree-optimization/71550
PR tree-optimization/71403
* tree-ssa-threadbackward.c: Include tree-vectorizer.h
(profitable_jump_thread_path): Also return boolean indicating if
the realized path will create an irreducible loop.
Remove loop depth tests from 71403.
(fsm_find_control_statement_thread_paths): Remove loop depth tests
from 71403. If threading will create an irreducible loop, then
throw away loop iteration and related information.
PR tree-optimization/71550
PR tree-optimization/71403
* gcc.c-torture/execute/pr71550.c: New test.
From-SVN: r240727
Ian Lance Taylor [Mon, 3 Oct 2016 18:39:54 +0000 (18:39 +0000)]
re PR go/77809 ("_LITTLE_ENDIAN" redefined)
PR go/77809
libgo: strip most C macros from runtime.inc
The Go runtime package is picking up C macros from runtime_sysinfo.go
and then re-exporting them to runtime.inc. This can cause name
conflicts. Change the Makefile so that we only put the macros we need
into runtime.inc. These are the constants that are actually defined by
Go code, not runtime_sysinfo.go. There are only a few, so we can
pattern match.
This is an additional hack on runtime.inc. The long term goal is to
convert the runtime package to Go and eliminate runtime.inc entirely, so
a few hacks seem acceptable.
Fixes GCC PR 77809.
Reviewed-on: https://go-review.googlesource.com/30167
From-SVN: r240724
Jonathan Wakely [Mon, 3 Oct 2016 17:01:10 +0000 (18:01 +0100)]
Define std::gcd and std::lcm for C++17
* doc/xml/manual/status_cxx2017.xml: Update gcd/lcm status.
* doc/html/*: Regenerate.
* include/experimental/numeric (__abs): Move to <numeric>.
(gcd, lcm): Use __detail::gcd and __detail::lcm.
* include/std/numeric (__detail::__abs_integral)
(__detail::__gcd, __detail::__lcm): Define.
(gcd, lcm): Define for C++17.
* testsuite/26_numerics/gcd/1.cc: New test.
* testsuite/26_numerics/lcm/1.cc: New test.
* testsuite/experimental/numeric/gcd.cc: Swap contents with ...
* testsuite/experimental/numeric/lcd.cc: ... this.
From-SVN: r240723
Uros Bizjak [Mon, 3 Oct 2016 15:51:33 +0000 (17:51 +0200)]
configure.ac (strict_warn): Merge -Wmissing-format-attribute and -Woverloaded-virtual checks for warning...
* configure.ac (strict_warn): Merge -Wmissing-format-attribute and
-Woverloaded-virtual checks for warning options.
* configure: Regenerate.
From-SVN: r240721
Jonathan Wakely [Mon, 3 Oct 2016 14:35:28 +0000 (15:35 +0100)]
Fix libstdc++ versioned namespace build
PR libstdc++/68323
PR libstdc++/77794
* config/abi/pre/gnu-versioned-namespace.ver: Add exports for
__cxa_thread_atexit and __gnu_cxx::__freeres.
* include/Makefile.am: Add <experimental/bits/lfts_config.h>
* include/Makefile.in: Regenerate.
* include.bits/basic_string.h: Fix nesting of versioned namespaces.
* include/bits/c++config: Declare versioned namespaces for literals.
* include/bits/regex.h (basic_regex, match_results): Add workarounds
for PR c++/59256.
* include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
* include/std/chrono: Likewise.
* include/std/complex: Likewise.
* include/std/string_view: Likewise.
* include/std/variant: Likewise. Add workaround for PR c++/59256.
* include/experimental/bits/fs_fwd.h: Declare versioned namespace.
* include/experimental/bits/lfts_config.h: Declare versioned
namespaces.
* include/experimental/algorithm: Include
<experimental/bits/lfts_config.h>.
* include/experimental/any: Likewise.
* include/experimental/bits/erase_if.h: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/memory_resource: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/random: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/utility: Likewise.
* include/experimental/string_view: Likewise. Fix nesting of
versioned namespaces.
* include/experimental/bits/string_view.tcc: Reopen inline namespace
for non-inline function definitions.
* testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
* testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
* testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
Likewise.
* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
* testsuite/experimental/propagate_const/requirements5.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.
From-SVN: r240714
Bernd Edlinger [Mon, 3 Oct 2016 14:05:46 +0000 (14:05 +0000)]
re PR preprocessor/77699 (suspicious code in get_next_line)
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR preprocessor/77699
* input.c (maybe_grow): Don't allocate one byte extra headroom.
(get_next_line): Return false on error.
(read_next_line): Removed, use get_next_line instead.
(read_line_num): Don't copy the line.
(location_get_source_line): Don't use static data.
(selftest::test_reading_source_line): Add more test cases.
From-SVN: r240713
Senthil Kumar Selvaraj [Mon, 3 Oct 2016 12:08:27 +0000 (12:08 +0000)]
Fix failing gcc.target/avr/torture/builtins_error.c
The compiler defaults to thin LTO objects if built with linker plugin
support, and in that case, the error expected by the testcase appears
only at link time, if at all. Forcing fat LTO object file creation
generates the error consistently at compile time, as expected.
gcc/testsuite/ChangeLog:
2016-10-03 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.target/avr/torture/builtins-error.c: Add -ffat-lto-objects
option.
From-SVN: r240711
Jonathan Wakely [Mon, 3 Oct 2016 11:50:46 +0000 (12:50 +0100)]
Ensure "C++" language linkage for std::abs overloads
PR libstdc++/77814
* include/bits/std_abs.h: Use "C++" language linkage.
* testsuite/17_intro/headers/c++2011/linkage.cc: Move <complex.h> to
the end. Add <stdalign.h>.
From-SVN: r240710
Ville Voutilainen [Mon, 3 Oct 2016 11:06:53 +0000 (14:06 +0300)]
re PR libstdc++/77802 (Boost Fiber doesn't compile)
PR libstdc++/77802
* testsuite/20_util/tuple/77802.cc: New.
Revert:
2016-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
Implement LWG 2729 for tuple.
* include/std/tuple (_Tuple_impl(_Tuple_impl&&)):
Suppress conditionally.
(_Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&&)): Likewise.
(__is_tuple_impl_trait_impl, __is_tuple_impl_trait): New.
(_Tuple_impl(const _Head&)): Constrain.
(_Tuple_impl(_UHead&&)): Likewise.
(_Tuple_impl(_Tuple_impl&&)): Suppress conditionally.
(_Tuple_impl(const _Tuple_impl<_Idx, _UHead>&)): Constrain.
(_Tuple_impl(_Tuple_impl<_Idx, _UHead>&&)): Likewise.
(operator=(const tuple&)): Enable conditionally.
(operator=(tuple&&)): Suppress conditionally.
(operator=(const tuple<_UElements...>&)): Constrain.
(operator=(tuple<_UElements...>&&)): Likewise.
(operator=(const tuple&)): Enable conditionally (2-param tuple).
(operator=(tuple&&)): Suppress conditionally (2-param tuple).
(operator=(const tuple<_U1, _U2>&)): Constrain.
(operator=(tuple<_U1, _U2>&&)): Likewise.
(operator=(const pair<_U1, _U2>&)): Likewise.
(operator=(pair<_U1, _U2>&&)): Likewise.
* testsuite/20_util/tuple/element_access/get_neg.cc: Adjust.
* testsuite/20_util/tuple/tuple_traits.cc: New.
From-SVN: r240709
Kyrylo Tkachov [Mon, 3 Oct 2016 09:28:28 +0000 (09:28 +0000)]
Revert: [RTL ifcvt] Transform (X == CST) ? -CST : Y into (X == CST) ? -X : Y when conditional negation is available
Revert
2016-09-30 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* ifcvt.c (noce_try_avoid_const_materialization): New function.
(noce_process_if_block): Use it.
* gcc.target/aarch64/ifcvt_avoid_const_materialization_1.c: New test.
From-SVN: r240708
Marek Polacek [Mon, 3 Oct 2016 08:10:43 +0000 (08:10 +0000)]
Core 903
Core 903
* typeck.c (cp_build_binary_op): Pass original operands to
null_ptr_cst_p, not those after the default conversions.
* g++.dg/cpp0x/nullptr37.C: New test.
From-SVN: r240707
Bernd Edlinger [Mon, 3 Oct 2016 08:00:21 +0000 (08:00 +0000)]
invoke.texi: Update -Wint-in-bool-context.
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* doc/invoke.texi: Update -Wint-in-bool-context.
c-family:
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn for suspicious
left shift in boolean context.
cp:
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* parser.c (cp_parser_condition): Fix a warning.
testsuite:
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-c++-common/Wint-in-bool-context.c: Update test.
From-SVN: r240706
GCC Administrator [Mon, 3 Oct 2016 00:16:19 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r240705
Jakub Jelinek [Sun, 2 Oct 2016 19:32:45 +0000 (21:32 +0200)]
asm3.C (two): Only use register keyword for C++14 and earlier.
* g++.dg/ext/asm3.C (two): Only use register keyword for C++14 and
earlier.
* g++.dg/charset/asm2.c (memmove): Likewise.
* g++.dg/tls/diag-2.C (foo): Expect -Wregister error for C++17.
* g++.dg/tls/diag-4.C (foo): Likewise.
* c-c++-common/vector-subscript-2.c (vf): Change dg-error to
dg-warning, fix up regex.
* g++.old-deja/g++.brendan/warnings4.C: Limit to c++14_down targets.
* g++.old-deja/g++.mike/p700.C: Add -Wno-register.
* g++.old-deja/g++.mike/net31.C: Likewise.
* g++.old-deja/g++.other/regstack.C (foo): Expect -Wregister warning
for C++17.
* g++.old-deja/g++.jason/enum3.C: Add -Wno-register.
* g++.old-deja/g++.eh/ia64-1.C: Likewise.
From-SVN: r240702
Jakub Jelinek [Sun, 2 Oct 2016 19:31:57 +0000 (21:31 +0200)]
dwarf2out.c (output_fde, [...]): Use MAX_ARTIFICIAL_LABEL_BYTES as char array sizes for...
* dwarf2out.c (output_fde, output_call_frame_info,
dwarf2out_do_cfi_startproc, set_indirect_string,
gen_internal_sym, output_die, output_line_info): Use
MAX_ARTIFICIAL_LABEL_BYTES as char array sizes for
ASM_GENERATE_INTERNAL_LABEL output.
From-SVN: r240701
GCC Administrator [Sun, 2 Oct 2016 00:16:22 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r240699
Richard Biener [Sat, 1 Oct 2016 14:34:18 +0000 (14:34 +0000)]
re PR middle-end/77798 (465.tonto ICE with trunk with -O2)
2016-10-01 Richard Biener <rguenther@suse.de>
PR middle-end/77798
* genmatch.c (get_operand_type): Add operand position arg
and handle COND_EXPR comparison operand with fixed boolean_type_node.
(expr::gen_transform): Adjust.
(dt_simplify::gen_1): Likewise.
* gfortran.fortran-torture/compile/pr77798.f90: New testcase.
From-SVN: r240696
Andre Vehreschild [Sat, 1 Oct 2016 14:00:57 +0000 (16:00 +0200)]
re PR libfortran/77663 (libgfortran/caf/single.c: three minor problems and a lost token)
gcc/testsuite/ChangeLog:
2016-10-01 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/77663
* gfortran.dg/coarray_send_by_ref_1.f08: New test.
libgfortran/ChangeLog:
2016-10-01 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/77663
* caf/single.c (caf_internal_error): Fix not terminating va-list.
(_gfortran_caf_register): Free memory also when other allocs failed.
(_gfortran_caf_get_by_ref): Fixed style.
(send_by_ref): Token is now stored at the correct position preventing
inaccessible tokens, memory loss and possibly crashes.
From-SVN: r240695
Jakub Jelinek [Sat, 1 Oct 2016 08:41:52 +0000 (10:41 +0200)]
sse.md (<mask_codefor><code><mode>): Add FALLTHRU comments.
* config/i386/sse.md (<mask_codefor><code><mode>): Add FALLTHRU
comments. Simplify asserts, remove unnecessary conditions.
Formatting fixes.
(*<code><mode>3): Likewise.
From-SVN: r240694
GCC Administrator [Sat, 1 Oct 2016 00:16:14 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r240691
Jakub Jelinek [Fri, 30 Sep 2016 23:43:49 +0000 (01:43 +0200)]
re PR c/77490 (bit-not (~) on boolean should be warned about)
PR c/77490
* c-c++-common/Wbool-operation-1.c: Add -Wno-psabi to dg-options.
Add dg-prune-output directive.
From-SVN: r240688
Jerry DeLisle [Fri, 30 Sep 2016 23:19:58 +0000 (23:19 +0000)]
re PR fortran/66643 (Missing compilation error for formatted data transfer without format)
2016-09-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/66643
* io.c (match_dt_unit): Peek check for missing format.
* gfortran.fortran-torture/compile/arrayio.f90: Update test.
* gfortran.fortran-torture/compile/write.f90: Update test.
From-SVN: r240686
Jakub Jelinek [Fri, 30 Sep 2016 22:47:29 +0000 (00:47 +0200)]
* doc/invoke.texi (-Wregister): Document.
From-SVN: r240685
Jakub Jelinek [Fri, 30 Sep 2016 22:46:39 +0000 (00:46 +0200)]
configure.ac: Add target-libffi to target_libraries.
* configure.ac: Add target-libffi to target_libraries.
Readd libgcj target disablings, modified to only target-libffi.
Readd target addition of go to unsupported languages.
* configure: Regenerated.
From-SVN: r240684
Bernd Edlinger [Fri, 30 Sep 2016 18:57:49 +0000 (18:57 +0000)]
configure.ac: Split CHECKING_P into CHECKING_P and ENABLE_EXTRA_CHECKING.
2016-09-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
* configure.ac: Split CHECKING_P into CHECKING_P and
ENABLE_EXTRA_CHECKING.
* configure: Regenerated.
* config.in: Adjust commment of CHECKING_P. Add ENABLE_EXTRA_CHECKING.
* common.opt (flag_checking): Use CHECKING_P and ENABLE_EXTRA_CHECKING.
From-SVN: r240677
Steve Ellcey [Fri, 30 Sep 2016 18:35:41 +0000 (18:35 +0000)]
MAINTAINERS: Update email address.
2016-09-30 Steve Ellcey <sellcey@caviumnetworks.com>
* MAINTAINERS: Update email address.
From-SVN: r240675
Jonathan Wakely [Fri, 30 Sep 2016 18:28:53 +0000 (19:28 +0100)]
libstdc++/77795 Only declare ::gets for C++98 and C++11
PR libstdc++/77795
* acinclude.m4 (GLIBCXX_CHECK_STDIO_PROTO): Use -std=gnu++11 to check
for gets.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/c_global/cstdio [!_GLIBCXX_HAVE_GETS] (gets): Only declare
for C++98 and C++11.
* include/c_std/cstdio [!_GLIBCXX_HAVE_GETS] (gets): Likewise.
* testsuite/27_io/headers/cstdio/functions_neg.cc: New test.
From-SVN: r240672
Prasad Ghangal [Fri, 30 Sep 2016 17:21:26 +0000 (17:21 +0000)]
re PR other/31566 (@missing_file gives bad error message)
PR other/31566
* gcc.c (process_command): For @filename handling, output
the correct name if the file does not exist.
From-SVN: r240669
Marek Polacek [Fri, 30 Sep 2016 16:52:53 +0000 (16:52 +0000)]
* config/alpha/predicates.md: Adjust fall through comment.
From-SVN: r240667
Andrew Haley [Fri, 30 Sep 2016 16:46:27 +0000 (16:46 +0000)]
Fix typo in ChangeLog.
From-SVN: r240666
Andrew Haley [Fri, 30 Sep 2016 16:43:34 +0000 (16:43 +0000)]
MAINTAINERS: Remove Per Bothner, Andrew Haley, and Tom Tromey rom write-after approval.
2016-09-30 Andrew Haley <aph@redhat.com>
* MAINTAINERS: Remove Per Bothner, Andrew Haley, and Tom Tromey rom
write-after approval. Remove Tom Tromey and Bryce McKinlay from
libgcj.
From-SVN: r240665
Tadek Kijkowski [Fri, 30 Sep 2016 16:36:18 +0000 (16:36 +0000)]
check.tpl: Convert line endings to unix on test outputs
2016-09-30 Tadek Kijkowski <tkijkowski@gmail.com>
* check.tpl: Convert line endings to unix on test outputs
* fixfixes.c: Fixed passing file name to apply_fix when
SEPARATE_FIX_PROC is defined
* fixincl.c: Use system_with_shell, fixes for MinGW and DJGPP
* fixlib.c, fixlib.h: Added system_with_shell and fix_path_separators
From-SVN: r240664
Andrew Haley [Fri, 30 Sep 2016 16:31:40 +0000 (16:31 +0000)]
MAINTAINERS: Move Per Bothner...
2016-09-30 Andrew Haley <aph@redhat.com>
* MAINTAINERS: Move Per Bothner, Andrew Haley, and Tom Tromey to
write-after approval after GCJ deletion.
From-SVN: r240663
Andrew Haley [Fri, 30 Sep 2016 16:24:48 +0000 (16:24 +0000)]
Makefile.def: Remove libjava.
2016-09-30 Andrew Haley <aph@redhat.com>
* Makefile.def: Remove libjava.
* Makefile.tpl: Likewise.
* Makefile.in: Regenerate.
* configure.ac: Likewise.
* configure: Likewise.
* gcc/java: Remove.
* libjava: Likewise.
From-SVN: r240662
Andrew Haley [Fri, 30 Sep 2016 16:08:23 +0000 (16:08 +0000)]
Makefile.def: Remove libjava.
2016-09-05 Andrew Haley <aph@redhat.com>
* Makefile.def: Remove libjava.
* Makefile.tpl: Likewise.
* Makefile.in: Regenerate.
* configure.ac: Likewise.
* configure: Likewise.
From-SVN: r240661
Jonathan Wakely [Fri, 30 Sep 2016 16:07:43 +0000 (17:07 +0100)]
Implement LWG 2192 and LWG 2294 for std::abs
* doc/xml/manual/intro.xml: Document LWG 2192 changes.
* doc/html/*: Regenerate.
* include/Makefile.am: Add bits/std_abs.h.
* include/Makefile.in: Regenerate.
* include/bits/std_abs.h: New header defining all required overloads
of std::abs in one place (LWG 2294).
* include/c_global/cmath (abs(double), abs(float), abs(long double)):
Move to bits/std_abs.h.
(abs<_Tp>(_Tp)): Remove.
* include/c_global/cstdlib (abs(long), abs(long long), abs(__int<N>)):
Move to bits/std_abs.h.
* testsuite/26_numerics/headers/cmath/dr2192.cc: New test.
* testsuite/26_numerics/headers/cmath/dr2192_neg.cc: New test.
* testsuite/26_numerics/headers/cstdlib/dr2192.cc: New test.
* testsuite/26_numerics/headers/cstdlib/dr2192_neg.cc: New test.
From-SVN: r240660
Ian Lance Taylor [Fri, 30 Sep 2016 13:45:08 +0000 (13:45 +0000)]
runtime: copy internal locking code from Go 1.7 runtime
Remove the old locking code written in C.
Add a shell script mkrsysinfo.sh to generate the runtime_sysinfo.go
file, so that we can get Go copies of the system time structures and
other types.
Tweak the compiler so that when compiling the runtime package the
address operator does not cause local variables to escape. When the gc
compiler compiles the runtime, an escaping local variable is treated as
an error. We should implement that, instead of this change, when escape
analysis is turned on.
Tweak the compiler so that the generated C header does not include names
that start with an underscore followed by a non-upper-case letter,
except for the special cases of _defer and _panic. Otherwise we
translate C types to Go in runtime_sysinfo.go and then generate those Go
types back as C types in runtime.inc, which is useless and painful for
the C code.
Change entersyscall and friends to take a dummy argument, as the gc
versions do, to simplify calls from the shared code.
Reviewed-on: https://go-review.googlesource.com/30079
From-SVN: r240657
Jonathan Wakely [Fri, 30 Sep 2016 13:43:37 +0000 (14:43 +0100)]
Remove use of std::abs in experimental::{gcd,lcm}
PR libstdc++/77801
* include/experimental/numeric: Include <numeric>.
(__abs): Define.
(gcd, lcm): Use __abs instead of std::abs.
* testsuite/experimental/numeric/77801.cc: New test.
* testsuite/experimental/numeric/gcd.cc: Test unsigned inputs.
* testsuite/experimental/numeric/lcm.cc: Likewise.
From-SVN: r240656
Matthew Wahab [Fri, 30 Sep 2016 13:25:04 +0000 (13:25 +0000)]
[Testsuite] Use correct effective-target settings for ARM fp16-aapcs tests.
2016-09-30 Matthew Wawhab <matthew.wahab@arm.com>
* gcc.target/arm/fp16-aapcs-3.c: Replace arm_fp16_ok with
arm_fp16_alternative_ok as the required effective target.
* gcc.target/arm/fp16-aapcs-4.c: Likewise. Also add
-mfp16-format=alternative to the dg-options directive and remove
the dg-add-options directive.
From-SVN: r240655
Marek Polacek [Fri, 30 Sep 2016 11:49:32 +0000 (11:49 +0000)]
* config/aarch64/aarch64-simd.md: Adjust fall through comments.
From-SVN: r240653
Fritz Reese [Fri, 30 Sep 2016 11:42:31 +0000 (11:42 +0000)]
Fix ICE for maps with zero components.
2016-09-30 Fritz Reese <fritzoreese@gmail.com>
Fix ICE for maps with zero components.
PR fortran/77764
* gcc/fortran/interface.c (gfc_compare_union_types): Null-guard map
components.
PR fortran/77764
* gcc/testsuite/gfortran.dg/dec_union_8.f90: New testcase.
From-SVN: r240652
Fritz Reese [Fri, 30 Sep 2016 11:37:23 +0000 (11:37 +0000)]
Fix ICE caused by union types comparing equal to structures.
2016-09-30 Fritz Reese <fritzoreese@gmail.com>
Fix ICE caused by union types comparing equal to structures.
PR fortran/77782
* gcc/fortran/interface.c (gfc_compare_derived_types): Use
gfc_compare_union_types to compare union types.
PR fortran/77782
* gcc/testsuite/gfortran.dg/dec_structure_16.f90: New testcase.
From-SVN: r240651
Andre Vehreschild [Fri, 30 Sep 2016 10:20:59 +0000 (12:20 +0200)]
trans-array.c (gfc_array_allocate): Use the token from coarray's .token member.
gcc/fortran/ChangeLog:
2016-09-30 Andre Vehreschild <vehre@gcc.gnu.org>
* trans-array.c (gfc_array_allocate): Use the token from coarray's
.token member.
* trans-intrinsic.c (conv_expr_ref_to_caf_ref): Only generate
caf-reference chains from the first coarray references on.
* trans-types.c (gfc_get_derived_type): Switch on mandatory .token
member generation for allocatable arrays in coarrays in derived types.
gcc/testsuite/ChangeLog:
2016-09-30 Andre Vehreschild <vehre@gcc.gnu.org>
* gfortran.dg/coarray_allocate_10.f08: New test.
* gfortran.dg/coindexed_1.f90: Above fixes allow execution.
From-SVN: r240650
Kyrylo Tkachov [Fri, 30 Sep 2016 08:28:09 +0000 (08:28 +0000)]
[RTL ifcvt] Transform (X == CST) ? -CST : Y into (X == CST) ? -X : Y when conditional negation is available
* ifcvt.c (noce_try_avoid_const_materialization): New function.
(noce_process_if_block): Use it.
* gcc.target/aarch64/ifcvt_avoid_const_materialization_1.c: New test.
From-SVN: r240649
Martin Liska [Fri, 30 Sep 2016 08:24:47 +0000 (10:24 +0200)]
Enhance documentation of asan-use-after-return param.
* doc/invoke.texi: Document asan-use-after-return that
it's disabled by default in runtime.
From-SVN: r240648
Richard Biener [Fri, 30 Sep 2016 07:09:28 +0000 (07:09 +0000)]
tree-vrp.c (intersect_ranges): If we failed to handle the intersection choose a constant singleton range if...
2016-09-30 Richard Biener <rguenther@suse.de>
* tree-vrp.c (intersect_ranges): If we failed to handle
the intersection choose a constant singleton range if available.
From-SVN: r240647
Richard Biener [Fri, 30 Sep 2016 07:06:16 +0000 (07:06 +0000)]
re PR tree-optimization/77399 (Poor code generation for vector casts and loads)
2016-09-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/77399
* tree-ssa-forwprop.c (simplify_vector_constructor): Handle
float <-> int conversions.
* gcc.dg/tree-ssa/forwprop-35.c: New testcase.
From-SVN: r240646
Sandra Loosemore [Fri, 30 Sep 2016 02:15:51 +0000 (22:15 -0400)]
pr27336.c: Make dependency on -fdelete-null-pointer-checks explicit.
2016-09-29 Sandra Loosemore <sandra@codesourcery.com>
gcc/testsuite/
* c-c++-common/pr27336.c: Make dependency on
-fdelete-null-pointer-checks explicit.
* g++.dg/cpp0x/constexpr-array-ptr10.C: Likewise.
* g++.dg/cpp0x/constexpr-nullptr-1.C: Likewise.
* g++.dg/lto/pr69589_0.C: Add nios2-*-elf to unsupported targets.
* gcc.dg/pic-1.c: Require fpic target support.
* gcc.dg/pic-2.c: Likewise.
From-SVN: r240644
GCC Administrator [Fri, 30 Sep 2016 00:16:18 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r240643
Alan Modra [Thu, 29 Sep 2016 21:36:10 +0000 (07:06 +0930)]
[RS6000] Revert rs6000_opt_vars change
Doubly wrong. Broke AIX bootstrap, and not updated for the
change in name.
* config/rs6000/rs6000.c (rs6000_opt_vars): Revert last change.
From-SVN: r240639
Jakub Jelinek [Thu, 29 Sep 2016 20:54:56 +0000 (22:54 +0200)]
Implement P0001R1 - C++17 removal of register storage class specifier c-family/
Implement P0001R1 - C++17 removal of register storage class specifier
c-family/
* c.opt (Wregister): New warning.
* c-opts.c (c_common_post_options): Enable -Wregister by
default for C++17.
cp/
* decl.c (cp_finish_decl): Diagnose register storage class
on vars except when used in GNU global or local register variable
extension.
(grokdeclarator): Diagnose register storage class on parameters.
* except.c (expand_start_catch_block): Set DECL_REGISTER only
after cp_finish_decl call.
testsuite/
* c-c++-common/Wvarargs-2.c (foo1): Except new warning for C++17.
* c-c++-common/vector-subscript-2.c (vf): Expect new error for
C++17.
* c-c++-common/vector-subscript-5.c (foo): Don't use register
keyword if not __SSE2__.
* c-c++-common/Wvarargs.c (foo1, foo3): Expect new warnings for
C++17.
* g++.dg/compat/struct-layout-1_generate.c (iterative_hash): Remove
register keywords.
* g++.dg/eh/pr29166.C: Add -Wno-register option.
* g++.dg/warn/register-parm-1.C (erroneous_warning,
no_erroneous_warning): Expect new warnings for C++17.
* g++.dg/warn/register-var-2.C (f): Likewise.
* g++.dg/parse/register1.C (f): Expect new error for C++17.
* g++.dg/parse/linkage2.C (foo): Likewise.
* g++.dg/torture/pr36826.C (CoinMin, CoinMax): Avoid register
keyword on parameters for C++17.
* g++.dg/cpp1z/register1.C: New test.
* g++.dg/cpp1z/register2.C: New test.
* g++.dg/cpp1z/register3.C: New test.
From-SVN: r240638
Uros Bizjak [Thu, 29 Sep 2016 20:49:58 +0000 (22:49 +0200)]
driver-i386.c (host_detect_local_cpu): Check maximum ext_level before calling CPUID with 0x80000008.
* config/i386/driver-i386.c (host_detect_local_cpu): Check maximum
ext_level before calling CPUID with 0x80000008.
Simplify xgetbv checks.
From-SVN: r240637
David Malcolm [Thu, 29 Sep 2016 19:01:41 +0000 (19:01 +0000)]
Machine-readable RTL dumps: print_rtx_function
gcc/ChangeLog:
* Makefile.in (OBJS): Add print-rtl-function.o.
* print-rtl-function.c: New file.
* print-rtl.h (print_rtx_function): New decl.
From-SVN: r240634
Uros Bizjak [Thu, 29 Sep 2016 18:55:26 +0000 (20:55 +0200)]
adx-check.h (main): Simplify feature bit tests.
* gcc.target/i386/adx-check.h (main): Simplify feature bit tests.
* gcc.target/i386/avx2-check.h (main): Ditto.
* gcc.target/i386/avx512bw-check.h (main): Ditto.
* gcc.target/i386/avx512cd-check.h (main): Ditto.
* gcc.target/i386/avx512dq-check.h (main): Ditto.
* gcc.target/i386/avx512er-check.h (main): Ditto.
* gcc.target/i386/avx512f-check.h (main): Ditto.
* gcc.target/i386/avx512ifma-check.h (main): Ditto.
* gcc.target/i386/avx512vbmi-check.h (main): Ditto.
* gcc.target/i386/avx512vl-check.h (main): Ditto.
From-SVN: r240631
Uros Bizjak [Thu, 29 Sep 2016 18:44:32 +0000 (20:44 +0200)]
re PR target/77756 (__get_cpuid() returns wrong values for level 7 (extended features))
PR target/77756
* config/i386/cpuid.h (__get_cpuid_count): New.
(__get_cpuid): Rename __level to __leaf.
testsuite/ChangeLog:
PR target/77756
* gcc.target/i386/pr77756.c: New test.
From-SVN: r240629
Marek Polacek [Thu, 29 Sep 2016 16:28:38 +0000 (16:28 +0000)]
* genattrtab.c (write_attr_case): Also emit FALLTHRU marker.
From-SVN: r240626
Bernd Schmidt [Thu, 29 Sep 2016 16:21:20 +0000 (11:21 -0500)]
builtins.c (expand_builtin_memcmp): don't swap args unless result is only being compared with zero.
2016-09-29 Bernd Schmidt <bschmidt@redhat.com>
* builtins.c (expand_builtin_memcmp): don't swap args unless
result is only being compared with zero.
From-SVN: r240625
Marek Polacek [Thu, 29 Sep 2016 16:04:17 +0000 (16:04 +0000)]
rtti.c (involves_incomplete_p): Add fall through comment.
* rtti.c (involves_incomplete_p): Add fall through comment.
* dwarf2out.c (loc_descriptor): Add fall through comment.
(add_const_value_attribute): Likewise.
From-SVN: r240624
Ville Voutilainen [Thu, 29 Sep 2016 15:20:28 +0000 (18:20 +0300)]
Make optional::reset noexcept, make optional::value work in constant expressions.
Make optional::reset noexcept, make optional::value
work in constant expressions.
* include/std/optional (_M_get): Make constexpr.
(reset): Make noexcept.
* testsuite/20_util/optional/assignment/7.cc: New.
* testsuite/20_util/optional/observers/6.cc: New.
From-SVN: r240623
Matthew Wahab [Thu, 29 Sep 2016 13:50:55 +0000 (13:50 +0000)]
[ARM] Fix new constraints and attributes of SI/HI data movement patterns
* config/arm/arm.md (*arm_movsi_insn): Replace "t2" arch attribute
with "v6t2". Move "arch" attribute above "pool_range".
* config/arm/vfp.md (*arm_movhi_vfp): Replace "t2" arch attribute
with "v6t2".
(*thumb2_movhi_vfp): Likewise.
(*arm_movhi_fp16): Likewise.
(*thumb2_movhi_fp16): Likewise.
(*arm_movsi_vfp): Remove "arch" attribute.
(*thumb2_movsi_vfp): Likewise.
From-SVN: r240622
Marek Polacek [Thu, 29 Sep 2016 13:27:48 +0000 (13:27 +0000)]
* g++.dg/cpp0x/fallthrough2.C: Use the c++14_down target.
From-SVN: r240621
Jonathan Wakely [Thu, 29 Sep 2016 13:25:48 +0000 (14:25 +0100)]
Define C++17 std::hypot without _GLIBCXX_USE_C99_MATH_TR1
* include/c_global/cmath (hypot, __hypot3): Move C++17 overloads
outside _GLIBCXX_USE_C99_MATH_TR1 condition.
From-SVN: r240620
Marek Polacek [Thu, 29 Sep 2016 13:15:21 +0000 (13:15 +0000)]
fallthrough2.C: Only expect the warning in C++11 and C++14.
* g++.dg/cpp0x/fallthrough2.C: Only expect the warning in C++11 and
C++14.
From-SVN: r240619
Martin Liska [Thu, 29 Sep 2016 12:58:28 +0000 (14:58 +0200)]
objc: update documetation and add test-case of
* doc/extend.texi: Remove limitation of Objective C for
__attribute__((constructor)) and __attribute__((destructor)).
* objc/execute/construct1.m: New test.
From-SVN: r240618
Richard Biener [Thu, 29 Sep 2016 12:31:02 +0000 (12:31 +0000)]
re PR bootstrap/77768 (LTO/PGO -O3 bootstrap broken: tree-vrp.c:11053:0: internal compiler error: Segmentation fault)
2016-09-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/77768
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
Handle stores to readonly memory when removing redundant stores.
* gcc.dg/torture/pr77768.c: New testcase.
From-SVN: r240617
Richard Biener [Thu, 29 Sep 2016 12:28:19 +0000 (12:28 +0000)]
re PR middle-end/77407 (Optimize integer i / abs (i) into the sign of i)
2016-09-29 Richard Biener <rguenther@suse.de>
PR middle-end/77407
* match.pd: Add X / abs (X) -> X < 0 ? -1 : 1 and
X / -X -> -1 simplifications.
* gcc.dg/pr77407.c: New testcase.
From-SVN: r240616
Richard Biener [Thu, 29 Sep 2016 12:27:19 +0000 (12:27 +0000)]
re PR middle-end/55152 (MAX_EXPR(a,-a) is really ABS_EXPR(a))
2016-09-29 Richard Biener <rguenther@suse.de>
PR middle-end/55152
* match.pd: Add max(a,-a) -> abs(a) pattern.
* tree-ssa-phiopt.c (minmax_replacement): Disable for
HONOR_SIGNED_ZEROS types.
* gcc.dg/pr55152.c: New testcase.
* gcc.dg/tree-ssa/phi-opt-5.c: Adjust.
From-SVN: r240615
James Greenhalgh [Thu, 29 Sep 2016 08:41:34 +0000 (08:41 +0000)]
[Patch] Remove all uses of TARGET_FLT_EVAL_METHOD_NON_DEFAULT and poison it
I'm going to hookize TARGET_FLT_EVAL_METHOD, so the current definition
of TARGET_FLT_EVAL_METHOD_NON_DEFAULT will stop working.
The relaxation enabled by TARGET_FLT_METHOD_NON_DEFAULT isn't portable,
and keeping it in place is tricky, so this patch removes it, and poisons
TARGET_FLT_EVAL_METHOD_NON_DEFAULT in system.h to prevent future use.
gcc/
* defaults.h (TARGET_FLT_EVAL_METHOD_NON_DEFAULT): Remove.
* system.h (TARGET_FLT_EVAL_METHOD_NON_DEFAULT): Poison.
gcc/c-family/
* c-opts.c (c_common_post_options): Remove special case for
TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
in C++.
gcc/java/
* lang.c (java_post_options): Remove special case for
TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
gcc/fortran/
* options.c (gfc_post_options): Remove special case for
TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
gcc/ada/
* gcc-interface/misc.c (gnat_post_options): Remove special case for
TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
From-SVN: r240614
Rainer Orth [Thu, 29 Sep 2016 08:39:04 +0000 (08:39 +0000)]
Fix 64-bit gcc.dg/profile-update-warning.c on 32-bit-default x86
* gcc.dg/profile-update-warning.c: Restrict to ia32.
(dg-options): Remove -m32.
From-SVN: r240613
Richard Biener [Thu, 29 Sep 2016 07:20:13 +0000 (07:20 +0000)]
tree-vrp.c (set_defs_to_varying): New helper avoiding writing to vr_const_varying.
2016-09-29 Richard Biener <rguenther@suse.de>
* tree-vrp.c (set_defs_to_varying): New helper avoiding
writing to vr_const_varying.
(vrp_initialize): Call it.
(vrp_visit_stmt): Likewise.
(evrp_dom_walker::before_dom_children): Likewise.
From-SVN: r240612
Richard Biener [Thu, 29 Sep 2016 07:16:10 +0000 (07:16 +0000)]
tree-vect-stmts.c (vectorizable_load): Avoid emitting vector constructors with vector elements.
2016-09-29 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (vectorizable_load): Avoid emitting vector
constructors with vector elements.
From-SVN: r240611
Richard Biener [Thu, 29 Sep 2016 07:15:13 +0000 (07:15 +0000)]
re PR bootstrap/77768 (LTO/PGO -O3 bootstrap broken: tree-vrp.c:11053:0: internal compiler error: Segmentation fault)
2016-09-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/77768
* tree-ssa-sccvn.c (visit_reference_op_store): Properly deal
with stores to a place we know has a constant value.
From-SVN: r240610
Ian Lance Taylor [Thu, 29 Sep 2016 00:56:44 +0000 (00:56 +0000)]
runtime: copy runtime.go and runtime1.go from Go 1.7
Also copy over cputicks.go, env_posix.go, vdso_none.go, stubs2.go, and a
part of os_linux.go. Remove the corresponding functions from the C code
in libgo/go/runtime. Add some transitional support functions to
stubs.go. This converts several minor functions from C to Go.
Reviewed-on: https://go-review.googlesource.com/29962
From-SVN: r240609
GCC Administrator [Thu, 29 Sep 2016 00:16:15 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r240607
Alan Modra [Wed, 28 Sep 2016 22:03:17 +0000 (07:33 +0930)]
Disable .gnu.attributes tags in compatibility-ldbl.o
compatibility-ldbl.o is compiled with -mlong-double-64. When
long double .gnu.attributes tags are checked by the linker, it
complains about the mismatch between this file and others in
libstdc++.
* configure.ac (LONG_DOUBLE_COMPAT_FLAGS): New ACSUBST.
* src/Makefile.am (compatibility-ldbl.o, compatibility-ldbl.lo):
Use LONG_DOUBLE_COMPAT_FLAGS.
* Makefile.in: Regenerate.
* configure: Regenerate.
* doc/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
* python/Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* src/c++11/Makefile.in: Regenerate.
* src/c++98/Makefile.in: Regenerate.
* src/filesystem/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
From-SVN: r240602
Alan Modra [Wed, 28 Sep 2016 22:01:48 +0000 (07:31 +0930)]
[RS6000] .gnu.attributes Tag_GNU_Power_ABI_FP
Extend this attribute to cover long double ABIs, for 64-bit too.
This patch also corrects an error that crept in to code setting
rs6000_passes_float. See the added comment. Passing IEEE128 values
in vsx regs ought to set both Tag_GNU_Power_ABI_FP and
Tag_GNU_Power_ABI_Vector. Also adds a new option, default on, that
disables output of .gnu_attribute assembly directives.
* config/rs6000/sysv4.opt (mgnu-attribute): New option.
* doc/invoke.texi: Document it.
* config/rs6000/rs6000.c (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): Define.
(rs6000_passes_float): Comment.
(rs6000_passes_long_double): New static var.
(call_ABI_of_interest): Return false unless rs6000_gnu_attr is set.
(init_cumulative_args): Set up to emit fp .gnu_attribute for
ELF 64-bit ABIs as well as 32-bit ELF. Correct rs6000_passes_float
to include fp values returned in vectors.
Set rs6000_passes_long_double.
(rs6000_function_arg_advance_1): Likewise for function args.
(rs6000_elf_file_end): Emit fp .gnu_attribute for ELF 64-bit ABIs,
and SPE. Emit long double tag value too.
(rs6000_opt_vars): Add gnu-attr.
* configure.ac (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): New ppc32 test.
* configure: Regenerate.
* config.in: Regenerate.
From-SVN: r240601
Jakub Jelinek [Wed, 28 Sep 2016 21:52:53 +0000 (23:52 +0200)]
gimple-ssa-sprintf.c (pass_sprintf_length::gate): Use x > 0 instead of 0 < x.
* gimple-ssa-sprintf.c (pass_sprintf_length::gate): Use x > 0 instead
of 0 < x.
(format_floating, format_string, format_directive,
get_destination_size, pass_sprintf_length::handle_gimple_call):
Likewise.
From-SVN: r240600
Uros Bizjak [Wed, 28 Sep 2016 21:29:47 +0000 (23:29 +0200)]
re PR target/77756 (__get_cpuid() returns wrong values for level 7 (extended features))
PR target/77756
* config/i386/cpuid.h (__get_cpuid): Handle CPUID level >= 7.
testsuite/ChangeLog:
PR target/77756
* gcc.target/i386/pr77756.c: New test.
From-SVN: r240597
Martin Sebor [Wed, 28 Sep 2016 19:51:08 +0000 (19:51 +0000)]
PR middle-end/77721 - -Wformat-length not uses arg range for converted vars
gcc/testsuite/ChangeLog:
PR middle-end/77721
* gcc.dg/tree-ssa/builtin-sprintf-warn-6.c: New test.
From-SVN: r240595
Jakub Jelinek [Wed, 28 Sep 2016 19:47:04 +0000 (21:47 +0200)]
gimple-ssa-sprintf.c: Fix comment formatting.
* gimple-ssa-sprintf.c: Fix comment formatting.
(format_integer): Use is_gimple_assign.
(pass_sprintf_length::handle_gimple_call): Use gimple_call_builtin_p
and gimple_call_fndecl. Reorder case BUILT_IN_SPRINTF_CHK. Fix up
BUILT_IN_SNPRINTF_CHK comment. Replace "to to" with "to" in comment.
(pass_sprintf_length::execute): Use is_gimple_call.
From-SVN: r240594
Jerry DeLisle [Wed, 28 Sep 2016 19:43:03 +0000 (19:43 +0000)]
re PR fortran/77707 (formatted direct access: nextrec off by one)
2016-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/77707
* gfortran.dg/inquire_17.f90: New test.
From-SVN: r240593
Jerry DeLisle [Wed, 28 Sep 2016 19:38:03 +0000 (19:38 +0000)]
re PR fortran/77707 (formatted direct access: nextrec off by one)
2016-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/77707
io/transfer.c (next_record): Flush before calculating next_record.
Correctly calculate.
From-SVN: r240592
Jakub Jelinek [Wed, 28 Sep 2016 19:21:47 +0000 (21:21 +0200)]
re PR c++/77467 (Segmentation fault with switch statement in constexpr function)
PR c++/77467
* constexpr.c (enum constexpr_switch_state): New.
(struct constexpr_ctx): Add css_state field.
(label_matches): Add CTX and STMT arguments, remove I and
DEFAULT_LABEL. For CASE_LABEL_EXPR assert ctx->css_state != NULL,
handle default labels according to css_state.
(cxx_eval_statement_list): Remove statement skipping, label_matches
and default_label handling code.
(cxx_eval_loop_expr): Exit after first iteration even if
switches (jump_target).
(cxx_eval_switch_expr): Set up css_state field in ctx, if default
label has been seen in the body, but no cases matched, evaluate
the body second time.
(cxx_eval_constant_expression): Handle stmt skipping and label_matches
here. Handle PREDICT_EXPR. For MODIFY_EXPR or INIT_EXPR, assert
statement is not skipped. For COND_EXPR during skipping, don't
evaluate condition, just the then block and if still skipping at the
end also the else block.
(cxx_eval_outermost_constant_expr): Adjust constexpr_ctx initializer.
(is_sub_constant_expr): Likewise.
* g++.dg/cpp1y/constexpr-77467.C: New test.
From-SVN: r240591
Uros Bizjak [Wed, 28 Sep 2016 18:22:16 +0000 (20:22 +0200)]
cpuinfo.c (__get_cpuid_output): Remove.
* config/i386/cpuinfo.c (__get_cpuid_output): Remove.
(__cpu_indicator_init): Call __get_cpuid, not __get_cpuid_output.
From-SVN: r240590
Jonathan Wakely [Wed, 28 Sep 2016 18:04:23 +0000 (19:04 +0100)]
* include/std/chrono (system_clock): Fix typo in comment.
From-SVN: r240589
Ian Lance Taylor [Wed, 28 Sep 2016 18:02:40 +0000 (18:02 +0000)]
libgo: fix for runtime/check failure with "-O0 -g"
Tweak the makefile rules for the runtime/check test to
insure that the runtime package is compiled with
"-fgo-compiling-runtime". This resolves a test failure
(unsat on runtime.getcallerpc) when in a build directory where the
compiler flags have been configured to disable optimization.
Reviewed-on: https://go-review.googlesource.com/30010
From-SVN: r240588
Jonathan Wakely [Wed, 28 Sep 2016 18:02:25 +0000 (19:02 +0100)]
Check for overflow in filesystem::last_write_time
* include/experimental/bits/fs_fwd.h (file_time_type): Simplify
definition.
* src/filesystem/ops.cc (file_time): Take error_code parameter and
check for overflow.
(do_copy_file, last_write_time): Pass error_code in file_time calls.
* testsuite/experimental/filesystem/operations/last_write_time.cc:
New.
* testsuite/util/testsuite_fs.h (scoped_file): Define RAII helper.
From-SVN: r240587
Wilco Dijkstra [Wed, 28 Sep 2016 16:31:34 +0000 (16:31 +0000)]
If strchr can't be folded in gimple-fold...
If strchr can't be folded in gimple-fold, we still need to fall into
the generic code so the folding code in builtins.c is also called.
gcc/
* gimple-fold.c (gimple_fold_builtin): After failing to fold
strchr, also try the generic folding.
From-SVN: r240585
Martin Sebor [Wed, 28 Sep 2016 16:24:35 +0000 (16:24 +0000)]
PR c/77762 - Incorrect destination buffer length in -Wformat-length warning
gcc/testsuite/ChangeLog:
PR c/77762
* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c (test_vsnprintf_chk_s):
Call __builtin___vsnprintf_chk, not __builtin___snprintf_chk.
(test_sprintf_p_const): Adjust line numbers to avoid failures
introduced in r240503.
gcc/ChangeLog:
PR c/77762
* gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
Fix typos.
From-SVN: r240584
Martin Sebor [Wed, 28 Sep 2016 16:13:12 +0000 (16:13 +0000)]
PR middle-end/77683 - ICE on %lf directive in format_floating in
gcc/testsuite/ChangeLog:
PR middle-end/77683
* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Add test cases.
gcc/ChangeLog:
PR middle-end/77683
* gimple-ssa-sprintf.c (format_integer): Fail gracefully when
length modifier is not expected.
(format_floating): Ignore l length modifier and fail gracefuly
when it isn't one of the other expected ones.
From-SVN: r240583
Martin Sebor [Wed, 28 Sep 2016 16:02:06 +0000 (16:02 +0000)]
PR bootstrap/77753 - [7 Regression] broken profiledbootstrap due to
gcc/ChangeLog:
PR bootstrap/77753
* varasm.c (assemble_addr_to_section): Increase local buffer size.
From-SVN: r240581
Richard Biener [Wed, 28 Sep 2016 14:31:04 +0000 (14:31 +0000)]
dwarf2out.c (cu_die_list): New global.
2016-09-27 Richard Biener <rguenther@suse.de>
* dwarf2out.c (cu_die_list): New global.
(dwarf2out_finish): Walk cu_die_list instead of limbo DIEs. Add
main_comp_unit_die to cu_die_list if we created it.
Move break_out_includes ...
(dwarf2out_early_finish): ... here. Push created CU DIEs onto
the cu_die_list.
From-SVN: r240579
Richard Biener [Wed, 28 Sep 2016 14:30:19 +0000 (14:30 +0000)]
dwarf2out.c (struct die_struct): Add removed flag.
2016-09-28 Richard Biener <rguenther@suse.de>
* dwarf2out.c (struct die_struct): Add removed flag.
(lookup_type_die): If the DIE is marked as removed, clear
TYPE_SYMTAB_DIE and return NULL.
(lookup_decl_die): If the DIE is marked as removed, remove it
from the hash and return NULL.
(mark_removed): New helper.
(prune_unused_types_prune): Call it for removed DIEs.
(gen_subprogram_die): Move the premark_used_types call to after
DIEs for the functions scopes are generated.
(process_scope_var): Do not re-create pruned types or type decls.
Make sure to also re-parent type decls.
(dwarf2out_finish): Move unused type pruning and debug_types
handling ...
(dwarf2out_early_finish): ... here.
From-SVN: r240578
Claudiu Zissulescu [Wed, 28 Sep 2016 14:25:21 +0000 (16:25 +0200)]
[ARC] New CPU C-define handler.
gcc/
2016-09-29 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-c.c: New file.
* config/arc/arc-c.def: Likewise.
* config/arc/t-arc: Likewise.
* config.gcc: Include arc-c.o as c and cpp object.
* config/arc/arc-protos.h (arc_cpu_cpp_builtins): Add prototype.
* config/arc/arc.h (TARGET_CPU_CPP_BUILTINS): Use
arc_cpu_cpp_builtins.
From-SVN: r240577
Claudiu Zissulescu [Wed, 28 Sep 2016 13:26:32 +0000 (15:26 +0200)]
[ARC] Add simple shift/rotate ops.
2016-09-29 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.md (*rotrsi3_cnt1): New pattern,
(*ashlsi2_cnt1, *lshrsi3_cnt1, *ashrsi3_cnt1): Likewise.
From-SVN: r240576
Bernd Edlinger [Wed, 28 Sep 2016 12:11:57 +0000 (12:11 +0000)]
re PR c++/77748 (pr77550.C fails on arm-none-eabi)
2016-09-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/77748
* g++.dg/pr77550.C: Avoid undefined behavior.
From-SVN: r240573
Bernd Edlinger [Wed, 28 Sep 2016 12:08:11 +0000 (12:08 +0000)]
pr68198.c: Fix dg-final.
2016-09-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gcc.dg/tree-ssa/pr68198.c: Fix dg-final.
From-SVN: r240572
Nathan Sidwell [Wed, 28 Sep 2016 11:26:16 +0000 (11:26 +0000)]
gimple-pretty-print.c (dump_gimple_call_args): Simplify "' " printing.
* gimple-pretty-print.c (dump_gimple_call_args): Simplify "' "
printing.
From-SVN: r240570
Claudiu Zissulescu [Wed, 28 Sep 2016 11:12:41 +0000 (13:12 +0200)]
[ARC COMMITTED] MAINTAINERS (Reviewers): Add myself.
2016-09-28 Claudiu Zissulescu <claziss@synopsys.com>
* MAINTAINERS (Reviewers): Add myself.
From-SVN: r240569