167488 Commits

Author SHA1 Message Date
Jason Merrill
bbee94aa67 PR c++/89571 - ICE with ill-formed noexcept on constructor.
Earlier changes to defer instantiating a defaulted noexcept-specifier that
depends on yet-unparsed default member initializers broke this testcase,
where instantiation fails for another reason.  In this case there's no
reason to defer and try again later, so let's not.

	* pt.c (maybe_instantiate_noexcept): Only return false if defaulted.
	(regenerate_decl_from_template): Use it for noexcept-specs.

From-SVN: r269746
2019-03-17 16:07:26 -04:00
John David Anglin
ad0a3085d7 pr83487-1_x.c: Use -fno-common option on hppa*-*-hpux*.
* gcc.dg/compat/pr83487-1_x.c: Use -fno-common option on hppa*-*-hpux*.
	* gcc.dg/compat/pr83487-1_y.c: Likewise.

From-SVN: r269745
2019-03-17 19:37:00 +00:00
John David Anglin
d09f61a9a6 pointer_init_10.f90: Require visibility support.
* gfortran.dg/pointer_init_10.f90: Require visibility support.
	* gfortran.dg/temporary_3.f90: Likewise.

From-SVN: r269744
2019-03-17 19:16:53 +00:00
John David Anglin
3147bc6ccc pr88074.c: Require c99_runtime.
* gcc.dg/pr88074.c: Require c99_runtime.
	* gcc.dg/warn-abs-1.c: Likewise.
	* gfortran.dg/ISO_Fortran_binding_1.f90: Likewise.

From-SVN: r269743
2019-03-17 18:24:14 +00:00
John David Anglin
712fee7a92 re PR testsuite/89666 (FAIL: gcc.dg/ipa/ipa-icf-39.c scan-ipa-dump-times icf "Unified;" 2)
PR testsuite/89666
	* c-c++-common/builtin-has-attribute-3.c: Define SKIP_ALIAS on
	hppa*-*-hpux*.
	* gcc.dg/attr-copy.c: Require alias support.
	* gcc.dg/ipa/ipa-icf-39.c: Likewise.

From-SVN: r269742
2019-03-17 17:59:03 +00:00
GCC Administrator
f5a18efc36 Daily bump.
From-SVN: r269737
2019-03-17 00:16:13 +00:00
Jakub Jelinek
985a72168a re PR fortran/89724 (Fortran diagnostics give wrong line number because of math-vector-fortran.h header file)
PR fortran/89724
	* scanner.c (load_line): Remove linenum and current_line static
	variables, add warned_tabs automatic variable.  Use current_file->line
	instead of current_line and warned_tabs boolean to avoid diagnosing
	tabs multiple times on the same line.

	* gfortran.dg/continuation_15.f90: New test.
	* gfortran.dg/continuation_16.f90: New test.

From-SVN: r269734
2019-03-16 22:18:49 +01:00
John David Anglin
0581f5b2ad Fix type in last change.
From-SVN: r269733
2019-03-16 18:23:48 +00:00
John David Anglin
3b7f728384 re PR testsuite/89393 (FAIL: g++.dg/abi/ref-temp1.C -std=c++14 scan-assembler .weak(_definition)?[ \t]_?_ZGR1bIvE)
PR testsuite/89393
	* g++.dg/abi/ref-temp1.C: Skip on 32-bit hppa*-*-hpux*.
	* g++.dg/cpp0x/pr84497.C: Likewise.

From-SVN: r269732
2019-03-16 18:10:31 +00:00
John David Anglin
733a21e171 builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
* c-c++-common/builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
	* gcc.dg/attr-copy-6.c: Likewise.
	* gcc.dg/pr87793.c: Likewise.

From-SVN: r269731
2019-03-16 17:48:14 +00:00
John David Anglin
3c390eda35 re PR inline-asm/84941 (internal compiler error: in reg_overlap_mentioned_p, at rtlanal.c:1870 (reg_overlap_mentioned_p()/match_asm_constraints_1()))
PR testsuite/84941
	* gcc.dg/pr84941.c: Skip on hppa*-*-*.

