Commit Graph

166047 Commits

Author SHA1 Message Date
Richard Biener
4c3643a559 re PR tree-optimization/88621 (wrong code at -O1 and above on x86_64-linux-gnu in 64-bit mode (not in 32-bit mode))
2019-01-02  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/88621
	* tree-ssa-loop-im.c (gather_mem_refs_stmt): Fix pastos, avoid
	bitfields when canoncalizing.

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

From-SVN: r267510
2019-01-02 12:19:10 +00:00
Richard Biener
3ff59baa1c re PR target/87545 (-mtune=intel regressions)
2019-01-02  Richard Biener  <rguenther@suse.de>

	PR target/87545
	* config/i386/x86-tune-costs.h (intel_cost): Adjust
	cost of cheap SSE instruction.

From-SVN: r267509
2019-01-02 11:04:45 +00:00
Jonathan Wakely
362eea7cbf Fix year range in copyright header
* testsuite/experimental/string_view/element_access/char/empty.cc:
	Fix year range in copyright header.

From-SVN: r267508
2019-01-02 10:44:35 +00:00
Jakub Jelinek
0958fc854b re PR ipa/88561 (PGO devirtualization miscompilation of firefox)
PR ipa/88561
	* g++.dg/tree-prof/devirt.C: Expect _ZThn16 only for lp64 and llp64
	targets and expect _ZThn8 for ilp32 targets.

From-SVN: r267507
2019-01-02 10:25:59 +01:00
Richard Biener
9e1f4e0016 re PR lto/85574 (LTO bootstapped binaries differ)
2019-01-02  Richard Biener  <rguenther@suse.de>

	PR ipa/85574
	* ipa-icf.h (sem_item_optimizer::sort_congruence_split): Declare.
	* ipa-icf.c (sem_item_optimizer::sort_congruence_split): New
	function.
	(sem_item_optimizer::do_congruence_step_f): Sort the congruence
	set after UIDs before splitting them.

From-SVN: r267506
2019-01-02 08:49:07 +00:00
Martin Sebor
eef2da674a gimple-fold.c (get_range_strlen_tree): Record if the computed length is optimistic.
* gimple-fold.c (get_range_strlen_tree): Record if the computed
	length is optimistic.  If it is, then arrange to compute the
	conservative length as well.

	* gcc.dg/strlenopt-40.c: Update
	* gcc.dg/strlenopt-51.c: Likewise.
	* gcc.dg/tree-ssa/pr79376.c: Likewise.

Co-Authored-By: Jeff Law <law@redhat.com>

From-SVN: r267505
2019-01-01 23:17:54 -07:00
Joel Brobecker
2667a5d04a Fix year range in libstdc++v3/testsuite/.../empty.cc copyright header
libstdc++-v3/ChangeLog:

        * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
        Fix year range in copyright header.

From-SVN: r267504
2019-01-02 06:04:51 +00:00
Martin Sebor
5d6655ebcc gimple-fold.h (get_range_strlen): Update prototype.
* gimple-fold.h (get_range_strlen): Update prototype.
	* builtins.c (check_access): Update call to get_range_strlen to use
	c_strlen_data pointer.   Change various variable accesses to instead
	pull data from the c_strlen_data structure.
	(check_strncat_sizes, expand_builtin_strncat): Likewise.
	* calls.c (maybe_warn_nonstring_arg): Likewise.
	* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Likewise.  Reset
	minimum length if maximum lengh is unknown.
	* gimple-ssa-sprintf.c (get_string_length): Likewise.  Drop code
	that used c_strlen, it's no longer needed.  Restructure slightly.
	(format_string): Set unlikely range appropriately.
	* gimple-fold.c (get_range_strlen): Update comments.  Fix minor
	formatting issues.
	(get_range_strlen):  Accept c_strlen_data pointer for external
	call sites as well.  Pass through to call to internal get_range_strlen.
	Adjust minlen, maxlen and maxbound as needed.
	(get_maxval_strlen): Update comments.
	(gimple_fold_builtin_strlen):  Update call to get_range_strlen
	to use c_strlen_data pointer.  Change variable accesses to instead
	use c_strlen_data data members.

	* gcc.dg/strlenopt-40.c: Disable a couple tests.
	* gcc.dg/strlenopt-48.c: Twiddle test.
	* gcc.dg/strlenopt-59.c: New test.
	* gcc.dg/tree-ssa/builtin-snprintf-5.c: New test.
	* g++.dg/init/strlen.C: New test.

