gcc.git
8 years ago[PR 69920] Prevent SRA from leaving a removed SSA_NAME in IL
Martin Jambor [Fri, 26 Feb 2016 18:06:42 +0000 (19:06 +0100)]
[PR 69920] Prevent SRA from leaving a removed SSA_NAME in IL

2016-02-26  Martin Jambor  <mjambor@suse.cz>

PR middle-end/69920
* tree-sra.c (sra_modify_assign): Do not remove loads of
uninitialized aggregates to SSA_NAMEs.

testsuite/
* gcc.dg/torture/pr69932.c: New test.
* gcc.dg/torture/pr69936.c: Likewise.

From-SVN: r233753

8 years agoS/390: PR69709 Fix risbg splitter
Andreas Krebbel [Fri, 26 Feb 2016 18:03:51 +0000 (18:03 +0000)]
S/390: PR69709 Fix risbg splitter

This fixes a wrong code generation problem with the splitters introduced
with that patch: https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01840.html

The target operand is used as temporary.  This fails if it matches the
source of the left shift which is read after writing the temporary.

Thanks to Dominik for debugging it and thanks to Richard for the fix!

Bootstrapped and regtested on s390x with-arch=z13.

Bye,

-Andreas-

gcc/ChangeLog:

2016-02-26  Richard Henderson  <rth@redhat.com>

PR target/69709
* config/s390/s390.md (risbg and risbgn splitters): Allocate new
pseudo in case the target rtx matches the source of the left
shift.

gcc/testsuite/ChangeLog:

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

PR target/69709
* gcc.target/s390/pr69709.c: New test.

From-SVN: r233752

8 years ago[hsa/69568] Fix ld instruction type for packed data
Martin Jambor [Fri, 26 Feb 2016 17:48:19 +0000 (18:48 +0100)]
[hsa/69568] Fix ld instruction type for packed data

2016-02-26  Martin Jambor  <mjambor@suse.cz>

PR hsa/69568
* hsa.h (hsa_type_packed_p): Declare.
* hsa.c (hsa_type_packed_p): New function.
* hsa-gen.c (mem_type_for_type): Use unsigned type for packed
loads.
(gen_hsa_insns_for_store): Use hsa_type_packed_p.
* hsa-brig.c (emit_basic_insn): Likewise.

From-SVN: r233751

8 years ago[hsa/69674] Make testsuite libgomp.c/for-3.c compile with -m32
Martin Jambor [Fri, 26 Feb 2016 17:45:37 +0000 (18:45 +0100)]
[hsa/69674] Make testsuite libgomp.c/for-3.c compile with -m32

2016-02-26  Martin Jambor  <mjambor@suse.cz>

pr hsa/69674
* hsa-gen.c (gen_hsa_phi_from_gimple_phi): Use proper hsa type for
pointers.
(gen_hsa_addr): Allow integer constants in TMR_INDEX2.

From-SVN: r233750

8 years ago[hsa] Satisfy conditional move operand type constrains
Martin Jambor [Fri, 26 Feb 2016 17:42:06 +0000 (18:42 +0100)]
[hsa] Satisfy conditional move operand type constrains

2016-02-26  Martin Jambor  <mjambor@suse.cz>

* hsa.h (is_a_helper): New overload for hsa_op_immed for
hsa_op_with_type operands.
(hsa_unsigned_type_for_type): Declare.
* hsa.c (hsa_unsigned_type_for_type): New function.
* hsa-gen.c (gen_hsa_binary_operation): Use hsa_unsigned_type_for_type.
(gen_hsa_insns_for_operation_assignment): Satisfy constrains of
the finalizer.  Do not emit extra move.

From-SVN: r233749

8 years ago[hsa] Fail in presence of atomic operations in private segment
Martin Jambor [Fri, 26 Feb 2016 17:39:11 +0000 (18:39 +0100)]
[hsa] Fail in presence of atomic operations in private segment

2016-02-26  Martin Jambor  <mjambor@suse.cz>

* hsa-gen.c (gen_hsa_ternary_atomic_for_builtin): Fail in presence of
atomic operations in private segment.

From-SVN: r233748

8 years agore PR go/69966 (libgo: Port syscall.SetsockoptUcred from golang)
Ian Lance Taylor [Fri, 26 Feb 2016 17:36:00 +0000 (17:36 +0000)]
re PR go/69966 (libgo: Port syscall.SetsockoptUcred from golang)

PR go/69966
    syscall: Add new Getsockopt functions.

    Add GetsockoptICMPv6Filter, GetsockoptIPv6MTUInfo, GetsockoptUcred as
    appropriate.  These functions exist in the master library.

    For GCC PR 69966.

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

From-SVN: r233747

8 years ago[omp, hsa] Do not gridify simd constructs
Martin Jambor [Fri, 26 Feb 2016 17:35:29 +0000 (18:35 +0100)]
[omp, hsa] Do not gridify simd constructs

2016-02-26  Martin Jambor  <mjambor@suse.cz>

* omp-low.c (grid_find_ungridifiable_statement): Store problematic
statements to wi->info.  Also disallow omp simd constructs.
(grid_target_follows_gridifiable_pattern): Use wi.info to dump reason
for not gridifying.  Dump special string for omp_for.

From-SVN: r233746

8 years ago[AArch64] Set TREE_TARGET_GLOBALS in aarch64_set_current_function when new tree is...
Kyrylo Tkachov [Fri, 26 Feb 2016 16:02:21 +0000 (16:02 +0000)]
[AArch64] Set TREE_TARGET_GLOBALS in aarch64_set_current_function when new tree is the default node to recalculate optab availability

PR target/69245
* config/aarch64/aarch64.c (aarch64_set_current_function):
Save/restore target globals when switching to
target_option_default_node.

* gcc.target/aarch64/pr69245_1.c: New test.

From-SVN: r233745

8 years ago[AArch64] PR target/69613: Return zero TARGET_SHIFT_TRUNCATION_MASK when SHIFT_COUNT_...
Kyrylo Tkachov [Fri, 26 Feb 2016 15:59:45 +0000 (15:59 +0000)]
[AArch64] PR target/69613: Return zero TARGET_SHIFT_TRUNCATION_MASK when SHIFT_COUNT_TRUNCATED is false

PR target/69613
* config/aarch64/aarch64.c (aarch64_shift_truncation_mask):
Return 0 if !SHIFT_COUNT_TRUNCATED.

* gcc.dg/torture/pr69613.c: New test.

From-SVN: r233744

8 years agore PR rtl-optimization/69891 (wrong code with -mstringop-strategy=libcall @ i686)
Jakub Jelinek [Fri, 26 Feb 2016 15:53:43 +0000 (16:53 +0100)]
re PR rtl-optimization/69891 (wrong code with -mstringop-strategy=libcall @ i686)

PR rtl-optimization/69891
* dse.c (scan_insn): If we can't figure out memset arguments
or they are non-constant, call clear_rhs_from_active_local_stores.

* gcc.target/i386/pr69891.c: New test.

Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r233743

8 years agoFix ChangeLog formatting
William Schmidt [Fri, 26 Feb 2016 15:30:18 +0000 (15:30 +0000)]
Fix ChangeLog formatting

From-SVN: r233742

8 years agoUpdate ChangeLog to mention pr61397
William Schmidt [Fri, 26 Feb 2016 15:25:29 +0000 (15:25 +0000)]
Update ChangeLog to mention pr61397

From-SVN: r233740