From-SVN: r269730
2019-03-16 17:31:30 +00:00
John David Anglin
38ea73a8c1 Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*.
* gcc.dg/Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*.
	* gcc.dg/gimplefe-34.c: Likewise.
	* gcc.dg/compat/pr83487-2_x.c: Use -fno-common option on hppa*-*-hpux*.
	* gcc.dg/compat/pr83487-2_y.c: Likewise.

From-SVN: r269729
2019-03-16 17:08:43 +00:00
John David Anglin
cdff635634 re PR testsuite/84174 (FAIL: gcc.dg/Wattributes-6.c (test for warnings, line 404))
PR testsuite/84174
	* gcc.dg/Wattributes-6.c: Skip warning check at line 404 on
	hppa*64*-*-*.

From-SVN: r269728
2019-03-16 16:39:49 +00:00
John David Anglin
3b1cba4679 re PR testsuite/83453 (FAIL: c-c++-common/Wattributes.c -std=gnu++98 (test for warnings, line 404))
PR testsuite/83453
	* c-c++-common/Wattributes.c: Skip a warning check on hppa*64*-*-*.

From-SVN: r269727
2019-03-16 15:44:25 +00:00
John David Anglin
8c8d4d29c1 target-supports.exp (check_ascii_locale_available): Remove hppa*-*-hpux*.
* lib/target-supports.exp (check_ascii_locale_available): Remove
	hppa*-*-hpux*.

From-SVN: r269726
2019-03-16 15:18:36 +00:00
Thomas Koenig
fbf1cec7a4 re PR fortran/84394 (compiler error when using modules with derived types in block data subprograms)
2019-03-16  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/84394
	* symbol.c (gfc_add_subroutine): If we are encountering a
	subrtoutine within a BLOCK DATA and the name starts with an
	underscore, do not check.

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

	PR fortran/84394
	* gfortran.dg/blockdata_11.f90: New test.

From-SVN: r269721
2019-03-16 11:50:03 +00:00
GCC Administrator
0759ca4a92 Daily bump.
From-SVN: r269720
2019-03-16 00:16:23 +00:00
Harald Anlauf
eb1474baee re PR fortran/60091 (Misleading error messages in rank-2 pointer assignment to rank-1 target)
2019-03-15  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/60091
	* expr.c (gfc_check_pointer_assign): Correct and improve error
	messages for invalid pointer assignments.

	PR fortran/60091
	* gfortran.dg/pointer_remapping_3.f08: Adjust error messages.
	* gfortran.dg/pointer_remapping_7.f90: Adjust error message.

From-SVN: r269717
2019-03-15 22:20:20 +00:00
Segher Boessenkool
850b8aa309 LRA: side_effects_p stmts' output is not invariant (PR89721)
PR89721 shows LRA treating an unspec_volatile's result as invariant,
which of course isn't correct.  This patch fixes it.


	PR rtl-optimization/89721
	* lra-constraints (invariant_p): Return false if side_effects_p holds.

From-SVN: r269716
2019-03-15 23:09:15 +01:00
Kelvin Nilsen
30bb0e44d3 re PR target/87532 (bad results from vec_extract(unsigned char, foo) dependent upon function inline)
gcc/ChangeLog:

2019-03-15  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/87532
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	When handling vec_extract, use modular arithmetic to allow
	constant selectors greater than vector length.
	* config/rs6000/rs6000.c (rs6000_expand_vector_extract): Allow
	V1TImode vectors to have constant selector values greater than 0.
	Use modular arithmetic to compute vector index.
	(rs6000_split_vec_extract_var): Use modular arithmetic to compute
	index for in-memory vectors.  Correct code generation for
	in-register vectors.
	(altivec_expand_vec_ext_builtin): Use modular arithmetic to
	compute index.

gcc/testsuite/ChangeLog:

2019-03-15  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/87532
	* gcc.target/powerpc/fold-vec-extract-char.p8.c: Modify expected
	instruction selection.
	* gcc.target/powerpc/fold-vec-extract-int.p8.c: Likewise.
	* gcc.target/powerpc/fold-vec-extract-short.p8.c: Likewise.
	* gcc.target/powerpc/pr87532-mc.c: New test.
	* gcc.target/powerpc/pr87532.c: New test.
	* gcc.target/powerpc/vec-extract-v16qiu-v2.h: New test.
	* gcc.target/powerpc/vec-extract-v16qiu-v2a.c: New test.
	* gcc.target/powerpc/vec-extract-v16qiu-v2b.c: New test.
	* gcc.target/powerpc/vsx-builtin-10a.c: New test.
	* gcc.target/powerpc/vsx-builtin-10b.c: New test.
	* gcc.target/powerpc/vsx-builtin-11a.c: New test.
	* gcc.target/powerpc/vsx-builtin-11b.c: New test.
	* gcc.target/powerpc/vsx-builtin-12a.c: New test.
	* gcc.target/powerpc/vsx-builtin-12b.c: New test.
	* gcc.target/powerpc/vsx-builtin-13a.c: New test.
	* gcc.target/powerpc/vsx-builtin-13b.c: New test.
	* gcc.target/powerpc/vsx-builtin-14a.c: New test.
	* gcc.target/powerpc/vsx-builtin-14b.c: New test.
	* gcc.target/powerpc/vsx-builtin-15a.c: New test.
	* gcc.target/powerpc/vsx-builtin-15b.c: New test.
	* gcc.target/powerpc/vsx-builtin-16a.c: New test.
	* gcc.target/powerpc/vsx-builtin-16b.c: New test.
	* gcc.target/powerpc/vsx-builtin-17a.c: New test.
	* gcc.target/powerpc/vsx-builtin-17b.c: New test.
	* gcc.target/powerpc/vsx-builtin-18a.c: New test.
	* gcc.target/powerpc/vsx-builtin-18b.c: New test.
	* gcc.target/powerpc/vsx-builtin-19a.c: New test.
	* gcc.target/powerpc/vsx-builtin-19b.c: New test.
	* gcc.target/powerpc/vsx-builtin-20a.c: New test.
	* gcc.target/powerpc/vsx-builtin-20b.c: New test.
	* gcc.target/powerpc/vsx-builtin-9a.c: New test.
	* gcc.target/powerpc/vsx-builtin-9b.c: New test.

From-SVN: r269715
2019-03-15 19:52:43 +00:00
Ian Lance Taylor
167727579b compiler: preserve nointerface property when inlining methods
When an inline function (with body) is imported from another package,
    make that the "nointerface" property (if set) is preserved.
    
    Fixes golang/go#30862.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167742

From-SVN: r269713
2019-03-15 16:58:14 +00:00
Alexander Monakov
d81beb31c6 add myself as selective scheduling reviewer
* MAINTAINERS (Reviewers): Add myself as selective scheduling reviewer.
	(Write After Approval): Remove myself.

From-SVN: r269712
2019-03-15 19:49:24 +03:00
Ian Lance Taylor
1cd04969e3 compiler: use const rather than constexpr
Fixes bootstrap with a C++98 compiler.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167762

From-SVN: r269710
2019-03-15 15:50:34 +00:00
Alexandre Oliva
ca7f909fba [PR88534] accept VAR_DECL in class literal template parms
P0732R2 / C++ 2a introduce class literals as template parameters.  The
front-end uses VAR_DECLs constructed from such literals to bind the
template PARM_DECLs, but dwarf2out.c used to reject such VAR_DECLs.

Taking DECL_INITIAL from such VAR_DECLs enables the generation of
DW_AT_const_value for them, at least when the class literal can
actually be represented as such.


for  gcc/ChangeLog

	PR c++/88534
	PR c++/88537
	* dwarf2out.c (generic_parameter_die): Follow DECL_INITIAL of
	VAR_DECL args.

for  gcc/testsuite/ChangeLog

	PR c++/88534
	PR c++/88537
	* g++.dg/cpp2a/pr88534.C: New.
	* g++.dg/cpp2a/pr88537.C: New.

From-SVN: r269709
2019-03-15 13:56:55 +00:00
Iain Buclaw
d2025512b3 re PR d/88990 (ICE in get_symbol_decl, at d/decl.cc:1097)
PR d/88990
d/dmd: Merge upstream dmd 8d4c876c6

The extern storage class flag was wrongly propagated to function scope
when starting the semantic pass on the body.

Fixes https://gcc.gnu.org/PR88990

Reviewed-on: https://github.com/dlang/dmd/pull/9452