Co-Authored-By: Jeff Law <law@redhat.com>

From-SVN: r267503
2019-01-01 23:02:37 -07:00
GCC Administrator
79b1c2295b Daily bump.
From-SVN: r267502
2019-01-02 00:16:20 +00:00
Thomas Koenig
cf015ca240 re PR fortran/82743 (uncaught character truncation in derived type initialization)
2019-01-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/82743
	* primary.c (gfc_convert_to_structure_constructor): If a character
	in a constructor is too long, add a warning with
	-Wcharacter-truncation.

2019-01-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/82743
	* gfortran.dg/structure_constructor_16.f90: New test.

From-SVN: r267499
2019-01-01 21:19:53 +00:00
Martin Sebor
730832cd79 gimple-fold.c (get_range_strlen): Update prototype.
* gimple-fold.c (get_range_strlen): Update prototype.
	(get_range_strlen_tree): Update prototype.  Drop minlen/maxlen
	local variables.  Use pdata to return information to caller.
	Update calls to get_range_strlen.  Update pdata->maxbound.
	(get_range_strlen -- static version): Similarly.
	(get_range_strlen -- extern version): Update for internal
	get_range_strlen API change.  Convert to external data format.
	(get_maxval_strlen): Similarly.

Co-Authored-By: Jeff Law <law@redhat.com>

From-SVN: r267498
2019-01-01 11:20:13 -07:00
Jan Hubicka
976cbbe1ea devirt-36.C: Add dg-do-compile.
* g++.dg/ipa/devirt-36.C: Add dg-do-compile.
	* g++.dg/ipa/devirt-53.C: Fix scan template.

From-SVN: r267497
2019-01-01 13:30:53 +00:00
Jan Hubicka
d2014992c0 devirt-13_0.C: Drop broken scan of ssa dump.
* g++.dg/lto/devirt-13_0.C: Drop broken scan of ssa dump.
	* g++.dg/lto/devirt-14_0.C: Drop broken scan of ssa dump.
	* g++.dg/lto/devirt-23_0.C: Add -fdump-ipa-cp.

From-SVN: r267496
2019-01-01 13:10:39 +00:00
Jan Hubicka
962e88a9f5 coverage.c (get_coverage_counts): Use current_function_decl.
* coverage.c (get_coverage_counts): Use current_function_decl.
	* profile.c (read_thunk_profile): New function.
	(branch_prob): Add THUNK parameter.
	* tree-profile.c (tree_profiling): Handle thunks.
	* value-prof.c (init_node_map): Handle thunks.
	* value-prof.h (branch_prob): Upate prototype.
	(read_thunk_profile): Declare.

	* g++.dg/tree-prof/devirt.C: Update testcase.

From-SVN: r267495
2019-01-01 12:49:18 +00:00
Jakub Jelinek
a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Jakub Jelinek
b5fcfdba9a * update-copyright.py: Add Gerard Jungman as external author.
From-SVN: r267493
2019-01-01 13:20:46 +01:00
Jakub Jelinek
3f27508ce4 gcc.c (process_command): Update copyright notice dates.
* gcc.c (process_command): Update copyright notice dates.
	* gcov-dump.c (print_version): Ditto.
	* gcov.c (print_version): Ditto.
	* gcov-tool.c (print_version): Ditto.
	* gengtype.c (create_file): Ditto.
	* doc/cpp.texi: Bump @copying's copyright year.
	* doc/cppinternals.texi: Ditto.
	* doc/gcc.texi: Ditto.
	* doc/gccint.texi: Ditto.
	* doc/gcov.texi: Ditto.
	* doc/install.texi: Ditto.
	* doc/invoke.texi: Ditto.