8 years agop8vector-ldst.c: Adjust to test desired functionality for both 32-bit and 64-bit.
Michael Meissner [Fri, 26 Feb 2016 15:24:55 +0000 (15:24 +0000)]
p8vector-ldst.c: Adjust to test desired functionality for both 32-bit and 64-bit.

2016-02-26  Michael Meissner <meissner@linux.vnet.ibm.com>
    Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* gcc.target/powerpc/p8vector-ldst.c: Adjust to test desired
functionality for both 32-bit and 64-bit.

Co-Authored-By: Bill Schmidt <wschmidt@linux.vnet.ibm.com>
From-SVN: r233739

8 years agoMention clog10{,f,l} in documentation (Builtins section)
Martin Liska [Fri, 26 Feb 2016 11:56:17 +0000 (12:56 +0100)]
Mention clog10{,f,l} in documentation (Builtins section)

* doc/extend.texi: Mention clog10, clog10f an clog10l
in Builtins section.

From-SVN: r233738

8 years agoReplace ENABLE_CHECKING with CHECKING_P in dwarf2out
Martin Liska [Fri, 26 Feb 2016 10:46:48 +0000 (11:46 +0100)]
Replace ENABLE_CHECKING with CHECKING_P in dwarf2out

* dwarf2out.c (new_loc_descr): Replace ENABLE_CHECKING with
CHECKING_P.
(resolve_args_picking_1): Likewise.
* dwarf2out.h (struct GTY): Likewise.

From-SVN: r233737

8 years agoReplace ENABLE_CHECKING macro with flag_checking in HSA
Martin Liska [Fri, 26 Feb 2016 10:10:11 +0000 (11:10 +0100)]
Replace ENABLE_CHECKING macro with flag_checking in HSA

* hsa-gen.c (generate_hsa): Replace ENABLE_CHECKING macro
with flag_checking.
* hsa-regalloc.c (linear_scan_regalloc): Likewise.

From-SVN: r233736

8 years agoMention --enable-valgrind-annotations in install.texi
Markus Trippelsdorf [Fri, 26 Feb 2016 10:02:45 +0000 (10:02 +0000)]
Mention --enable-valgrind-annotations in install.texi

    Martin Liska  <mliska@suse.cz>

* doc/install.texi: Mention --enable-valgrind-annotations.

Co-Authored-By: Martin Liska <mliska@suse.cz>
From-SVN: r233735

8 years agore PR target/69551 (Wrong code with single element vector insert)
Richard Biener [Fri, 26 Feb 2016 08:34:58 +0000 (08:34 +0000)]
re PR target/69551 (Wrong code with single element vector insert)

2016-02-26  Richard Biener  <rguenther@suse.de>

PR tree-optimization/69551
* tree-ssa-structalias.c (get_constraint_for_ssa_var): When
looking through aliases adjust DECL_PT_UID to refer to the
ultimate alias target.

* gcc.dg/torture/pr69951.c: New testcase.

From-SVN: r233734

8 years agore PR c++/69889 (ICE: in assign_temp, at function.c:961)
Jason Merrill [Fri, 26 Feb 2016 04:53:58 +0000 (23:53 -0500)]
re PR c++/69889 (ICE: in assign_temp, at function.c:961)

PR c++/69889

* cp-tree.h (AGGR_INIT_FROM_THUNK_P): New.
* tree.c (build_aggr_init_expr): Set it.
* semantics.c (simplify_aggr_init_expr): Check it.
* cp-gimplify.c (cp_genericize_r): Don't walk into
a call/aggr_init from a thunk.

From-SVN: r233733