From-SVN: r269708
2019-03-15 13:37:07 +00:00
Robin Dapp
ec15654627 S/390: Fix tests that expect unquoted option names
r269586 puts single quotes around option names. This patch fixes tests
that expect the old format.

From-SVN: r269706
2019-03-15 13:19:10 +00:00
Kyrylo Tkachov
03570b2410 [AArch64] PR target/89719 Adjust gcc.target/aarch64/spellcheck*.c tests
As of recently the -march,-mcpu,-mtune strings in the error messages are
now quoted.
This patch adjusts the testcases in gcc.target/aarch64/ that had started
failing due to that change.

	PR target/89719
	* gcc.target/aarch64/spellcheck_4.c: Adjust dg-error string.
	* gcc.target/aarch64/spellcheck_5.c: Likewise.
	* gcc.target/aarch64/spellcheck_6.c: Likewise.

From-SVN: r269703
2019-03-15 09:50:11 +00:00
Jakub Jelinek
4e6482d05b re PR c++/89709 (ICE with constexpr and "-O")
PR c++/89709
	* tree.c (inchash::add_expr): Strip any location wrappers.
	* fold-const.c (operand_equal_p): Move stripping of location wrapper
	after hash verification.

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

From-SVN: r269702
2019-03-15 10:23:11 +01:00
Jakub Jelinek
8eb2215d8d re PR debug/89704 (ICE in add_const_value_attribute, at dwarf2out.c:19685)
PR debug/89704
	* dwarf2out.c (add_const_value_attribute): Return false for MINUS,
	SIGN_EXTEND and ZERO_EXTEND.

	* gcc.dg/debug/pr89704.c: New test.

From-SVN: r269700
2019-03-15 09:00:46 +01:00
Ian Lance Taylor
b1403b691a compiler: eliminate bound checks in append expression
The compiler generates two array index expressions when lowering
    an append expression. Currently they generate bound checks.
    Bound checks are not necessary in this case, as we know the slice
    has, or will grow to, enough length and capacity. Eliminate them.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166817

From-SVN: r269699
2019-03-15 04:34:43 +00:00
GCC Administrator
928499cfee Daily bump.
From-SVN: r269698
2019-03-15 00:16:11 +00:00
Jason Merrill
62de703f19 hash-table.h (remove_elt_with_hash): Return if slot is NULL rather than if is_empty (*slot).
* hash-table.h (remove_elt_with_hash): Return if slot is NULL rather
	than if is_empty (*slot).
	* hash-set-tests.c (test_set_of_strings): Add tests for addition of
	existing elt and for elt removal.
	* hash-map-tests.c (test_map_of_strings_to_int): Add test for removal
	of already removed elt.

	* hashtab.c (htab_remove_elt_with_hash): Return if slot is NULL rather
	than if *slot is HTAB_EMPTY_ENTRY.

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

From-SVN: r269695
2019-03-14 23:47:01 +01:00
H.J. Lu
12fb7712a8 i386: Handle REG_EH_REGION note
When we split:

(insn 18 17 76 2 (set (reg:SF 88 [ _19 ])
        (float:SF (mem/c:SI (symbol_ref:DI ("d") [flags 0x2]  <var_decl 0x7fd6d8290c60 d>) [1 d+0 S4 A32]))) "x.ii":4:20 170 {*floatsisf2}
     (expr_list:REG_EH_REGION (const_int 2 [0x2])
        (nil)))

to

(insn 94 17 18 2 (set (reg:V4SF 115)
        (vec_merge:V4SF (vec_duplicate:V4SF (float:SF (mem/c:SI (symbol_ref:DI ("d") [flags 0x2]  <var_decl 0x7f346837ac60 d>) [1 d+0 S4 A32])))
            (reg:V4SF 114)
            (const_int 1 [0x1]))) "x.ii":4:20 -1
     (nil))
(insn 18 94 76 2 (set (reg:SF 88 [ _19 ])
        (subreg:SF (reg:V4SF 115) 0)) "x.ii":4:20 112 {*movsf_internal}
     (expr_list:REG_EH_REGION (const_int 2 [0x2])
        (nil)))

