Commit Graph

165945 Commits

Author SHA1 Message Date
Steven G. Kargl
73f5d219bb re PR fortran/88169 (Rejects USE rename of namelist group)
2018-12-21  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/88169
	* module.c (mio_namelist): Remove an error condition/message that
	is contrary to the Fortran standard.

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

	PR fortran/88169
	* gfortran.dg/pr88169_1.f90: new test.
	* gfortran.dg/pr88169_2.f90: Ditto.
	* gfortran.dg/pr88169_3.f90: Ditto.

From-SVN: r267351
2018-12-22 17:26:12 +00:00
Thomas Koenig
a00165b466 backport: re PR fortran/85544 (ICE in gfc_conv_scalarized_array_ref, at fortran/trans-array.c:3385)
2018-12-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

    Backport from trunk
    PR fortran/85544
    * gfortran.dg/power_7.f90: New test.

From-SVN: r267348
2018-12-22 14:21:01 +00:00
Thomas Koenig
06b2653852 re PR fortran/85544 (ICE in gfc_conv_scalarized_array_ref, at fortran/trans-array.c:3385)
2018-12-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/85544
	* frontend-passes.c (optimize_power): Remove.
	(optimize_op): Remove call to optimize_power.
	* trans-expr.c (gfc_conv_power_op): Handle cases of 1**integer,
	(2|4|8|16) ** integer and (-1) ** integer.

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

	PR fortran/85544
	* gfortran.dg/power_7.f90: New test.

From-SVN: r267347
2018-12-22 14:14:44 +00:00
GCC Administrator
91c02f863e Daily bump.
From-SVN: r267346
2018-12-22 00:16:32 +00:00
Steven G. Kargl
8ab8b08a13 re PR fortran/69121 (IEEE_SCALB is not generic)
2018-12-21  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/69121
	* ieee/ieee_arithmetic.F90: Provide missing interfaces for IEEE_SCALB.

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

	PR fortran/69121
	* gfortran.dg/ieee/ieee_9.f90: New test.

From-SVN: r267343
2018-12-21 21:09:17 +00:00
Jakub Jelinek
4cd3e7df0b re PR c++/86524 (std::less with pointer arguments not usable in static_assert in constexpr function)
PR c++/86524
	PR c++/88446
	* cp-tree.h (cp_fold_maybe_rvalue, cp_fold_rvalue): Declare.
	(fold_non_dependent_expr): Add manifestly_const_eval argument.
	* constexpr.c (cxx_eval_builtin_function_call): Evaluate
	__builtin_constant_p if ctx->manifestly_const_eval even in constexpr
	functions.  Don't reuse dummy{1,2} vars between different arguments.
	Use cp_fold_rvalue instead of cp_fully_fold.  Fix comment typo.
	(fold_non_dependent_expr): Add manifestly_const_eval argument, pass
	it through to cxx_eval_outermost_constant_expr and
	maybe_constant_value.
	* cp-gimplify.c (cp_fold_maybe_rvalue, cp_fold_rvalue): No longer
	static.
	* semantics.c (finish_static_assert): Call fold_non_dependent_expr
	with true as manifestly_const_eval.

	* g++.dg/cpp1y/constexpr-86524.C: New test.
	* g++.dg/cpp2a/is-constant-evaluated4.C: New test.
	* g++.dg/cpp2a/is-constant-evaluated5.C: New test.
	* g++.dg/cpp2a/is-constant-evaluated6.C: New test.

From-SVN: r267341
2018-12-21 20:58:36 +01:00
Paul Thomas
dca0061722 correct double semi-colons
From-SVN: r267340
2018-12-21 19:25:02 +00:00
Jakub Jelinek
d1ffbd43e8 re PR middle-end/85594 (ICE during expand when compiling with -fwrapv -fopenmp)
PR middle-end/85594
	PR middle-end/88553
	* omp-expand.c (extract_omp_for_update_vars): Regimplify the condition
	if needed.
	(expand_omp_for_generic): Don't clobber t temporary for ordered loops.

	* gcc.dg/gomp/pr85594.c: New test.
	* gcc.dg/gomp/pr88553.c: New test.