gcc/fortran/
	* gfortranspec.c (lang_specific_driver): Update copyright notice
	dates.
	* gfc-internals.texi: Bump @copying's copyright year.
	* gfortran.texi: Ditto.
	* intrinsic.texi: Ditto.
	* invoke.texi: Ditto.
gcc/go/
	* gccgo.texi: Bump @copyrights-go year.
gcc/ada/
 	* gnat_ugn.texi: Bump @copying's copyright year.
 	* gnat_rm.texi: Likewise.
gcc/d/
	* gdc.texi: Bump @copyrights-d year.
libitm/
	* libitm.texi: Bump @copying's copyright year.
libgomp/
	* libgomp.texi: Bump @copying's copyright year.
libquadmath/
	* libquadmath.texi: Bump @copying's copyright year.

From-SVN: r267492
2019-01-01 12:34:49 +01:00
GCC Administrator
0070af3f1c Daily bump.
From-SVN: r267491
2019-01-01 00:16:34 +00:00
Max Filippov
c6579387bd re PR target/86814 (xtensa port needs updating for CVE-2017-5753)
PR target/86814

Xtensa architecture is not affected by speculation.

gcc/
2018-12-31  Max Filippov  <jcmvbkbc@gmail.com>

	* config/xtensa/xtensa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
	Define to speculation_safe_value_not_needed.

From-SVN: r267488
2018-12-31 16:51:36 +00:00
Thomas Koenig
2ea47ee9fd re PR fortran/82995 (Segmentation fault passing optional argument to intrinsic sum function)
2018-12-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/82995
	* trans-expr.c (gfc_conv_procedure_call):  Pass NULL pointer
	for missing optional dummy arguments for library routines.
	* trans-intinsic.c (conv_mask_condition): New function.
	(gfc_conv_intrinsic_arith): Detect and handle optional mask.
	(gfc_conv_intrinsic_minmaxloc): Likewise.
	(gfc_conv_intrinsic_findloc): Likewise.
	(gfc_conv_intrinsic_minmaxval): Likewise.
	(gfc_inline_intrinsic_function_p): Do not inline for rank > 1 if
	an optional mask is present.

2018-12-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/82995
        * m4/ifindloc0.m4: Handle case of absend optional argument, passed
	as a NULL pointer.  Correct allocation of retarray->base_addr.
        * m4/ifindloc1.m4: Likewise.
        * m4/ifindloc2.m4: Handle case of absend optional argument, passed
	as a NULL pointer.
        * m4/iforeach-s.m4: Likewise.
        * m4/iforeach-s2.m4: Likewise.
        * m4/iforeach.m4: Likewise.
        * m4/ifunction-s.m4: Likewise.
        * m4/ifunction-s2.m4: Likewise.
        * m4/ifunction.m4: Likewise.
        * generated/findloc0_c16.c: Regenerated.
        * generated/findloc0_c4.c: Regenerated.
        * generated/findloc0_c8.c: Regenerated.
        * generated/findloc0_i1.c: Regenerated.
        * generated/findloc0_i16.c: Regenerated.
        * generated/findloc0_i2.c: Regenerated.
        * generated/findloc0_i4.c: Regenerated.
        * generated/findloc0_i8.c: Regenerated.
        * generated/findloc0_r16.c: Regenerated.
        * generated/findloc0_r4.c: Regenerated.
        * generated/findloc0_r8.c: Regenerated.
        * generated/findloc0_s1.c: Regenerated.
        * generated/findloc0_s4.c: Regenerated.
        * generated/findloc1_c16.c: Regenerated.
        * generated/findloc1_c4.c: Regenerated.
        * generated/findloc1_c8.c: Regenerated.
        * generated/findloc1_i1.c: Regenerated.
        * generated/findloc1_i16.c: Regenerated.
        * generated/findloc1_i2.c: Regenerated.
        * generated/findloc1_i4.c: Regenerated.
        * generated/findloc1_i8.c: Regenerated.
        * generated/findloc1_r16.c: Regenerated.
        * generated/findloc1_r4.c: Regenerated.
        * generated/findloc1_r8.c: Regenerated.
        * generated/findloc1_s1.c: Regenerated.
        * generated/findloc1_s4.c: Regenerated.
        * generated/findloc2_s1.c: Regenerated.
        * generated/findloc2_s4.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_16_s1.c: Regenerated.
        * generated/maxloc0_16_s4.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_4_s1.c: Regenerated.
        * generated/maxloc0_4_s4.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/maxloc0_8_s1.c: Regenerated.
        * generated/maxloc0_8_s4.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_16_s1.c: Regenerated.
        * generated/maxloc1_16_s4.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_4_s1.c: Regenerated.
        * generated/maxloc1_4_s4.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/maxloc1_8_s1.c: Regenerated.
        * generated/maxloc1_8_s4.c: Regenerated.
        * generated/maxval0_s1.c: Regenerated.
        * generated/maxval0_s4.c: Regenerated.
        * generated/maxval1_s1.c: Regenerated.
        * generated/maxval1_s4.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_16_s1.c: Regenerated.
        * generated/minloc0_16_s4.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_4_s1.c: Regenerated.
        * generated/minloc0_4_s4.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/minloc0_8_s1.c: Regenerated.
        * generated/minloc0_8_s4.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_16_s1.c: Regenerated.
        * generated/minloc1_16_s4.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_4_s1.c: Regenerated.
        * generated/minloc1_4_s4.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/minloc1_8_s1.c: Regenerated.
        * generated/minloc1_8_s4.c: Regenerated.
        * generated/minval0_s1.c: Regenerated.
        * generated/minval0_s4.c: Regenerated.
        * generated/minval1_s1.c: Regenerated.
        * generated/minval1_s4.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/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.