we must copy the REG_EH_REGION note to the first insn and split the block
after the newly added insn.  The REG_EH_REGION on the second insn will be
removed later since it no longer traps.

gcc/

	PR target/89650
	* config/i386/i386.c (remove_partial_avx_dependency): Handle
	REG_EH_REGION note.

gcc/testsuite/

	PR target/89650
	* g++.target/i386/pr89650.C: New test.

From-SVN: r269694
2019-03-14 13:38:52 -07:00
Jason Merrill
f869f40780 Don't require 'bool' in a concept definition.
* parser.c (cp_parser_decl_specifier_seq): Support C++20
	concept-definition syntax without 'bool'.

From-SVN: r269692
2019-03-14 15:53:04 -04:00
Uros Bizjak
aa9cedb4ed * gcc.target/i386/pr85860.c: Use target int128 instead of lp64.
From-SVN: r269691
2019-03-14 19:39:44 +01:00
Thomas Koenig
c27722368b gfortran.texi: Document Q edit descriptor under " Extensions not implemented in GNU Fortran".
2019-03-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* gfortran.texi: Document Q edit descriptor under
	" Extensions not implemented in GNU Fortran".

From-SVN: r269690
2019-03-14 17:31:18 +00:00
Martin Liska
3ce5bdf77c Remove dead option from manual (PR other/89712).
2019-03-14  Martin Liska  <mliska@suse.cz>

	PR other/89712
	* doc/invoke.texi: Remove -fdump-class-hierarchy option.

From-SVN: r269684
2019-03-14 14:19:33 +00:00
Richard Biener
6965fa6db5 re PR target/89711 (ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2832)
2019-03-14  Richard Biener  <rguenther@suse.de>

	PR target/89711
	* config/i386/i386.c (make_resolver_func): Properly set
	DECL_CONTEXT on the RESULT_DECL.
	* config/rs6000/rs6000.c (make_resolver_func): Likewise.