From-SVN: r267339
2018-12-21 20:17:13 +01:00
Jan Hubicka
ffdcdc0b5a re PR ipa/88561 (PGO devirtualization miscompilation of firefox)
PR ipa/88561
	* ipa-polymorphic-call.c
	(ipa_polymorphic_call_context::ipa_polymorphic_call_context): Handle
	arguments of thunks correctly.
	(ipa_polymorphic_call_context::get_dynamic_context): Be ready for
	NULL instance pinter.
	* lto-cgraph.c (lto_output_node): Always stream thunk info.

From-SVN: r267338
2018-12-21 19:13:06 +00:00
Paul Thomas
69597e2f5d re PR fortran/87881 (gfortran.dg/inquiry_type_ref_(1.f08|3.f90) fail on darwin)
2018-12-21  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/87881
	* expr.c (find_inquiry_ref): Loop through the inquiry refs in
	case there are two of them.
	(simplify_ref_chain): Return true after a successful call to
	find_inquiry_ref.

2018-12-21  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/87881
	* gfortran.dg/inquiry_part_ref_4.f90: New test.

From-SVN: r267337
2018-12-21 19:09:42 +00:00
Andreas Krebbel
2f8df14d37 S/390: Add support for double<->long vector converts
gcc/ChangeLog:

2018-12-21  Andreas Krebbel  <krebbel@linux.ibm.com>

	* config/s390/vector.md ("floatv2div2df2", "floatunsv2div2df2")
	("fix_truncv2dfv2di2", "fixuns_truncv2dfv2di2"): New pattern
	definitions.

gcc/testsuite/ChangeLog:

2018-12-21  Andreas Krebbel  <krebbel@linux.ibm.com>

	* gcc.target/s390/vector/fp-signedint-convert-1.c: New test.
	* gcc.target/s390/vector/fp-unsignedint-convert-1.c: New test.

From-SVN: r267336
2018-12-21 18:57:00 +00:00
Uros Bizjak
c3d62ffdc2 pr88418.c (dg-options): Add -mno-avx.
* gcc.target/i386/pr88418.c (dg-options): Add -mno-avx.

From-SVN: r267334
2018-12-21 19:13:22 +01:00
Thomas Preud'homme
7c50cefc2c Update maintainer email address
2018-12-21  Thomas Preud'homme  <thomas.preudhomme@linaro.org>

    * MAINTAINERS (Write After Approval): Update my maintainer address.

From-SVN: r267330
2018-12-21 17:53:03 +00:00
Gergö Barany
ea9a30d071 * MAINTAINERS (Write After Approval): Add myself.
From-SVN: r267329
2018-12-21 17:23:16 +00:00
Eric Botcazou
dd9bf787d3 re PR rtl-optimization/87727 (gcc.target/sparc/overflow-2.c FAILs)
PR rtl-optimization/87727
	* combine.c (cant_combine_insn_p): On a LEAF_REGISTERS target, combine
	again moves from leaf hard registers.

	* final.c (final_scan_insn_1) <NOTE_INSN_INLINE_ENTRY>: Minor tweak.