2018-12-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/82995
	* gfortran.dg/optional_absent_4.f90: New test.
	* gfortran.dg/optional_absent_5.f90: New test.

From-SVN: r267487
2018-12-31 14:59:46 +00:00
Martin Liska
4d73e47bf8 Fix scan pattern of a test-case.
2018-12-31  Martin Liska  <mliska@suse.cz>

	* g++.dg/tree-prof/devirt.C: Fix scan pattern and test options.

From-SVN: r267486
2018-12-31 14:11:09 +00:00
Martin Liska
b3282dfe1a predict.c (set_even_probabilities): Include also unlikely_count in calculation.
).

2018-12-31  Martin Liska  <mliska@suse.cz>

	* predict.c (set_even_probabilities): Include also
	unlikely_count in calculation.
	(combine_predictions_for_bb): Consider also HOT and
	COLD labels predictions.
	* predict.def (PRED_HOT_LABEL): Move it just after
	__builtin_expect_with_probability predictor.
	(PRED_COLD_LABEL): Likewise.
2018-12-31  Martin Liska  <mliska@suse.cz>

	* g++.dg/predict-2.C: New test.
	* g++.dg/predict-3.C: New test.
	* g++.dg/predict-4.C: New test.
	* gcc.dg/tree-ssa/attr-hotcold-2.c: Adjust test-case.

From-SVN: r267485
2018-12-31 13:46:08 +00:00
Jan Hubicka
41ee4e75ab * x86-tune.def: Enable inter_unit_moves_to_vec for generic.
From-SVN: r267484
2018-12-31 10:05:30 +00:00
Martin Sebor
80c2bad6b6 gimple-fold.c (get_range_strlen): Minor logic cleanup.
* gimple-fold.c (get_range_strlen): Minor logic cleanup.  Add comments
	on code's intent.

Co-Authored-By: Jeff Law <law@redhat.com>

From-SVN: r267483
2018-12-30 20:18:49 -07:00
Martin Sebor
598f7235fb gimple-fold.c (strlen_range_kind): New enum.
* gimple-fold.c (strlen_range_kind): New enum.
	(get_range_strlen): Update signature to use strlen_range_kind
	instead of type+fuzzy.
	(get_range_strlen_tree): Update signature to use
	strlen_range_kind instead of type+fuzzy.  Pass rkind down to
	get_range_strlen.  Check the rkind enum value instead of
	type+fuzzy.
	(get_range_strlen): Similarly.
	(get_maxval_strlen): Update signature to make NONSTR argument have
	a default value and make static.  Add asserts to ensure sanity of
	arguments.  Update calls to get_range_strlen.
	(gimple_fold_builtin_strcpy): Update calls to get_maxval_strlen.
	(gimple_fold_builtin_strcat, gimple_fold_builtin_fputs): Similarly.
	(gimple_fold_builtin_memory_chk): Similarly.
	(gimple_fold_builtin_stxcpy_chk): Similarly.
	(gimple_fold_builtin_snprintf_chk): Similarly.
	(gimple_fold_builtin_sprintf, gimple_fold_builtin_snprintf): Similarly.
	* gimple-fold.h (get_maxval_strlen): Delete prototype.