From-SVN: r269683
2019-03-14 14:05:26 +00:00
Richard Biener
baa09dc5c9 c-tree.h (enum c_declspec_il): New.
2019-03-14  Richard Biener  <rguenther@suse.de>

	c/
	* c-tree.h (enum c_declspec_il): New.
	(struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
	enum bitfield.
	* c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
	Pass start pass and declspec_il to c_parser_parse_gimple_body.
	(c_parser_declspecs): Adjust.
	* gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
	gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
	and bitmap.h.
	(struct gimple_parser): New.
	(gimple_parser::push_edge): New method.
	(c_parser_gimple_parse_bb_spec): New helper.
	(c_parser_parse_gimple_body): Get start pass and IL specification.
	Initialize SSA and CFG.
	(c_parser_gimple_compound_statement): Handle CFG and SSA build.
	Build a gimple_parser parsing state and pass it along.
	(c_parser_gimple_statement): Change intermittend __PHI internal
	function argument for the edge.
	(c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
	(c_parser_gimple_goto_stmt): Record edges to build.
	(c_parser_gimple_if_stmt): Likewise.
	* gimple-parser.h (c_parser_parse_gimple_body): Adjust.
	(c_parser_gimple_or_rtl_pass_list): Likewise.

	* gimple-pretty-print.c: Include cfgloop.h.
	(dump_gimple_phi): Adjust.
	(dump_gimple_bb_header): Dump loop header for GIMPLE.
	(pp_cfg_jump): Adjust.
	(dump_implicit_edges): Dump fallthru to next block for GIMPLE as well.
	* tree-cfg.c (build_gimple_cfg): Remove lower_phi_internal_fn call.
	(lower_phi_internal_fn): Remove.
	(verify_gimple_call): Remove IFN_PHI special-casing.
	(dump_function_to_file): Dump IL state.
	* tree-into-ssa.c (rewrite_add_phi_arguments): Revert changes
	done to deal with PHI nodes being present in non-SSA state.

	* gcc.dg/gimplefe-13.c: Adjust.
	* gcc.dg/gimplefe-14.c: Likewise.
	* gcc.dg/gimplefe-17.c: Likewise.
	* gcc.dg/gimplefe-18.c: Likewise.
	* gcc.dg/gimplefe-7.c: Likewise.
	* gcc.dg/torture/pr89595.c: Likewise.
	* gcc.dg/tree-ssa/cunroll-13.c: Likewise.
	* gcc.dg/tree-ssa/ivopt_mult_1g.c: Likewise.
	* gcc.dg/tree-ssa/ivopt_mult_2g.c: Likewise.
	* gcc.dg/tree-ssa/scev-3.c: Likewise.
	* gcc.dg/tree-ssa/scev-4.c: Likewise.
	* gcc.dg/tree-ssa/scev-5.c: Likewise.
	* gcc.dg/vect/vect-cond-arith-2.c: Likewise.
	* gcc.target/aarch64/sve/loop_add_6.c: Likewise.

From-SVN: r269682
2019-03-14 13:25:27 +00:00
Jakub Jelinek
27814aed34 re PR ipa/89684 (ICE in gsi_for_stmt, at gimple-iterator.c:613)
PR ipa/89684
	* multiple_target.c (create_dispatcher_calls): Change
	references_to_redirect from vector of ipa_ref * to vector of ipa_ref.
	In the node->iterate_referring loop, push *ref rather than ref, call
	ref->remove_reference () and always pass 0 to iterate_referring.

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

From-SVN: r269681
2019-03-14 14:05:34 +01:00
Jakub Jelinek
87654f1813 re PR rtl-optimization/89679 (wrong code with -Og -frerun-cse-after-loop -fno-tree-fre)
PR rtl-optimization/89679
	* expmed.c (expand_mult_const): Don't add a REG_EQUAL note if it
	would contain a paradoxical SUBREG.

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

From-SVN: r269680
2019-03-14 13:21:36 +01:00
Richard Biener
df6d3ac9aa re PR tree-optimization/89710 (ICE in dyn_cast<gcond*, gimple>(gimple*) / should_duplicate_loop_header_p)
2019-03-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/89710
	* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Use
	safe_dyn_cast.

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

From-SVN: r269679
2019-03-14 11:07:41 +00:00
Martin Liska
b815471796 GCOV: print {start,end}_column in JSON file and gcov-dump tool.
2019-03-14  Martin Liska  <mliska@suse.cz>

	* coverage.c (coverage_begin_function): Stream also
	end_column.
	* doc/gcov.texi: Document 2 new fields in JSON file.  Improve
	documentation about function declaration location.
	* gcov-dump.c (tag_function): Print whole range
	of function declaration.
	* gcov.c (struct function_info): Add end_column field.
	(function_info::function_info): Initialize it.
	(output_json_intermediate_file): Output {start,end}_column
	fields.
	(read_graph_file): Read end_column.

From-SVN: r269678
2019-03-14 09:33:54 +00:00
Richard Biener
ea9d9d749c re PR c++/89698 (Run-time error due to optimization of field access after cast at -Os/-O2 and higher)
2019-03-14  Richard Biener  <rguenther@suse.de>

	PR middle-end/89698
	* fold-const.c (operand_equal_p): For INDIRECT_REF check
	that the access types are similar.

	* g++.dg/torture/pr89698.C: New testcase.

From-SVN: r269677
2019-03-14 09:24:21 +00:00
Jakub Jelinek
f54e63dfa3 re PR tree-optimization/89703 (ICE in compare_values_warnv, at tree-vrp.c:997)
PR tree-optimization/89703
	* tree-ssa-strlen.c (valid_builtin_call): Punt if stmt call types
	aren't compatible also with builtin_decl_explicit.  Check pure
	or non-pure status of BUILT_IN_STR{{,N}CMP,N{LEN,{CAT,CPY}{,_CHK}}}
	and BUILT_IN_STPNCPY{,_CHK}.

	* gcc.c-torture/compile/pr89703-1.c: New test.
	* gcc.c-torture/compile/pr89703-2.c: New test.

From-SVN: r269674
2019-03-14 09:56:47 +01:00
H.J. Lu
fb055f4b74 x32: Add addr32 prefix to VSIB address
32-bit indices in VSIB address are sign-extended to 64 bits.  In x32,
when 32-bit indices are used as addresses, like in

vgatherdps %ymm7, 0(,%ymm9,1), %ymm6

32-bit indices, 0xf7fa3010, is sign-extended to 0xfffffffff7fa3010 which
is invalid address.  Add addr32 prefix to UNSPEC_VSIBADDR instructions
for x32 if there is no base register nor symbol.

This fixes 175.vpr and 254.gap in SPEC CPU 2000 on x32 with

-Ofast -funroll-loops -march=haswell

gcc/

	PR target/89523
	* config/i386/i386.c (ix86_print_operand): Handle 'M' to add
	addr32 prefix to VSIB address for X32.
	* config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask): Prepend
	"%M2" to opcode.
	(*avx512pf_gatherpf<mode>df_mask): Likewise.
	(*avx512pf_scatterpf<mode>sf_mask): Likewise.
	(*avx512pf_scatterpf<mode>df_mask): Likewise.
	(*avx2_gathersi<mode>): Prepend "%M3" to opcode.
	(*avx2_gathersi<mode>_2): Prepend "%M2" to opcode.
	(*avx2_gatherdi<mode>): Prepend "%M3" to opcode.
	(*avx2_gatherdi<mode>_2): Prepend "%M2" to opcode.
	(*avx2_gatherdi<mode>_3): Prepend "%M3" to opcode.
	(*avx2_gatherdi<mode>_4): Prepend "%M2" to opcode.`
	(*avx512f_gathersi<mode>): Prepend "%M4" to opcode.
	(*avx512f_gathersi<mode>_2): Prepend "%M3" to opcode.
	(*avx512f_gatherdi<mode>): Prepend "%M4" to opcode.
	(*avx512f_gatherdi<mode>_2): Prepend "%M3" to opcode.
	(*avx512f_scattersi<mode>): Prepend "%M0" to opcode.
	(*avx512f_scatterdi<mode>): Likewise.

gcc/testsuite/

	PR target/89523
	* gcc.target/i386/pr89523-1a.c: New test.
	* gcc.target/i386/pr89523-1b.c: Likewise.
	* gcc.target/i386/pr89523-2.c: Likewise.
	* gcc.target/i386/pr89523-3.c: Likewise.
	* gcc.target/i386/pr89523-4.c: Likewise.
	* gcc.target/i386/pr89523-5.c: Likewise.
	* gcc.target/i386/pr89523-6.c: Likewise.
	* gcc.target/i386/pr89523-7.c: Likewise.
	* gcc.target/i386/pr89523-8.c: Likewise.
	* gcc.target/i386/pr89523-9.c: Likewise.

From-SVN: r269673
2019-03-14 01:49:54 -07:00
Jakub Jelinek
b2725ea5df re PR c++/89512 (ICE in get_expr_operands, at tree-ssa-operands.c:882)
PR c++/89512
	* semantics.c (finish_qualified_id_expr): Reject variable templates.

	* g++.dg/cpp1y/var-templ61.C: New test.

From-SVN: r269672
2019-03-14 09:14:48 +01:00
Jakub Jelinek
0ee285909b re PR c++/89652 (ICE during constexpr evaluation)
PR c++/89652
	* constexpr.c (struct constexpr_ctx): Change save_exprs type from
	hash_set<tree> to vec<tree>.
	(cxx_eval_call_expression): Adjust for save_exprs being a vec instead
	of hash_set.
	(cxx_eval_loop_expr): Likewise.  Truncate the vector after each
	removal of SAVE_EXPRs from values.
	(cxx_eval_constant_expression) <case SAVE_EXPR>: Call safe_push
	method on save_exprs instead of add.

	* g++.dg/cpp1y/constexpr-89652.C: New test.

From-SVN: r269671
2019-03-14 09:13:09 +01:00
GCC Administrator
7da0bca130 Daily bump.
From-SVN: r269670
2019-03-14 00:16:19 +00:00
Jason Merrill
dcfa851886 PR c++/86521 - C++17 copy elision in initialization by constructor.
This is an overlooked case in C++17 mandatory copy elision: We want overload
resolution to reflect that initializing an object from a prvalue does not
involve a copy or move constructor even when [over.match.ctor] says that
only constructors are candidates.  Here I implement that by looking through
the copy/move constructor in joust.

	* call.c (joust_maybe_elide_copy): New.
	(joust): Call it.

From-SVN: r269667
2019-03-13 19:34:51 -04:00