8 years agoDaily bump.
GCC Administrator [Fri, 26 Feb 2016 00:16:22 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r233732

8 years agoDo not gather mem stats in run_exit_handles (PR
Martin Liska [Thu, 25 Feb 2016 16:57:39 +0000 (17:57 +0100)]
Do not gather mem stats in run_exit_handles (PR

PR middle-end/69919
* alloc-pool.c (after_memory_report): New variable.
* alloc-pool.h (base_pool_allocator ::release): Do not use
the infrastructure if after_memory_report.
* toplev.c (toplev::main): Mark after memory report.

From-SVN: r233722

8 years agore PR c++/69842 (Parameter deduction in polymorphic lambdas)
Jason Merrill [Thu, 25 Feb 2016 15:23:47 +0000 (10:23 -0500)]
re PR c++/69842 (Parameter deduction in polymorphic lambdas)

PR c++/69842
* method.c (forward_parm): Handle parameter packs.
* lambda.c (maybe_add_lambda_conv_op): Use it for them.

From-SVN: r233719

8 years agore PR c++/67364 ("accessing uninitialized member" error in constexpr context)
Jason Merrill [Thu, 25 Feb 2016 14:09:24 +0000 (09:09 -0500)]
re PR c++/67364 ("accessing uninitialized member" error in constexpr context)

PR c++/67364
* constexpr.c (cxx_eval_component_reference): Don't complain about
unevaluated empty classes.

From-SVN: r233716

8 years agore PR c++/68049 (template instantiation involving may_alias defines symbol twice)
Jason Merrill [Thu, 25 Feb 2016 14:09:18 +0000 (09:09 -0500)]
re PR c++/68049 (template instantiation involving may_alias defines symbol twice)

PR c++/68049
* tree.c (strip_typedefs): Use DECL_ORIGINAL_TYPE.

From-SVN: r233715

8 years agore PR tree-optimization/48795 (-Warray-bounds false positive)
Richard Biener [Thu, 25 Feb 2016 13:20:25 +0000 (13:20 +0000)]
re PR tree-optimization/48795 (-Warray-bounds false positive)

2016-02-25  Richard Biener  <rguenther@suse.de>

PR tree-optimization/48795
* tree-vrp.c (check_array_ref): Use array_at_struct_end_p.

* gcc.dg/Warray-bounds-18.c: New testcase.

From-SVN: r233714

8 years agoRequire init_priority support for g++.dg/ext/attr-constructor1.C
Rainer Orth [Thu, 25 Feb 2016 12:47:28 +0000 (12:47 +0000)]
Require init_priority support for g++.dg/ext/attr-constructor1.C

* g++.dg/ext/attr-constructor1.C: Require init_priority support.

From-SVN: r233713

8 years agore PR driver/68463 (Offloading fails when some objects are compiled with LTO and...
Ilya Verbin [Thu, 25 Feb 2016 12:23:52 +0000 (12:23 +0000)]
re PR driver/68463 (Offloading fails when some objects are compiled with LTO and some without)

gcc/
PR driver/68463
* config/gnu-user.h (CRTOFFLOADBEGIN): Define.  Add crtoffloadbegin.o if
offloading is enabled and -fopenacc or -fopenmp is specified.
(CRTOFFLOADEND): Likewise.
(GNU_USER_TARGET_STARTFILE_SPEC): Add CRTOFFLOADBEGIN.
(GNU_USER_TARGET_ENDFILE_SPEC): Add CRTOFFLOADEND.
* lto-wrapper.c (offloadbegin, offloadend): Remove static vars.
(offload_objects_file_name): New static var.
(tool_cleanup): Remove offload_objects_file_name file.
(find_offloadbeginend): Replace with ...
(find_crtoffloadtable): ... this.
(run_gcc): Remove offload_argc and offload_argv.
Get offload_objects_file_name from -foffload-objects=... option.
Read names of object files with offload from this file, pass them to
compile_images_for_offload_targets.  Don't call find_offloadbeginend and
don't pass offloadbegin and offloadend to the linker.  Don't pass
offload non-LTO files to the linker, because now they're not claimed.
libgcc/
PR driver/68463
* Makefile.in (crtoffloadtable$(objext)): New rule.
* configure.ac (extra_parts): Add crtoffloadtable$(objext) if
enable_offload_targets is not empty.
* configure: Regenerate.
* offloadstuff.c: Move __OFFLOAD_TABLE__ from crtoffloadend to
crtoffloadtable.
libgomp/
PR driver/68463
* testsuite/libgomp.oacc-c-c++-common/parallel-dims-2.c: Remove.
lto-plugin/
PR driver/68463
* lto-plugin.c (struct plugin_offload_file): New.
(offload_files): Change type.
(offload_files_last, offload_files_last_obj): New.
(offload_files_last_lto): New.
(free_2): Adjust accordingly.
(all_symbols_read_handler): Don't add offload files to lto_arg_ptr.
Don't call free_1 for offload_files.  Write names of object files with
offloading to the temporary file.  Add new option to lto_arg_ptr.
(claim_file_handler): Don't claim file if it contains offload sections
without LTO sections.  If it contains offload sections, add to the list.

From-SVN: r233712

8 years agore PR lto/69630 (LTO ICE in types_same_for_odr at ipa-devirt.c:402)
Jan Hubicka [Thu, 25 Feb 2016 12:10:04 +0000 (13:10 +0100)]
re PR lto/69630 (LTO ICE in types_same_for_odr at ipa-devirt.c:402)

PR ipa/69630
* ipa-devirt.c (possible_polymorphic_call_targets): Do not ICE
on builtin_unreachable.

From-SVN: r233711

8 years agore PR rtl-optimization/69896 (wrong code with -frename-registers @ x64_64)
Jakub Jelinek [Thu, 25 Feb 2016 08:09:02 +0000 (09:09 +0100)]
re PR rtl-optimization/69896 (wrong code with -frename-registers @ x64_64)

PR rtl-optimization/69896
* regcprop.c: Include cfgrtl.h.
(copyprop_hardreg_forward_1): If noop_p insn uses narrower
than remembered mode, either delete it (if noop_move_p), or
treat like copy_p but not noop_p instruction.

* gcc.dg/pr69896.c: New test.

From-SVN: r233692

8 years agore PR c++/69736 ("error: too few arguments to function" in c++14 but not c++11)
Patrick Palka [Thu, 25 Feb 2016 01:14:27 +0000 (01:14 +0000)]
re PR c++/69736 ("error: too few arguments to function" in c++14 but not c++11)

Fix PR c++/69736

gcc/cp/ChangeLog:

PR c++/69736
* cp-tree.h (REF_PARENTHESIZED_P): Adjust documentation.
(maybe_undo_parenthesized_ref): Declare.
* semantics.c (maybe_undo_parenthesized_ref): Split out from
check_return_expr.
(finish_call_expr): Use it.
* typeck.c (check_return_expr): Use it.
* pt.c (tsubst_copy_and_build) [INDIRECT_REF]: Retain the
REF_PARENTHESIZED_P flag.

gcc/testsuite/ChangeLog:

PR c++/69736
* g++.dg/cpp1y/paren2.C: New test.

From-SVN: r233691

8 years agoDaily bump.
GCC Administrator [Thu, 25 Feb 2016 00:16:13 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r233690

8 years agoPR c/51147 - attribute((mode(byte))) on an enum generates wrong code
Martin Sebor [Wed, 24 Feb 2016 23:26:42 +0000 (23:26 +0000)]
PR c/51147 - attribute((mode(byte))) on an enum generates wrong code

gcc/testsuite/ChangeLog:
2016-02-24  Martin Sebor  <msebor@redhat.com>

        PR c/51147
        * gcc.dg/enum-mode-2.c: New test.

From-SVN: r233686

8 years agore PR debug/69705 (segfault in libgomp.fortran/task1.f90 with -flto -fno-use-linker...
Jakub Jelinek [Wed, 24 Feb 2016 22:04:09 +0000 (23:04 +0100)]
re PR debug/69705 (segfault in libgomp.fortran/task1.f90 with -flto -fno-use-linker-plugin -fno-toplevel-reorder -O1 -g)

PR debug/69705
* dwarf2out.c (gen_variable_die): Work around buggy LTO
- allow NULL decl for Fortran DW_TAG_common_block variables.

From-SVN: r233685

8 years agore PR c++/69922 (Bogus -Wnonnull-compare for: ... ? static_cast<T*>(this) : nullptr)
Jakub Jelinek [Wed, 24 Feb 2016 22:01:24 +0000 (23:01 +0100)]
re PR c++/69922 (Bogus -Wnonnull-compare for: ... ? static_cast<T*>(this) : nullptr)

PR c++/69922
* class.c (build_base_path): Set TREE_NO_WARNING on the null_test.
Avoid folding it.
* init.c (build_vec_delete_1, build_delete): Don't fold the non-NULL
tests.
* cp-gimplify.c (cp_fold): For TREE_NO_WARNING comparisons with NULL,
unless they are folded into INTEGER_CST, error_mark_node or some
comparison with NULL, avoid folding them and use either the original
comparison or non-folded comparison of folded arguments.
* cp-ubsan.c (cp_ubsan_instrument_vptr): Set TREE_NO_WARNING on the
comparison, don't fold the comparison right away.

* g++.dg/warn/Wnonnull-compare-6.C: New test.
* g++.dg/warn/Wnonnull-compare-7.C: New test.
* g++.dg/ubsan/pr69922.C: New test.

From-SVN: r233684

8 years agore PR c/69819 (ICE on invalid code on x86_64-linux-gnu in tree check: expected functi...
Marek Polacek [Wed, 24 Feb 2016 21:47:59 +0000 (21:47 +0000)]
re PR c/69819 (ICE on invalid code on x86_64-linux-gnu in tree check: expected function_type or method_type, have array_type in function_args_iter_init, at tree.h:4536)

PR c/69819
* c-decl.c (finish_decl): Don't update the copy of the type of a
different decl type.

* gcc.dg/pr69819.c: New test.

From-SVN: r233683

8 years agoPR c++/69323 - errors
Jason Merrill [Wed, 24 Feb 2016 19:56:09 +0000 (14:56 -0500)]
PR c++/69323 - errors

* friend.c (make_friend_class): Likewise.
* decl.c (lookup_and_check_tag): Diagnose invalid dependent friend.

From-SVN: r233682

8 years agoPR c++/69323 - valid
Jason Merrill [Wed, 24 Feb 2016 19:56:03 +0000 (14:56 -0500)]
PR c++/69323 - valid

* pt.c (instantiate_class_template_1): Set
processing_template_decl before substituting friend_type.

From-SVN: r233681

8 years ago* doc/invoke.texi: Adjust -flifetime-dse documentation.
Jason Merrill [Wed, 24 Feb 2016 19:55:57 +0000 (14:55 -0500)]
* doc/invoke.texi: Adjust -flifetime-dse documentation.

From-SVN: r233680

8 years agoPR c++/69912 - [6 regression] ICE in build_ctor_subob_ref initializing
Martin Sebor [Wed, 24 Feb 2016 17:23:35 +0000 (17:23 +0000)]
PR c++/69912 - [6 regression] ICE in build_ctor_subob_ref initializing

PR c++/69912 - [6 regression] ICE in build_ctor_subob_ref initializing
a flexible array member

gcc/testsuite/ChangeLog:
2016-02-24  Martin Sebor  <msebor@redhat.com>

PR c++/69912
* g++.dg/ext/flexary15.C: New test.

gcc/cp/ChangeLog:
2016-02-24  Martin Sebor  <msebor@redhat.com>

PR c++/69912
* tree.c (build_ctor_subob_ref): Compare types' main variants
        instead of the types as they are.

From-SVN: r233678

8 years agoAvoid making unportable assumptions about the relationship between SIZE_MAX
Martin Sebor [Wed, 24 Feb 2016 17:04:03 +0000 (17:04 +0000)]
Avoid making unportable assumptions about the relationship between SIZE_MAX
and UINT_MAX.

gcc/testsuite/ChangeLog:
        * gcc/testsuite/gcc.dg/builtins-68.c: Avoid making unportable
        assumptions about the relationship between SIZE_MAX and UINT_MAX.
        * gcc/testsuite/g++.dg/ext/builtin_alloca.C: Same.

From-SVN: r233677

8 years agore PR debug/61033 (Infinite loop in variable tracking)
Maxim Kuvyrkov [Wed, 24 Feb 2016 16:41:52 +0000 (16:41 +0000)]
re PR debug/61033 (Infinite loop in variable tracking)

PR debug/61033
* g++.dg/pr61033.C: Add a regression testcase for PR debug/61033.

Co-Authored-By: Charles Baylis <charles.baylis@linaro.org>
From-SVN: r233675

8 years agoAdd -flifetime-dse=1.
Jason Merrill [Wed, 24 Feb 2016 15:18:04 +0000 (10:18 -0500)]
Add -flifetime-dse=1.

gcc/
* common.opt (flifetime-dse): Add -flifetime-dse=1.
gcc/cp/
* decl.c (start_preparsed_function): Condition ctor clobber on
flag_lifetime_dse > 1.

From-SVN: r233672

8 years ago* cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline.
Jason Merrill [Wed, 24 Feb 2016 15:17:58 +0000 (10:17 -0500)]
* cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline.

From-SVN: r233671

8 years agoruntime: lock M during cgo call
Ian Lance Taylor [Wed, 24 Feb 2016 15:03:04 +0000 (15:03 +0000)]
runtime: lock M during cgo call

    cgo should lock the M.

    See also https://golang.org/cl/18882 .

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

From-SVN: r233670

8 years agore PR tree-optimization/69760 (Wrong 64-bit memory address caused by an unneeded...
Richard Biener [Wed, 24 Feb 2016 14:54:01 +0000 (14:54 +0000)]
re PR tree-optimization/69760 (Wrong 64-bit memory address caused by an unneeded overflowing 32-bit integer multiplication on x86_64 under -O2 and -O3 code optimization)

2016-02-24  Richard Biener  <rguenther@suse.de>
Jakub Jelinek  <jakub@redhat.com>

PR middle-end/69760
* tree-scalar-evolution.c (interpret_rhs_expr): Re-write
conditionally executed ops to well-defined overflow behavior.

* gcc.dg/torture/pr69760.c: New testcase.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r233669

8 years agoAdapt gcc.dg/debug/dwarf2/prod-options.c for Solaris assembler
Rainer Orth [Wed, 24 Feb 2016 14:46:07 +0000 (14:46 +0000)]
Adapt gcc.dg/debug/dwarf2/prod-options.c for Solaris assembler

* gcc.dg/debug/dwarf2/prod-options.c: Use different DW_AT_producer
pattern on Solaris with as.

From-SVN: r233668

8 years ago[ARM] Tests for arm_restrict_it patterns in thumb2.md
Kyrylo Tkachov [Wed, 24 Feb 2016 14:21:52 +0000 (14:21 +0000)]
[ARM] Tests for arm_restrict_it patterns in thumb2.md

* gcc.target/arm/cond_sub_restrict_it.c: New test.
* gcc.target/arm/condarith_restrict_it.c: Likewise.
* gcc.target/arm/movcond_restrict_it.c: Likewise.
* gcc.target/arm/negscc_restrict_it.c: Likewise.

From-SVN: r233667

8 years agolibstdc++/69939 Qualify get and forward
Jonathan Wakely [Wed, 24 Feb 2016 13:59:29 +0000 (13:59 +0000)]
libstdc++/69939 Qualify get and forward

PR libstdc++/69939
* include/experimental/tuple (__apply_impl): Qualify get and forward.

From-SVN: r233666

8 years agore PR middle-end/69915 (ICE: SIGSEGV with -O -ftracer with broken backtrace)
Jakub Jelinek [Wed, 24 Feb 2016 13:54:39 +0000 (14:54 +0100)]
re PR middle-end/69915 (ICE: SIGSEGV with -O -ftracer with broken backtrace)

PR middle-end/69915
* tree.c (build_vector_from_ctor): Fix handling of VECTOR_CST
elements.

* gcc.dg/pr69915.c: New test.

From-SVN: r233664

8 years ago[gcse] PR rtl-optimization/69886: Check target mode in can_assign_to_reg_without_clob...
Kyrylo Tkachov [Wed, 24 Feb 2016 13:00:10 +0000 (13:00 +0000)]
[gcse] PR rtl-optimization/69886: Check target mode in can_assign_to_reg_without_clobbers_p

PR rtl-optimization/69886
* gcse.c (can_assign_to_reg_without_clobbers_p): Accept mode
argument.  Use it when checking validity of set instructions.
(want_to_gcse_p): Pass mode to can_assign_to_reg_without_clobbers_p.
(compute_ld_motion_mems): Update can_assign_to_reg_without_clobbers_p
callsite.
* rtl.h (can_assign_to_reg_without_clobbers_p): Update prototype.
* store-motion.c (find_moveable_store): Update
can_assign_to_reg_without_clobbers_p callsite.

* gcc.dg/torture/pr69886.c: New test.

From-SVN: r233662

8 years agore PR tree-optimization/68963 (O3 vs. O2 discards part of loop and terminates early)
Richard Biener [Wed, 24 Feb 2016 12:03:27 +0000 (12:03 +0000)]
re PR tree-optimization/68963 (O3 vs. O2 discards part of loop and terminates early)

2016-02-24  Richard Biener  <rguenther@suse.de>

PR middle-end/68963
* tree-ssa-loop-niter.c (derive_constant_upper_bound_ops): Fix
bogus check.
(record_nonwrapping_iv): Do not fall back to the low/high bound
for non-constant IV bases if the stmt is not always executed.

* gcc.dg/torture/pr68963.c: New testcase.

From-SVN: r233660

8 years ago[ARM] Add initial support for the Cortex-A32
Kyrylo Tkachov [Wed, 24 Feb 2016 11:02:04 +0000 (11:02 +0000)]
[ARM] Add initial support for the Cortex-A32

* config/arm/arm-cores.def (cortex-a32): New entry.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/arm-tune.md: Regenerate.
* config/arm/bpabi.h (BE8_LINK_SPEC): Add mcpu=cortex-a32.
* config/arm/t-aprofile: Handle mcpu=cortex-a32.
* doc/invoke.texi (ARM Options): Document cortex-a32 as value
for -mcpu and -mtune.

From-SVN: r233659

8 years ago[ARM] PR target/69875 Fix atomic_loaddi expansion
Kyrylo Tkachov [Wed, 24 Feb 2016 11:00:28 +0000 (11:00 +0000)]
[ARM] PR target/69875 Fix atomic_loaddi expansion

PR target/69875
* config/arm/arm.h (TARGET_HAVE_LPAE): Define.
* config/arm/unspecs.md (VUNSPEC_LDRD_ATOMIC): New value.
* config/arm/sync.md (arm_atomic_loaddi2_ldrd): New pattern.
(atomic_loaddi_1): Delete.
(atomic_loaddi): Rewrite expander using the above changes.

* gcc.target/arm/atomic_loaddi_acquire.x: New file.
* gcc.target/arm/atomic_loaddi_relaxed.x: Likewise.
* gcc.target/arm/atomic_loaddi_seq_cst.x: Likewise.
* gcc.target/arm/atomic_loaddi_1.c: New test.
* gcc.target/arm/atomic_loaddi_2.c: Likewise.
* gcc.target/arm/atomic_loaddi_3.c: Likewise.
* gcc.target/arm/atomic_loaddi_4.c: Likewise.
* gcc.target/arm/atomic_loaddi_5.c: Likewise.
* gcc.target/arm/atomic_loaddi_6.c: Likewise.
* gcc.target/arm/atomic_loaddi_7.c: Likewise.
* gcc.target/arm/atomic_loaddi_8.c: Likewise.
* gcc.target/arm/atomic_loaddi_9.c: Likewise.

From-SVN: r233658

8 years agore PR c/69918 (gcc.dg/torture/builtin-integral-1.c FAILs)
Jakub Jelinek [Wed, 24 Feb 2016 08:37:41 +0000 (09:37 +0100)]
re PR c/69918 (gcc.dg/torture/builtin-integral-1.c FAILs)

PR c/69918
* params.def (PARAM_MAX_SSA_NAME_QUERY_DEPTH): Bump default from
2 to 3.

From-SVN: r233657

8 years agore PR middle-end/69909 (wrong code with -Os and vectors @ x86_64)
Jakub Jelinek [Wed, 24 Feb 2016 08:36:16 +0000 (09:36 +0100)]
re PR middle-end/69909 (wrong code with -Os and vectors @ x86_64)

PR middle-end/69909
* expr.c (expand_expr_real_1) <normal_inner_ref>: Avoid
set_mem_attributes if tem is SSA_NAME which got expanded
as a MEM.

* gcc.dg/torture/pr69909.c: New test.

Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r233656

8 years agore PR tree-optimization/69907 (wrong code at -O3 on x86_64-linux-gnu)
Richard Biener [Wed, 24 Feb 2016 08:27:25 +0000 (08:27 +0000)]
re PR tree-optimization/69907 (wrong code at -O3 on x86_64-linux-gnu)

2016-02-24  Richard Biener  <rguenther@suse.de>

PR tree-optimization/69907
* tree-vect-stmts.c (vectorizable_load): Check for gaps at the
end of permutations for BB vectorization.

* gcc.dg/vect/bb-slp-pr69907.c: New testcase.
* gcc.dg/vect/bb-slp-34.c: XFAIL.
* gcc.dg/vect/bb-slp-pr68892.c: Likewise.

From-SVN: r233655

8 years agoarm-c.c (arm_option_override): Initialize target_option_current_node.
Christian Bruel [Wed, 24 Feb 2016 08:19:12 +0000 (09:19 +0100)]
arm-c.c (arm_option_override): Initialize target_option_current_node.

2016-02-24  Christian Bruel  <christian.bruel@st.com>

* config/arm/arm-c.c (arm_option_override): Initialize
target_option_current_node.
* config/arm/arm.c (arm_pragma_target_parse): Replace
build_target_option_node call by target_option_current_node.
Set target_option_current_node.
Fix comments.

From-SVN: r233654

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

From-SVN: r233652

8 years agore PR fortran/61156 (Internal compiler error for Fortran files when specifying a...
Jerry DeLisle [Tue, 23 Feb 2016 22:53:31 +0000 (22:53 +0000)]
re PR fortran/61156 (Internal compiler error for Fortran files when specifying a file instead of an include directory with -I)

2016-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/61156
* scanner.c (add_path_to_list): If include path is not a directory,
issue a fatal error.

PR fortran/61156
* gfortran.dg/include_6.f90: Update test.

From-SVN: r233649

8 years agore PR target/69810 (PowerPC64: unrecognizable insn)
David Edelsohn [Tue, 23 Feb 2016 22:28:23 +0000 (22:28 +0000)]
re PR target/69810 (PowerPC64: unrecognizable insn)

PR target/69810
* config/rs6000/rs6000.md (zero_extendqi<mode>2_dot): Convert from
define_insn_and_split to define_insn.
(zero_extendqi<mode>2_dot2): Same.
(extendqi<mode>2_dot): Same.
(extendqi<mode>2_dot2): Same.

From-SVN: r233648

8 years agoTweak the pipeline model for Exynos M1
Evandro Menezes [Tue, 23 Feb 2016 21:31:00 +0000 (21:31 +0000)]
Tweak the pipeline model for Exynos M1

gcc/
* config/aarch64/aarch64.c (exynosm1_tunings): Enable fusion of AES{D,E}
and AESMC pairs.
* config/arm/exynos-m1.md: Change cost of STP, fix bypass for stores
and add bypass for AES{D,E} and AESMC pairs.

From-SVN: r233647

8 years agoaarch64.c (exynosm1_tunings): Enable the Newton series for reciprocal square root...
Evandro Menezes [Tue, 23 Feb 2016 20:21:23 +0000 (20:21 +0000)]
aarch64.c (exynosm1_tunings): Enable the Newton series for reciprocal square root in Exynos M1.

        * gcc/config/aarch64/aarch64.c (exynosm1_tunings): Enable the Newton
        series for reciprocal square root in Exynos M1.

From-SVN: r233646

8 years agoDocument __STDCPP_WANT_MATH_SPEC_FUNCS__ macro
Jonathan Wakely [Tue, 23 Feb 2016 20:03:30 +0000 (20:03 +0000)]
Document __STDCPP_WANT_MATH_SPEC_FUNCS__ macro

* doc/xml/manual/using.xml: Document __STDCPP_WANT_MATH_SPEC_FUNCS__.
* doc/html/*: Regenerate.

From-SVN: r233645

8 years agolibstdc++/69893 make <tr1/cmath> work with C++11
Jonathan Wakely [Tue, 23 Feb 2016 19:49:31 +0000 (19:49 +0000)]
libstdc++/69893 make <tr1/cmath> work with C++11

PR libstdc++/69893
* include/tr1/cmath (acosh, asinh, atanh, cbrt, copysign, erf, erfc,
exp2, expm1, fdim, fma, fmax, fmin, hypot, ilogb, lgamma, llrint,
llround, log1p, log2, logb, lrint, lround, nan, nearbyint, nextafter,
nexttoward, remainder, remquo, rint, round, scalbln, scalbn, tgamma,
trunc) [__cplusplus >= 201103L]: Import from namespace std.
(fabs) [__cplusplus < 201103L]: Import from namespace std.
* include/tr1/complex (acosh, asinh, atanh) [__cplusplus >= 201103L]:
Likewise.
* testsuite/tr1/headers/c++200x/complex.cc: Add std::fabs to global
namespace before including TR1 headers.
* testsuite/tr1/headers/c++200x/math.cc: New test.

From-SVN: r233644

8 years agore PR objc/69844 (Possibly bogus error: unknown type name in ObjC code)
Jakub Jelinek [Tue, 23 Feb 2016 19:47:24 +0000 (20:47 +0100)]
re PR objc/69844 (Possibly bogus error: unknown type name in ObjC code)

PR objc/69844
* c-parser.c (c_parser_for_statement): Properly handle ObjC classes
in id_kind reclassification.

* objc.dg/pr69844.m: New test.

From-SVN: r233643

8 years agore PR fortran/69456 (Namelist value with trailing sign is ignored without error)
Jerry DeLisle [Tue, 23 Feb 2016 18:38:31 +0000 (18:38 +0000)]
re PR fortran/69456 (Namelist value with trailing sign is ignored without error)

2016-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/69456
* io/list_read.c (read_real): If digit is missing from exponent issue
an error. (parse_real): Likewise and adjusted error message to clarify
it is part of a complex number.
(nml_read_obj): Bump item count and add comment that this is used to
identify which item in a namelist read has a problem.

PR libgfortran/69456
* gfortran.dg/namelist_89.f90: New test.
* gfortran.dg/pr59700.f90: Update test..

From-SVN: r233641

8 years agoPR middle-end/69780 - [4.9/5/6 Regression] ICE on __builtin_alloca_with_align
Martin Sebor [Tue, 23 Feb 2016 18:09:37 +0000 (18:09 +0000)]
PR middle-end/69780 - [4.9/5/6 Regression] ICE on __builtin_alloca_with_align

PR middle-end/69780 - [4.9/5/6 Regression] ICE on __builtin_alloca_with_align
with small alignment
PR c/69759 - __builtin_alloca and __builtin_alloca_with_align undocumented

gcc/c-family/ChangeLog:
* c-common.c (check_builtin_function_arguments): Validate and reject
invalid arguments to __builtin_alloca_with_align.

gcc/ChangeLog:
* doc/extend.texi (Other Builtins): Document __builtin_alloca and
__builtin_alloca_with_align.

gcc/testsuite/ChangeLog:
* g++.dg/ext/builtin_alloca.C: New test.
* gcc.dg/builtins-68.c: New test.

From-SVN: r233640

8 years agoRemove __seg_tls before first release.
Richard Henderson [Tue, 23 Feb 2016 18:05:14 +0000 (10:05 -0800)]
Remove __seg_tls before first release.

  * config/i386/i386-c.c (ix86_target_macros): Remove __SEG_TLS.
  (ix86_register_pragmas): Remove __seg_tls.
  * config/i386/i386-protos.h (ADDR_SPACE_SEG_TLS): Remove.
  * config/i386/i386.c (ix86_print_operand_address_as): Don't handle it.
  (ix86_addr_space_subset_p, TARGET_ADDR_SPACE_SUBSET_P): Remove.
  (ix86_addr_space_convert, TARGET_ADDR_SPACE_CONVERT): Remove.
  (ix86_addr_space_debug, TARGET_ADDR_SPACE_DEBUG): Remove.
  * doc/extend.texi (__seg_tls): Remove item.
testsuite/
  * gcc.target/i386/addr-space-3.c: Remove test.

From-SVN: r233639

8 years agoPR preprocessor/69126: avoid comparing ad-hoc and non-ad-hoc locations
David Malcolm [Tue, 23 Feb 2016 17:44:28 +0000 (17:44 +0000)]
PR preprocessor/69126: avoid comparing ad-hoc and non-ad-hoc locations

gcc/testsuite/ChangeLog:
PR preprocessor/69126
PR preprocessor/69543
* c-c++-common/pr69126-2-long.c: New test.
* c-c++-common/pr69126-2-short.c: New test.
* c-c++-common/pr69543-1.c: Remove xfail.

libcpp/ChangeLog:
PR preprocessor/69126
PR preprocessor/69543
* line-map.c (linemap_compare_locations): At the function top,
replace inlined bodies of get_location_from_adhoc_loc with calls
to get_location_from_adhoc_loc.  Add a pair of calls to
get_location_from_adhoc_loc at the bottom of the function, to
avoid meaningless comparisons of ad-hoc and non-ad-hoc locations.

From-SVN: r233638

8 years agoAdd test coverage for _Pragma (PR preprocessor 69126, 69543, 69558)
David Malcolm [Tue, 23 Feb 2016 17:39:16 +0000 (17:39 +0000)]
Add test coverage for _Pragma (PR preprocessor 69126, 69543, 69558)

We had some regressions in the ability for _Pragma to disable a warning
(PR preprocessor/69126, PR preprocessor/69543, PR preprocessor/69558).

This patch attempts to add more test coverage for this, for the
various combinations of:
  - various warnings:
    -Wunused-variable
    -Wuninitialized
    -Wdeprecated-declarations
  - various combinations of location of _Pragma relative to location of
    the warning:
     - _Pragma is in a macro, warning isn't a macro
     - neither is in a macro
     - _Pragma isnt't in a macro, warning is in a macro
     - in different macros
     - both in the same macro
  - C vs C++ frontend.

It adds some XFAILs:
  - pr69543-1.c for C++ (fixed in the followup patch)
  - pr69543-3.c for both C and C++
  - pr69543-4.c for both C and C++
  - pr69558.c for C++ (moving it from gcc.dg to c-c++-common,
    marking it as xfail for C++ for now)

gcc/testsuite/ChangeLog:
PR preprocessor/69126
PR preprocessor/69543
PR preprocessor/69558
* c-c++-common/pr69126.c (MACRO_1, test_1): New.
(f): Rename to...
(test_2): ...this, and add leading comment.
(MACRO_3, test_3): New.
(MACRO_4A, MACRO_4B, test_4): New.
(MACRO): Rename to...
(MACRO_5): ...this.
(g): Rename to...
(test_5): ...this, updating for renaming of MACRO, and
add leading comment.
* c-c++-common/pr69543-1.c: New.
* c-c++-common/pr69543-2.c: New.
* c-c++-common/pr69543-3.c: New.
* c-c++-common/pr69543-4.c: New.
* c-c++-common/pr69558-1.c: New.
* c-c++-common/pr69558-2.c: New.
* c-c++-common/pr69558-3.c: New.
* c-c++-common/pr69558-4.c: New.
* gcc.dg/pr69558.c: Move to...
* c-c++-common/pr69558.c: ...here.  Add dg-bogus directives, with
xfail for c++.

From-SVN: r233637

8 years agore PR libstdc++/69881 (with gcc-6 of today building gcc-4.9 fails)
Bernd Edlinger [Tue, 23 Feb 2016 15:57:09 +0000 (15:57 +0000)]
re PR libstdc++/69881 (with gcc-6 of today building gcc-4.9 fails)

2016-02-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR libstdc++/69881
        * include/c_global/cstdarg: Undefine __need___va_list.
        * include/c_global/cstddef: Undefine all kinds of __need_*.

From-SVN: r233636

8 years agoalloc-pool.h (struct allocation_object): Make id member conditional on CHECKING_P...
Richard Biener [Tue, 23 Feb 2016 15:19:17 +0000 (15:19 +0000)]
alloc-pool.h (struct allocation_object): Make id member conditional on CHECKING_P again.

2016-02-23  Richard Biener  <rguenther@suse.de>

* alloc-pool.h (struct allocation_object): Make id member
conditional on CHECKING_P again.
(get_instance): Adjust.
(base_pool_allocator): Likewise.

From-SVN: r233635

8 years agoUse plain -fopenacc to enable OpenACC kernels processing
Thomas Schwinge [Tue, 23 Feb 2016 15:07:54 +0000 (16:07 +0100)]
Use plain -fopenacc to enable OpenACC kernels processing

gcc/
* tree-parloops.c (create_parallel_loop, gen_parallel_loop)
(parallelize_loops): In OpenACC kernels mode, set n_threads to
zero.
(pass_parallelize_loops::gate): In OpenACC kernels mode, gate on
flag_openacc.
* tree-ssa-loop.c (gate_oacc_kernels): Likewise.
gcc/testsuite/
* c-c++-common/goacc/kernels-counter-vars-function-scope.c: Adjust
to -ftree-parallelize-loops/-fopenacc changes.
* c-c++-common/goacc/kernels-double-reduction-n.c: Likewise.
* c-c++-common/goacc/kernels-double-reduction.c: Likewise.
* c-c++-common/goacc/kernels-loop-2.c: Likewise.
* c-c++-common/goacc/kernels-loop-3.c: Likewise.
* c-c++-common/goacc/kernels-loop-g.c: Likewise.
* c-c++-common/goacc/kernels-loop-mod-not-zero.c: Likewise.
* c-c++-common/goacc/kernels-loop-n.c: Likewise.
* c-c++-common/goacc/kernels-loop-nest.c: Likewise.
* c-c++-common/goacc/kernels-loop.c: Likewise.
* c-c++-common/goacc/kernels-one-counter-var.c: Likewise.
* c-c++-common/goacc/kernels-reduction.c: Likewise.
* gfortran.dg/goacc/kernels-loop-inner.f95: Likewise.
* gfortran.dg/goacc/kernels-loops-adjacent.f95: Likewise.
libgomp/
* oacc-parallel.c (GOACC_parallel_keyed): Initialize dims.
* plugin/plugin-nvptx.c (nvptx_exec): Provide default values for
dims.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: Adjust to
-ftree-parallelize-loops/-fopenacc changes.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-3.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-2.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-3.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-4.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-5.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq-6.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-and-seq.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-collapse.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-g.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-mod-not-zero.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-n.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-nest.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-reduction.c:
Likewise.

From-SVN: r233634

8 years agomem-stats.h (struct mem_usage): Use PRIu64 for printing size_t.
Richard Biener [Tue, 23 Feb 2016 14:01:51 +0000 (14:01 +0000)]
mem-stats.h (struct mem_usage): Use PRIu64 for printing size_t.

2016-02-23  Richard Biener  <rguenther@suse.de>

* mem-stats.h (struct mem_usage): Use PRIu64 for printing size_t.
* bitmap.h (struct bitmap_usage): Likewise.
(bitmap_move): Declare.
* bitmap.c (register_overhead): Take size_t argument.
(bitmap_move): New function.
* df-problems.c (df_rd_transfer_function): Use bitmap_move
to properly account overhead.
* tree.c (free_node): Use tree_size.

From-SVN: r233633

8 years agoRequire alias support in gcc.target/i386/chkp-hidden-def.c
Rainer Orth [Tue, 23 Feb 2016 13:52:01 +0000 (13:52 +0000)]
Require alias support in gcc.target/i386/chkp-hidden-def.c

* gcc.target/i386/chkp-hidden-def.c: Require alias support.

From-SVN: r233632

8 years agore PR c++/69902 (Bogus -Wnonnull-compare for: dynamic_cast<T*>(&ref) == nullptr)
Jakub Jelinek [Tue, 23 Feb 2016 12:58:53 +0000 (13:58 +0100)]
re PR c++/69902 (Bogus -Wnonnull-compare for: dynamic_cast<T*>(&ref) == nullptr)

PR c++/69902
* fold-const.c (fold_truth_not_expr): Propagate TREE_NO_WARNING
when inverting comparison.

* g++.dg/warn/Wnonnull-compare-5.C: New test.

From-SVN: r233631

8 years agore PR c/69900 (Unhelpful diagnostic about Ignored options)
Jakub Jelinek [Tue, 23 Feb 2016 12:57:32 +0000 (13:57 +0100)]
re PR c/69900 (Unhelpful diagnostic about Ignored options)

PR c/69900
* common.opt (Wunreachable-code): Add Warning flag.

* gcc.dg/pr69900.c: New test.

From-SVN: r233630

8 years agoPR c/69911 Check main_input_filename and DECL_SOURCE_FILE are not NULL.
Mark Wielaard [Tue, 23 Feb 2016 11:47:19 +0000 (11:47 +0000)]
PR c/69911 Check main_input_filename and DECL_SOURCE_FILE are not NULL.

DECL_SOURCE_FILE can be NULL (for example when DECL_ARTIFICIAL).
So make sure to check before comparing against main_input_filename.

gcc/ChangeLog

PR c/69911
* cgraphunit.c (check_global_declaration): Check main_input_filename
and DECL_SOURCE_FILE are not NULL.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r233627

8 years ago[pr 69666] No SRA default_def replacements for unscalarizable regions
Martin Jambor [Tue, 23 Feb 2016 10:55:47 +0000 (11:55 +0100)]
[pr 69666] No SRA default_def replacements for unscalarizable regions

2016-02-23  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/69666
* tree-sra.c (sra_modify_assign): Do not attempt to create
default_def replacements for unscalarizable regions.

testsuite/
* gcc.dg/tree-ssa/pr69666.c: New test.

From-SVN: r233626

8 years agore PR fortran/67451 ([F08] ICE with sourced allocation from coarray.)
Andre Vehreschild [Tue, 23 Feb 2016 10:29:26 +0000 (11:29 +0100)]
re PR fortran/67451 ([F08] ICE with sourced allocation from coarray.)

gcc/testsuite/ChangeLog:

2016-02-23  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/67451
* gfortran.dg/coarray_allocate_5.f08: New test.

gcc/fortran/ChangeLog:

2016-02-23  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/67451
* trans-array.c (gfc_array_allocate): Take the attributes from the
expression to allocate and not from the source=-expression.

From-SVN: r233625

8 years agoS/390: Move vcond-shift.c to vector subdir.
Andreas Krebbel [Tue, 23 Feb 2016 10:18:33 +0000 (10:18 +0000)]
S/390: Move vcond-shift.c to vector subdir.

gcc/testsuite/ChangeLog:

* gcc.target/s390/vcond-shift.c: Move to ...
* gcc.target/s390/vector/vcond-shift.c: ... here.

From-SVN: r233624

8 years agoS/390: Move movstr-2.c into vector subdir.
Andreas Krebbel [Tue, 23 Feb 2016 10:17:15 +0000 (10:17 +0000)]
S/390: Move movstr-2.c into vector subdir.

gcc/testsuite/ChangeLog:

* gcc.target/s390/md/movstr-2.c: Move and rename to ...
* gcc.target/s390/vector/stpcpy-1.c: ... this one.

From-SVN: r233623

8 years agoS/390: Turn movstr-1.c into compile only test.
Andreas Krebbel [Tue, 23 Feb 2016 10:15:31 +0000 (10:15 +0000)]
S/390: Turn movstr-1.c into compile only test.

gcc/testsuite/ChangeLog:

* gcc.target/s390/md/movstr-1.c: Turn into compile test.

From-SVN: r233622

8 years agosso tests need int32 machines.
Mike Stump [Tue, 23 Feb 2016 10:02:18 +0000 (10:02 +0000)]
sso tests need int32 machines.

From-SVN: r233621

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

From-SVN: r233620

8 years ago* sv.po, vi.po: Update.
Joseph Myers [Mon, 22 Feb 2016 22:56:21 +0000 (22:56 +0000)]
* sv.po, vi.po: Update.

From-SVN: r233617

8 years agoPR28901 Add two levels for -Wunused-const-variable.
Mark Wielaard [Mon, 22 Feb 2016 22:42:19 +0000 (22:42 +0000)]
PR28901 Add two levels for -Wunused-const-variable.

There is some controversy about enabling -Wunused-const-variable for all
unused static const variables because some feel there are too many errors
exposed in header files. Create two levels for -Wunused-const-variable.
One level to only check for unused static const variables in the main
compilation file. Which is enabled by -Wunused-variable. And a second
level that also checks for unused static const variables in included
files. Which must be explicitly enabled.

gcc/ChangeLog

PR c/28901
* cgraphunit.c (check_global_declaration): Check level of
warn_unused_const_variable and main_input_filename.
* doc/invoke.texi (Warning Options): Add -Wunused-const-variable=.
(-Wunused-variable): For C implies -Wunused-const-variable=1.
(-Wunused-const-variable): Explain levels 1 and 2.

gcc/c-family/ChangeLog

PR c/28901
* c.opt (Wunused-const-variable): Turn into Alias for...
(Wunused-const-variable=): New option.

gcc/testsuite/ChangeLog

PR c/28901
* gcc.dg/unused-variable-3.c: New test.

From-SVN: r233616

8 years agore PR target/69888 (ICE: SIGSEGV in decide_alg (i386.c:26169) due to infinite (?...
Jakub Jelinek [Mon, 22 Feb 2016 21:34:49 +0000 (22:34 +0100)]
re PR target/69888 (ICE: SIGSEGV in decide_alg (i386.c:26169) due to infinite (?) recursion with -minline-all-stringops -mmemset-strategy=no_stringop:-1:noalign)

PR target/69888
* config/i386/i386.c (decide_alg): Ensure we don't recurse with
identical arguments.  Formatting and spelling fixes.

* gcc.target/i386/pr69888.c: New test.

From-SVN: r233615

8 years agore PR target/69888 (ICE: SIGSEGV in decide_alg (i386.c:26169) due to infinite (?...
Jakub Jelinek [Mon, 22 Feb 2016 21:34:07 +0000 (22:34 +0100)]
re PR target/69888 (ICE: SIGSEGV in decide_alg (i386.c:26169) due to infinite (?) recursion with -minline-all-stringops -mmemset-strategy=no_stringop:-1:noalign)

PR target/69888
* config/i386/i386.c (decide_alg): Ensure we don't recurse with
identical arguments.  Formatting and spelling fixes.

* gcc.target/i386/pr69888.c: New test.

From-SVN: r233614

8 years agore PR bootstrap/69885 (ICE in maybe_legitimize_operand, at optabs.c:6903 on m68k...
Jakub Jelinek [Mon, 22 Feb 2016 21:27:08 +0000 (22:27 +0100)]
re PR bootstrap/69885 (ICE in maybe_legitimize_operand, at optabs.c:6903 on m68k-linux-gnu)

PR target/69885
* doc/md.texi (ashl@var{m}3): Document that mode of operand 2 must
be specified.

From-SVN: r233613

8 years agoAdd terminating line to output as prune can remove last \r from output.
Mike Stump [Mon, 22 Feb 2016 21:17:00 +0000 (21:17 +0000)]
Add terminating line to output as prune can remove last \r from output.

From-SVN: r233612

8 years agore PR target/69894 (dependency of gcc-plugin.h not installed on aarch64-linux-gnu)
Jakub Jelinek [Mon, 22 Feb 2016 19:55:47 +0000 (20:55 +0100)]
re PR target/69894 (dependency of gcc-plugin.h not installed on aarch64-linux-gnu)

PR target/69894
PR target/69895
* config/m68k/t-opts (OPTIONS_H_EXTRA): Add m68k-microarchs.def
and m68k-devices.def.
* config/c6x/t-c6x (OPTIONS_H_EXTRA): Add c6x-isas.def.
* config/aarch64/t-aarch64 (OPTIONS_H_EXTRA): Add aarch64-arches.def.

From-SVN: r233611

8 years agoMAINTAINERS: add myself to libcpp and diagnostic messages
David Malcolm [Mon, 22 Feb 2016 17:35:45 +0000 (17:35 +0000)]
MAINTAINERS: add myself to libcpp and diagnostic messages

2016-02-22  David Malcolm  <dmalcolm@redhat.com>

* MAINTAINERS (libcpp): Add myself.
(diagnostic messages): Likewise.

From-SVN: r233608

8 years agonvptx.c (nvptx_gen_shuffle): Add support for QImode and HImode registers.
Cesar Philippidis [Mon, 22 Feb 2016 16:28:25 +0000 (08:28 -0800)]
nvptx.c (nvptx_gen_shuffle): Add support for QImode and HImode registers.

gcc/
* config/nvptx/nvptx.c (nvptx_gen_shuffle): Add support for QImode
and HImode registers.

libgomp/
* testsuite/libgomp.oacc-c-c++-common/vprop.c: New test.

From-SVN: r233607

8 years agore PR tree-optimization/69882 (Excessive reduction statements generated by SLP)
Richard Biener [Mon, 22 Feb 2016 14:53:17 +0000 (14:53 +0000)]
re PR tree-optimization/69882 (Excessive reduction statements generated by SLP)

2016-02-22  Richard Biener  <rguenther@suse.de>

PR tree-optimization/69882
* tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Properly
preserve permutations present because of gaps.
(vect_supported_load_permutation_p): Always continue checking
permutations after vect_attempt_slp_rearrange_stmts.

* gfortran.dg/vect/pr69882.f90: New testcase.

From-SVN: r233605

8 years agotree-vect-loop.c (vect_estimate_min_profitable_iters): Dump min_profitable_estimate...
Bin Cheng [Mon, 22 Feb 2016 14:38:10 +0000 (14:38 +0000)]
tree-vect-loop.c (vect_estimate_min_profitable_iters): Dump min_profitable_estimate, rather than min_profitable_iters.

* tree-vect-loop.c (vect_estimate_min_profitable_iters): Dump
min_profitable_estimate, rather than min_profitable_iters.

From-SVN: r233604

8 years agore PR bootstrap/69885 (ICE in maybe_legitimize_operand, at optabs.c:6903 on m68k...
Jakub Jelinek [Mon, 22 Feb 2016 14:22:07 +0000 (15:22 +0100)]
re PR bootstrap/69885 (ICE in maybe_legitimize_operand, at optabs.c:6903 on m68k-linux-gnu)

PR target/69885
* config/m68k/m68k.md (ashldi3, ashrdi3, lshrdi3): Use
SImode for last match_operand.

* gcc.dg/pr69885.c: New test.

From-SVN: r233603

8 years agoHSA: fix emission of clrsb{l,ll} builtins
Martin Liska [Mon, 22 Feb 2016 14:14:51 +0000 (15:14 +0100)]
HSA: fix emission of clrsb{l,ll} builtins

* hsa-gen.c (gen_hsa_clrsb): In case of zero value,
return bitsize - 1 as the return value.

From-SVN: r233602

8 years agore PR rtl-optimization/69806 ([SH] Combine doesn't see constant)
Oleg Endo [Mon, 22 Feb 2016 13:33:31 +0000 (13:33 +0000)]
re PR rtl-optimization/69806 ([SH] Combine doesn't see constant)

gcc/
PR target/69806
PR target/54089
* config/sh/sh.c (sh_lshrsi_clobbers_t_reg_p, sh_dynamicalize_shift_p):
Handle negative shift counts.
* config/sh/sh.md (ashlsi3, lshrsi3_n, lshrsi3_n_clobbers_t): Don't use
force_reg on the shift constant.
(lshrsi3): Likewise.  Expand into lshrsi3_n* instead of lshrsi3_d.
(lshrsi3_d): Handle negative shift counts.

gcc/testsuite/
PR target/69806
PR target/54089
* gcc.target/sh/pr54089-10.c: New.

From-SVN: r233601