Commit Graph

34170 Commits

Author SHA1 Message Date
Jakub Jelinek e711928b48 re PR fortran/80010 (diagnostics: typo $!)
PR fortran/80010
	* parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
	and ST_OACC_END_ATOMIC, instead of !ACC.
	* trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
	* openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
	gfc_resolve_oacc_declare): Likewise.

	* gfortran.dg/goacc/asyncwait-3.f95: Adjust expected diagnostic.

From-SVN: r246204
2017-03-16 17:50:27 +01:00
Jakub Jelinek c05c238081 re PR fortran/79886 (ICE in pp_format, at pretty-print.c:681)
PR fortran/79886
	* tree-diagnostic.c (default_tree_printer): No longer static.
	* tree-diagnostic.h (default_tree_printer): New prototype.
fortran/
	* error.c (gfc_format_decoder): Rename plus argument to set_locus,
	remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
	if not a Fortran specific spec.
	* trans-io.c: Include options.h.
	(gfc_build_st_parameter): Temporarily disable -Wpadded around layout
	of artificial IO data structures.
testsuite/
	* gfortran.dg/pr79886.f90: New test.

From-SVN: r246203
2017-03-16 17:27:08 +01:00
Jason Merrill 559a77e112 PR c++/80043 - ICE with -fpermissive
* typeck.c (convert_for_assignment): Handle instantiate_type
	not giving an error.

From-SVN: r246180
2017-03-15 17:32:43 -04:00
Michael Meissner 3231d64b5e re PR target/79038 (Improve PowerPC ISA 3.0 conversion between integers and hardware _Float128)
[gcc]
2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/79038
	* config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
	insns to convert from signed/unsigned char/short to IEEE 128-bit
	floating point.
	(floatuns<QHI:mode><IEEE128:mode>2): Likewise.

[gcc/testsuite]
2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/79038
	* gcc.target/powerpc/pr79038-1.c: New test.

From-SVN: r246178
2017-03-15 21:17:35 +00:00
Segher Boessenkool 81ef1f5e25 rs6000: Do not xfail nint_2.f90 on Linux systems
It was XFAILed because there was a bug in glibc, but that bug was fixed
nine years ago.  Nowadays everyone uses a version of glibc with the bug
fixed, so we should no longer XFAIL the test.


gcc/testsuite/
	PR fortran/33271
	* gfortran.dg/nint_2.f90: Do not xfail powerpc*-*-linux*.

From-SVN: r246174
2017-03-15 21:48:49 +01:00
Jiong Wang 395a1e9b5c [gcc, testsuite] Don't xfail on arm
PR testsuite/79356
	* gcc.dg/attr-alloc_size-11.c: Don't xfail on arm.

From-SVN: r246167
2017-03-15 15:33:12 +00:00
Uros Bizjak 05f659104f re PR target/80019 (ICE in ix86_vector_duplicate_value, at config/i386/i386.c:42584)
PR target/80019
	* config/i386/i386.c (ix86_vector_duplicate_value): Create
	subreg of inner mode for values already in registers.

testsuite/ChangeLog:

	PR target/80019
	* gcc.target/i386/pr80019.c: New test.

From-SVN: r246161
2017-03-15 14:38:51 +01:00
Martin Liska 94285a7d56 Removed unused dg-error.
2017-03-15  Martin Liska  <mliska@suse.cz>

	* gcc.dg/tree-prof/pr66295.c: Removed unused dg-error.