Co-Authored-By: Jeff Law <law@redhat.com>

From-SVN: r267482
2018-12-30 18:01:10 -07:00
GCC Administrator
c43459cad8 Daily bump.
From-SVN: r267481
2018-12-31 00:16:12 +00:00
H.J. Lu
87972ceb8f Use dg-additional-options instead of dg-options
Use dg-additional-options rather than dg-options to avoid overwriting the
default IEEE options which are passed by ieee.exp and necessary.

	PR testsuite/88639
	* gfortran.dg/ieee/ieee_10.f90: Use dg-additional-options
	instead of dg-options.

From-SVN: r267478
2018-12-30 09:36:05 -08:00
GCC Administrator
d5ae7d04ab Daily bump.
From-SVN: r267473
2018-12-30 00:16:15 +00:00
Gerald Pfeifer
4b420b27d3 Makefile.am (xcoff_%.c): Use an actual newline instead of \n in sed pattern.
* Makefile.am (xcoff_%.c): Use an actual newline instead of \n
	in sed pattern.
	* Makefile.in: Regenerate.

From-SVN: r267470
2018-12-29 23:22:50 +00:00
Dominique d'Humieres
0402d00e34 key2.C: Silence the [-Wreturn-type] warning.
2018-12-29  Dominique d'Humieres  <dominiq@gcc.gnu.org>

	* g++.dg/abi/key2.C: Silence the [-Wreturn-type] warning.

From-SVN: r267469
2018-12-29 23:30:14 +01:00
Steven G. Kargl
ede9dea5c4 expr.c (external_spec_function): Add ieee_support_subnormal to list of IEEE inquiry functions.
2018-12-29  Steven G. Kargl  <kargl@gcc.gnu.org>

	* expr.c (external_spec_function): Add ieee_support_subnormal to list
	of IEEE inquiry functions.

2018-12-29  Steven G. Kargl  <kargl@gcc.gnu.org>

	* gfortran.map: Expose subnormal functions in dynamic library.
	* ieee/ieee_arithmetic.F90: Add support for IEEE_SUBNORMAL,
	IEEE_POSITIVE_SUBNORMAL, and IEEE_NEGATIVE_SUBNORMAL.
	* ieee/ieee_helper.c: Ditto.
	* ieee/ieee_features.F90:  Add IEEE_SUBNORMAL.

2018-12-29  Steven G. Kargl  <kargl@gcc.gnu.org>

	* gfortran.dg/ieee/ieee_11.F90: New test.

From-SVN: r267468
2018-12-29 19:14:32 +00:00
Jozef Lawrynowicz
600845521e msp430.c (msp430_attr): Warn when the critical and interrupt function attributes are used together.
2018-12-29  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	gcc/ChangeLog:

	* config/msp430/msp430.c (msp430_attr): Warn when the critical and
	interrupt function attributes are used together.
	* gcc/doc/extend.texi: Update documentation on the critical attribute.

	gcc/testsuite/ChangeLog:

	* gcc.target/msp430/critical-interrupt.c: New test.

From-SVN: r267467
2018-12-29 19:00:48 +00:00
Steven G. Kargl
74ee24e23e re PR fortran/88342 (Possible bug with IEEE_POSITIVE_INF and -ffpe-trap=overflow)
2018-12-29  Steven G. Kargl  <kargl@gcc.gnu.org>
      
	PR fortran/88342
	* ieee/ieee_arithmetic.F90: Prevent exceptions in IEEE_VALUE if
	-ffpe-trap=invalid or -ffpe-trap=overflow is used.

