platform/upstream/gcc.git
8 years agore PR tree-optimization/77929 (ICE: verify_gimple failed (error: non-trivial conversi...
Jakub Jelinek [Wed, 12 Oct 2016 07:07:33 +0000 (09:07 +0200)]
re PR tree-optimization/77929 (ICE: verify_gimple failed (error: non-trivial conversion at assignment))

PR tree-optimization/77929
* tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle
(*ops)[ranges[i].idx]->op != ranges[i].exp case.

* gcc.c-torture/compile/pr77929.c: New test.

From-SVN: r241019

8 years agore PR target/77934 (pattern for mtvsrdd needs to use b constraint not r)
Aaron Sawdey [Wed, 12 Oct 2016 02:12:06 +0000 (02:12 +0000)]
re PR target/77934 (pattern for mtvsrdd needs to use b constraint not r)

2016-10-12  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

PR target/77934
* config/rs6000/vmx.md (vsx_concat_<mode>): The mtvsrdd instruction
needs a base register for arg 1.

From-SVN: r241017

8 years agoDaily bump.
GCC Administrator [Wed, 12 Oct 2016 00:16:12 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241016

8 years agogcc/
Jakub Jelinek [Tue, 11 Oct 2016 23:19:06 +0000 (01:19 +0200)]
gcc/
* common.opt (Wimplicit-fallthrough) Turn into alias to
-Wimplicit-fallthrough=3.  Remove EnabledBy.
(Wimplicit-fallthrough=): New option.
* gimplify.c (warn_implicit_fallthrough_r): Use
OPT_Wimplicit_fallthrough_ instead of OPT_Wimplicit_fallthrough.
* doc/invoke.texi (-Wimplicit-fallthrough): Document as alias
to -Wimplicit-fallthrough=3.
(-Wimplicit-fallthrough=): Document.
gcc/c-family/
* c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
(Wimplicit-fallthrough=): Enable for these languages by -Wextra.
* c-opts.c (sanitize_cpp_opts): Initialize
cpp_opts->cpp_warn_implicit_fallthrough.
gcc/testsuite/
* c-c++-common/Wimplicit-fallthrough-25.c: New test.
* c-c++-common/Wimplicit-fallthrough-26.c: New test.
* c-c++-common/Wimplicit-fallthrough-27.c: New test.
* c-c++-common/Wimplicit-fallthrough-28.c: New test.
* c-c++-common/Wimplicit-fallthrough-29.c: New test.
* c-c++-common/Wimplicit-fallthrough-30.c: New test.
* c-c++-common/Wimplicit-fallthrough-31.c: New test.
* c-c++-common/Wimplicit-fallthrough-32.c: New test.
* c-c++-common/Wimplicit-fallthrough-33.c: New test.
libcpp/
* include/cpplib.h (struct cpp_options): Add
cpp_warn_implicit_fallthrough.
* init.c (cpp_create_reader): Initialize it to 0.
* lex.c (fallthrough_comment_p): Handle different
cpp_warn_implicit_fallthrough levels.  Whitespace fixes.

From-SVN: r241013

8 years agosparc.c (emit_scc_insn): Remove direct support for EQ and GEU in DImode if TARGET_SUBXC.
Eric Botcazou [Tue, 11 Oct 2016 22:22:38 +0000 (22:22 +0000)]
sparc.c (emit_scc_insn): Remove direct support for EQ and GEU in DImode if TARGET_SUBXC.

* config/sparc/sparc.c (emit_scc_insn): Remove direct support for EQ
and GEU in DImode if TARGET_SUBXC.
* config/sparc/sparc.md (seqdi<W:mode>_zero): Remove TARGET_SUBXC.
(seqdi<W:mode>_zero_subxc): Delete.
(neg_seqdi<W:mode>_zero): Remove TARGET_VIS3.
(neg_seqdi<W:mode>_zero_vis3): Delete.
(plus_seqdi<W:mode>_zero): Likewise.
(minus_seqdi<W:mode>_zero): Likewise.
(plus_plus_sltu<W:mode>): Accept only register.
(addx<W:mode>): Likewise.
(plus_sltu<W:mode>_vis3): Likewise.
(plus_plus_sltu<W:mode>_vis3): Likewise.
(neg_sgeu<W:mode>_vis3): Delete.
(minus_sgeu<W:mode>_vis3): Likewise.
(addxc<W:mode>): Accept only registers.
(neg_sltu<W:mode>_subxc): Write %%g0 instead of 0.
(minus_neg_sltu<W:mode>_subxc): Accept only register.
(neg_plus_sltu<W:mode>_subxc): Likewise.
(minus_sltu<W:mode>_subxc): Write %%g0 instead of 0.
(minus_minus_sltu<W:mode>_subxc): Accept only register.
(sgeu<W:mode>_insn_subxc): Delete.
(plus_sgeu<W:mode>_subxc): Likewise.
(subxc<W:mode>): Accept only register.
(scc splitter): Split always GEU again.

From-SVN: r241012

8 years agoiresolve.c (is_trig_resolved, [...]): Formatting fixes.
Jakub Jelinek [Tue, 11 Oct 2016 21:45:34 +0000 (23:45 +0200)]
iresolve.c (is_trig_resolved, [...]): Formatting fixes.

* iresolve.c (is_trig_resolved, resolve_trig_call): Formatting fixes.
* simplify.c (simplify_trig_call, degrees_f, radians_f,
gfc_simplify_atrigd, gfc_simplify_cotan): Likewise.

From-SVN: r241010

8 years agore PR tree-optimization/77424 (Identical statements in if-else branches)
Jeff Law [Tue, 11 Oct 2016 21:41:51 +0000 (15:41 -0600)]
re PR tree-optimization/77424 (Identical statements in if-else branches)

PR tree-optimization/77424
* tree-ssa-threadupdate.c (thread_through_all_blocks): Remove
dead conditionals.  Assert that all e->aux fields are NULL.

From-SVN: r241009

8 years agore PR fortran/77942 (ICE: Floating point exception, in gfc_simplify_cshift, at fortra...
Steven G. Kargl [Tue, 11 Oct 2016 21:03:04 +0000 (21:03 +0000)]
re PR fortran/77942 (ICE: Floating point exception, in gfc_simplify_cshift, at fortran/simplify.c:1845)

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

PR fortran/77942
* simplify.c (gfc_simplify_cshift): Check for zero.

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

PR fortran/77942
* gfortran.dg/pr77942.f90

From-SVN: r241008

8 years agosystem-linux-armeb.ads (Backend_Overflow_Checks): Change to True.
Eric Botcazou [Tue, 11 Oct 2016 19:50:31 +0000 (19:50 +0000)]
system-linux-armeb.ads (Backend_Overflow_Checks): Change to True.

* system-linux-armeb.ads (Backend_Overflow_Checks): Change to True.
* system-linux-mips.ads (Backend_Overflow_Checks): Likewise.
* system-linux-mips64el.ads (Backend_Overflow_Checks): Likewise.
* system-linux-mipsel.ads (Backend_Overflow_Checks): Likewise.
* system-linux-sparcv9.ads (Backend_Overflow_Checks): Likewise.
* system-rtems.ads: Likewise.

From-SVN: r241003

8 years agoSplit print_rtx into subroutines
David Malcolm [Tue, 11 Oct 2016 19:19:05 +0000 (19:19 +0000)]
Split print_rtx into subroutines

gcc/ChangeLog:
* print-rtl.c (print_rtx): Rename "i" to "idx".  Split out the
operand-printing "switch" statement into...
(print_rtx_operand_code_0): ...this new function, ...
(print_rtx_operand_code_e): ...this new function, ...
(print_rtx_operand_codes_E_and_V): ...this new function, ...
(print_rtx_operand_code_i): ...this new function, ...
(print_rtx_operand_code_r): ...this new function, ...
(print_rtx_operand_code_u): ...this new function, ...
(print_rtx_operand): ...and this new function.

From-SVN: r241002

8 years agoFix bad commit for -fdec-math.
Fritz Reese [Tue, 11 Oct 2016 18:44:05 +0000 (18:44 +0000)]
Fix bad commit for -fdec-math.

2016-10-11  Fritz Reese  <fritzoreese@gmail.com>

Fix bad commit for -fdec-math.

* iresolve.c (get_radians, get_degrees): Fix sloppy commit.
* simplify.c (degrees_f, radians_f): Ditto.

From-SVN: r241001

8 years agosimplify.c (radians_f): Fix mpdr_mod.
Jerry DeLisle [Tue, 11 Oct 2016 18:31:50 +0000 (18:31 +0000)]
simplify.c (radians_f): Fix mpdr_mod.

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

* simplify.c (radians_f): Fix mpdr_mod.
* ireolce.c (get_degrees): Declare tmp.

From-SVN: r241000

8 years agoadaint.c: Include process.h, signal.h, dir.h and utime.h for DJGPP.
Andris Pavenis [Tue, 11 Oct 2016 18:24:45 +0000 (21:24 +0300)]
adaint.c: Include process.h, signal.h, dir.h and utime.h for DJGPP.

2016-10-11  Andris Pavenis  <andris.pavenis@iki.fi>

* adaint.c: Include process.h, signal.h, dir.h and utime.h for DJGPP.
ISALPHA: include <ctype.h> and define to isalpha for DJGPP when IN_RTS is defined.
(DIR_SEPARATOR) define to '\\' for DJGPP.
(__gnat_get_file_names_case_sensitive): return 0 for DJGPP unless
overriden in environment
(__gnat_is_absolute_path): Support MS-DOS style absolute paths for DJGPP.
(__gnat_portable_spawn): Use spewnvp for DJGPP.
(__gnat_portable_no_block_spawn): Use spawnvp for DJGPP.
(__gnat_portable_wait): Return 0 for DJGPP.

From-SVN: r240999

8 years agoMakefile.in (LIBGNAT_TARGET_PAIRS): Define for DJGPP target
Andris Pavenis [Tue, 11 Oct 2016 18:19:07 +0000 (21:19 +0300)]
Makefile.in (LIBGNAT_TARGET_PAIRS): Define for DJGPP target

2016-10-11  Andris Pavenis  <andris.pavenis@iki.fi>

* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Define for DJGPP target
(EH_MECHANISM): Define to -gcc for DJGPP
* system-djgpp.ads: New file

From-SVN: r240998

8 years agoctrl_c.c: Do not use macro SA_RESTART for DJGPP.
Andris Pavenis [Tue, 11 Oct 2016 18:12:52 +0000 (21:12 +0300)]
ctrl_c.c: Do not use macro SA_RESTART for DJGPP.

2016-10-11  Andris Pavenis  <andris.pavenis@iki.fi>

* ctrl_c.c: Do not use macro SA_RESTART for DJGPP.
* gsocket.h: Do not support sockets for DJGPP.
* init.c (__gnat_install_handler): Implememt for DJGPP
* sysdep.c: Include <io.h> for DJGPP
(_setmode): Define to setmode for DJGPP
(__gnat_set_mode): Add implementation for DJGPP
(__gnat_localtime_tzoff): Use localtime_r for DJGPP
* terminals.c: Add DJGPP to list of unsupported platforms.
* env.c (__gnat_clearenv): use _gnat_unsetenv on all entries for DJGPP

From-SVN: r240997

8 years agoalpha-passes.def: New file.
Uros Bizjak [Tue, 11 Oct 2016 16:30:45 +0000 (18:30 +0200)]
alpha-passes.def: New file.

* config/alpha/alpha-passes.def: New file.
* config/alpha/t-alpha: New file.
* config/alpha/alpha-protos.h (gcc::context, rtl_opt_pass): Declare.
(make_pass_handle_trap_shadows): New prototype.
(make_pass_align_insns): Ditto.
* config/alpha/alpha.c (alpha_option_override): Don't register
passes here.
* config.gcc (alpha*-*-*) Add alpha/t-alpha to tmake_file.

From-SVN: r240996

8 years agore PR target/77924 (-mfloat128-type change broke AIX)
Michael Meissner [Tue, 11 Oct 2016 14:12:09 +0000 (14:12 +0000)]
re PR target/77924 (-mfloat128-type change broke AIX)

2016-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/77924
* config/rs6000/rs6000.c (rs6000_init_builtins): Only create the
distinct __ibm128 IBM extended double type if long doubles are
128-bits and the default format for long double is IEEE 128-bit.

From-SVN: r240994

8 years agoconfigure: redirect -fsplit-stack compilation to dev/null
Ian Lance Taylor [Tue, 11 Oct 2016 13:13:17 +0000 (13:13 +0000)]
configure: redirect -fsplit-stack compilation to dev/null

    Avoid an error message in the middle of the configure output.

    Patch by Eric Botcazou.

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

From-SVN: r240993

8 years agodwarf2out.c (DEBUG_STR_OFFSETS_SECTION): Remove conditional.
Richard Biener [Tue, 11 Oct 2016 12:56:49 +0000 (12:56 +0000)]
dwarf2out.c (DEBUG_STR_OFFSETS_SECTION): Remove conditional.

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

* dwarf2out.c (DEBUG_STR_OFFSETS_SECTION): Remove conditional.
(init_sections_and_labels): Use DEBUG_DWO_STR_OFFSETS_SECTION.
(verify_die): New function.
(dwarf2out_finish): Call it.
(output_line_info): Handle case of -gsplit-dwarf without
DWARF2_ASM_LINE_DEBUG_INFO.

From-SVN: r240992

8 years agore PR debug/77931 (PASS->FAIL: gdb.cp/namespace.exp: print ina)
Richard Biener [Tue, 11 Oct 2016 12:52:44 +0000 (12:52 +0000)]
re PR debug/77931 (PASS->FAIL: gdb.cp/namespace.exp: print ina)

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

PR debug/77931
* gimple-low.c (lower_gimple_bind): Handle arbitrary common
sub-chains of BLOCK_VARS and gimple_bind_vars.

From-SVN: r240991

8 years agoFix integer load reservation for -march=znver1
Venkataramanan Kumar [Tue, 11 Oct 2016 11:49:32 +0000 (11:49 +0000)]
Fix integer load reservation for -march=znver1
2016-10-11  Venkataramanan Kumar  <Venkataramanan.kumar@amd.com>

* config/i386/znver1.md : Fix imov/imovx load type reservations.

From-SVN: r240990

8 years agoNew flag -fdec-math for COTAN and degree trig intrinsics.
Fritz Reese [Tue, 11 Oct 2016 11:21:07 +0000 (11:21 +0000)]
New flag -fdec-math for COTAN and degree trig intrinsics.

2016-10-11  Fritz Reese  <fritzoreese@gmail.com>

New flag -fdec-math for COTAN and degree trig intrinsics.

gcc/fortran/
* lang.opt: New flag -fdec-math.
* options.c (set_dec_flags): Enable with -fdec.
* invoke.texi, gfortran.texi, intrinsic.texi: Update documentation.
* intrinsics.c (add_functions, do_simplify): New intrinsics
with -fdec-math.
* gfortran.h (gfc_isym_id): New isym GFC_ISYM_COTAN.
* gfortran.h (gfc_resolve_atan2d, gfc_resolve_cotan,
gfc_resolve_trigd, gfc_resolve_atrigd): New prototypes.
* iresolve.c (resolve_trig_call, get_degrees, get_radians,
is_trig_resolved, gfc_resolve_cotan, gfc_resolve_trigd,
gfc_resolve_atrigd, gfc_resolve_atan2d): New functions.
* intrinsics.h (gfc_simplify_atan2d, gfc_simplify_atrigd,
gfc_simplify_cotan, gfc_simplify_trigd): New prototypes.
* simplify.c (simplify_trig_call, degrees_f, radians_f,
gfc_simplify_cotan, gfc_simplify_trigd, gfc_simplify_atrigd,
gfc_simplify_atan2d): New functions.

gcc/testsuite/gfortran.dg/
* dec_math.f90: New testsuite.

From-SVN: r240989

8 years agoMinor tweaks
Eric Botcazou [Tue, 11 Oct 2016 10:37:24 +0000 (10:37 +0000)]
Minor tweaks

From-SVN: r240988

8 years ago* MAINTAINERS: Update email address.
Nathan Sidwell [Tue, 11 Oct 2016 10:36:33 +0000 (10:36 +0000)]
* MAINTAINERS: Update email address.

From-SVN: r240987

8 years agoFix gcc.dg/tree-ssa/pr59597.c failure for avr
Senthil Kumar Selvaraj [Tue, 11 Oct 2016 10:35:57 +0000 (10:35 +0000)]
Fix gcc.dg/tree-ssa/pr59597.c failure for avr

Declare loop index variable j as a 32 bit int instead of assuming ints
are 32 bits. The smaller int size on the avr makes prior passes optimize
away the loop exit check (j < 10000000), as the constant is outside
the range of a 16 bit int.

gcc/testsuite/ChangeLog

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

* gcc.dg/tree-ssa/pr59597.c: Typedef  __INT32_TYPE__ to i32.
(main): Declare j as i32 instead of int.

From-SVN: r240986

8 years agoexp_dbug.adb (Debug_Renaming_Declaration): Process underlying types.
Pierre-Marie de Rodat [Tue, 11 Oct 2016 10:35:43 +0000 (10:35 +0000)]
exp_dbug.adb (Debug_Renaming_Declaration): Process underlying types.

* exp_dbug.adb (Debug_Renaming_Declaration): Process underlying types.
Emit GNAT encodings for object renamings involving record components
whose normalized bit offset is not null.
* uintp.h (UI_No_Uint): Declare.
* gcc-interface/gigi.h (can_materialize_object_renaming_p): New.
* gcc-interface/utils.c (can_materialize_object_renaming_p): New
function.
* gcc-interface/trans.c (gnat_to_gnu) <N_Object_Renaming_Declaration>:
In code generation mode, materialize all renamings as long as they need
debug info and we are not optimizing.

From-SVN: r240985

8 years agoOptimise std::list::assign(initializer_list<T>) slightly
Jonathan Wakely [Tue, 11 Oct 2016 10:33:41 +0000 (11:33 +0100)]
Optimise std::list::assign(initializer_list<T>) slightly

* include/bits/stl_list.h (assign(initializer_list<value_type>)): Call
_M_assign_dispatch directly with correct tag.

From-SVN: r240984

8 years agoSimplify std::rethrow_if_nested definition
Jonathan Wakely [Tue, 11 Oct 2016 10:33:36 +0000 (11:33 +0100)]
Simplify std::rethrow_if_nested definition

* doc/xml/manual/intro.xml: Document LWG 2484 status.
* libsupc++/nested_exception.h (_Throw_with_nested_impl)
(_Throw_with_nested_helper): Remove.
(__throw_with_nested_impl): New overloaded functions to implement
throw_with_nested logic.
(throw_with_nested): Call __throw_with_nested_impl.
(_Rethrow_if_nested_impl): Remove
(__rethrow_if_nested_impl): New overloaded functions to implement
rethrow_if_nested logic.
(rethrow_if_nested): Call __rethrow_if_nested_impl.
* testsuite/18_support/nested_exception/rethrow_if_nested.cc: Test
problem cases from LWG 2484.

From-SVN: r240983

8 years agoEnable printers and xmethods for std::__cxx11::list
Jonathan Wakely [Tue, 11 Oct 2016 10:33:29 +0000 (11:33 +0100)]
Enable printers and xmethods for std::__cxx11::list

* python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
Register printer for std::__cxx11::list.
* python/libstdcxx/v6/xmethods.py (ListMethodsMatcher.match): Match
std::__cxx11::list as well as std::list.

From-SVN: r240982

8 years agoRemove redundant const qualifliers from string_view
Jonathan Wakely [Tue, 11 Oct 2016 10:33:24 +0000 (11:33 +0100)]
Remove redundant const qualifliers from string_view

* include/experimental/string_view (basic_string_view::_S_compare):
Remove redundant const from return type.
* include/std/string_view (basic_string_view:_S_compare): Likewise.

From-SVN: r240981

8 years agoMore noexcept for standard mutex types and locks
Jonathan Wakely [Tue, 11 Oct 2016 10:33:16 +0000 (11:33 +0100)]
More noexcept for standard mutex types and locks

* include/bits/std_mutex.h (mutex::native_handle)
(lock_guard(mutex_type&, adopt_lock_t)
(unique_lock(mutex_type&, adopt_lock_t): Add noexcept.
* include/std/mutex (recursive_mutex, timed_mutex)
(recursive_timed_mutex): Likewise.

From-SVN: r240980

8 years agoPR77710: fix triplet in builtin-sprintf-warn-4.c
Thomas Preud'homme [Tue, 11 Oct 2016 10:26:10 +0000 (10:26 +0000)]
PR77710: fix triplet in builtin-sprintf-warn-4.c

2016-10-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/testsuite/
    PR testsuite/PR77710
    * gcc.dg/tree-ssa/builtin-sprintf-warn-4.c: Use *-*-* as catch-all
    target triplet instead of *-*-*-*.

From-SVN: r240979

8 years agoutils2.c (build_binary_op): Add a NO_FOLD argument.
Pierre-Marie de Rodat [Tue, 11 Oct 2016 10:19:39 +0000 (10:19 +0000)]
utils2.c (build_binary_op): Add a NO_FOLD argument.

* gcc-interface/utils2.c (build_binary_op): Add a NO_FOLD
argument.  Disable folding when true.
* gcc-interface/gigi.h (choices_to_gnu): Remove declaration.
(build_binary_op): Update signature and comment.
* gcc-interface/decl.c (choices_to_gnu): Make static.  Disable
folding for all calls to build_binary_op.

From-SVN: r240978

8 years agofe.h (Constant_Value): Declare.
Tristan Gingold [Tue, 11 Oct 2016 10:11:49 +0000 (10:11 +0000)]
fe.h (Constant_Value): Declare.

* fe.h (Constant_Value): Declare.
* gcc-interface/decl.c (compile_time_known_address_p): Also consider
references to constants.

From-SVN: r240977

8 years agotrans.c (gnat_to_gnu): Adjust comment.
Eric Botcazou [Tue, 11 Oct 2016 10:03:49 +0000 (10:03 +0000)]
trans.c (gnat_to_gnu): Adjust comment.

* gcc-interface/trans.c (gnat_to_gnu) <N_Op_Add>: Adjust comment.
<N_Op_Minus>: Add comment and missing guard.
* gcc-interface/trans.c (build_binary_op_trapv): Use an explicit test.

From-SVN: r240976

8 years agoutils.c (type_unsigned_for_rm): New predicate.
Eric Botcazou [Tue, 11 Oct 2016 09:52:35 +0000 (09:52 +0000)]
utils.c (type_unsigned_for_rm): New predicate.

* gcc-interface/utils.c (type_unsigned_for_rm): New predicate.
(make_type_from_size): Use it.
(unchecked_convert): Likewise.  Do not skip the extension step if the
source type is not integral.

From-SVN: r240975

8 years agoc-common.c (warning_candidate_p): Change the return type to bool and return true...
Marek Polacek [Tue, 11 Oct 2016 09:32:44 +0000 (09:32 +0000)]
c-common.c (warning_candidate_p): Change the return type to bool and return true/false instead of 1/0.

* c-common.c (warning_candidate_p): Change the return type to bool
and return true/false instead of 1/0.
(vector_mode_valid_p): Likewise.

From-SVN: r240974

8 years agosystem-linux-ppc64.ads: Delete.
Eric Botcazou [Tue, 11 Oct 2016 09:12:25 +0000 (09:12 +0000)]
system-linux-ppc64.ads: Delete.

* system-linux-ppc64.ads: Delete.
* system-linux-ppc.ads: Make 32-bit/64-bit neutral.
* gcc-interface/Makefile.in (PowerPC/Linux): Simplify.

Co-Authored-By: Tristan Gingold <gingold@adacore.com>
From-SVN: r240973

8 years agoAdd missing file
Eric Botcazou [Tue, 11 Oct 2016 08:55:31 +0000 (08:55 +0000)]
Add missing file

From-SVN: r240972

8 years agosparc.opt (msubxc): New option.
Eric Botcazou [Tue, 11 Oct 2016 08:54:56 +0000 (08:54 +0000)]
sparc.opt (msubxc): New option.

* config/sparc/sparc.opt (msubxc): New option.
* doc/invoke.texi (SPARC options): Document it and tidy up.
* doc/tm.texi.in (Condition Codes): Adjust SPARC example.
* doc/tm.texi: Regenerate.
* config/sparc/sparc-modes.def (CC_NOOV): Rename into...
(CCNZ): ...this.
(CCX_NOOV): Rename into...
(CCXNZ): ...this.
(CCC): New.
(CCXC): Likewise.
* config/sparc/predicates.m (fcc_register_operand): Simplify.
(fcc0_register_operand): Likewise.
(icc_register_operand): New.
(icc_or_fcc_register_operand): Simplify.
(nz_comparison_operator): New.
(c_comparison_operator): Likewise.
(noov_compare_operator): Rename into...
(icc_comparison_operator): ...this.  Use above predicates.
(noov_compare64_operator): Rename into...
(v9_comparison_operator): ...this and tidy up.
(fcc_comparison_operator): New.
(icc_or_fcc_comparison_operator): Likewise.
(v9_register_compare_operator): Rename info...
(v9_register_comparison_operator): ...this.
* config/sparc/sparc.c (TARGET_FIXED_CONDITION_CODE_REGS): Define.
(sparc_option_override): Remove redundant VIS masks and add MASK_SUBXC
for Niagara-7.
(sparc_fixed_condition_code_regs): New function.
(select_cc_mode): Remove ATTRIBUTE_UNUSED.  Adjust for CCNZ/CCXNZ
renaming and add support for CCC/CCXC.
(output_cbranch): Likewise.
(sparc_print_operand): Likewise.
(gen_v9_scc): Remove obsolete assertion.
(emit_scc_insn): Emit RTL directly for EQ and NE.  Add direct support
for EQ in DImode if TARGET_SUBXC.  Remove test on TARGET_VIS3 for GEU.
(output_cbcond): Remove bogus handling of CC modes.
(sparc_register_move_cost): Return 100 for NO_REGS.
* config/sparc/sparc.md (W): New mode iterator.
(length): Adjust for noov_compare64_operator renaming.
(cmpsi_sne): New instruction.
(cmpdi_sne): Likewise.
(seqdi_special): Delete.
(seqdi_special): Likewise.
(snesi<P:mode>_special): Likewise.
(snedi_special): Likewise.
(snedi_special_vis3): Likewise.
(snesi patterns): Use W iterator.
(snedi patterns): Likewise.  Add TARGET_SUBXC patterns.
(sltu patterns): Likewise.
(sgeu patterns): Likewise.
(scc splitter): Do not split GEU in DImode if TARGET_SUBXC.
(normal_branch): Use icc_comparison_operator predicate.
(inverted_branch): Likewise.
(cbcond_sp32): Use comparison_operator predicate.
(cbcond_sp64): Likewise.
(normal_int_branch_sp64): Adjust for renaming
(inverted_int_branch_sp64): Likewise.
(mov<I:mode>_cc_reg_sp64): Likewise.
(movsf_cc_reg_sp6): Likewise.
(movdf_cc_reg_sp64): Likewise.
(movtf_cc_reg_hq_sp64): Likewise.
(movtf_cc_reg_sp64): Likewise.
(mov<I:mode>_cc_v9): Use icc_or_fcc_comparison_operator predicate.
(movsf_cc_v9): Likewise.
(movdf_cc_v9): Likewise.
(movtf_cc_hq_v9): Likewise.
(movtf_cc_v9): Likewise.
(adddi3): Call gen_adddi3_sp32.
(adddi3_insn_sp32): Rename to...
(adddi3_sp32): ...this.  Accept only register_operand as operand #1
and use CCCmode for the carry.
(addx_extend_sp32): Use CCCmode for the carry.
(addx_extend_sp64): Delete.
(adddi3_extend_sp32): Use CCCmode for the carry.
(cmp_plus patterns): Use CCNZ/CCXNZ mode and add C variants.
(subdi3): Call gen_subdi3_sp32.
(subdi3_insn_sp32): Rename to...
(subdi3_sp32): ...this and use CCmode for the carry.
(subx_extend_sp32): Use CCCmode for the carry.
(subx_extend_sp64): Delete.
(subdi3_extend_sp32): Use CCmode for the carry.
(cmp_minus patterns): Use CCNZ/CCXNZ mode and add C variants.
(negdi3): Call gen_negdi3_sp32.
(negdi3_sp32): Use CCCmode for the carry.
(cmp_neg patterns): Use CCNZ/CCXNZ mode and add C variants.
(cmp_nz_ashift_1): Use CCNZ mode.
(cmp_nz_set_ashift_1): Likewise.
(ctrapsi4): Use comparison_operator predicate.
(ctrapdi4): Likewise.
(trapsi_insn): Use icc_comparison_operator predicate.
(trapdi_insn): Likewise.
(edge8 patterns): Use CCNZmode.
(edge16 patterns): Likewise.
(edge32 patterns): Likewise.

From-SVN: r240971

8 years agovisium-modes.def (CC_NOOV): Rename into...
Eric Botcazou [Tue, 11 Oct 2016 08:19:17 +0000 (08:19 +0000)]
visium-modes.def (CC_NOOV): Rename into...

* config/visium/visium-modes.def (CC_NOOV): Rename into...
(CCNZ): ...this.
(CC_BTST): Rename into...
(CCC): ...this.
* config/visium/predicates.md (real_add_operand): New.
(visium_btst_operator): Rename into...
(visium_equality_comparison_operator): ...this.
(visium_noov_operator): Rename into...
(visium_nz_comparison_operator): ...this.
(visium_c_comparison_operator): New.
(visium_branch_operator): Adjust and deal with all CC modes.
* config/visium/visium.c (visium_adjust_cost): Adjust.
(visium_split_double_add): Use the *_set_carry patterns.
(visium_select_cc_mode): Add support for CCC mode and adjust.
(output_cbranch): Adjust and use the carry-based operators for
floating-point comparisons.
* config/visium/visium.md (flags_subst_arith): Adjust.
(addsi3_insn_set_carry): New instruction.
(subsi3_insn_set_carry): Likewise.
(negsi2_insn_set_carry): Likewise.
(btst): Adjust.
(cmp<mode>_sne): Likewise.
(cbranch<mode>4): Use ordered_comparison_operator.
(cbranch<mode>4_insn): Likewise.
(cbranchsi4_btst_insn): Adjust.

From-SVN: r240969

8 years agoRemove RECORD_TYPE special-casing in std_canonical_va_list_type
Tom de Vries [Tue, 11 Oct 2016 08:16:11 +0000 (08:16 +0000)]
Remove RECORD_TYPE special-casing in std_canonical_va_list_type

2016-10-11  Tom de Vries  <tom@codesourcery.com>

PR middle-end/77558
* builtins.c (std_canonical_va_list_type): Remove RECORD_TYPE
special-casing.

From-SVN: r240968

8 years agotree.h (build_complex_type): Add second parameter with default.
Eric Botcazou [Tue, 11 Oct 2016 08:05:31 +0000 (08:05 +0000)]
tree.h (build_complex_type): Add second parameter with default.

* tree.h (build_complex_type): Add second parameter with default.
* tree.c (build_complex_type): Add NAMED second parameter and adjust
recursive call.  Create a TYPE_DECL only if NAMED is true.
(build_common_tree_nodes): Pass true in calls to build_complex_type.

From-SVN: r240967

8 years agoNew avr-passes.def to register AVR specific passes.
Georg-Johann Lay [Tue, 11 Oct 2016 08:02:48 +0000 (08:02 +0000)]
New avr-passes.def to register AVR specific passes.

* config/avr/avr-passes.def: New file.
* config/avr/t-avr (PASSES_EXTRA): Add avr-passes.def.
* config/avr/avr-protos.h (gcc::context, rtl_opt_pass): Declare.
(make_avr_pass_recompute_note): New proto.
* config/avr/avr.c (make_avr_pass_recompute_notes): New function.
(avr_pass_recompute_notes): Use anonymous namespace.
(avr_register_passes): Remove function...
(avr_option_override): ...and its call.

From-SVN: r240966

8 years ago[MIPS] Disable -mbranch-likely for -Os when targetting generic arch
Robert Suchanek [Tue, 11 Oct 2016 07:58:54 +0000 (07:58 +0000)]
[MIPS] Disable -mbranch-likely for -Os when targetting generic arch

gcc/
* config/mips/mips-cpus.def: Replace PTF_AVOID_BRANCHLIKELY with
PTF_AVOID_BRANCHLIKELY_ALWAYS for generic architecture and with
PTF_AVOID_BRANCHLIKELY_SPEED for others.
(mips2, mips3, mips4): Add PTF_AVOID_BRANCHLIKELY_SIZE to tune flags.
* config/mips/mips.c (mips_option_override): Enable the branch likely
depending on the tune flags and optimization level.
* config/mips/mips.h (PTF_AVOID_BRANCHLIKELY): Remove.
(PTF_AVOID_BRANCHLIKELY_SPEED): Define.
(PTF_AVOID_BRANCHLIKELY_SIZE): Likewise.
(PTF_AVOID_BRANCHLIKELY_ALWAYS): Likewise.

From-SVN: r240965

8 years agolto-streamer-out.c (collect_block_tree_leafs): New helper.
Richard Biener [Tue, 11 Oct 2016 07:38:08 +0000 (07:38 +0000)]
lto-streamer-out.c (collect_block_tree_leafs): New helper.

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

* lto-streamer-out.c (collect_block_tree_leafs): New helper.
(output_function): Properly stream the whole block tree.
* lto-streamer-in.c (input_function): Likewise.

From-SVN: r240964

8 years agoMakefile.in (C_COMMON_OBJS): Add c-family/c-warn.o.
Marek Polacek [Tue, 11 Oct 2016 07:02:40 +0000 (07:02 +0000)]
Makefile.in (C_COMMON_OBJS): Add c-family/c-warn.o.

* Makefile.in (C_COMMON_OBJS): Add c-family/c-warn.o.

* c-common.c (fold_for_warn): No longer static.
(bool_promoted_to_int_p): Likewise.
(c_common_get_narrower): Likewise.
(constant_expression_warning): Move to c-warn.c.
(constant_expression_error): Likewise.
(overflow_warning): Likewise.
(warn_logical_operator): Likewise.
(find_array_ref_with_const_idx_r): Likewise.
(warn_tautological_cmp): Likewise.
(expr_has_boolean_operands_p): Likewise.
(warn_logical_not_parentheses): Likewise.
(warn_if_unused_value): Likewise.
(strict_aliasing_warning): Likewise.
(sizeof_pointer_memaccess_warning): Likewise.
(check_main_parameter_types): Likewise.
(conversion_warning): Likewise.
(warnings_for_convert_and_check): Likewise.
(match_case_to_enum_1): Likewise.
(match_case_to_enum): Likewise.
(c_do_switch_warnings): Likewise.
(warn_for_omitted_condop): Likewise.
(readonly_error): Likewise.
(lvalue_error): Likewise.
(invalid_indirection_error): Likewise.
(warn_array_subscript_with_type_char): Likewise.
(warn_about_parentheses): Likewise.
(warn_for_unused_label): Likewise.
(warn_for_div_by_zero): Likewise.
(warn_for_memset): Likewise.
(warn_for_sign_compare): Likewise.
(do_warn_double_promotion): Likewise.
(do_warn_unused_parameter): Likewise.
(record_locally_defined_typedef): Likewise.
(maybe_record_typedef_use): Likewise.
(maybe_warn_unused_local_typedefs): Likewise.
(maybe_warn_bool_compare): Likewise.
(maybe_warn_shift_overflow): Likewise.
(warn_duplicated_cond_add_or_warn): Likewise.
(diagnose_mismatched_attributes): Likewise.
* c-common.h: Move the declarations from c-warn.c to its own section.
* c-warn.c: New file.

From-SVN: r240963

8 years agoDaily bump.
GCC Administrator [Tue, 11 Oct 2016 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r240962

8 years agocompiler: move Backend/Linemap creation out of front end.
Than McIntosh [Tue, 11 Oct 2016 00:11:43 +0000 (00:11 +0000)]
compiler: move Backend/Linemap creation out of front end.

    Push the calls to create Backend and Linemap object out
    of the front end into the back end, and instead pass pointers to
    these objects in the go_create_gogo_args struct. This allows
    for more flexibility in the interfaces used to create the
    objects.

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

* go-gcc.h: New file.
* go-c.h (struct go_create_gogo_args): Add backend and linemap
fields.
* go-lang.c: Include "go-gcc.h".
(go_langhook_init): Set linemap and backend fields of args.
* go-gcc.cc: Include "go-gcc.h".
* go-linemap.cc: Include "go-gcc.h".

From-SVN: r240959

8 years agoAccidentally failed to commit these earlier, as part of:
Ian Lance Taylor [Tue, 11 Oct 2016 00:08:35 +0000 (00:08 +0000)]
Accidentally failed to commit these earlier, as part of:

    Update the compiler to use the new names.  Add calls to printlock and
    printunlock around print statements.  Move expression evaluation before
    the call to printlock.  Update g's writebuf field to a slice, and adjust
    C code accordingly.

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

From-SVN: r240958

8 years agoInfer and push new value ranges for x in y < x.
Kugan Vivekanandarajah [Mon, 10 Oct 2016 23:48:47 +0000 (23:48 +0000)]
Infer and push new value ranges for x in y < x.

gcc/ChangeLog:

2016-10-11  Kugan Vivekanandarajah  <kuganv@linaro.org>

* tree-vrp.c (evrp_dom_walker::try_add_new_range): New.
(evrp_dom_walker::before_dom_children): Infer and push new value
ranges for x in y < x.

From-SVN: r240957

8 years agoruntime: copy print/println support from Go 1.7
Ian Lance Taylor [Mon, 10 Oct 2016 23:13:39 +0000 (23:13 +0000)]
runtime: copy print/println support from Go 1.7

    Update the compiler to use the new names.  Add calls to printlock and
    printunlock around print statements.  Move expression evaluation before
    the call to printlock.  Update g's writebuf field to a slice, and adjust
    C code accordingly.

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

From-SVN: r240956

8 years agoAlways support float128 on ia64 (PR target/77586).
Joseph Myers [Mon, 10 Oct 2016 22:43:07 +0000 (23:43 +0100)]
Always support float128 on ia64 (PR target/77586).

Bug 77586, and previously
<https://gcc.gnu.org/ml/gcc-bugs/2016-08/msg03233.html>, reports
ia64-elf failing to build because of float128_type_node being NULL,
but being used by the back end for __float128.

The global float128_type_node is only available conditionally, if
target hooks indicate TFmode is not only available as a scalar mode
and of the right format, but also supported in libgcc.  The back-end
support, however, expects the type always to be available for
__float128 even if the libgcc support is missing.

Although a target-specific node could be restored in the case where
libgcc support is missing, it seems better to address the missing
libgcc support.  Thus, this patch enables TFmode soft-fp in libgcc
globally for all ia64 targets.  Support for XFmode in libgcc (that is,
for libgcc2.c XFmode functions, not soft-fp) is also enabled for all
ia64 targets so that ia64 no longer needs to define the
TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P hook.

I've confirmed that ia64-elf builds cc1 with this patch and it passes
-fself-test.  I have not otherwise tested the patch.  It's plausible
that ia64-elf and ia64-freebsd might work as-is, but ia64-vms probably
needs further changes, by someone familiar with VMS shared libraries,
to implement an equivalent of ia64/t-softfp-compat in that case
(avoiding conflicts between __divtf3 from soft-fp and the old alias
for __divxf3).

PR target/77586
gcc:
* config/ia64/ia64.c (ia64_libgcc_floating_mode_supported_p)
(TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Remove.
* config/ia64/elf.h (IA64_NO_LIBGCC_TFMODE): Likewise.
* config/ia64/freebsd.h (IA64_NO_LIBGCC_TFMODE): Likewise.
* config/ia64/vms.h (IA64_NO_LIBGCC_XFMODE)
(IA64_NO_LIBGCC_TFMODE): Likewise.

libgcc:
* config.host (ia64*-*-elf*, ia64*-*-freebsd*, ia64-hp-*vms*): Use
soft-fp.

From-SVN: r240955

8 years ago* sv.po: Update.
Joseph Myers [Mon, 10 Oct 2016 22:38:22 +0000 (23:38 +0100)]
* sv.po: Update.

From-SVN: r240953

8 years agoImprove docs on libstdc++ source-code layout
Jonathan Wakely [Mon, 10 Oct 2016 22:34:17 +0000 (23:34 +0100)]
Improve docs on libstdc++ source-code layout

* doc/xml/manual/appendix_contributing.xml (contrib.organization):
Replace <literallayout> with nested <variablelist> elements. Update
some more outdated text.
* doc/html/*: Regenerate.

From-SVN: r240952

8 years agoMake any's copy assignment operator exception-safe,
Ville Voutilainen [Mon, 10 Oct 2016 22:08:58 +0000 (01:08 +0300)]
Make any's copy assignment operator exception-safe,

don't copy the underlying value when any is moved,
make in_place constructors explicit.
* include/std/any (any(in_place_type_t<_ValueType>, _Args&&...)):
Make explicit.
(any(in_place_type_t<_ValueType>, initializer_list<_Up>, _Args&&...)):
Likewise.
(operator=(const any&)): Make strongly exception-safe.
(operator=(any&&)): reset() unconditionally in the case where
rhs has a value.
(operator=(_ValueType&&)): Indent the return type.
(_Manager_internal<_Tp>::_S_manage): Move in _Op_xfer, don't copy.
* testsuite/20_util/any/assign/2.cc: Adjust.
* testsuite/20_util/any/assign/exception.cc: New.
* testsuite/20_util/any/cons/2.cc: Adjust.
* testsuite/20_util/any/cons/explicit.cc: New.
* testsuite/20_util/any/misc/any_cast_neg.cc: Ajust.

From-SVN: r240951

8 years agoAllocate bitmap before copying
Kugan Vivekanandarajah [Mon, 10 Oct 2016 22:03:09 +0000 (22:03 +0000)]
Allocate bitmap before copying

Allocate bitmap before copying
gcc/ChangeLog:

2016-10-11  Kugan Vivekanandarajah  <kuganv@linaro.org>

* tree-vrp.c (vrp_intersect_ranges_1): Allocate bitmap before
  copying.

From-SVN: r240950

8 years agoconfigure.ac: Add aarch64-*-freebsd*.
Andreas Tobler [Mon, 10 Oct 2016 21:31:17 +0000 (23:31 +0200)]
configure.ac: Add aarch64-*-freebsd*.

toplevel:

2016-10-10  Andreas Tobler <andreast@gcc.gnu.org>

    * configure.ac: Add aarch64-*-freebsd*.
    * configure: Regenerate.

gcc:

2016-10-10  Andreas Tobler  <andreast@gcc.gnu.org>

    * config.gcc: Add aarch64-*-freebsd* support.
    * config.host: Likewise.
    * config/aarch64/aarch64-freebsd.h: New file.
    * config/aarch64/t-aarch64-freebsd: Ditto.

libgcc:

2016-10-10  Andreas Tobler  <andreast@gcc.gnu.org>

    * config.host: Add support for aarch64-*-freebsd*.

From-SVN: r240949

8 years agoC++17 class deduction issues
Jason Merrill [Mon, 10 Oct 2016 20:48:51 +0000 (16:48 -0400)]
C++17 class deduction issues

PR c++/77890
PR c++/77912
* pt.c (do_class_deduction): Set cp_unevaluated_operand.
(tsubst) [TEMPLATE_TYPE_PARM]: Copy CLASS_PLACEHOLDER_TEMPLATE.

From-SVN: r240948

8 years agore PR tree-optimization/71947 (x ^ y not folded to 0 if x == y by DOM)
Jeff Law [Mon, 10 Oct 2016 20:40:59 +0000 (14:40 -0600)]
re PR tree-optimization/71947 (x ^ y not folded to 0 if x == y by DOM)

        PR tree-optimization/71947
* tree-ssa-dom.c (cprop_into_stmt): Avoid replacing A with B, then
B with A within a single statement.

PR tree-optimization/71947
* gcc.dg/tree-ssa/pr71947-1.c: New test.
* gcc.dg/tree-ssa/pr71947-2.c: New test.
* gcc.dg/tree-ssa/pr71947-3.c: New test.
* gcc.dg/tree-ssa/pr71947-4.c: New test.
* gcc.dg/tree-ssa/pr71947-5.c: New test.
* gcc.dg/tree-ssa/pr71947-6.c: New test.

From-SVN: r240947

8 years agoUpdate docs on libstdc++ source-code layout
Jonathan Wakely [Mon, 10 Oct 2016 18:57:15 +0000 (19:57 +0100)]
Update docs on libstdc++ source-code layout

* doc/xml/manual/appendix_contributing.xml (contrib.organization):
Describe other subdirectories and add markup. Remove outdated
reference to check-script target.
* doc/html/*: Regenerate.

From-SVN: r240946

8 years agore PR tree-optimization/77824 (unreachable code in SLSR GIMPLE pass)
Bill Schmidt [Mon, 10 Oct 2016 18:39:41 +0000 (18:39 +0000)]
re PR tree-optimization/77824 (unreachable code in SLSR GIMPLE pass)

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

PR tree-optimization/77824
* gimple-ssa-strength-reduction.c (stmt_cost): Explicitly return
zero cost for copies.
(find_candidates_dom_walker::before_dom_children): Replace
MODIFY_EXPR with SSA_NAME.
(replace_mult_candidate): Likewise.
(replace_profitable_candidates): Likewise.

From-SVN: r240945

8 years agoCorrect C++11 implementation status docs
Jonathan Wakely [Mon, 10 Oct 2016 18:39:18 +0000 (19:39 +0100)]
Correct C++11 implementation status docs

* doc/xml/manual/status_cxx2011.xml: Correct C++11 status.

From-SVN: r240944

8 years agoUse noexcept instead of _GLIBCXX_USE_NOEXCEPT
Jonathan Wakely [Mon, 10 Oct 2016 18:32:40 +0000 (19:32 +0100)]
Use noexcept instead of _GLIBCXX_USE_NOEXCEPT

* libsupc++/eh_ptr.cc (exception_ptr): Replace _GLIBCXX_USE_NOEXCEPT
with noexcept.

From-SVN: r240943

8 years agocompiler: prune away gcc-specific linemap usage
Than McIntosh [Mon, 10 Oct 2016 17:33:32 +0000 (17:33 +0000)]
compiler: prune away gcc-specific linemap usage

    Add an interface to the go Linemap class to allow clients to ask for the
    line number for a Location (for debugging dumps), so as to move some
    gcc-specific location code into the back end.

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

* go-linemap.cc (Gcc_linemap::location_line): New method.

From-SVN: r240942

8 years agoruntime: copy channel code from Go 1.7 runtime
Ian Lance Taylor [Mon, 10 Oct 2016 16:52:09 +0000 (16:52 +0000)]
runtime: copy channel code from Go 1.7 runtime

    Change the compiler to use the new routines. Drop the separation of
    small and large values when sending on a channel. Allocate the select
    struct on the stack. Remove the old C implementation of channels. Adjust
    the garbage collector for the new data structure.

    Bring in part of the tracing code, enough for the channel code to call.

    Bump the permitted number of allocations in one of the tests in
    context_test.go. The difference is that now receiving from a channel
    allocates a sudog, which the C code used to simply put on the
    stack. This will be somewhat better when we port proc.go.

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

From-SVN: r240941

8 years agoMinor simplification to std::_Bind_result helpers
Jonathan Wakely [Mon, 10 Oct 2016 16:15:52 +0000 (17:15 +0100)]
Minor simplification to std::_Bind_result helpers

* include/std/functional (_Bind_result::__enable_if_void): Use alias
template instead of class template.
(_Bind_result::__disable_if_void): Likewise.
(_Bind_result::__call): Adjust uses of __enable_if_void and
__disable_if_void.

From-SVN: r240940

8 years agoS/390: Wrap more macro args into ()
Andreas Krebbel [Mon, 10 Oct 2016 15:36:42 +0000 (15:36 +0000)]
S/390: Wrap more macro args into ()

Turned out that there where a few () around macro args uses missing.
One real problem with it was detected with the int-in-bool-context in
the definition of DBX_REGISTER_NUMBER. But while being at it I've
also tried to fix other places where brackets might be missing.

gcc/ChangeLog:

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

* config/s390/s390.h: Wrap more macros args in brackets and fix
        some formatting.

From-SVN: r240930

8 years agoImplement constexpr std::addressof for C++17
Jonathan Wakely [Mon, 10 Oct 2016 15:34:28 +0000 (16:34 +0100)]
Implement constexpr std::addressof for C++17

* doc/xml/manual/intro.xml: Document DR 2296 status.
* doc/xml/manual/status_cxx2017.xml: Update status.
* include/bits/move.h (__addressof): Add _GLIBCXX_CONSTEXPR and
call __builtin_addressof.
(addressof): Add _GLIBCXX17_CONSTEXPR.
* testsuite/20_util/addressof/requirements/constexpr.cc: New test.
* testsuite/20_util/forward/c_neg.cc: Adjust dg-error lineno.
* testsuite/20_util/forward/f_neg.cc: Likewise.

From-SVN: r240929

8 years agore PR fortran/77915 (Internal error for matmul() in forall with optimization)
Thomas Koenig [Mon, 10 Oct 2016 14:54:26 +0000 (14:54 +0000)]
re PR fortran/77915 (Internal error for matmul() in forall with optimization)

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

PR fortran/77915
* frontend-passes.c (inline_matmul_assign):  Return early if
inside a FORALL statement.

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

PR fortran/77915
* gfortran.dg/matmul_11.f90:  New test.

From-SVN: r240928

8 years agogen-avr-mmcu-texi.c (string.h): Include.
Georg-Johann Lay [Mon, 10 Oct 2016 14:18:04 +0000 (14:18 +0000)]
gen-avr-mmcu-texi.c (string.h): Include.

* config/avr/gen-avr-mmcu-texi.c (string.h): Include.

From-SVN: r240925

8 years ago[4/4] ARMv8.2-A testsuite for new scalar intrinsics
Jiong Wang [Mon, 10 Oct 2016 13:50:10 +0000 (13:50 +0000)]
[4/4] ARMv8.2-A testsuite for new scalar intrinsics

gcc/testsuite/

* gcc.target/aarch64/advsimd-intrinsics/unary_scalar_op.inc: Support FMT64.
* gcc.target/aarch64/advsimd-intrinsics/vabdh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcageh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcagth_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcaleh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcalth_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vceqh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vceqzh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcgeh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcgezh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcgth_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcgtzh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcleh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vclezh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vclth_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcltzh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtah_s16_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtah_s64_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtah_u16_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtah_u64_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_f16_s16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_f16_s64_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_f16_u16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_f16_u64_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_n_f16_s16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_n_f16_s64_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_n_f16_u16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_n_f16_u64_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_n_s16_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_n_s64_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_n_u16_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_n_u64_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_s16_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_s64_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_u16_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvth_u64_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtmh_s16_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtmh_s64_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtmh_u16_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtmh_u64_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtnh_s16_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtnh_s64_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtnh_u16_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtnh_u64_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtph_s16_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtph_s64_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtph_u16_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vcvtph_u64_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vfmash_lane_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vmaxh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vminh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vmulh_lane_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vmulxh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vmulxh_lane_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vrecpeh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vrecpsh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vrecpxh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vrsqrteh_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vrsqrtsh_f16_1.c: New.

From-SVN: r240924

8 years ago[3/4] ARMv8.2-A testsuite for new vector intrinsics
Jiong Wang [Mon, 10 Oct 2016 13:47:14 +0000 (13:47 +0000)]
[3/4] ARMv8.2-A testsuite for new vector intrinsics

gcc/testsuite/

* gcc.target/aarch64/advsimd-intrinsics/vdiv_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vfmas_lane_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vfmas_n_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vmaxnmv_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vmaxv_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vminnmv_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vminv_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vmul_lane_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vmulx_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vmulx_lane_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vmulx_n_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vpminmaxnm_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vrndi_f16_1.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vsqrt_f16_1.c: New.

From-SVN: r240923

8 years ago[2/4] ARMv8.2-A testsuite for new data movement intrinsics
Jiong Wang [Mon, 10 Oct 2016 13:45:17 +0000 (13:45 +0000)]
[2/4] ARMv8.2-A testsuite for new data movement intrinsics

gcc/testsuite/

* gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h (FP16_SUPPORTED):
Enable AArch64.
* gcc.target/aarch64/advsimd-intrinsics/vdup_lane.c: Add support for
vdup*_laneq.
* gcc.target/aarch64/advsimd-intrinsics/vduph_lane.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vtrn_half.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vuzp_half.c: New.
* gcc.target/aarch64/advsimd-intrinsics/vzip_half.c: New.

From-SVN: r240922

8 years ago[1/4] ARMv8.2-A FP16 testsuite selector
Jiong Wang [Mon, 10 Oct 2016 13:43:01 +0000 (13:43 +0000)]
[1/4] ARMv8.2-A FP16 testsuite selector

gcc/testsuite/

* target-supports.exp (add_options_for_arm_v8_2a_fp16_scalar): Mention
AArch64 support.
(add_options_for_arm_v8_2a_fp16_neon): Likewise.
(check_effective_target_arm_v8_2a_fp16_scalar_ok_nocache): Support
AArch64 targets.
(check_effective_target_arm_v8_2a_fp16_neon_ok_nocache): Support
AArch64 targets.
(check_effective_target_arm_v8_2a_fp16_scalar_hw): Support AArch64
targets.
(check_effective_target_arm_v8_2a_fp16_neon_hw): Likewise.

From-SVN: r240921

8 years agoDefine std::allocator<T>::is_always_equal
Jonathan Wakely [Mon, 10 Oct 2016 12:17:45 +0000 (13:17 +0100)]
Define std::allocator<T>::is_always_equal

* include/bits/allocator.h (allocator<T>::is_always_equal): Define.
* testsuite/20_util/allocator/requirements/typedefs.cc: Test for
is_always_equal.
* testsuite/util/testsuite_allocator.h
(uneq_allocator::is_always_equal): Define as false_type.

From-SVN: r240920

8 years agoLWG 2733, LWG 2759 reject bool in gcd and lcm
Jonathan Wakely [Mon, 10 Oct 2016 12:17:34 +0000 (13:17 +0100)]
LWG 2733, LWG 2759 reject bool in gcd and lcm

* include/experimental/numeric (gcd, lcm): Make bool arguments
ill-formed.
* include/std/numeric (gcd, lcm): Likewise.
* testsuite/26_numerics/gcd/gcd_neg.cc: New test.
* testsuite/26_numerics/lcm/lcm_neg.cc: New test.

From-SVN: r240919

8 years agore PR target/77738 (Invalid initialisation of ar.lc register)
Andreas Schwab [Mon, 10 Oct 2016 12:16:00 +0000 (12:16 +0000)]
re PR target/77738 (Invalid initialisation of ar.lc register)

PR target/77738
* config/ia64/ia64.md ("doloop_end"): Reject if mode of loop
pseudo is not DImode.

From-SVN: r240918

8 years agoAdd noexcept to enable_shared_from_this::weak_from_this
Jonathan Wakely [Mon, 10 Oct 2016 11:44:05 +0000 (12:44 +0100)]
Add noexcept to enable_shared_from_this::weak_from_this

* include/bits/shared_ptr.h (enable_shared_from_this::weak_from_this):
Add noexcept.
* include/bits/shared_ptr_base.h
(__enable_shared_from_this::weak_from_this): Likewise.
* testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
Test exception-specification of weak_from_this.

From-SVN: r240917

8 years ago[ARC] Disable compact casesi patterns for arcv2
Claudiu Zissulescu [Mon, 10 Oct 2016 11:39:22 +0000 (13:39 +0200)]
[ARC] Disable compact casesi patterns for arcv2

gcc/
2016-05-09  Claudiu Zissulescu  <claziss@synopsys.com>

* common/config/arc/arc-common.c (arc_option_optimization_table):
Remove compact casesi option.
* config/arc/arc.c (arc_override_options): Use compact casesi
option only for pre-ARCv2 cores.
* doc/invoke.texi (mcompact-casesi): Update text.

From-SVN: r240916

8 years agodecl.c (gnat_to_gnu_entity): Put volatile qualifier on types at the very end of the...
Eric Botcazou [Mon, 10 Oct 2016 10:09:13 +0000 (10:09 +0000)]
decl.c (gnat_to_gnu_entity): Put volatile qualifier on types at the very end of the processing.

* gcc-interface/decl.c (gnat_to_gnu_entity): Put volatile qualifier
on types at the very end of the processing.
(gnat_to_gnu_param): Remove redundant test.
(change_qualified_type): Do nothing for unconstrained array types.

From-SVN: r240915

8 years agoutils2.c (find_common_type): Do not return the LHS type if it's an array with non...
Eric Botcazou [Mon, 10 Oct 2016 09:46:10 +0000 (09:46 +0000)]
utils2.c (find_common_type): Do not return the LHS type if it's an array with non-constant lower bound and...

* gcc-interface/utils2.c (find_common_type): Do not return the LHS type
if it's an array with non-constant lower bound and the RHS type is an
array with a constant one.

From-SVN: r240913

8 years agoutils.c (convert): For a biased input type, convert the bias itself to the base type...
Eric Botcazou [Mon, 10 Oct 2016 08:47:52 +0000 (08:47 +0000)]
utils.c (convert): For a biased input type, convert the bias itself to the base type before adding it.

* gcc-interface/utils.c (convert): For a biased input type, convert
the bias itself to the base type before adding it.

From-SVN: r240910

8 years ago* config-lang.in (lang_requires_boot_languages): Delete.
Eric Botcazou [Mon, 10 Oct 2016 07:18:07 +0000 (07:18 +0000)]
* config-lang.in (lang_requires_boot_languages): Delete.

From-SVN: r240909

8 years agors6000.h (TARGET_EFFICIENT_OVERLAPPING_UNALIGNED): Add macro to say we can efficientl...
Aaron Sawdey [Mon, 10 Oct 2016 04:42:08 +0000 (04:42 +0000)]
rs6000.h (TARGET_EFFICIENT_OVERLAPPING_UNALIGNED): Add macro to say we can efficiently handle overlapping unaligned loads.

2016-10-09  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

* config/rs6000/rs6000.h (TARGET_EFFICIENT_OVERLAPPING_UNALIGNED):
Add macro to say we can efficiently handle overlapping unaligned
loads.
* config/rs6000/rs6000.c (expand_block_compare): Avoid generating
poor code for processors older than p8.

From-SVN: r240908

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

From-SVN: r240907

8 years ago* gen-pass-instances.awk: Remove GNUism.
Eric Botcazou [Sun, 9 Oct 2016 20:50:52 +0000 (20:50 +0000)]
* gen-pass-instances.awk: Remove GNUism.

From-SVN: r240904

8 years agoipa-prop.c (ipcp_transform_function): Set fields m_vr and bits to NULL of (*ipcp_tran...
Prathamesh Kulkarni [Sun, 9 Oct 2016 18:40:09 +0000 (18:40 +0000)]
ipa-prop.c (ipcp_transform_function): Set fields m_vr and bits to NULL of (*ipcp_transformations)][node->uid].

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

* ipa-prop.c (ipcp_transform_function): Set fields m_vr and bits to NULL of
(*ipcp_transformations)][node->uid].

From-SVN: r240903

8 years agoPR 67585 Handle EINTR
Janne Blomqvist [Sun, 9 Oct 2016 18:05:56 +0000 (21:05 +0300)]
PR 67585 Handle EINTR

Many POSIX systems have the bad habit of not restarting interrupted
syscalls. On these systems it's up to the user to check for an error
with errno == EINTR and restart manually. This patch does this for
libgfortran, so that GFortran users don't have to do it.

2016-10-09  Janne Blomqvist  <jb@gcc.gnu.org>

        PR libfortran/67585
        * io/io.h: TEMP_FAILURE_RETRY: Define macro if not found.
        * io/unix.c (raw_read): Handle EINTR.
        (raw_write): Check for return value -1.
        (raw_seek): Handle EINTR.
        (raw_tell): Likewise.
        (raw_size): Likewise.
        (raw_truncate): Likewise.
        (raw_close): Likewise.
        (buf_flush): Call raw_seek instead of lseek.
        (buf_read): Likewise.
        (buf_write): Likewise.
        (fd_to_stream): Handle EINTR.
        (tempfile_open): Likewise.
        (regular_file2): Likewise.
        (compare_file_filename): Likewise.
        (find_file): Likewise.
        (inquire_sequential): Likewise.
        (inquire_direct): Likewise.
        (inquire_formatted): Likewise.

From-SVN: r240902

8 years agopa.h (BIGGEST_ALIGNMENT): Adjust comment.
John David Anglin [Sun, 9 Oct 2016 17:02:21 +0000 (17:02 +0000)]
pa.h (BIGGEST_ALIGNMENT): Adjust comment.

* config/pa/pa.h (BIGGEST_ALIGNMENT): Adjust comment.
(MALLOC_ABI_ALIGNMENT): Define.

From-SVN: r240901

8 years agotree-ssa.c (target_for_debug_bind, [...]): Use VAR_P and/or VAR_OR_FUNCTION_DECL_P...
Jakub Jelinek [Sun, 9 Oct 2016 11:19:48 +0000 (13:19 +0200)]
tree-ssa.c (target_for_debug_bind, [...]): Use VAR_P and/or VAR_OR_FUNCTION_DECL_P macros.

* tree-ssa.c (target_for_debug_bind, verify_phi_args,
ssa_undefined_value_p, maybe_optimize_var): Use VAR_P and/or
VAR_OR_FUNCTION_DECL_P macros.
* tree-chkp.c (chkp_register_var_initializer, chkp_make_static_bounds,
chkp_get_bounds_for_decl_addr, chkp_parse_array_and_component_ref,
chkp_find_bounds_1): Likewise.
* ipa-polymorphic-call.c (decl_maybe_in_construction_p): Likewise.
* hsa-gen.c (get_symbol_for_decl): Likewise.
* cgraphunit.c (check_global_declaration, analyze_functions,
handle_alias_pairs, thunk_adjust, cgraph_node::expand_thunk):
Likewise.
* gimple-fold.c (can_refer_decl_in_current_unit_p,
canonicalize_constructor_val, gimple_get_virt_method_for_vtable):
Likewise.
* tree.c (set_decl_section_name, copy_node_stat,
need_assembler_name_p, free_lang_data_in_decl, find_decls_types_r,
merge_dllimport_decl_attributes, handle_dll_attribute,
decl_init_priority_insert, auto_var_in_fn_p, array_at_struct_end_p,
verify_type): Likewise.
* gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior,
find_explicit_erroneous_behavior): Likewise.
* sdbout.c (sdbout_toplevel_data, sdbout_late_global_decl): Likewise.
* ipa.c (process_references): Likewise.
* tree-chkp-opt.c (chkp_get_check_result): Likewise.
* varasm.c (get_block_for_decl, use_blocks_for_decl_p, make_decl_rtl,
notice_global_symbol, assemble_variable, mark_decl_referenced,
build_constant_desc, output_constant_def_contents, do_assemble_alias,
make_decl_one_only, default_section_type_flags,
categorize_decl_for_section, default_encode_section_info): Likewise.
* trans-mem.c (requires_barrier): Likewise.
* gimple-expr.c (mark_addressable): Likewise.
* cfgexpand.c (add_scope_conflicts_1, expand_one_var,
expand_used_vars_for_block, clear_tree_used, stack_protect_decl_p,
expand_debug_expr): Likewise.
* tree-dump.c (dequeue_and_dump): Likewise.
* ubsan.c (instrument_bool_enum_load): Likewise.
* tree-pretty-print.c (print_declaration): Likewise.
* simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.
* tree-ssa-uninit.c (warn_uninitialized_vars): Likewise.
* asan.c (asan_protect_global, instrument_derefs): Likewise.
* tree-into-ssa.c (rewrite_stmt, maybe_register_def,
pass_build_ssa::execute): Likewise.
* var-tracking.c (var_debug_decl, track_expr_p): Likewise.
* tree-ssa-loop-ivopts.c (force_expr_to_var_cost, split_address_cost):
Likewise.
* ipa-split.c (test_nonssa_use, consider_split, mark_nonssa_use):
Likewise.
* tree-inline.c (insert_debug_decl_map, remap_ssa_name,
can_be_nonlocal, remap_decls, copy_debug_stmt,
initialize_inlined_parameters, add_local_variables,
reset_debug_binding, replace_locals_op): Likewise.
* dse.c (can_escape): Likewise.
* ipa-devirt.c (compare_virtual_tables, referenced_from_vtable_p):
Likewise.
* tree-diagnostic.c (default_tree_printer): Likewise.
* tree-streamer-in.c (unpack_ts_decl_common_value_fields,
unpack_ts_decl_with_vis_value_fields,
lto_input_ts_decl_common_tree_pointers): Likewise.
* builtins.c (builtin_save_expr, fold_builtin_expect,
readonly_data_expr): Likewise.
* tree-ssa-structalias.c (new_var_info, get_constraint_for_ssa_var,
create_variable_info_for, set_uids_in_ptset, visit_loadstore):
Likewise.
* gimple-streamer-out.c (output_gimple_stmt): Likewise.
* gimplify.c (force_constant_size, gimplify_bind_expr,
gimplify_decl_expr, gimplify_var_or_parm_decl,
gimplify_compound_lval, gimplify_init_constructor,
gimplify_modify_expr, gimplify_asm_expr, gimplify_oacc_declare,
gimplify_type_sizes): Likewise.
* cgraphbuild.c (record_reference, record_type_list, mark_address,
mark_load, mark_store, pass_build_cgraph_edges::execute): Likewise.
* tree-ssa-live.c (mark_all_vars_used_1, remove_unused_scope_block_p,
remove_unused_locals): Likewise.
* tree-ssa-alias.c (ptr_deref_may_alias_decl_p, ptrs_compare_unequal,
ref_maybe_used_by_call_p_1, call_may_clobber_ref_p_1): Likewise.
* function.c (instantiate_expr, instantiate_decls_1,
setjmp_vars_warning, add_local_decl): Likewise.
* alias.c (ao_ref_from_mem, get_alias_set, compare_base_symbol_refs):
Likewise.
* tree-stdarg.c (find_va_list_reference, va_list_counter_struct_op,
va_list_ptr_read, va_list_ptr_write, check_all_va_list_escapes,
optimize_va_list_gpr_fpr_size): Likewise.
* tree-nrv.c (pass_nrv::execute): Likewise.
* tsan.c (instrument_expr): Likewise.
* tree-ssa-dce.c (remove_dead_stmt): Likewise.
* vtable-verify.c (verify_bb_vtables): Likewise.
* tree-dfa.c (ssa_default_def, set_ssa_default_def,
get_ref_base_and_extent): Likewise.
* toplev.c (wrapup_global_declaration_1, wrapup_global_declaration_2):
Likewise.
* tree-sra.c (static bool constant_decl_p, find_var_candidates,
analyze_all_variable_accesses): Likewise.
* tree-nested.c (get_nonlocal_debug_decl,
convert_nonlocal_omp_clauses, note_nonlocal_vla_type,
note_nonlocal_block_vlas, convert_nonlocal_reference_stmt,
get_local_debug_decl, convert_local_omp_clauses,
convert_local_reference_stmt, nesting_copy_decl, remap_vla_decls):
Likewise.
* tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Likewise.
* stmt.c (decl_overlaps_hard_reg_set_p): Likewise.
* dbxout.c (dbxout_late_global_decl, dbxout_type_fields,
dbxout_symbol, dbxout_common_check): Likewise.
* expr.c (expand_assignment, expand_expr_real_2, expand_expr_real_1,
string_constant): Likewise.
* hsa.c (hsa_get_declaration_name): Likewise.
* passes.c (rest_of_decl_compilation): Likewise.
* tree-ssanames.c (make_ssa_name_fn): Likewise.
* tree-streamer-out.c (pack_ts_decl_common_value_fields,
pack_ts_decl_with_vis_value_fields,
write_ts_decl_common_tree_pointers): Likewise.
* stor-layout.c (place_field): Likewise.
* symtab.c (symtab_node::maybe_create_reference,
symtab_node::verify_base, symtab_node::make_decl_local,
symtab_node::copy_visibility_from,
symtab_node::can_increase_alignment_p): Likewise.
* dwarf2out.c (add_var_loc_to_decl, tls_mem_loc_descriptor,
decl_by_reference_p, reference_to_unused, rtl_for_decl_location,
fortran_common, add_location_or_const_value_attribute,
add_scalar_info, add_linkage_name, set_block_abstract_flags,
local_function_static, gen_variable_die, dwarf2out_late_global_decl,
optimize_one_addr_into_implicit_ptr,
optimize_location_into_implicit_ptr): Likewise.
* gimple-low.c (record_vars_into): Likewise.
* ipa-visibility.c (update_vtable_references): Likewise.
* tree-ssa-address.c (fixed_address_object_p, copy_ref_info):
Likewise.
* lto-streamer-out.c (tree_is_indexable, get_symbol_initial_value,
DFS::DFS_write_tree_body, write_symbol): Likewise.
* langhooks.c (lhd_warn_unused_global_decl,
lhd_set_decl_assembler_name): Likewise.
* attribs.c (decl_attributes): Likewise.
* except.c (output_ttype): Likewise.
* varpool.c (varpool_node::get_create, ctor_for_folding,
varpool_node::assemble_decl, varpool_node::create_alias): Likewise.
* fold-const.c (fold_unary_loc): Likewise.
* ipa-prop.c (ipa_compute_jump_functions_for_edge,
ipa_find_agg_cst_from_init): Likewise.
* omp-low.c (expand_omp_regimplify_p, expand_omp_taskreg,
expand_omp_target, lower_omp_regimplify_p,
grid_reg_assignment_to_local_var_p, grid_remap_prebody_decls,
find_link_var_op): Likewise.
* tree-chrec.c (chrec_contains_symbols): Likewise.
* tree-cfg.c (verify_address, verify_expr, verify_expr_location_1,
gimple_duplicate_bb, move_stmt_op, replace_block_vars_by_duplicates,
execute_fixup_cfg): Likewise.

From-SVN: r240900

8 years agore PR tree-optimization/77901 (ICE in tree-sse-reassoc,c:2881)
Jakub Jelinek [Sun, 9 Oct 2016 11:18:53 +0000 (13:18 +0200)]
re PR tree-optimization/77901 (ICE in tree-sse-reassoc,c:2881)

PR tree-optimization/77901
* tree-ssa-reassoc.c (optimize_range_tests_var_bound): Only optimize
if ranges[i].exp is SSA_NAME when looking for >= and only when
ranges[i].exp is NULL or SSA_NAME when looking for the other
comparison.

* gcc.c-torture/compile/pr77901.c: New test.

From-SVN: r240899

8 years agoipa-cp.c (ipcp_alignment_lattice): Remove.
Prathamesh Kulkarni [Sun, 9 Oct 2016 04:48:50 +0000 (04:48 +0000)]
ipa-cp.c (ipcp_alignment_lattice): Remove.

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

* ipa-cp.c (ipcp_alignment_lattice): Remove.
(ipcp_param_lattices): Remove field alignment.
(print_all_lattices): Remove call to ipcp_alignment_lattice::print.
(set_all_contains_variable): Remove call to
ipcp_alignment_lattice::set_to_bottom.
(initialize_node_lattices): Likewise.
(propagate_alignment_accross_jump_function): Remove.
(propagate_constants_accross_call): Remove call to
propagate_alignment_accross_jump_function.
(ipcp_store_alignment_results): Remove.
(ipcp_driver): Remove call to ipcp_store_alignment_results.
(propagate_bits_accross_jump_function): Handle ancestor jump function.
* ipa-prop.c (ipa_print_node_jump_functions_for_edge): Remove
pretty-printing of alignment jump function.
(ipa_set_jf_unknown): Remove assignment to jfunc->alignment.known.
(ipa_compute_jump_functions_for_edge): Adjust ipa_bits jump function for
alignments and remove computing ipa_alignment jump function.
(ipa_node_params_t::duplicate): Remove copying of src_trans->alignments.
(ipa_write_jump_functions): Remove streaming for ipa_alignment.
(ipa_read_jump_function): Remove reading of ipa_alignment.
(write_ipcp_transformation_info): Remove streaming for alignment
propagation summary.
(read_ipcp_transformation_info): Remove reading of alignment
propagation summary.
(ipcp_update_alignments): Remove.
(ipcp_update_bits): Adjust to set alignment for parameters of pointer
type.
(ipcp_transform_function): Remove call to ipcp_update_alignments()
and remove assignment to (*ipcp_transformations)[node->uid].alignments.
* ipa-prop.h (ipa_alignment): Remove.
(ipa_jump_func): Remove field alignment.
(ipcp_transformation_summary): Remove field alignments.
* doc/invoke.texi: Mark fipa-cp-alignment as obsolete.
* opts.c (default_options_table): Remove entry for fipa-cp-alignment.
(enable_fdo_optimizations): Remove checking for fipa-cp-alignment.

testsuite/
* gcc.dg/ipa/propalign-1.c: Adjust scan-ipa-dump.
* gcc.dg/ipa/propalign-2.c: Likewise
* gcc.dg/ipa/propalign-3.c: Likewise.
* gcc.dg/ipa/propalign-4.c: Likewise.
* gcc.dg/ipa/propalign-5.c: Likewise.

From-SVN: r240898

8 years ago* cp-gimplify.c (cp_fold): Add variable name.
Jason Merrill [Sun, 9 Oct 2016 02:41:47 +0000 (22:41 -0400)]
* cp-gimplify.c (cp_fold): Add variable name.

From-SVN: r240897

8 years agoDaily bump.
GCC Administrator [Sun, 9 Oct 2016 00:16:17 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r240896

8 years agoDelay folding of bool conversion into COND_EXPR.
Jason Merrill [Sat, 8 Oct 2016 17:40:22 +0000 (13:40 -0400)]
Delay folding of bool conversion into COND_EXPR.

gcc/c-family/
* c-common.c (c_common_truthvalue_conversion): Don't distribute
into COND_EXPR in C++.
gcc/cp/
* cp-gimplify.c (cp_fold): Distribute cp_truthvalue_conversion
into COND_EXPR.

From-SVN: r240893

8 years agosparc.h (FIXED_REGISTERS): Add %icc.
Eric Botcazou [Sat, 8 Oct 2016 17:32:46 +0000 (17:32 +0000)]
sparc.h (FIXED_REGISTERS): Add %icc.

* config/sparc/sparc.h (FIXED_REGISTERS): Add %icc.

* config/visium/visium.c (visium_expand_int_cstore): Revert latest
change.
(visium_expand_fp_cstore): Likewise.

From-SVN: r240892

8 years agodiagnostic-core.h (warning_at_rich_loc_n): Declare.
Prathamesh Kulkarni [Sat, 8 Oct 2016 17:04:35 +0000 (17:04 +0000)]
diagnostic-core.h (warning_at_rich_loc_n): Declare.

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

* diagnostic-core.h (warning_at_rich_loc_n): Declare.
* diagnostic.c (warning_at_rich_loc_n): New function.
(diagnostic_n_impl_richloc): Likewise.
(diagnostic_n_impl): Move most of the function to
diagnostic_n_impl_richloc and call it.

From-SVN: r240891

8 years agoutils.c (convert): Add missing break.
Eric Botcazou [Sat, 8 Oct 2016 17:04:28 +0000 (17:04 +0000)]
utils.c (convert): Add missing break.

* gcc-interface/utils.c (convert) <VECTOR_CST>: Add missing break.

Revert
2016-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

* gcc-interface/decl.c: Fix fall through comment formatting.
* gcc-interface/misc.c: Likewise.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils.c: Likewise.
* gcc-interface/utils2.c: Likewise.

From-SVN: r240890

8 years agoFurther P0135 refinement.
Jason Merrill [Sat, 8 Oct 2016 16:23:26 +0000 (12:23 -0400)]
Further P0135 refinement.

* call.c (build_user_type_conversion_1): Consider conversions from
a single element in an initializer-list.
(build_temp): Undo early_elide_copy change.
(build_over_call): Check that we don't try to copy a TARGET_EXPR
in C++17 mode.  Set user_conv_p here.
(convert_like_real): Not here.
(check_self_delegation): Split out from...
(build_special_member_call): ...here.  Handle C++17 copy elision.
* cvt.c (early_elide_copy): Remove.
(ocp_convert): Undo early_elide_copy change.
* except.c (build_throw): Likewise.
* init.c (expand_default_init): Likewise.
* typeck.c (cp_build_modify_expr): Likewise.

From-SVN: r240889