From-SVN: r246154
2017-03-15 10:06:10 +00:00
Martin Sebor a983542b60 re PR tree-optimization/79800 (wrong snprintf result range with precision in a narrow negative-positive range)
PR tree-optimization/79800
	* gimple-ssa-sprintf.c (format_floating: Add argument.  Handle
	precision in negative-positive range.
	(format_floating): Call non-const overload with adjusted precision.

	PR tree-optimization/79800
	* gcc.dg/tree-ssa/builtin-sprintf-warn-15.c: Add test cases.
	* gcc.dg/tree-ssa/pr79800.c: New test.

From-SVN: r246151
2017-03-14 22:31:27 -06:00
Michael Meissner 76ca5f401d re PR target/79947 (ICE in rs6000_emit_swsqrt at gcc/config/rs6000/rs6000.c:37570)
[gcc]
2017-03-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/79947
	* config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for
	-mpowerpc-gfxopt.

[gcc/testsuite]
2017-03-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/79947
	* gcc.target/powerpc/pr79947.c: New test.

From-SVN: r246150
2017-03-15 00:25:10 +00:00
Martin Sebor 5d9a283ac6 re PR middle-end/80020 (gcc confused about aligned_alloc argument order)
PR middle-end/80020
	* builtin-attrs.def (ATTR_ALLOC_SIZE_2_NOTHROW_LIST): New macro.
	* builtins.def (aligned_alloc): Use it.

	PR middle-end/80020
	* gcc.dg/attr-alloc_size-6.c: Correct aligned_alloc argument order.
	* gcc.dg/attr-alloc_size-7.c: Same.
	* gcc.dg/attr-alloc_size-9.c: Same.
	* gcc.dg/builtin-alloc-size.c: Same.
	* gcc.dg/pr80020.c: New test.

From-SVN: r246145
2017-03-14 16:16:27 -06:00
Bernd Schmidt 4692943dac re PR rtl-optimization/79728 (ICE in setup_pressure_classes, at ira.c:912)
PR rtl-optimization/79728
	* regs.h (struct target_regs): New field
	x_contains_allocatable_regs_of_mode.
	(contains_allocatable_regs_of_mode): New macro.
	* reginfo.c (init_reg_sets_1): Initialize it, and change
	contains_reg_of_mode so it includes global regs as well.
	* reload.c (push_reload): Use contains_allocatable_regs_of_mode
	rather than contains_regs_of_mode.

	PR rtl-optimization/79728
	* gcc.target/i386/sse-globalreg.c: New test.

From-SVN: r246138
2017-03-14 11:50:46 -06:00
Nathan Sidwell 9b74f93310 PR c++/79393 DR 1658 workaround
PR c++/79393 DR 1658 workaround
	* method.c (synthesized_method_base_walk): Inihibit abstract class
	virtual base access check here.
	(synthesized_method_walk): Not here.

From-SVN: r246126
2017-03-14 14:41:53 +00:00
Martin Liska 861d9d5e6a Fix multiple target clones nodes (PR lto/66295).
2017-03-14  Martin Liska  <mliska@suse.cz>

	PR lto/66295
	* multiple_target.c (expand_target_clones): Drop local.local
	flag for default implementation.
2017-03-14  Martin Liska  <mliska@suse.cz>

	PR lto/66295
	* gcc.dg/tree-prof/pr66295.c: New test.

From-SVN: r246119
2017-03-14 11:59:59 +00:00
Martin Liska a48018b5dc Do not warn -Wsuggest-attribute=noreturn for main.chkp (PR middle-end/78339).
2017-03-13  Martin Liska  <mliska@suse.cz>

	PR middle-end/78339
	* ipa-pure-const.c (warn_function_noreturn): If the declarations
	is a CHKP clone, use original declaration.
2017-03-13  Martin Liska  <mliska@suse.cz>

	PR middle-end/78339
	* gcc.target/i386/mpx/pr78339.c: New test.

From-SVN: r246098
2017-03-13 15:30:17 +00:00
Claudiu Zissulescu 8c56cc5a88 [ARC] Fix tst_bitfield_tst pattern.
gcc/
2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.md (*tst_bitfield_tst): Fix pattern.

gcc/testsuite
2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>

	* testsuite/gcc.target/arc/bitfield.c: New file.

From-SVN: r246090
2017-03-13 13:56:11 +01:00
Claudiu Zissulescu 14555394f4 [ARC] Handle complex PIC move patterns.
fwprop step is placing in the REG_EQUIV notes constant pic unspecs
expressions.  Then, loop may use these notes for optimizations
rezulting in complex patterns that are not supported by the current
implementation.

The patch adds handling of complex PIC addresses having MINUS or UNARY
operations.

gcc/
2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_legitimize_pic_address): Handle PIC
	expressions with MINUS and UNARY ops.

gcc/testsuite
2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>

	* gcc.target/arc/pr9001090948.c: New file.

From-SVN: r246087
2017-03-13 13:55:38 +01:00
Nathan Sidwell 16e93e4b0b PR c++/79393 DR 1658 workaround
PR c++/79393 DR 1658 workaround
	* method.c (synthesized_method_walk): Check vbases of abstract
	classes for dtor walk.