From-SVN: r267328
2018-12-21 16:09:23 +00:00
Jakub Jelinek
4a77025b7d re PR target/88522 (Error: operand size mismatch for `vpgatherqq')
PR target/88522
	* config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask,
	*avx512pf_gatherpf<mode>df_mask, *avx512pf_scatterpf<mode>sf_mask,
	*avx512pf_scatterpf<mode>df_mask): Use %X5 instead of %5 for
	-masm=intel.
	(gatherq_mode): Remove mode iterator.
	(*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2): Use X instead
	of <xtg_mode>.
	(*avx512f_gatherdi<mode>): Use X instead of <gatherq_mode>.
	(*avx512f_gatherdi<mode>_2, *avx512f_scattersi<mode>,
	*avx512f_scatterdi<mode>): Use %X5 for -masm=intel.

From-SVN: r267327
2018-12-21 17:01:53 +01:00
Jakub Jelinek
f9f248c8b8 re PR rtl-optimization/88563 (wrong code with -O2 -fno-code-hoisting -fno-tree-ccp -fno-tree-dominator-opts -fno-tree-forwprop -fno-tree-fre -fno-tree-pre -fno-tree-vrp)
PR rtl-optimization/88563
	* expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Swap innermode
	and mode arguments to convert_modes.  Likewise swap mode and word_mode
	arguments.  Handle both arguments with VOIDmode before convert_modes
	of one of them.  Formatting fixes.

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

From-SVN: r267326
2018-12-21 16:54:55 +01:00
Uros Bizjak
247c45b265 re PR target/88556 (Inline built-in sinh, cosh, tanh for -ffast-math)
PR target/88556
	* internal-fn.def (COSH): New.
	(SINH): Ditto.
	(TANH): Ditto.
	* optabs.def (cosh_optab): New.
	(sinh_optab): Ditto.
	(tanh_optab): Ditto.
	* config/i386/i386-protos.h (ix86_emit_i387_sinh): New prototype.
	(ix86_emit_i387_cosh): Ditto.
	(ix86_emit_i387_tanh): Ditto.
	* config/i386/i386.c (ix86_emit_i387_sinh): New function.
	(ix86_emit_i387_cosh): Ditto.
	(ix86_emit_i387_tanh): Ditto.
	* config/i386/i386.md (sinhxf2): New expander.
	(sinh<mode>2):	Ditto.
	(coshxf2): Ditto.
	(cosh<mode>2): Ditto.
	(tanhxf2): Ditto.
	(tanh<mode>2): Ditto.

From-SVN: r267325
2018-12-21 14:30:58 +01:00
Jakub Jelinek
6aa698aa4d re PR c++/87125 (ICE in tsubst_copy starting with r261084)
PR c++/87125
	* g++.dg/cpp0x/pr87125.C: New test.

From-SVN: r267324
2018-12-21 13:11:57 +01:00
Thomas Preud'homme
7fa344c523 [ARM] Fix size-optimization-ieee testcase failure
On some version of dejagnu, options in RUNTESTFLAGS are appended to the
command-line and thus any -mfloat-abi=softfp or -mfloat-abi=hard in
there overwrite the -mfloat-abi=soft in the dg-options for
size-optimization-ieee-* tests. Test is still run though because
arm_soft_ok returns true if -mfloat-abi=soft is accepted, even if the
file is not compiled for softfloat due to a later -mfloat-abi on the
command line.

This patch adds a dg-skip-if to those tests to ensure they are not run
in softfp or hard mode.

2018-12-21  Thomas Preud'homme  <thomas.preudhomme@linaro.org>

    gcc/testsuite/
    * gcc.target/arm/size-optimization-ieee-1.c: Skip if passing
    -mfloat-abi=softfp or -mfloat-abi=hard.
    * gcc.target/arm/size-optimization-ieee-2.c: Likewise.
    * gcc.target/arm/size-optimization-ieee-3.c: Likewise.

From-SVN: r267323
2018-12-21 11:49:04 +00:00
Jakub Jelinek
d6b612a76f re PR target/88547 (missed optimization for vector comparisons)
PR target/88547
	* config/i386/i386.c (ix86_expand_int_sse_cmp): Optimize
	x > y ? 0 : -1 into min (x, y) == x ? -1 : 0.

	* gcc.target/i386/pr88547-1.c: Expect only 2 knotb and 2 knotw
	insns instead of 4, check for vpminud, vpminuq and no vpsubd or
	vpsubq.
	* gcc.target/i386/sse2-pr88547-1.c: New test.
	* gcc.target/i386/sse2-pr88547-2.c: New test.
	* gcc.target/i386/sse4_1-pr88547-1.c: New test.
	* gcc.target/i386/sse4_1-pr88547-2.c: New test.
	* gcc.target/i386/avx2-pr88547-1.c: New test.
	* gcc.target/i386/avx2-pr88547-2.c: New test.
	* gcc.target/i386/avx512f-pr88547-2.c: New test.
	* gcc.target/i386/avx512vl-pr88547-1.c: New test.
	* gcc.target/i386/avx512vl-pr88547-2.c: New test.
	* gcc.target/i386/avx512vl-pr88547-3.c: New test.
	* gcc.target/i386/avx512f_cond_move.c (y): Change from unsigned int
	array to int array.

From-SVN: r267322
2018-12-21 11:37:11 +01:00
Jan Beulich
10d26d9dd2 x86: VAESDEC{,LAST} allow memory inputs
They are no different from their VAESENC{,LAST} counterparts in this
regard.

From-SVN: r267321
2018-12-21 09:31:30 +00:00
Alexandre Oliva
5d6551f527 support --with-multilib-list=@name for ARM
Introduce @name as a means to specify alternate multilib profiles as
arguments to --with-multilib-list.

So far this is only implemented for ARM.


for  gcc/ChangeLog

	* config.gcc (tmake_file): Add name to tmake_file for
        each @name in --with-multilib-list on arm-*-* targets.
	* doc/install.texi (with-multilib-list): Document it.

From-SVN: r267320
2018-12-21 05:40:53 +00:00
Marek Polacek
906a9283a5 PR c++/88196 - ICE with class non-type template parameter.
* pt.c (convert_nontype_argument): If the expr is a PTRMEM_CST, also
	check if the type we're converting it to is TYPE_PTRMEM_P.

	* g++.dg/cpp0x/ptrmem-cst-arg1.C: Tweak dg-error.
	* g++.dg/cpp2a/nontype-class10.C: New test.
	* g++.dg/template/pr54858.C: Tweak dg-error.

From-SVN: r267319
2018-12-21 03:34:06 +00:00
Jakub Jelinek
6647c1e86f tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Use DR_TARGET_ALIGNMENT on dr_info rather than dr.
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Use
	DR_TARGET_ALIGNMENT on dr_info rather than dr.  Spelling fixes.

From-SVN: r267318
2018-12-21 02:03:33 +01:00
GCC Administrator
adf778dfa1 Daily bump.
From-SVN: r267317
2018-12-21 00:16:33 +00:00
Joern Rennecke
c9aa91088d tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Don't do versioning for data accesses with misaligned step.
2018-12-20  Joern Rennecke  <joern.rennecke@riscy-ip.com>

        * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Don't do
        versioning for data accesses with misaligned step.

From-SVN: r267314
2018-12-20 23:00:00 +00:00
H.J. Lu
da77eace90 C/C++: Add -Waddress-of-packed-member
When address of packed member of struct or union is taken, it may result
in an unaligned pointer value.  This patch adds -Waddress-of-packed-member
to check alignment at pointer assignment and warn unaligned address as
well as unaligned pointer:

$ cat x.i
struct pair_t
{
  char c;
  int i;
} __attribute__ ((packed));

extern struct pair_t p;
int *addr = &p.i;
$ gcc -O2 -S x.i
x.i:8:13: warning: taking address of packed member of ‘struct pair_t’ may result in an unaligned pointer value [-Waddress-of-packed-member]
8 | int *addr = &p.i;
  |             ^

$ cat c.i
struct B { int i; };
struct C { struct B b; } __attribute__ ((packed));

long* g8 (struct C *p) { return p; }
$ gcc -O2 -S c.i -Wno-incompatible-pointer-types
c.i: In function ‘g8’:
c.i:4:18: warning: converting a packed ‘struct C *’ pointer (alignment 1) to ‘long int *’ (alignment 8) may may result in an unaligned pointer value [-Waddress-of-packed-member]
4 | long* g8 (struct C *p) { return p; }
  |                  ^
c.i:2:8: note: defined here
2 | struct C { struct B b; } __attribute__ ((packed));
  |        ^
$

This warning is enabled by default.  Since read_encoded_value_with_base
in unwind-pe.h has

  union unaligned
    {
      void *ptr;
      unsigned u2 __attribute__ ((mode (HI)));
      unsigned u4 __attribute__ ((mode (SI)));
      unsigned u8 __attribute__ ((mode (DI)));
      signed s2 __attribute__ ((mode (HI)));
      signed s4 __attribute__ ((mode (SI)));
      signed s8 __attribute__ ((mode (DI)));
    } __attribute__((__packed__));
  _Unwind_Internal_Ptr result;

and GCC warns:

gcc/libgcc/unwind-pe.h:210:37: warning: taking address of packed member of 'union unaligned' may result in an unaligned pointer value [-Waddress-of-packed-member]
    result = (_Unwind_Internal_Ptr) u->ptr;
                                    ^
we need to add GCC pragma to ignore -Waddress-of-packed-member.

gcc/

	PR c/51628
	* doc/invoke.texi: Document -Wno-address-of-packed-member.

gcc/c-family/

	PR c/51628
	* c-common.h (warn_for_address_or_pointer_of_packed_member): New.
	* c-warn.c (check_alignment_of_packed_member): New function.
	(check_address_of_packed_member): Likewise.
	(check_and_warn_address_of_packed_member): Likewise.
	(warn_for_address_or_pointer_of_packed_member): Likewise.
	* c.opt: Add -Wno-address-of-packed-member.

gcc/c/

	PR c/51628
	* c-typeck.c (convert_for_assignment): Call
	warn_for_address_or_pointer_of_packed_member.

gcc/cp/

	PR c/51628
	* call.c (convert_for_arg_passing): Call
	warn_for_address_or_pointer_of_packed_member.
	* typeck.c (convert_for_assignment): Likewise.

gcc/testsuite/

	PR c/51628
	* c-c++-common/pr51628-1.c: New test.
	* c-c++-common/pr51628-2.c: Likewise.
	* c-c++-common/pr51628-3.c: Likewise.
	* c-c++-common/pr51628-4.c: Likewise.
	* c-c++-common/pr51628-5.c: Likewise.
	* c-c++-common/pr51628-6.c: Likewise.
	* c-c++-common/pr51628-7.c: Likewise.
	* c-c++-common/pr51628-8.c: Likewise.
	* c-c++-common/pr51628-9.c: Likewise.
	* c-c++-common/pr51628-10.c: Likewise.
	* c-c++-common/pr51628-11.c: Likewise.
	* c-c++-common/pr51628-12.c: Likewise.
	* c-c++-common/pr51628-13.c: Likewise.
	* c-c++-common/pr51628-14.c: Likewise.
	* c-c++-common/pr51628-15.c: Likewise.
	* c-c++-common/pr51628-26.c: Likewise.
	* c-c++-common/pr51628-27.c: Likewise.
	* c-c++-common/pr51628-28.c: Likewise.
	* c-c++-common/pr51628-29.c: Likewise.
	* c-c++-common/pr51628-30.c: Likewise.
	* c-c++-common/pr51628-31.c: Likewise.
	* c-c++-common/pr51628-32.c: Likewise.
	* gcc.dg/pr51628-17.c: Likewise.
	* gcc.dg/pr51628-18.c: Likewise.
	* gcc.dg/pr51628-19.c: Likewise.
	* gcc.dg/pr51628-20.c: Likewise.
	* gcc.dg/pr51628-21.c: Likewise.
	* gcc.dg/pr51628-22.c: Likewise.
	* gcc.dg/pr51628-23.c: Likewise.
	* gcc.dg/pr51628-24.c: Likewise.
	* gcc.dg/pr51628-25.c: Likewise.
	* c-c++-common/asan/misalign-1.c: Add
	-Wno-address-of-packed-member.
	* c-c++-common/asan/misalign-2.c: Likewise.
	* c-c++-common/ubsan/align-2.c: Likewise.
	* c-c++-common/ubsan/align-4.c: Likewise.
	* c-c++-common/ubsan/align-6.c: Likewise.
	* c-c++-common/ubsan/align-7.c: Likewise.
	* c-c++-common/ubsan/align-8.c: Likewise.
	* c-c++-common/ubsan/align-10.c: Likewise.
	* g++.dg/ubsan/align-2.C: Likewise.
	* gcc.target/i386/avx512bw-vmovdqu16-2.c: Likewise.
	* gcc.target/i386/avx512f-vmovdqu32-2.c: Likewise.
	* gcc.target/i386/avx512f-vmovdqu64-2.c: Likewise.
	* gcc.target/i386/avx512vl-vmovdqu16-2.c: Likewise.
	* gcc.target/i386/avx512vl-vmovdqu32-2.c: Likewise.
	* gcc.target/i386/avx512vl-vmovdqu64-2.c: Likewise.

libgcc/

	* unwind-pe.h (read_encoded_value_with_base): Add GCC pragma
	to ignore -Waddress-of-packed-member.

From-SVN: r267313
2018-12-20 13:41:48 -08:00
Steven G. Kargl
11e07fa432 ieee_arithmetic.F90: Re-organize file to eliminate #ifdef ...
2018-12-20  Steven G. Kargl  <kargl@gcc.gnu.org>

	* libgfortran/ieee/ieee_arithmetic.F90: Re-organize file to 
	eliminate #ifdef ... #endif.  No functional change.

From-SVN: r267312
2018-12-20 19:39:30 +00:00
Jonathan Wakely
080cec7f9a Fix filesystem::path tests that fail on Windows
* testsuite/27_io/filesystem/operations/proximate.cc: Fix test for
	MinGW.
	* testsuite/27_io/filesystem/path/append/source.cc: Likewise.
	* testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.

From-SVN: r267308
2018-12-20 18:12:11 +00:00
Vladimir Makarov
159fdc3966 re PR target/88457 (ICE: Max. number of generated reload insns per insn is achieved (90))
2018-12-20  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/88457
	* ira-color.c (fast_allocation): Choose the best cost hard reg.

2018-12-20  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/88457
	* ira-color.c (fast_allocation): Choose the best cost hard reg.

From-SVN: r267307
2018-12-20 18:07:51 +00:00
Jakub Jelinek
2694cacbc0 re PR c++/88180 (ICE in vec<tree_node*, va_gc, vl_embed>::quick_push(tree_node* const&))
PR c++/88180
	* parser.c (cp_parser_class_specifier_1): If
	cp_parser_check_type_definition fails, skip default arguments, NSDMIs,
	etc. like for erroneous template args.

	* g++.dg/parse/pr88180.C: New test.
	* g++.dg/pr85039-1.C: Don't expect diagnostics inside of the type
	definition's NSDMIs.

From-SVN: r267306
2018-12-20 18:34:19 +01:00
Jakub Jelinek
50867d20f4 cp-tree.h (cp_fully_fold_init): Declare.
* cp-tree.h (cp_fully_fold_init): Declare.
	* cp-gimplify.c (cp_fully_fold_init): New function.
	* typeck2.c (split_nonconstant_init, store_init_value): Use it
	instead of cp_fully_fold.

From-SVN: r267305
2018-12-20 18:31:05 +01:00
Richard Sandiford
69c5fdcf6e [AArch64][SVE] Add ABS support
For some reason we missed ABS out of the list of supported integer
operations when adding the SVE port initially.

2018-12-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* config/aarch64/iterators.md (SVE_INT_UNARY, fp_int_op): Add abs.
	(SVE_FP_UNARY): Sort.

gcc/testsuite/
	* gcc.target/aarch64/pr64946.c: Force nosve.
	* gcc.target/aarch64/ssadv16qi.c: Likewise.
	* gcc.target/aarch64/usadv16qi.c: Likewise.
	* gcc.target/aarch64/vect-abs-compile.c: Likewise.
	* gcc.target/aarch64/sve/abs_1.c: New test.

From-SVN: r267304
2018-12-20 16:34:31 +00:00
Richard Sandiford
7abc36cc99 [AArch64][SVE] Fix IFN_COND_FMLA movprfx alternative
This patch fixes a cut-&-pasto in the (match_dup 4) version of
"cond_<SVE_COND_FP_TERNARY:optab><SVE_F:mode>".  (It's a shame
that there's so much cut-&-paste in these patterns, but it's hard
to avoid without more infrastructure.)

2018-12-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* config/aarch64/aarch64-sve.md (*cond_<optab><mode>_4): Use
	sve_fmla_op rather than sve_fmad_op for the movprfx alternative.

gcc/testsuite/
	* gcc.target/aarch64/sve/fmla_2.c: New test.
	* gcc.target/aarch64/sve/fmla_2_run.c: Likewise

From-SVN: r267303
2018-12-20 16:32:46 +00:00
Martin Sebor
ab3c292e60 PR tree-optimization/84053 - missing -Warray-bounds accessing a local array across inlined function boundaries
gcc/testsuite/ChangeLog:
	* gcc.dg/Warray-bounds-36.c: New test.

From-SVN: r267302
2018-12-20 09:25:13 -07:00
David Malcolm
573767d4d2 -Wtautological-compare: fix comparison of macro expansions
gcc/c-family/ChangeLog:
	PR c++/87504
	* c-warn.c (get_outermost_macro_expansion): New function.
	(spelled_the_same_p): Use it to unwind the macro expansions, and
	compare the outermost macro in each nested expansion, rather than
	the innermost.

gcc/testsuite/ChangeLog:
	PR c++/87504
	* c-c++-common/Wtautological-compare-8.c: New test.

From-SVN: r267299
2018-12-20 14:18:48 +00:00
Martin Jambor
49fb296851 [PR 88214] Assert that ptr is a pointer
2018-12-20  Martin Jambor  <mjambor@suse.cz>

	PR ipa/88214
	* tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Assert that
	ptr is a pointer.

From-SVN: r267298
2018-12-20 15:14:22 +01:00
Jonathan Wakely
26bf4e3134 Add missing test from previous commit
* testsuite/27_io/filesystem/directory_entry/lwg3171.cc: New test
	(missed from previous commit).

From-SVN: r267297
2018-12-20 12:32:17 +00:00
Richard Biener
1c852d1d70 re PR tree-optimization/84362 (Auto-vectorization regression when accessing member variable through getter/accessor)
2018-12-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/84362
	* tree-ssa-loop-im.c: Include alias.h, builtins.h and tree-dfa.h.
	(struct im_mem_ref): add ref_canonical flag.
	(struct mem_ref_hasher): Use ao_ref as compare_type.
	(mem_ref_hasher::equal): Adjust and add variant comparing ao_ref
	parts.
	(mem_ref_alloc): Take ao_ref parameter, initialize ref_canonical
	member.
	(gather_mem_refs_stmt): Set up ao_ref early and do the lookup
	using it.  If we have non-equal refs canonicalize the one
	in the hashtable used for insertion.
	(tree_ssa_lim_initialize): Adjust.

	* g++.dg/vect/pr84362.cc: New testcase.

From-SVN: r267296
2018-12-20 11:39:59 +00:00
Xiong Hu Luo
f0355446cb fix typo.
From-SVN: r267294
2018-12-20 08:44:42 +00:00
Jakub Jelinek
5a5fe9175e re PR target/88547 (missed optimization for vector comparisons)
PR target/88547
	* config/i386/i386.c (ix86_expand_sse_movcc): For maskcmp, try to
	emit vpmovm2? instruction perhaps after knot?.  Reorganize code
	so that it doesn't have to test !maskcmp in almost every conditional.

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

From-SVN: r267293
2018-12-20 08:58:02 +01:00
Alan Modra
59faa32efd [RS6000] Fix non-linux powerpc breakage
svn r266496, git commit ab6b1bb456f broke non-linux powerpc builds
due to GNU_USER_DYNAMIC_LINKER being undefined.

	* config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Define.

From-SVN: r267292
2018-12-20 11:38:14 +10:30
GCC Administrator
a60d3a727f Daily bump.
From-SVN: r267291
2018-12-20 00:16:44 +00:00
Steven G. Kargl
7d564142f5 re PR fortran/87992 (ICE in resolve_fl_variable, at fortran/resolve.c:12314)
2018-12-19  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/87992
	* resolve.c (resolve_fl_variable): Avoid a NULL pointer.

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

	PR fortran/87992
	* gfortran.dg/pr87992.f90: New test.

From-SVN: r267288
2018-12-19 22:31:25 +00:00
Andreas Tobler
5b0acc312d config.gcc: Enable TARGET_DEFAULT_ASYNC_UNWIND_TABLES on aarch64*-*-freebsd*
2018-12-19  Andreas Tobler  <andreast@gcc.gnu.org>

	* config.gcc: Enable TARGET_DEFAULT_ASYNC_UNWIND_TABLES on
	aarch64*-*-freebsd*

From-SVN: r267287
2018-12-19 22:41:03 +01:00
Uros Bizjak
5dd376fa7b i386.md (SWI1248_AVX512BWDQ_64): Rename from SWI1248_AVX512BWDQ2_64.
* config/i386/i386.md (SWI1248_AVX512BWDQ_64): Rename from
	SWI1248_AVX512BWDQ2_64.  Unconditionally enable HImode.
	(*cmp<mode>_ccz_1): Emit kortest instead of ktest insn.
	Use SWI1248_AVX512BWDQ_64 mode iterator and enable only for
	TARGET_AVX512F.

testsuite/ChangeLog:

	* gcc.target/i386/avx512dq-pr82855.c: Update scan-assembler pattern.

From-SVN: r267286
2018-12-19 21:44:59 +01:00
Jonathan Wakely
f39365f3ed Fix grammar in libstdc++ ABI history documentation
* doc/xml/manual/abi.xml: Add missing word.

From-SVN: r267285
2018-12-19 20:16:57 +00:00
Thomas Preud'homme
72e3a52923 [ARM] Optimize executable size when using softfloat fmul/dmul
Softfloat single precision and double precision floating-point
multiplication routines in libgcc share some code with the
floating-point division of their corresponding precision. As the code
is structured now, this leads to *all* division code being pulled in an
executable in softfloat mode even if only multiplication is
performed.

This patch create some new LIB1ASMFUNCS macros to also build files with
just the multiplication and shared code as weak symbols. By putting
these earlier in the static library, they can then be picked up when
only multiplication is used and they are overriden by the global
definition in the existing file containing both multiplication and
division code when division is needed.

The patch also removes changes made to the FUNC_START and ARM_FUNC_START
macros in r218124 since the intent was to put multiplication and
division code into their own section in a later patch to achieve the
same size optimization. That approach relied on specific section layout
to ensure multiplication and division were not too far from the shared
bit of code in order to the branches to be within range. Due to lack of
guarantee regarding section layout, in particular with all the
possibility of linker scripts, this approach was chosen instead. This
patch keeps the two testcases that were posted by Tony Wang on the mailing
list to implement this approach and adds a new one.

2018-12-19  Thomas Preud'homme  <thomas.preudhomme@linaro.org>

    libgcc/
    * /config/arm/lib1funcs.S (FUNC_START): Remove unused sp_section
    parameter and corresponding code.
    (ARM_FUNC_START): Likewise in both definitions.
    Also update footer comment about condition that need to match with
    gcc/config/arm/elf.h to also include libgcc/config/arm/t-arm.
    * config/arm/ieee754-df.S (muldf3): Also build it if L_arm_muldf3 is
    defined.  Weakly define it in this case.
    * config/arm/ieee754-sf.S (mulsf3): Likewise with L_arm_mulsf3.
    * config/arm/t-elf (LIB1ASMFUNCS): Build _arm_muldf3.o and
    _arm_mulsf3.o before muldiv versions if targeting Thumb-1 only. Add
    comment to keep condition in sync with the one in
    libgcc/config/arm/lib1funcs.S and gcc/config/arm/elf.h.

    gcc/
    * config/arm/elf.h: Update comment about condition that need to
    match with libgcc/config/arm/lib1funcs.S to also include
    libgcc/config/arm/t-arm.
    * doc/sourcebuild.texi (output-exists, output-exists-not): Rename
    subsubsection these directives are in to "Check for output files".
    Move scan-symbol to that section and add to it new scan-symbol-not
    directive.

2018-12-19  Tony Wang  <tony.wang@arm.com>
	    Thomas Preud'homme  <thomas.preudhomme@linaro.org>

    gcc/testsuite/
    * lib/lto.exp (lto-execute): Define output_file and testname_with_flags
    to same value as execname.
    (scan-symbol): Move and rename to ...
    * lib/gcc-dg.exp (scan-symbol-common): This.  Adapt into a
    helper function returning true or false if a symbol is present.
    (scan-symbol): New procedure.
    (scan-symbol-not): Likewise.
    * gcc.target/arm/size-optimization-ieee-1.c: New testcase.
    * gcc.target/arm/size-optimization-ieee-2.c: Likewise.
    * gcc.target/arm/size-optimization-ieee-3.c: Likewise.

From-SVN: r267282
2018-12-19 17:34:18 +00:00
Tom de Vries
c4686fa91e [nvptx] Add PTX_CTA_SIZE
2018-12-19  Tom de Vries  <tdevries@suse.de>

	* config/nvptx/nvptx.c (PTX_CTA_SIZE): Define.

From-SVN: r267281
2018-12-19 17:16:10 +00:00