2018-12-29  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/88342
	* gfortran.dg/ieee/ieee_10.f90:  New test.

From-SVN: r267465
2018-12-29 18:10:57 +00:00
Steven G. Kargl
0b774babfb cpp.c (gfc_cpp_init): Add pre-defined macros for INTEGER(1) INTEGER(2)...
2018-12-25  Steven G. Kargl  <kargl@gcc.gnu.org>

	* cpp.c (gfc_cpp_init):  Add pre-defined macros for INTEGER(1)
	INTEGER(2), INTEGER(8) and INTEGER(16) if supported.  Add pre-defined
	macros for REAL(10) and REAL(16) if available.
	* gfortran.texi: Document new macros.

From-SVN: r267464
2018-12-29 17:43:02 +00:00
John David Anglin
40b1bb9f3b config.gcc (hppa*64*-*-linux*): Add pa/t-pa to tmake_file.
* config.gcc (hppa*64*-*-linux*): Add pa/t-pa to tmake_file.  Define
        d_target_objs.
	(hppa*-*-openbsd*): Likewise.
	(hppa[12]*-*-hpux10*): Likewise.
	(hppa*64*-*-hpux11*): Likewise.
	(hppa[12]*-*-hpux11*): Likewise.

From-SVN: r267463
2018-12-29 17:02:51 +00:00
Dominique d'Humieres
db304b55fb re PR tree-optimization/68356 (FAIL: gcc.dg/torture/pr68264.c -O* execution test on x86_64-apple-darwin1(0|4))
2018-12-29  Dominique d'Humieres  <dominiq@gcc.gnu.org>

	PR tree-optimization/68356
	PR target/81210
	PR target/81693
	* gcc.dg/torture/pr68264.c: Skip on darwin.
	* gcc.dg/torture/pr68037-1.c: Likewise.
	* gcc.dg/torture/pr68037-2.c: Likewise.
	* gcc.dg/torture/pr68037-3.c: Likewise.
	* gcc.dg/torture/pr25967-1.c: Likewise.
	* gcc.dg/torture/pr25967-2.c: Likewise.


M    ChangeLog
M    gcc.dg/torture/pr25967-1.c
M    gcc.dg/torture/pr25967-2.c
M    gcc.dg/torture/pr68037-1.c
M    gcc.dg/torture/pr68037-2.c
M    gcc.dg/torture/pr68037-3.c
M    gcc.dg/torture/pr68264.c

From-SVN: r267462
2018-12-29 16:05:55 +01:00
Jakub Jelinek
a4983b7ad8 re PR ipa/88586 (ICE: Segmentation fault (in free_lang_data_in_decl))
PR ipa/88586
	* omp-low.c (lower_omp_task_reductions): Set DECL_CONTEXT on field
	and ifield.  Update TYPE_ALIGN from alignment of field, ifield or
	bfield.

	* g++.dg/gomp/pr88586.C: New test.

From-SVN: r267461
2018-12-29 11:53:36 +01:00
GCC Administrator
2fda71537b Daily bump.
From-SVN: r267460
2018-12-29 00:16:30 +00:00
Ian Lance Taylor
e20bfbd18e runtime: prevent deadlock when profiling signal arrives in stack scan
Precise stack scan needs to unwind the stack. When it is
    unwinding the stack, if a profiling signal arrives, which also
    does a traceback, it may deadlock in dl_iterate_phdr. Prevent
    this deadlock by setting up runtime_in_callers before traceback.
    
    Reviewed-on: https://go-review.googlesource.com/c/155766

From-SVN: r267457
2018-12-29 00:07:06 +00:00
Uros Bizjak
50bec22834 i386.h (ADDITIONAL_REGISTER_NAMES): Add sil, dil, bpl and spl aliases.
* config/i386/i386.h (ADDITIONAL_REGISTER_NAMES): Add
	sil, dil, bpl and spl aliases.

From-SVN: r267456
2018-12-28 23:50:12 +01:00
Ian Lance Taylor
03f0fa9538 compiler: remove escapes_ field from Variable and Result_variable
The fields were set to true initially and never set to false.
    These were left over from an earlier attempt at escape analysis.
    
    Reviewed-on: https://go-review.googlesource.com/c/155750