From-SVN: r246085
2017-03-13 11:58:15 +00:00
Segher Boessenkool 3079b92e34 rs6000, testsuite: Correct the broken_cplxf_arg test
check_effective_target_broken_cplxf_arg is buggy.  It actually tests
if passing complex float works, not if it fails.  Also, it only runs
the test for target powerpc64-linux, but we are biarch, so it should
be powerpc*-linux.

This also changes the early-out conditions to be separate, because
the big combined condition was hard to follow.

This fixes the libstdc++ tests:

Running target unix/-m64
XPASS: 26_numerics/complex/13450.cc execution test
XPASS: 26_numerics/complex/pow.cc execution test
XPASS: 26_numerics/complex/value_operations/1.cc execution test

which were the last failing libstdc++ tests on BE.


gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_broken_cplxf_arg):
	Fix test.  Make early-out condition return early.  Correct comments.

From-SVN: r246072
2017-03-12 01:04:02 +01:00
Jerry DeLisle c08de9db47 re PR fortran/78854 ([F03] DTIO namelist output not working on internal unit)
2017-03-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/78854
	* io/list_read.c (nml_get_obj_data): Stash internal unit for
	later use by child procedures.
	* io/write.c (nml_write_obj): Likewise.
	* io/tranfer.c (data_transfer_init): Minor whitespace.
	* io/unit.c (set_internal_uit): Look for the stashed internal
	unit and use it if found.

	* gfortran.dg/dtio_25.f90: New test.

From-SVN: r246070
2017-03-11 14:49:57 +00:00
Martin Sebor 1d0cf89ab4 Fix up a couple of old ChangeLog entries.
From-SVN: r246065
2017-03-10 17:37:40 -07:00
Martin Sebor 66b2754523 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
2017-03-10 17:33:45 -07:00
Bernd Schmidt 8f2f638160 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
2017-03-10 21:17:13 +00:00
Jason Merrill 0c942f3eda 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
2017-03-10 12:35:54 -05:00
Will Schmidt 8e2c69b489 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
2017-03-10 16:18:44 +00:00
Marek Polacek 455d833cd8 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
2017-03-10 15:36:00 +00:00
Jakub Jelinek e260b0a7dd 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
2017-03-10 16:33:04 +01:00
Jakub Jelinek cdd669f9fc 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
2017-03-10 16:28:26 +01:00
Segher Boessenkool 730e6e4634 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
2017-03-10 16:23:06 +01:00
Pat Haugen fc8f6304a9 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
2017-03-10 14:32:42 +00:00
Martin Liska 8823ce3f54 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
2017-03-10 13:24:45 +00:00
Olivier Hainque f1b0632aab 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
2017-03-10 11:16:21 +00:00
Jakub Jelinek 2d9dd4fb86 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
2017-03-10 08:57:45 +01:00
Jakub Jelinek 72772e6761 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
2017-03-10 08:55:00 +01:00
Jakub Jelinek 5558f089e3 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
2017-03-10 08:53:57 +01:00
Marek Polacek 822a132cfb 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
2017-03-09 22:45:39 +00:00
Jason Merrill 4a23a464f8 * g++.dg/warn/Wpadded-1.C: Fix for 32-bit target.
From-SVN: r246014
2017-03-09 17:20:33 -05:00
Matthew Fortune c9819d2270 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
2017-03-09 17:18:41 +00:00
Marek Polacek 3661842863 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
2017-03-09 16:58:17 +00:00
Jakub Jelinek 01e5af5a2f 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
2017-03-09 17:42:45 +01:00
Marek Polacek 6443c7c0e5 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
2017-03-09 16:36:37 +00:00
Richard Biener d721dc3c4b 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
2017-03-09 16:19:37 +00:00
Toma Tabacu 1f1fd3e272 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
2017-03-09 15:04:31 +00:00
Richard Biener 16967aff7a 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
2017-03-09 13:20:50 +00:00
Richard Biener 26d7dc48b6 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
2017-03-09 13:20:03 +00:00
Paolo Carlini 35f77c2855 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
2017-03-09 11:51:29 +00:00
Martin Liska 8a7df0316d 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
2017-03-09 10:10:02 +00:00
Martin Liska 3828bb0d7e 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
2017-03-09 10:04:50 +00:00
Marek Polacek 410a590c2a 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
2017-03-09 09:53:03 +00:00
Prachi Godbole f084a22e98 msa-bclri.c: Skip the test for -O0.
gcc/testsuite/
	* gcc.target/mips/msa-bclri.c: Skip the test for -O0.

From-SVN: r245995
2017-03-09 09:38:00 +00:00