gcc.git
7 years agoFix up a couple of old ChangeLog entries.
Martin Sebor [Sat, 11 Mar 2017 00:37:40 +0000 (00:37 +0000)]
Fix up a couple of old ChangeLog entries.

From-SVN: r246065

7 years agoAs discussed in https://gcc.gnu.org/ml/gcc-patches/2017-02/msg00942.html
Martin Sebor [Sat, 11 Mar 2017 00:33:45 +0000 (00:33 +0000)]
As discussed in https://gcc.gnu.org/ml/gcc-patches/2017-02/msg00942.html

gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Add a test case.

From-SVN: r246064

7 years ago* de.po, sv.po: Update.
Joseph Myers [Sat, 11 Mar 2017 00:33:30 +0000 (00:33 +0000)]
* de.po, sv.po: Update.

From-SVN: r246063

7 years agoDaily bump.
GCC Administrator [Sat, 11 Mar 2017 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r246062

7 years agore PR rtl-optimization/78911 (Infinite loop at -O2/O3 optimization levels while tryin...
Bernd Schmidt [Fri, 10 Mar 2017 21:17:13 +0000 (21:17 +0000)]
re PR rtl-optimization/78911 (Infinite loop at -O2/O3 optimization levels while trying to compile server.c from Wine-2.0-rc2)

PR rtl-optimization/78911
* lra-assigns.c (must_not_spill_p): New function.
(spill_for): Use it.

PR rtl-optimization/78911
* gcc.target/i386/pr78911-1.c: New test.
* gcc.target/i386/pr78911-2.c: New test.

From-SVN: r246059

7 years agore PR tree-optimization/79981 (Forwprop not working for __atomic_compare_exchange_n)
Jakub Jelinek [Fri, 10 Mar 2017 19:47:44 +0000 (20:47 +0100)]
re PR tree-optimization/79981 (Forwprop not working for __atomic_compare_exchange_n)

PR tree-optimization/79981
* tree-vrp.c (extract_range_basic): Handle IMAGPART_EXPR of
ATOMIC_COMPARE_EXCHANGE ifn result.
(stmt_interesting_for_vrp, vrp_visit_stmt): Handle
IFN_ATOMIC_COMPARE_EXCHANGE.

From-SVN: r246054

7 years agore PR libfortran/79956 (many new -Wmaybe-uninitialized warnings with bootstrap-O3)
Thomas Koenig [Fri, 10 Mar 2017 19:42:46 +0000 (19:42 +0000)]
re PR libfortran/79956 (many new -Wmaybe-uninitialized warnings with bootstrap-O3)

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

PR libfortran/79956
* m4/iforeach.m4:  Change exit condition from loop for
increasing dimension to >=.  Fix type in comment.
* m4/ifunction.m4:  Likewise.
* m4/ifunction_logical.m4: Likewise.
* generated/all_l1.c: Regenerated.
* generated/all_l16.c: Regenerated.
* generated/all_l2.c: Regenerated.
* generated/all_l4.c: Regenerated.
* generated/all_l8.c: Regenerated.
* generated/any_l1.c: Regenerated.
* generated/any_l16.c: Regenerated.
* generated/any_l2.c: Regenerated.
* generated/any_l4.c: Regenerated.
* generated/any_l8.c: Regenerated.
* generated/count_16_l.c: Regenerated.
* generated/count_1_l.c: Regenerated.
* generated/count_2_l.c: Regenerated.
* generated/count_4_l.c: Regenerated.
* generated/count_8_l.c: Regenerated.
* generated/iall_i1.c: Regenerated.
* generated/iall_i16.c: Regenerated.
* generated/iall_i2.c: Regenerated.
* generated/iall_i4.c: Regenerated.
* generated/iall_i8.c: Regenerated.
* generated/iany_i1.c: Regenerated.
* generated/iany_i16.c: Regenerated.
* generated/iany_i2.c: Regenerated.
* generated/iany_i4.c: Regenerated.
* generated/iany_i8.c: Regenerated.
* generated/iparity_i1.c: Regenerated.
* generated/iparity_i16.c: Regenerated.
* generated/iparity_i2.c: Regenerated.
* generated/iparity_i4.c: Regenerated.
* generated/iparity_i8.c: Regenerated.
* generated/maxloc0_16_i1.c: Regenerated.
* generated/maxloc0_16_i16.c: Regenerated.
* generated/maxloc0_16_i2.c: Regenerated.
* generated/maxloc0_16_i4.c: Regenerated.
* generated/maxloc0_16_i8.c: Regenerated.
* generated/maxloc0_16_r10.c: Regenerated.
* generated/maxloc0_16_r16.c: Regenerated.
* generated/maxloc0_16_r4.c: Regenerated.
* generated/maxloc0_16_r8.c: Regenerated.
* generated/maxloc0_4_i1.c: Regenerated.
* generated/maxloc0_4_i16.c: Regenerated.
* generated/maxloc0_4_i2.c: Regenerated.
* generated/maxloc0_4_i4.c: Regenerated.
* generated/maxloc0_4_i8.c: Regenerated.
* generated/maxloc0_4_r10.c: Regenerated.
* generated/maxloc0_4_r16.c: Regenerated.
* generated/maxloc0_4_r4.c: Regenerated.
* generated/maxloc0_4_r8.c: Regenerated.
* generated/maxloc0_8_i1.c: Regenerated.
* generated/maxloc0_8_i16.c: Regenerated.
* generated/maxloc0_8_i2.c: Regenerated.
* generated/maxloc0_8_i4.c: Regenerated.
* generated/maxloc0_8_i8.c: Regenerated.
* generated/maxloc0_8_r10.c: Regenerated.
* generated/maxloc0_8_r16.c: Regenerated.
* generated/maxloc0_8_r4.c: Regenerated.
* generated/maxloc0_8_r8.c: Regenerated.
* generated/maxloc1_16_i1.c: Regenerated.
* generated/maxloc1_16_i16.c: Regenerated.
* generated/maxloc1_16_i2.c: Regenerated.
* generated/maxloc1_16_i4.c: Regenerated.
* generated/maxloc1_16_i8.c: Regenerated.
* generated/maxloc1_16_r10.c: Regenerated.
* generated/maxloc1_16_r16.c: Regenerated.
* generated/maxloc1_16_r4.c: Regenerated.
* generated/maxloc1_16_r8.c: Regenerated.
* generated/maxloc1_4_i1.c: Regenerated.
* generated/maxloc1_4_i16.c: Regenerated.
* generated/maxloc1_4_i2.c: Regenerated.
* generated/maxloc1_4_i4.c: Regenerated.
* generated/maxloc1_4_i8.c: Regenerated.
* generated/maxloc1_4_r10.c: Regenerated.
* generated/maxloc1_4_r16.c: Regenerated.
* generated/maxloc1_4_r4.c: Regenerated.
* generated/maxloc1_4_r8.c: Regenerated.
* generated/maxloc1_8_i1.c: Regenerated.
* generated/maxloc1_8_i16.c: Regenerated.
* generated/maxloc1_8_i2.c: Regenerated.
* generated/maxloc1_8_i4.c: Regenerated.
* generated/maxloc1_8_i8.c: Regenerated.
* generated/maxloc1_8_r10.c: Regenerated.
* generated/maxloc1_8_r16.c: Regenerated.
* generated/maxloc1_8_r4.c: Regenerated.
* generated/maxloc1_8_r8.c: Regenerated.
* generated/maxval_i1.c: Regenerated.
* generated/maxval_i16.c: Regenerated.
* generated/maxval_i2.c: Regenerated.
* generated/maxval_i4.c: Regenerated.
* generated/maxval_i8.c: Regenerated.
* generated/maxval_r10.c: Regenerated.
* generated/maxval_r16.c: Regenerated.
* generated/maxval_r4.c: Regenerated.
* generated/maxval_r8.c: Regenerated.
* generated/minloc0_16_i1.c: Regenerated.
* generated/minloc0_16_i16.c: Regenerated.
* generated/minloc0_16_i2.c: Regenerated.
* generated/minloc0_16_i4.c: Regenerated.
* generated/minloc0_16_i8.c: Regenerated.
* generated/minloc0_16_r10.c: Regenerated.
* generated/minloc0_16_r16.c: Regenerated.
* generated/minloc0_16_r4.c: Regenerated.
* generated/minloc0_16_r8.c: Regenerated.
* generated/minloc0_4_i1.c: Regenerated.
* generated/minloc0_4_i16.c: Regenerated.
* generated/minloc0_4_i2.c: Regenerated.
* generated/minloc0_4_i4.c: Regenerated.
* generated/minloc0_4_i8.c: Regenerated.
* generated/minloc0_4_r10.c: Regenerated.
* generated/minloc0_4_r16.c: Regenerated.
* generated/minloc0_4_r4.c: Regenerated.
* generated/minloc0_4_r8.c: Regenerated.
* generated/minloc0_8_i1.c: Regenerated.
* generated/minloc0_8_i16.c: Regenerated.
* generated/minloc0_8_i2.c: Regenerated.
* generated/minloc0_8_i4.c: Regenerated.
* generated/minloc0_8_i8.c: Regenerated.
* generated/minloc0_8_r10.c: Regenerated.
* generated/minloc0_8_r16.c: Regenerated.
* generated/minloc0_8_r4.c: Regenerated.
* generated/minloc0_8_r8.c: Regenerated.
* generated/minloc1_16_i1.c: Regenerated.
* generated/minloc1_16_i16.c: Regenerated.
* generated/minloc1_16_i2.c: Regenerated.
* generated/minloc1_16_i4.c: Regenerated.
* generated/minloc1_16_i8.c: Regenerated.
* generated/minloc1_16_r10.c: Regenerated.
* generated/minloc1_16_r16.c: Regenerated.
* generated/minloc1_16_r4.c: Regenerated.
* generated/minloc1_16_r8.c: Regenerated.
* generated/minloc1_4_i1.c: Regenerated.
* generated/minloc1_4_i16.c: Regenerated.
* generated/minloc1_4_i2.c: Regenerated.
* generated/minloc1_4_i4.c: Regenerated.
* generated/minloc1_4_i8.c: Regenerated.
* generated/minloc1_4_r10.c: Regenerated.
* generated/minloc1_4_r16.c: Regenerated.
* generated/minloc1_4_r4.c: Regenerated.
* generated/minloc1_4_r8.c: Regenerated.
* generated/minloc1_8_i1.c: Regenerated.
* generated/minloc1_8_i16.c: Regenerated.
* generated/minloc1_8_i2.c: Regenerated.
* generated/minloc1_8_i4.c: Regenerated.
* generated/minloc1_8_i8.c: Regenerated.
* generated/minloc1_8_r10.c: Regenerated.
* generated/minloc1_8_r16.c: Regenerated.
* generated/minloc1_8_r4.c: Regenerated.
* generated/minloc1_8_r8.c: Regenerated.
* generated/minval_i1.c: Regenerated.
* generated/minval_i16.c: Regenerated.
* generated/minval_i2.c: Regenerated.
* generated/minval_i4.c: Regenerated.
* generated/minval_i8.c: Regenerated.
* generated/minval_r10.c: Regenerated.
* generated/minval_r16.c: Regenerated.
* generated/minval_r4.c: Regenerated.
* generated/minval_r8.c: Regenerated.
* generated/norm2_r10.c: Regenerated.
* generated/norm2_r16.c: Regenerated.
* generated/norm2_r4.c: Regenerated.
* generated/norm2_r8.c: Regenerated.
* generated/parity_l1.c: Regenerated.
* generated/parity_l16.c: Regenerated.
* generated/parity_l2.c: Regenerated.
* generated/parity_l4.c: Regenerated.
* generated/parity_l8.c: Regenerated.
* generated/product_c10.c: Regenerated.
* generated/product_c16.c: Regenerated.
* generated/product_c4.c: Regenerated.
* generated/product_c8.c: Regenerated.
* generated/product_i1.c: Regenerated.
* generated/product_i16.c: Regenerated.
* generated/product_i2.c: Regenerated.
* generated/product_i4.c: Regenerated.
* generated/product_i8.c: Regenerated.
* generated/product_r10.c: Regenerated.
* generated/product_r16.c: Regenerated.
* generated/product_r4.c: Regenerated.
* generated/product_r8.c: Regenerated.
* generated/sum_c10.c: Regenerated.
* generated/sum_c16.c: Regenerated.
* generated/sum_c4.c: Regenerated.
* generated/sum_c8.c: Regenerated.
* generated/sum_i1.c: Regenerated.
* generated/sum_i16.c: Regenerated.
* generated/sum_i2.c: Regenerated.
* generated/sum_i4.c: Regenerated.
* generated/sum_i8.c: Regenerated.
* generated/sum_r10.c: Regenerated.
* generated/sum_r16.c: Regenerated.
* generated/sum_r4.c: Regenerated.
* generated/sum_r8.c: Regenerated.

From-SVN: r246053

7 years agofreebsd-unwind.h: New file.
John Marino [Fri, 10 Mar 2017 19:33:27 +0000 (19:33 +0000)]
freebsd-unwind.h: New file.

2017-03-10  John Marino  <gnugcc@marino.st>

    * config/aarch64/freebsd-unwind.h: New file.
    * config.host: Add aarch64-*-freebsd unwinder.

From-SVN: r246052

7 years agoBuild crt*vr.S with AltiVec enabled
Segher Boessenkool [Fri, 10 Mar 2017 19:29:48 +0000 (20:29 +0100)]
Build crt*vr.S with AltiVec enabled

These files won't build on targets that do not have AltiVec enabled,
breaking the build, unless we tell GAS that Altivec insns are fine.
The alternative is to not build these files in that case, which is much
more complicated.

libgcc/
* config/rs6000/crtrestvr.s: Use .machine altivec.
* config/rs6000/crtsavevr.s: Ditto.

From-SVN: r246051

7 years agoAdd missing punctuation to message (PR driver/79875)
David Malcolm [Fri, 10 Mar 2017 19:22:35 +0000 (19:22 +0000)]
Add missing punctuation to message (PR driver/79875)

gcc/ChangeLog:
PR driver/79875
* opts.c (parse_sanitizer_options): Add missing question mark to
"did you mean" message.

From-SVN: r246047

7 years agors6000-builtin.def (VMULEUB_UNS): Remove orphaned built-in.
Bill Schmidt [Fri, 10 Mar 2017 19:16:04 +0000 (19:16 +0000)]
rs6000-builtin.def (VMULEUB_UNS): Remove orphaned built-in.

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

* config/rs6000/rs6000-builtin.def (VMULEUB_UNS): Remove orphaned
built-in.
(VMULEUH_UNS): Likewise.
(VMULOUB_UNS): Likewise.
(VMULOUH_UNS): Likewise.
* config/rs6000/rs6000.c (builtin_function_type): Remove
references to ALTIVEC_BUILTIN_VMUL[EO]U[BH]_UNS.

From-SVN: r246046

7 years agoc-indentation.c: workaround xgettext limitation (PR c/79921)
David Malcolm [Fri, 10 Mar 2017 19:09:02 +0000 (19:09 +0000)]
c-indentation.c: workaround xgettext limitation (PR c/79921)

gcc/c-family/ChangeLog:
PR c/79921
* c-indentation.c (warn_for_misleading_indentation): Remove parens
from inform's message, so that xgettext can locate it.

From-SVN: r246045

7 years agoFix out-of-bounds write in RTL function reader (PR bootstrap/79952)
David Malcolm [Fri, 10 Mar 2017 18:39:52 +0000 (18:39 +0000)]
Fix out-of-bounds write in RTL function reader (PR bootstrap/79952)

gcc/ChangeLog:
PR bootstrap/79952
* read-rtl-function.c (function_reader::read_rtx_operand): Update
x with result of extra_parsing_for_operand_code_0.
(function_reader::extra_parsing_for_operand_code_0): Convert
return type from void to rtx, returning x.  When reading
SYMBOL_REF with SYMBOL_FLAG_HAS_BLOCK_INFO, reallocate x to the
larger size containing struct block_symbol.

From-SVN: r246044

7 years agors6000: float128 on BE and 32-bit
Segher Boessenkool [Fri, 10 Mar 2017 17:57:58 +0000 (18:57 +0100)]
rs6000: float128 on BE and 32-bit

This fixes float128 on BE and on 32-bit.

The configure tests need to use -mabi=altivec for 32-bit, since it is
not the default there.  That also enables the "vector" keyword, used by
the tests.  To do this it temporarily adds a few flags to the CFLAGS
variable.

It also fixes a syntax error in the libgcc_cv_powerpc_float128_hw test
(the function name was missing in the function declaration).

Regenerating config.in (via autoreconf) removed the duplicate definition
of HAVE_SOLARIS_CRTS.

Finally, this adds a "-mfloat128-hardware requires -m64" test to
rs6000.c: all the current patterns need 64-bit registers.  Maybe we'll
want to add float128 hardware support to 32-bit some day, but certainly
not today.

* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
-mfloat128-hardware without -m64.

libgcc/
* configure.ac (test for libgcc_cv_powerpc_float128): Temporarily
modify CFLAGS.  Add -mabi=altivec -mvsx -mfloat128.
(test for libgcc_cv_powerpc_float128_hw): Add -mpower9-vector and
-mfloat128-hardware to the CFLAGS.  Fix syntax error in the C snippet.
* configure: Regenerate.
* config.in: Regenerate.

From-SVN: r246043

7 years agoPR c++/79960 - alias templates and partial ordering
Jason Merrill [Fri, 10 Mar 2017 17:35:54 +0000 (12:35 -0500)]
PR c++/79960 - alias templates and partial ordering

* pt.c (comp_template_args): Add partial_order parm.
(template_args_equal): Likewise.
(comp_template_args_porder): New.
(get_partial_spec_bindings): Use it.

From-SVN: r246042

7 years agore PR target/79941 (Altivec vec_vmuleub regression)
Will Schmidt [Fri, 10 Mar 2017 16:18:44 +0000 (16:18 +0000)]
re PR target/79941 (Altivec vec_vmuleub regression)

gcc:
2017-03-10  Will Schmidt <will_schmidt@vnet.ibm.com>

     PR target/79941
     * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB]
     entries to the case statement that marks unsigned arguments to
     overloaded functions.

testsuite:
2017-03-10  Will Schmidt <will_schmidt@vnet.ibm.com>

     PR target/79941
     * gcc.target/powerpc/fold-vec-mult-even_odd_misc.c: New test.
     * gcc.target/powerpc/fold-vec-mult-even_odd_char.c: New test.
     * gcc.target/powerpc/fold-vec-mult-even_odd_short.c: New test.

From-SVN: r246040

7 years agore PR c++/79967 (ICE on non-type template argument declared noreturn)
Marek Polacek [Fri, 10 Mar 2017 15:36:00 +0000 (15:36 +0000)]
re PR c++/79967 (ICE on non-type template argument declared noreturn)

PR c++/79967
* decl.c (grokdeclarator): Check ATTRLIST before dereferencing it.

* g++.dg/cpp0x/gen-attrs-63.C: New test.

From-SVN: r246039

7 years agore PR c++/79899 (ICE in ctor_omit_inherited_parms at gcc/cp/method.c:576 on ARM target)
Jakub Jelinek [Fri, 10 Mar 2017 15:33:04 +0000 (16:33 +0100)]
re PR c++/79899 (ICE in ctor_omit_inherited_parms at gcc/cp/method.c:576 on ARM target)

PR c++/79899
* optimize.c (maybe_thunk_body): Don't ICE if fns[0] is NULL.
Use XALLOCAVEC macro.

* g++.dg/other/friend7.C: New test.

From-SVN: r246038

7 years agoFix libstdc++ reserved names test to pass on AIX
Jonathan Wakely [Fri, 10 Mar 2017 15:29:49 +0000 (15:29 +0000)]
Fix libstdc++ reserved names test to pass on AIX

* testsuite/17_intro/names.cc: Undefine macros that clash with
identifiers in AIX system headers.

From-SVN: r246037

7 years agoP0604R0 add invoke_result, is_invocable etc. for C++17
Jonathan Wakely [Fri, 10 Mar 2017 15:29:38 +0000 (15:29 +0000)]
P0604R0 add invoke_result, is_invocable etc. for C++17

* include/bits/invoke.h (__invoke): Use __invoke_result instead of
result_of, and __is_nothrow_invocable instead of
__is_nothrow_callable.
* include/bits/shared_ptr_base.h (__shared_ptr): Use __is_invocable
instead of __is_callable.
* include/std/functional (invoke): use invoke_result_t instead of
result_of_t and is_nothrow_invocable instead of is_nothrow_callable.
(_Not_fn): Use __invoke_result instead of result_of.
* include/std/type_traits (__result_of_memobj, __result_of_memfun):
Remove partial specializations for reference_wrapper types.
(__result_of_impl): Use __inv_unwrap to strip reference_wrapper.
(__invoke_result): Define replacement for result_of and then use it to
define result_of.
(__is_callable_impl, __is_callable, __is_nothrow_callable): Replace
with __is_invocable_impl, __is_invocable, and __is_nothrow_invocable
respectively.
(invoke_result, invoke_result_t): Define for C++17.
(is_callable, is_nothrow_callable): Replace with is_invocable,
is_invocable_r, is_nothrow_invocable, and is_nothrow_invocable_r.
(is_callable_v, is_nothrow_callable_v): Replace with is_invocable_v,
is_invocable_r_v, is_nothrow_invocable_v, and is_nothrow_invocable_r_v.
* include/std/variant (hash<variant<T...>>): Use is_nothrow_invocable_v
instead of is_nothrow_callable_v.
* testsuite/20_util/function_objects/invoke/59768.cc: Remove unused
main function.
* testsuite/20_util/function_objects/not_fn/1.cc: Use is_invocable
instead of is_callable.
* testsuite/20_util/is_callable/*: Rename directory and adjust tests
to use new traits.
* testsuite/20_util/is_notjrow_callable/*: Likewise.
* testsuite/20_util/optional/hash.cc: Use is_invocable_v instead of
is_callable.
* testsuite/20_util/variant/hash.cc: Likewise.

From-SVN: r246036

7 years agors6000.c (rs6000_option_override_internal): Fix two typographic errors in the handlin...
Kelvin Nilsen [Fri, 10 Mar 2017 15:29:35 +0000 (15:29 +0000)]
rs6000.c (rs6000_option_override_internal): Fix two typographic errors in the handling of TARGET_UPPER_REGS_DI.

gcc/ChangeLog:

2017-03-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/rs6000.c (rs6000_option_override_internal): Fix
two typographic errors in the handling of TARGET_UPPER_REGS_DI.

From-SVN: r246035

7 years agore PR c++/79896 (ICE in gimplify_expr, at gimplify.c:11950 on non-int128 target)
Jakub Jelinek [Fri, 10 Mar 2017 15:28:26 +0000 (16:28 +0100)]
re PR c++/79896 (ICE in gimplify_expr, at gimplify.c:11950 on non-int128 target)

PR c++/79896
* decl.c (finish_enum_value_list): If value is error_mark_node,
don't copy it and change its type.
* init.c (constant_value_1): Return error_mark_node if DECL_INITIAL
of CONST_DECL is error_mark_node.

* g++.dg/ext/int128-5.C: New test.

From-SVN: r246034

7 years agotestsuite: attr-alloc_size-11.c (PR79356)
Segher Boessenkool [Fri, 10 Mar 2017 15:23:06 +0000 (16:23 +0100)]
testsuite: attr-alloc_size-11.c (PR79356)

As stated in the PR (and elsewhere), this test now passes on aarch64,
ia64, mips, powerpc, sparc, and s390x.  This patch disables the xfails
for those targets.

PR testsuite/79356
* gcc.dg/attr-alloc_size-11.c: Don't xfail on aarch64, ia64, mips,
powerpc, sparc, or s390x.

From-SVN: r246032

7 years agore PR target/79907 (ICE in extract_constrain_insn, at recog.c:2213 on ppc64le)
Pat Haugen [Fri, 10 Mar 2017 14:32:42 +0000 (14:32 +0000)]
re PR target/79907 (ICE in extract_constrain_insn, at recog.c:2213 on ppc64le)

PR target/79907
* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test
TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass.
* gcc.target/powerpc/pr79907.c: New.

From-SVN: r246029

7 years agoMPX: Fix option handling.
Martin Liska [Fri, 10 Mar 2017 13:24:45 +0000 (14:24 +0100)]
MPX: Fix option handling.

2017-03-10  Martin Liska  <mliska@suse.cz>

        PR target/65705
        PR target/69804
* toplev.c (process_options): Enable MPX with LSAN and UBSAN.
* tree-chkp.c (chkp_walk_pointer_assignments): Verify that
FIELD != NULL.

From-SVN: r246027

7 years ago[libstdc++-v3] Fix detection of obsolete isnan
George Lander [Fri, 10 Mar 2017 12:22:45 +0000 (12:22 +0000)]
[libstdc++-v3] Fix detection of obsolete isnan

libstdc++-v3 configure checks whether old glibc inline definitions
of isnan would conflict with the libstdc++-v3 definitions and
works around them if so.  But if g++ 6.x build A is used to build
another g++ 6.x B, the configure step for B will pick up the math.h
installed alongside A instead of the glibc version.  configure will
then assume that the workaround isn't necessary, leaving B with a
broken cmath.

isinf already worked around this.  This patch extends the same fix
to isnan.  (Thanks to George for the fix.)

libstdc++-v3/
2017-03-10  George Lander  <george.lander@arm.com>

* acinclude.m4 (glibcxx_cv_obsolete_isnan): Define
_GLIBCXX_INCLUDE_NEXT_C_HEADERS before including math.h.
* configure: Regenerate.

From-SVN: r246025

7 years agotree-switch-conversion (array_value_type): Start by resetting candidate type to it...
Olivier Hainque [Fri, 10 Mar 2017 11:16:21 +0000 (11:16 +0000)]
tree-switch-conversion (array_value_type): Start by resetting candidate type to it's main variant.

2017-03-10  Olivier Hainque  <hainque@adacore.com>

* tree-switch-conversion (array_value_type): Start by resetting
candidate type to it's main variant.

testsuite/
* gnat.dg/opt64.adb: New test.
* gnat.dg/opt64_pkg.ads: New helper.
* gnat.dg/opt64_pkg.adb: New helper.

From-SVN: r246024

7 years agore PR middle-end/79909 (ICE error: invalid rtl sharing found in the insn on ppc64le)
Jakub Jelinek [Fri, 10 Mar 2017 07:57:45 +0000 (08:57 +0100)]
re PR middle-end/79909 (ICE error: invalid rtl sharing found in the insn on ppc64le)

PR rtl-optimization/79909
* combine.c (try_combine): Use simplify_replace_rtx on individual
CALL_INSN_FUNCTION_USAGE elements instead of replace_rtx on copy_rtx
of the whole CALL_INSN_FUNCTION_USAGE.

* gcc.target/powerpc/pr79909.c: New test.

From-SVN: r246023

7 years agore PR tree-optimization/79972 (ICE in tree check: expected ssa_name, have var_decl...
Jakub Jelinek [Fri, 10 Mar 2017 07:55:00 +0000 (08:55 +0100)]
re PR tree-optimization/79972 (ICE in tree check: expected ssa_name, have var_decl in get_range_info, at tree-ssanames.c:377 w/ -Walloca -Wvla-larger-than=364854541)

PR tree-optimization/79972
* gimple-ssa-warn-alloca.c (alloca_call_type): Only call
get_range_info on SSA_NAMEs.  Formatting fixes.

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

From-SVN: r246022

7 years agore PR tree-optimization/77975 (Missed optimization for some small constants)
Jakub Jelinek [Fri, 10 Mar 2017 07:53:57 +0000 (08:53 +0100)]
re PR tree-optimization/77975 (Missed optimization for some small constants)

PR tree-optimization/77975
* tree-ssa-loop-niter.c (get_base_for): Allow phi argument from latch
edge to be constant.
(get_val_for): For constant x return it.  Formatting fix.
(loop_niter_by_eval): Avoid pointless looping if the next iteration
would use the same bases as the current one.

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

From-SVN: r246021

7 years agoEliminate unneeded test.
Michael Eager [Fri, 10 Mar 2017 00:48:51 +0000 (00:48 +0000)]
Eliminate unneeded test.

From-SVN: r246020

7 years agoDaily bump.
GCC Administrator [Fri, 10 Mar 2017 00:16:21 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r246019

7 years agore PR c++/79962 (ICE nonnull_check_p on a function template with a type-dependent...
Marek Polacek [Thu, 9 Mar 2017 22:45:39 +0000 (22:45 +0000)]
re PR c++/79962 (ICE nonnull_check_p on a function template with a type-dependent attribute nonnull)

PR c++/79962
PR c++/79984
* c-attribs.c (handle_nonnull_attribute): Save the result of default
conversion to the attribute list.

* c-c++-common/nonnull-3.c: New test.
* g++.dg/warn/Wnonnull3.C: New test.

From-SVN: r246016

7 years agors6000.c (rs6000_gen_le_vsx_permute): Use rotate instead of vec_select for V1TImode.
Bill Schmidt [Thu, 9 Mar 2017 22:41:34 +0000 (22:41 +0000)]
rs6000.c (rs6000_gen_le_vsx_permute): Use rotate instead of vec_select for V1TImode.

2017-03-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use rotate
instead of vec_select for V1TImode.
* conifg/rs6000/vsx.md (VSX_LE): Remove mode iterator that is no
longer needed.
(VSX_LE_128): Add V1TI to this mode iterator.
(*vsx_le_perm_load_<mode>): Change to use VSX_D mode iterator.
(*vsx_le_perm_store_<mode>): Likewise.
(pre-reload splitter for VSX stores): Likewise.
(post-reload splitter for VSX stores): Likewise.
(*vsx_xxpermdi2_le_<mode>): Likewise.
(*vsx_lxvd2x2_le_<mode>): Likewise.
(*vsx_stxvd2x2_le_<mode>): Likewise.

From-SVN: r246015

7 years ago* g++.dg/warn/Wpadded-1.C: Fix for 32-bit target.
Jason Merrill [Thu, 9 Mar 2017 22:20:33 +0000 (17:20 -0500)]
* g++.dg/warn/Wpadded-1.C: Fix for 32-bit target.

From-SVN: r246014

7 years agoDefine macro to simplify std::_Not_fn definition
Jonathan Wakely [Thu, 9 Mar 2017 20:36:42 +0000 (20:36 +0000)]
Define macro to simplify std::_Not_fn definition

* include/std/functional (_Not_fn): Define macro to simplify
repetitive function definitions.

From-SVN: r246013

7 years agoCorrect failures with --enable-checking=yes,rtl.
Michael Eager [Thu, 9 Mar 2017 18:09:39 +0000 (18:09 +0000)]
Correct failures with --enable-checking=yes,rtl.

        * config/microblaze/microblaze.c (microblaze_expand_shift):
        Replace GET_CODE test with CONST_INT_P and INTVAL test with
        test for const0_rtx.
        * config/microblaze/microblaze.md (ashlsi3_byone, ashrsi3_byone,
        lshrsi3_byone): Replace INTVAL with test for const1_rtx.

From-SVN: r246012

7 years agoUse -mhard-float for MIPS -mlxc1-sxc1 tests
Matthew Fortune [Thu, 9 Mar 2017 17:18:41 +0000 (17:18 +0000)]
Use -mhard-float for MIPS -mlxc1-sxc1 tests

gcc/testsuite/

* gcc.target/mips/lxc1-sxc1-1.c: Use -mhard-float.
* gcc.target/mips/lxc1-sxc1-2.c: Likewise.

From-SVN: r246011

7 years agore PR sanitizer/79757 (ICE in declare_vars, at gimplify.c:634)
Marek Polacek [Thu, 9 Mar 2017 16:58:17 +0000 (16:58 +0000)]
re PR sanitizer/79757 (ICE in declare_vars, at gimplify.c:634)

PR sanitizer/79757
* c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
parameter declarations with initializers.

* gcc.dg/ubsan/pr79757-1.c: New test.
* gcc.dg/ubsan/pr79757-2.c: New test.
* gcc.dg/ubsan/pr79757-3.c: New test.
* gcc.dg/ubsan/pr79757-4.c: New test.
* gcc.dg/ubsan/pr79757-5.c: New test.

From-SVN: r246010

7 years agore PR c/79969 (C FE emits locus of forward enum declaration rather than definition...
Jakub Jelinek [Thu, 9 Mar 2017 16:42:45 +0000 (17:42 +0100)]
re PR c/79969 (C FE emits locus of forward enum declaration rather than definition into debug info)

PR c/79969
* c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
TYPE_STUB_DECL.

* gcc.dg/debug/dwarf2/enum-loc1.c: New test.

From-SVN: r246009

7 years agore PR c++/79687 (Wrong code with pointer-to-member)
Marek Polacek [Thu, 9 Mar 2017 16:36:37 +0000 (16:36 +0000)]
re PR c++/79687 (Wrong code with pointer-to-member)

PR c++/79687
* init.c (constant_value_1): Break if the variable has a dynamic
initializer.

* g++.dg/expr/ptrmem8.C: New test.
* g++.dg/expr/ptrmem9.C: New test.

From-SVN: r246008

7 years agore PR tree-optimization/79977 ([graphite] ICE in outermost_loop_in_sese, at sese...
Richard Biener [Thu, 9 Mar 2017 16:19:37 +0000 (16:19 +0000)]
re PR tree-optimization/79977 ([graphite] ICE in outermost_loop_in_sese, at sese.c:300 w/ -O2 -floop-nest-optimize)

2017-03-09  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79977
* graphite-scop-detection.c (scop_detection::merge_sese):
Handle the case of extra exits to blocks dominating the entry.

* gcc.dg/graphite/pr79977.c: New testcase.

From-SVN: r246006

7 years agoDefine std::byte for C++17 (P0298R3)
Jonathan Wakely [Thu, 9 Mar 2017 15:42:02 +0000 (15:42 +0000)]
Define std::byte for C++17 (P0298R3)

* doc/xml/manual/status_cxx2017.xml: Document std::byte support.
* include/c_global/cstddef (std::byte): Define for C++17.
* testsuite/18_support/byte/global_neg.cc: New test.
* testsuite/18_support/byte/ops.cc: New test.
* testsuite/18_support/byte/requirements.cc: New test.

From-SVN: r246005

7 years agoAdd check_effective_target_rdynamic and use it in g++.dg/lto/pr69589_0.C.
Toma Tabacu [Thu, 9 Mar 2017 15:04:31 +0000 (15:04 +0000)]
Add check_effective_target_rdynamic and use it in g++.dg/lto/pr69589_0.C.

gcc/
* doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
Document rdynamic.

gcc/testsuite/

* g++.dg/lto/pr69589_0.C: Add dg-require-effective-target for
rdynamic.  Remove dg-skip-if for targets which don't support -rdynamic.
* lib/target-supports.exp (check_effective_target_rdynamic):
New proc.

From-SVN: r246004

7 years agore PR rtl-optimization/79949 (ICE in Max. number of generated reload insns per insn...
Vladimir Makarov [Thu, 9 Mar 2017 14:43:17 +0000 (14:43 +0000)]
re PR rtl-optimization/79949 (ICE in Max. number of generated reload insns per insn is achieved (90))

2017-03-09  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/79949
* lra-constraints.c (process_alt_operands): Check memory when
trying to predict a cycle.  Print about the overall increase.

From-SVN: r246003

7 years agore PR target/79971 (ICE in const_binop, at fold-const.c:1554 on ARM target with satur...
Richard Biener [Thu, 9 Mar 2017 13:20:50 +0000 (13:20 +0000)]
re PR target/79971 (ICE in const_binop, at fold-const.c:1554 on ARM target with saturated integers)

2017-03-09  Richard Biener  <rguenther@suse.de>

PR middle-end/79971
* gimple-expr.c (useless_type_conversion_p): Preserve
TYPE_SATURATING for fixed-point types.

* gcc.dg/fixed-point/pr79971.c: New testcase.

From-SVN: r246002

7 years agore PR ipa/79970 (ICE in add_stack_var, at cfgexpand.c:450 with always_inline attribute)
Richard Biener [Thu, 9 Mar 2017 13:20:03 +0000 (13:20 +0000)]
re PR ipa/79970 (ICE in add_stack_var, at cfgexpand.c:450 with always_inline attribute)

2017-03-09  Richard Biener  <rguenther@suse.de>

PR ipa/79970
* ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
alignment of BLKmode params.

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

From-SVN: r246001

7 years agore PR c++/71966 (ICE on invalid C++11 code (undefined constructor used in a constant...
Paolo Carlini [Thu, 9 Mar 2017 11:51:29 +0000 (11:51 +0000)]
re PR c++/71966 (ICE on invalid C++11 code (undefined constructor used in a constant expression): in cp_build_addr_expr_1, at cp/typeck.c:5671)

2017-03-09  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71966
* g++.dg/cpp0x/pr71966-1.C: New.
* g++.dg/cpp0x/pr71966-2.C: Likewise.

From-SVN: r246000

7 years ago[AArch64] PR target/79913: VEC_SELECT bugs in aarch64 patterns
Kyrylo Tkachov [Thu, 9 Mar 2017 10:34:36 +0000 (10:34 +0000)]
[AArch64] PR target/79913: VEC_SELECT bugs in aarch64 patterns

PR target/79913
* config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
(VALL_NO_V2Q): Likewise.
(VDQF_DF): Delete.
* config/aarch64/aarch64-simd.md
(aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
iterator.
(*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
VALL_NO_V2Q mode iterator.
(*aarch64_vgetfmulx<mode>): Use VDQF iterator.

From-SVN: r245999

7 years agoFix ICE in tree-chkp-opt.c (PR tree-optimization/79631).
Martin Liska [Thu, 9 Mar 2017 10:10:02 +0000 (11:10 +0100)]
Fix ICE in tree-chkp-opt.c (PR tree-optimization/79631).

2017-03-09  Martin Liska  <mliska@suse.cz>

PR tree-optimization/79631
* tree-chkp-opt.c (chkp_is_constant_addr): Call
tree_int_cst_sign_bit just for INTEGER constants.
2017-03-09  Martin Liska  <mliska@suse.cz>

PR tree-optimization/79631
* gcc.target/i386/mpx/pr79631.c: New test.

From-SVN: r245998

7 years agoDisable -fcheck-pointer-bounds with sanitizers.
Martin Liska [Thu, 9 Mar 2017 10:04:50 +0000 (11:04 +0100)]
Disable -fcheck-pointer-bounds with sanitizers.

2017-03-09  Martin Liska  <mliska@suse.cz>

PR target/65705
PR target/69804
* toplev.c (process_options): Disable -fcheck-pointer-bounds with
sanitizers.
2017-03-09  Martin Liska  <mliska@suse.cz>

PR target/65705
PR target/69804
* gcc.target/i386/pr71458.c: Update scanned pattern.

From-SVN: r245997

7 years agore PR c++/79672 (ICE with -Wduplicated-branches -fopenmp)
Marek Polacek [Thu, 9 Mar 2017 09:53:03 +0000 (09:53 +0000)]
re PR c++/79672 (ICE with -Wduplicated-branches -fopenmp)

PR c++/79672
* tree.c (inchash::add_expr): Handle TREE_VEC.

* g++.dg/warn/Wduplicated-branches2.C: Fix PR.
* g++.dg/warn/Wduplicated-branches3.C: New test.

From-SVN: r245996

7 years agomsa-bclri.c: Skip the test for -O0.
Prachi Godbole [Thu, 9 Mar 2017 09:38:00 +0000 (09:38 +0000)]
msa-bclri.c: Skip the test for -O0.

gcc/testsuite/
* gcc.target/mips/msa-bclri.c: Skip the test for -O0.

From-SVN: r245995

7 years agoSupport BIT_FIELD_REF in MPX (PR ipa/79764).
Martin Liska [Thu, 9 Mar 2017 09:26:45 +0000 (10:26 +0100)]
Support BIT_FIELD_REF in MPX (PR ipa/79764).

2017-03-09  Martin Liska  <mliska@suse.cz>

PR ipa/79764
(chkp_narrow_size_and_offset): New function.
(chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
(void chkp_parse_bit_field_ref): New function.
(chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
(chkp_process_stmt): Use chkp_parse_bit_field_ref.
2017-03-09  Martin Liska  <mliska@suse.cz>

PR ipa/79764
* g++.dg/pr79764.C: New test.

From-SVN: r245994

7 years agoGet bounds for a PARM_DECL (PR ipa/79761).
Martin Liska [Thu, 9 Mar 2017 09:22:29 +0000 (10:22 +0100)]
Get bounds for a PARM_DECL (PR ipa/79761).

2017-03-09  Martin Liska  <mliska@suse.cz>

PR ipa/79761
* tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
(chkp_find_bounds_1): Remove gcc_unreachable.
2017-03-09  Martin Liska  <mliska@suse.cz>

PR ipa/79761
* g++.dg/pr79761.C: New test.

From-SVN: r245993

7 years agoIncrement value instead of a pointer in ADA macro processing.
Martin Liska [Thu, 9 Mar 2017 09:20:59 +0000 (10:20 +0100)]
Increment value instead of a pointer in ADA macro processing.

2017-03-09  Martin Liska  <mliska@suse.cz>

* c-ada-spec.c (macro_length): Increment value instead of a pointer.

From-SVN: r245992

7 years agore PR sanitizer/79944 (asan: incorrect instrumentation of atomic operations)
Jakub Jelinek [Thu, 9 Mar 2017 09:20:23 +0000 (10:20 +0100)]
re PR sanitizer/79944 (asan: incorrect instrumentation of atomic operations)

PR sanitizer/79944
* asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
BUILT_IN_SYNC*, determine the access type from the size suffix and
always build a MEM_REF with that type.  Handle forgotten
BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.

* c-c++-common/asan/pr79944.c: New test.

From-SVN: r245991

7 years agore PR target/79932 (_mm512_packus_epi32 does not compile under -O0)
Jakub Jelinek [Thu, 9 Mar 2017 09:11:06 +0000 (10:11 +0100)]
re PR target/79932 (_mm512_packus_epi32 does not compile under -O0)

PR target/79932
* config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
_mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
_mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
_mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
_mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
_mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
_mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
_mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
_mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
_mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
_mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
_mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
_mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
_mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
_mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
_mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
_mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
_mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
_mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
_mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
_mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
_mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
_mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
_mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
_mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
_mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
_mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
_mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
_mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
_mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
definitions outside of __OPTIMIZE__ guarded section.

* gcc.target/i386/pr79932-2.c: New test.

From-SVN: r245990

7 years agore PR target/79932 (_mm512_packus_epi32 does not compile under -O0)
Jakub Jelinek [Thu, 9 Mar 2017 09:09:27 +0000 (10:09 +0100)]
re PR target/79932 (_mm512_packus_epi32 does not compile under -O0)

PR target/79932
* config/i386/avx512bwintrin.h (_mm512_packs_epi32,
_mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
_mm512_packus_epi32, _mm512_maskz_packus_epi32,
_mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
guarded section.

* gcc.target/i386/pr79932-1.c: New test.

From-SVN: r245989

7 years agoPR c++/79900 - ICE in strip_typedefs
Marek Polacek [Thu, 9 Mar 2017 08:35:37 +0000 (08:35 +0000)]
PR c++/79900 - ICE in strip_typedefs

PR c++/79900 - ICE in strip_typedefs
* tree.c (strip_typedefs): Skip the attribute handling if T is
a variant type which hasn't been updated yet.

* g++.dg/warn/Wpadded-1.C: New test.

From-SVN: r245988

7 years agoS/390: Add missing constraints in builtin patterns
Andreas Krebbel [Thu, 9 Mar 2017 07:53:29 +0000 (07:53 +0000)]
S/390: Add missing constraints in builtin patterns

gcc/ChangeLog:

2017-03-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
("vfenez<mode>"): Add missing constraints.

From-SVN: r245987

7 years agoPR c++/79797 - ICE with self-reference in array DMI.
Jason Merrill [Thu, 9 Mar 2017 01:01:18 +0000 (20:01 -0500)]
PR c++/79797 - ICE with self-reference in array DMI.

* constexpr.c (lookup_placeholder): Split out...
(cxx_eval_constant_expression): ...from here.

From-SVN: r245986

7 years agoDaily bump.
GCC Administrator [Thu, 9 Mar 2017 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245985

7 years agoPR target/79928 - nds32: misspelled diagnostic: not support -fpic
Martin Sebor [Wed, 8 Mar 2017 23:29:42 +0000 (23:29 +0000)]
PR target/79928 - nds32: misspelled diagnostic: not support -fpic

Verified by building an nds32be-elf cross-compiler.

gcc/ChangeLog
* config/nds32/nds32.c (nds32_option_override):

From-SVN: r245982

7 years agore PR c/79940 (OpenMP pragma - internal compiler error with taskloop)
Jakub Jelinek [Wed, 8 Mar 2017 17:21:06 +0000 (18:21 +0100)]
re PR c/79940 (OpenMP pragma - internal compiler error with taskloop)

PR c/79940
* gimplify.c (gimplify_omp_for): Replace index var in outer
taskloop statement with an artificial variable and add
OMP_CLAUSE_PRIVATE clause for it.

* testsuite/libgomp.c/pr79940.c: New test.

From-SVN: r245980

7 years agoFix PR demangler/70909 and 67264 (endless demangler recursion)
Mark Wielaard [Wed, 8 Mar 2017 14:28:38 +0000 (14:28 +0000)]
Fix PR demangler/70909 and 67264 (endless demangler recursion)

ChangeLog:

       PR demangler/70909
       PR demangler/67264
       * include/demangle.h: Add d_printing to struct demangle_component
       and pass struct demangle_component as non const.

libiberty/ChangeLog:

       PR demangler/70909
       PR demangler/67264
       * cp-demangle.c: Fix endless recursion. Pass
       struct demangle_component as non const.
       (d_make_empty): Initialize variable.
       (d_print_comp_inner): Limit recursion.
       (d_print_comp): Decrement variable.
       * cp-demint.c (cplus_demangle_fill_component): Initialize
       variable.
       (cplus_demangle_fill_builtin_type): Likewise.
       (cplus_demangle_fill_operator): Likewise.
       * testsuite/demangle-expected: Add tests.

From-SVN: r245978

7 years agobtest.c (test5): Replace #ifdef guard with 'unused' attribute to fix compile warning...
Sam Thursfield [Wed, 8 Mar 2017 14:21:21 +0000 (14:21 +0000)]
btest.c (test5): Replace #ifdef guard with 'unused' attribute to fix compile warning when...

       * btest.c (test5): Replace #ifdef guard with 'unused' attribute
       to fix compile warning when BACKTRACE_SUPPORTED isn't defined.

From-SVN: r245977

7 years agore PR tree-optimization/79955 (GLIBC build fails after r245840)
Richard Biener [Wed, 8 Mar 2017 14:10:47 +0000 (14:10 +0000)]
re PR tree-optimization/79955 (GLIBC build fails after r245840)

2017-03-08  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79955
* tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
for accesses that are completely outside of the variable.

* gcc.dg/uninit-24.c: New testcase.

From-SVN: r245976

7 years ago* g++.dg/Walloca1.C: Adjust dg-warning.
Marek Polacek [Wed, 8 Mar 2017 12:58:01 +0000 (12:58 +0000)]
* g++.dg/Walloca1.C: Adjust dg-warning.

From-SVN: r245975

7 years agore PR tree-optimization/79943 (Loop splitting breaks with loops of pointer type)
Andrew Haley [Wed, 8 Mar 2017 11:35:23 +0000 (11:35 +0000)]
re PR tree-optimization/79943 (Loop splitting breaks with loops of pointer type)

2017-03-08  Andrew Haley  <aph@redhat.com>

PR tree-optimization/79943
* tree-ssa-loop-split.c (compute_new_first_bound): When
calculating the new upper bound, (END-BEG) should be added, not
subtracted.

From-SVN: r245974

7 years agore PR ada/79903 (When building GCC-cross compiler for RTEMS/SPARC with Ada support...
Thanassis Tsiodras [Wed, 8 Mar 2017 09:20:17 +0000 (09:20 +0000)]
re PR ada/79903 (When building GCC-cross compiler for  RTEMS/SPARC with Ada support, the build fails because of missing #ifdef)

PR ada/79903
* socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.

From-SVN: r245972

7 years agore PR ada/79945 (ppc64le Default_Bit_Order in Ada)
Eric Botcazou [Wed, 8 Mar 2017 09:08:54 +0000 (09:08 +0000)]
re PR ada/79945 (ppc64le Default_Bit_Order in Ada)

PR ada/79945
* system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.

* system-linux-arm.ads (Default_Bit_Order): Likewise.
* system-linux-mips.ads (Default_Bit_Order): Likewise.
* system-linux-armeb.ads: Delete.
* system-linux-mipsel.ads: Likewise.
* gcc-interface/Makefile.in (MIPS/Linux): Adjust.
(ARM/Linux): Likewise.

From-SVN: r245970

7 years agoavr.md (setmemhi): Make sure match_dup operand number comes before match_scratch.
Jakub Jelinek [Wed, 8 Mar 2017 08:52:05 +0000 (09:52 +0100)]
avr.md (setmemhi): Make sure match_dup operand number comes before match_scratch.

* config/avr/avr.md (setmemhi): Make sure match_dup
operand number comes before match_scratch.

From-SVN: r245969

7 years agore PR tree-optimization/79920 (Incorrect floating point results when compiling with...
Richard Biener [Wed, 8 Mar 2017 08:50:01 +0000 (08:50 +0000)]
re PR tree-optimization/79920 (Incorrect floating point results when compiling with -O3)

2017-03-08  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79920
* tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
with ncopies == 1 to ...
(vect_transform_slp_perm_load): ... here.  Properly compute
all element loads by iterating VF times over the group.  Do
not handle ncopies (computed in a broken way) in
vect_create_mask_and_perm.

* gcc.dg/vect/pr79920.c: New testcase.

From-SVN: r245968

7 years agore PR target/79904 (ICE in annotate_constant_pool_refs, at config/s390/s390.c:7909)
Jakub Jelinek [Wed, 8 Mar 2017 08:35:20 +0000 (09:35 +0100)]
re PR target/79904 (ICE in annotate_constant_pool_refs, at config/s390/s390.c:7909)

PR sanitizer/79904
* internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
is a uniform vector, use uniform_vector_p return value instead of
building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.

* gcc.dg/ubsan/pr79904.c: New test.

From-SVN: r245967

7 years agoDaily bump.
GCC Administrator [Wed, 8 Mar 2017 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245966

7 years agore PR c/79834 (c/c-parser.c: make code more i18n-friendly)
Jakub Jelinek [Tue, 7 Mar 2017 19:07:44 +0000 (20:07 +0100)]
re PR c/79834 (c/c-parser.c: make code more i18n-friendly)

PR c/79834
c/
* c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
for "may only be used in compound statements" diagnostics, change it
such that the same translatable string is used for all pragmas.  For
PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
diagnostics.
(c_parser_omp_cancellation_point, c_parser_omp_target_update,
c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
"may only be used in compound statements" diagnostics, such that the
same translatable string is used for all pragmas.
cp/
* parser.c (cp_parser_omp_cancellation_point,
cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data,
cp_parser_omp_target_update): Change "may only be used in compound
statements" diagnostics, such that the same translatable string is
used for all pragmas.
(cp_parser_pragma): Likewise.  Use error_at instead of
cp_parser_error for that diagnostics.
testsuite/
* c-c++-common/goacc/pragma_context.c (f2): Adjust expected
diagnostics.

From-SVN: r245959

7 years agore PR middle-end/79809 (ICE in alloca_call_type, at gimple-ssa-warn-alloca.c:282)
Marek Polacek [Tue, 7 Mar 2017 17:30:53 +0000 (17:30 +0000)]
re PR middle-end/79809 (ICE in alloca_call_type, at gimple-ssa-warn-alloca.c:282)

PR middle-end/79809
* gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
(alloca_call_type): Likewise.

* g++.dg/Walloca1.C: New test.

From-SVN: r245955

7 years agogcov: put comment to correct location.
Martin Liska [Tue, 7 Mar 2017 14:13:10 +0000 (15:13 +0100)]
gcov: put comment to correct location.

2017-03-07  Martin Liska  <mliska@suse.cz>

* gcov.c (process_args): Put comment to correct location.

From-SVN: r245952

7 years agoUse array_at_struct_end_p in tree-chkp.c (PR middle-end/68270).
Martin Liska [Tue, 7 Mar 2017 14:12:52 +0000 (15:12 +0100)]
Use array_at_struct_end_p in tree-chkp.c (PR middle-end/68270).

2017-03-07  Martin Liska  <mliska@suse.cz>

PR middle-end/68270
* tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
Use array_at_struct_end_p instead of DECL_CHAIN (field).
(chkp_narrow_bounds_for_field): Likewise.
(chkp_parse_array_and_component_ref): Pass one more argument to
call.
2017-03-07  Martin Liska  <mliska@suse.cz>

PR middle-end/68270
* g++.dg/pr68270.C: New test.

From-SVN: r245951

7 years agotree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve preheaders.
Richard Biener [Tue, 7 Mar 2017 13:39:44 +0000 (13:39 +0000)]
tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve preheaders.

2017-03-07  Richard Biener  <rguenther@suse.de>

* tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
preheaders.

From-SVN: r245950

7 years agoi386: Do not align small stack slots to 16 bytes
Segher Boessenkool [Tue, 7 Mar 2017 11:53:32 +0000 (12:53 +0100)]
i386: Do not align small stack slots to 16 bytes

As Shmuel reported in <https://gcc.gnu.org/ml/gcc-help/2017-03/msg00009.html>,
on x86-64 small structures in automatic storage are aligned to 16 bytes.
This seems to be because of a mix-up between bits and bytes in the i386
target code.

* config/i386/i386.c (ix86_local_alignment): Align most aggregates
of 16 bytes and more to 16 bytes, not those of 16 bits and more.

From-SVN: r245949

7 years agoPR c/79855: add full stop to store merging param descriptions
Kyrylo Tkachov [Tue, 7 Mar 2017 09:36:44 +0000 (09:36 +0000)]
PR c/79855: add full stop to store merging param descriptions

PR c/79855
* params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
to end of description.
(PARAM_MAX_STORES_TO_MERGE): Likewise.

From-SVN: r245948

7 years agore PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)
Jakub Jelinek [Tue, 7 Mar 2017 08:11:30 +0000 (09:11 +0100)]
re PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)

PR rtl-optimization/79901
* config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
...
(*avx512f_<code><mode>3<mask_name>): ... this.
(<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
iterator instead of VI8_AVX2_AVX512BW.

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

From-SVN: r245947

7 years agore PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)
Jakub Jelinek [Tue, 7 Mar 2017 08:04:38 +0000 (09:04 +0100)]
re PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)

PR rtl-optimization/79901
* expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
min/max expander, expand it using expand_vec_cond_expr.

From-SVN: r245946

7 years agore PR sanitizer/79897 (ICE in gimplify_modify_expr, at gimplify.c:5627 on ARM target)
Jakub Jelinek [Tue, 7 Mar 2017 06:11:14 +0000 (07:11 +0100)]
re PR sanitizer/79897 (ICE in gimplify_modify_expr, at gimplify.c:5627 on ARM target)

PR sanitizer/79897
* ubsan.c (ubsan_encode_value): Call mark_addressable on the
temporary.

* c-c++-common/ubsan/pr79897.c: New test.

From-SVN: r245945

7 years agoDaily bump.
GCC Administrator [Tue, 7 Mar 2017 00:16:13 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245943

7 years agoFix typo.
John David Anglin [Mon, 6 Mar 2017 23:12:14 +0000 (23:12 +0000)]
Fix typo.

From-SVN: r245937

7 years agore PR c++/79821 (SEGV in cc1plus compiling 64-bit stdc++.h.gch/O2g.gch)
Jakub Jelinek [Mon, 6 Mar 2017 22:51:23 +0000 (23:51 +0100)]
re PR c++/79821 (SEGV in cc1plus compiling 64-bit stdc++.h.gch/O2g.gch)

PR c++/79821
* dwarf2out.h (dw_vec_const): Change array type from unsigned char *
to void * for PCH reasons.
* dwarf2out.c (output_loc_operands, output_die): Cast
v.val_vec.array to unsigned char *.

From-SVN: r245932

7 years agoPR target 77850
John David Anglin [Mon, 6 Mar 2017 22:48:53 +0000 (22:48 +0000)]
PR target 77850

PR target 77850
* config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
vector types.

From-SVN: r245931

7 years agoFix the last ChangeLog entry
Vladimir Makarov [Mon, 6 Mar 2017 20:29:49 +0000 (20:29 +0000)]
Fix the last ChangeLog entry

From-SVN: r245929

7 years agore PR rtl-optimization/79571 (ICE in Max. number of generated reload insns per insn...
Vladimir Makarov [Mon, 6 Mar 2017 20:23:00 +0000 (20:23 +0000)]
re PR rtl-optimization/79571 (ICE in Max. number of generated reload insns per insn is achieved (90))

2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/79571
* lra-constraints.c (process_alt_operands): Claculate static
reject and subtract it from overal when there will be only address
reloads.

2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/79571
* gcc.target/i386/pr79571.c: New.

From-SVN: r245928

7 years agoPR c++/79796 - ICE with NSDMI and this pointer
Marek Polacek [Mon, 6 Mar 2017 17:38:42 +0000 (17:38 +0000)]
PR c++/79796 - ICE with NSDMI and this pointer

PR c++/79796 - ICE with NSDMI and this pointer
* call.c (build_over_call): Handle NSDMI with a 'this' by calling
replace_placeholders.

* g++.dg/cpp0x/nsdmi13.C: New test.

From-SVN: r245927

7 years agoSet incoming stack boundary to 128 for 64-bit targets
Julia Koval [Mon, 6 Mar 2017 16:08:59 +0000 (17:08 +0100)]
Set incoming stack boundary to 128 for 64-bit targets

For 64-bit targets, the incoming stack of interrupt handler is aligned
to 16 bytes.  Update ix86_minimum_incoming_stack_boundary to set the
incoming stack boundary of interrupt handler to 128 for 64-bit targets.

gcc/

2017-03-06  Julia Koval  <julia.koval@intel.com>

PR target/79793
* config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
incoming stack boundary to 128 for 64-bit targets.

gcc/testsuite/

2017-03-06  Julia Koval  <julia.koval@intel.com>

PR target/79793
 * gcc.target/i386/interrupt-12.c: Update scan-assembler-times
 directives.
 * gcc.target/i386/interrupt-13.c: Ditto.
 * gcc.target/i386/interrupt-14.c: Ditto.
 * gcc.target/i386/interrupt-15.c: Ditto.

From-SVN: r245926

7 years agore PR c++/79822 (ICE with void statement expression)
Jakub Jelinek [Mon, 6 Mar 2017 15:43:51 +0000 (16:43 +0100)]
re PR c++/79822 (ICE with void statement expression)

PR c++/79822
* constexpr.c (cxx_eval_statement_list): Treat empty ({ }) like
({ (void) 0; }).

* g++.dg/cpp0x/constexpr-79822.C: New test.

From-SVN: r245925

7 years agoRevert "Allow deduction guides to look into primary template."
Jason Merrill [Mon, 6 Mar 2017 14:44:44 +0000 (09:44 -0500)]
Revert "Allow deduction guides to look into primary template."

* cp-tree.h, parser.c, pt.c, search.c: Revert.

From-SVN: r245924

7 years agore PR tree-optimization/79887 (ICE in set_uid_loop_bbs, at tree-vectorizer.c:482)
Richard Biener [Mon, 6 Mar 2017 13:58:57 +0000 (13:58 +0000)]
re PR tree-optimization/79887 (ICE in set_uid_loop_bbs, at tree-vectorizer.c:482)

2017-03-06  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79894
* tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
to NULL after folding it.

* gcc.dg/vect/pr79887.c: New testcase.

From-SVN: r245923

7 years agore PR tree-optimization/79824 (Failure to peel for gaps leads to read beyond mapped...
Richard Biener [Mon, 6 Mar 2017 13:58:01 +0000 (13:58 +0000)]
re PR tree-optimization/79824 (Failure to peel for gaps leads to read beyond mapped memory)

2017-03-06  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79824
* tree-vect-stmts.c (get_group_load_store_type): Fix alignment
check disabling peeling for gaps.

* gcc.dg/vect/pr79824-1.c: New testcase.
* gcc.dg/vect/pr79824-2.c: Likewise.

From-SVN: r245922

7 years agoAdd check_effective_target_gettimeofday and use it in gcc.dg/lto/pr60449_0.c.
Toma Tabacu [Mon, 6 Mar 2017 13:15:30 +0000 (13:15 +0000)]
Add check_effective_target_gettimeofday and use it in gcc.dg/lto/pr60449_0.c.

gcc/
* doc/sourcebuild.texi (Effective-Target Keywords, Environment
attributes): Document gettimeofday.

gcc/testsuite/

* gcc.dg/lto/pr60449_0.c: Add dg-require-effective-target for
gettimeofday.  Remove dg-skip-if for AVR.
* lib/target-supports.exp (check_effective_target_gettimeofday):
New proc.

From-SVN: r245921

7 years agore PR fortran/79894 (ICE in gfc_add_modify_loc, at fortran/trans.c:159)
Richard Biener [Mon, 6 Mar 2017 12:48:54 +0000 (12:48 +0000)]
re PR fortran/79894 (ICE in gfc_add_modify_loc, at fortran/trans.c:159)

2017-03-06  Richard Biener  <rguenther@suse.de>

PR fortran/79894
* trans.c (gfc_add_modify_loc): Weaken assert.

From-SVN: r245919