From-SVN: r267455
2018-12-28 21:10:33 +00:00
Martin Sebor
3a03bffd48 tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Avoid undesirable warning.
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Avoid
	undesirable warning.

From-SVN: r267454
2018-12-28 12:26:14 -07:00
David Edelsohn
766d4a5925 ident-1b.c: XFAIL AIX and Darwin.
* c-c++-common/ident-1b.c: XFAIL AIX and Darwin.
        * c-c++-common/ident-2b.c: Likewise.

From-SVN: r267453
2018-12-28 14:14:51 -05:00
Steven G. Kargl
07b700ead5 re PR libfortran/81984 (NULL string pointer dereferencing forces undefined behaviour in libgfortran)
2018-12-28  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/81984
	* intrinsics/string_intrinsics_inc.c: Placate the sanitizer.

From-SVN: r267452
2018-12-28 18:26:09 +00:00
H.J. Lu
691adeb097 x86-64: Remove .file directive from snapshot source
* gcc.target/x86_64/abi/avx/asm-support-darwin.s: Remove .file
	directive.
	* gcc.target/x86_64/abi/avx/asm-support.S: Likewise.
	* gcc.target/x86_64/abi/avx512f/asm-support.S: Likewise.

From-SVN: r267451
2018-12-28 07:13:14 -08:00
H.J. Lu
ba7b6836f5 x86-64: Remove .file directive from snapshot source
Since snapshot() is implemented in assembly code, .file directive should
be removed.  Otherwise, debugger can't find the snapshot source.

	* gcc.target/x86_64/abi/asm-support-darwin.s: Remove .file
	directive.
	* gcc.target/x86_64/abi/asm-support.S: Likewise.

From-SVN: r267450
2018-12-28 06:40:27 -08:00
Thomas Schwinge
59d5960cdb For libgomp OpenACC entry points, redefine the "device" argument to "flags"
... so that we're then able to use this for other flags in addition to
"GOACC_FLAG_HOST_FALLBACK".

	gcc/
	* omp-expand.c (expand_omp_target): Restructure OpenACC vs. OpenMP
	code paths.  Update for libgomp OpenACC entry points change.
	include/
	* gomp-constants.h (GOACC_FLAG_HOST_FALLBACK)
	(GOACC_FLAGS_MARSHAL_OP, GOACC_FLAGS_UNMARSHAL): Define.
	libgomp/
	* oacc-parallel.c (GOACC_parallel_keyed, GOACC_parallel)
	(GOACC_data_start, GOACC_enter_exit_data, GOACC_update)
	(GOACC_declare): Redefine the "device" argument to "flags".

From-SVN: r267448
2018-12-28 12:34:14 +01:00
Thomas Schwinge
5a12987e79 poly_int: get_inner_reference & co.: fix known_eq typo/bug
gcc/
	* gimplify.c (gimplify_scan_omp_clauses): Fix known_eq typo/bug.

Co-Authored-By: Julian Brown <julian@codesourcery.com>

From-SVN: r267447
2018-12-28 12:34:03 +01:00
Thomas Schwinge
a44c17909a Cleanup libgomp's coalesce chunk data structures
libgomp/
	* target.c (struct gomp_coalesce_chunk): New structure.
	(struct gomp_coalesce_buf): Update the chunks member to use that
	type.  Adjust all users.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>

From-SVN: r267446
2018-12-28 12:33:54 +01:00
Tom de Vries
eb33bf0a0a [libbacktrace] Reduce memory usage in build_address_map
In build_address_map we allocate a unit, and then look for addresses in the
unit, which we store in the addrs vector, with the elements pointing to the
unit.  However, if we cannot find addresses in the unit, the allocated unit is
not used.

Fix this by detecting if the allocated unit has been used, and reusing it
otherwise.

Bootstrapped and reg-tested on x86_64.

2018-12-28  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (build_address_map): Reuse unused units.

From-SVN: r267445
2018-12-28 03:43:56 +00:00