aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2019-02-18PR c++/89336 - multiple stores in constexpr stmt.Jason Merrill4-9/+115
If we evaluate the RHS in the context of the LHS, that evaluation might change the LHS in ways that mess with being able to store the value later. So for assignment or scalar values, evaluate the RHS first. * constexpr.c (cxx_eval_store_expression): Preevaluate scalar or assigned value. From-SVN: r269003
2019-02-19Daily bump.GCC Administrator1-1/+1
From-SVN: r269002
2019-02-18* fr.po: Update.Joseph Myers2-586/+402
From-SVN: r268998
2019-02-18Improve diagnostic for redundant template arguments in declaration.Jason Merrill3-2/+6
* pt.c (check_explicit_specialization): If the declarator is a template-id, only check whether the arguments are dependent. From-SVN: r268997
2019-02-18README: Fix typos.Sharon Dvir2-2/+6
2019-02-18 Sharon Dvir <unapologtic@gmail.com> gcc/testsuite/ * README: Fix typos. From-SVN: r268996
2019-02-18Fix g++.dg/torture/pr89303.C with Solaris ldRainer Orth2-2/+7
* g++.dg/torture/pr89303.C (bad_weak_ptr): Rename to bad_weak_ptr_. From-SVN: r268995
2019-02-18Improve duplicate [[likely]] diagnostic.Jason Merrill4-15/+29
* parser.c (cp_parser_statement): Make attrs_loc a range. Pass it to process_stmt_hotness_attribute. * cp-gimplify.c (process_stmt_hotness_attribute): Take attrs_loc. (genericize_if_stmt): Use likely/unlikely instead of predictor_name. From-SVN: r268994
2019-02-18cpp.texi (Conditional syntax): Add __has_attribute, __has_cpp_attribute, and ↵Martin Sebor2-0/+101
__has_include. gcc/ChangeLog: * doc/cpp.texi (Conditional syntax): Add __has_attribute, __has_cpp_attribute, and __has_include. From-SVN: r268993
2019-02-18re PR fortran/87689 (PowerPC64 ELFv2 function parameter passing violation)Thomas Koenig11-10/+108
2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/87689 * trans-decl.c (gfc_get_extern_function_decl): Add argument actual_args and pass it through to gfc_get_function_type. * trans-expr.c (conv_function_val): Add argument actual_args and pass it on to gfc_get_extern_function_decl. (conv_procedure_call): Pass actual arguments to conv_function_val. * trans-types.c (get_formal_from_actual_arglist): New function. (gfc_get_function_type): Add argument actual_args. Generate formal args from actual args if necessary. * trans-types.h (gfc_get_function_type): Add optional argument. * trans.h (gfc_get_extern_function_decl): Add optional argument. 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/87689 * gfortran.dg/lto/20091028-1_0.f90: Add -Wno-lto-type-mismatch to options. * gfortran.dg/lto/20091028-2_0.f90: Likewise. * gfortran.dg/lto/pr87689_0.f: New file. * gfortran.dg/lto/pr87689_1.f: New file. From-SVN: r268992
2019-02-18invoke.texi (-Wreturn-type): Correct and expand.Martin Sebor2-5/+12
gcc/ChangeLog: * doc/invoke.texi (-Wreturn-type): Correct and expand. From-SVN: r268991
2019-02-18PR middle-end/89294 - ICE in valid_constant_size_pMartin Sebor5-1/+27
gcc/c-family/ChangeLog: PR middle-end/89294 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant. gcc/ChangeLog: PR middle-end/89294 * tree.c (valid_constant_size_p): Avoid assuming size is a constant expression. * tree.h (cst_size_error): Add the cst_size_not_constant enumerator. From-SVN: r268990
2019-02-18Fix test pr88680.CWilco Dijkstra2-1/+5
Fix pr88680.C failures due to short enums on arm-none-eabi. Committed as obvious. gcc/testsuite/ * g++.dg/wrappers/pr88680.C: Add -fno-short-enums. From-SVN: r268988
2019-02-18Tabify all D *.exp filesRainer Orth6-389/+397
libphobos: * testsuite/lib/libphobos-dg.exp: Tabify. * testsuite/lib/libphobos.exp: Likewise. * testsuite/libphobos.cycles/cycles.exp: Likewise. * testsuite/libphobos.shared/shared.exp: Likewise. * testsuite/libphobos.unittests/unittests.exp: Likewise. gcc/testsuite: * gdc.dg/dg.exp: Tabify. * gdc.dg/lto/lto.exp: Likewise. * gdc.test/gdc-test.exp: Likewise. * lib/gdc-dg.exp: Likewise. * lib/gdc.exp: Likewise. From-SVN: r268987
2019-02-18re PR tree-optimization/89296 (tree copy-header masking uninitialized warning)Richard Biener4-2/+38
2019-02-18 Richard Biener <rguenther@suse.de> PR tree-optimization/89296 * tree-ssa-loop-ch.c (ch_base::copy_headers): Restrict setting of no-warning flag to cases that might emit the bogus warning. * gcc.dg/uninit-pr89296.c: New testcase. From-SVN: r268986
2019-02-18re PR bootstrap/88714 (bootstrap comparison failure on armv7l since r265398)Jakub Jelinek4-8/+15
PR bootstrap/88714 * config/arm/arm.md (*arm_movdi, *movdf_soft_insn): Use "r" instead of "q" constraint. * config/arm/vfp.md (*movdi_vfp): Likewise. * config/arm/ldrdstrd.md (*arm_ldrd, *arm_strd): Use "r" instead of "q" constraint for operands[0]. From-SVN: r268985
2019-02-18re PR target/89369 (pseudo-RNG miscompiled on s390x-linux with -O2 ↵Jakub Jelinek5-18/+95
-march=zEC12 -mtune=z13 starting with r266203) PR target/89369 * config/s390/s390.md (*r<noxa>sbg_<mode>_srl_bitmask, *r<noxa>sbg_<mode>_sll, *r<noxa>sbg_<mode>_srl): Don't construct pattern in a temporary buffer. (*r<noxa>sbg_sidi_srl): Likewise. Always use 32 as I3 rather than 64-operands[2]. * gcc.c-torture/execute/pr89369.c: New test. * gcc.target/s390/md/rXsbg_mode_sXl.c (rosbg_si_srl, rxsbg_si_srl): Expect last 3 operands 32,63,62 rather than 34,63,62. From-SVN: r268984
2019-02-18re PR target/89361 (s390 broken without S390_USE_TARGET_ATTRIBUTE, likely ↵Jakub Jelinek2-3/+14
since r257489) PR target/89361 * config/s390/s390.c (s390_indirect_branch_attrvalue, s390_indirect_branch_settings): Define unconditionally. (s390_set_current_function): Likewise, but guard the whole body except the s390_indirect_branch_settings call with #if S390_USE_TARGET_ATTRIBUTE. (TARGET_SET_CURRENT_FUNCTION): Redefine unconditionally. From-SVN: r268983
2019-02-18* config/s390/s390.md (*<risbg_n>_ior_and_sr_ze,Jakub Jelinek2-12/+32
*<risbg_n>_<mode>_ior_and_lshiftrt, *<risbg_n>_sidi_ior_and_lshiftrt): Use HOST_WIDE_INT_M1U instead of ~(0ULL). (*<risbg_n>_and_subregdi_rotr, *<risbg_n>_and_subregdi_rotl): Use HOST_WIDE_INT_1U instead of 1ULL. (*pre_z10_extzv<mode>, *pre_z10_extv<mode>): Change mask type from int to unsigned HOST_WIDE_INT, use HOST_WIDE_INT_1U instead of 1ul. (*insv<mode><clobbercc_or_nocc>_appendbitsleft, z = (x << c) | (y >> d) splitters): Use HOST_WIDE_INT_1U instead of 1UL. (*insv<mode>_mem_reg, *insvdi_mem_reghigh): Use HOST_WIDE_INT_1U instead of 1ul. From-SVN: r268982
2019-02-18[PR 89209] Avoid segfault in a peculiar corner case in SRAMartin Jambor4-13/+53
2019-02-18 Martin Jambor <mjambor@suse.cz> PR tree-optimization/89209 * tree-sra.c (create_access_replacement): New optional parameter reg_tree. Use it as a type if non-NULL and access type is not of a register type. (get_repl_default_def_ssa_name): New parameter REG_TYPE, pass it to create_access_replacement. (sra_modify_assign): Pass LHS type to get_repl_default_def_ssa_name. Check lacc is non-NULL before attempting to re-create it on the RHS. testsuite/ * gcc.dg/tree-ssa/pr89209.c: New test. From-SVN: r268980
2019-02-18Come up with fast {function,call}_summary classes (PR ipa/89306).Martin Liska9-211/+765
2019-02-18 Martin Liska <mliska@suse.cz> PR ipa/89306 * cgraph.c (symbol_table::create_edge): Set m_summary_id to -1 by default. (symbol_table::free_edge): Recycle m_summary_id. * cgraph.h (get_summary_id): New. (symbol_table::release_symbol): Set m_summary_id to -1 by default. (symbol_table::allocate_cgraph_symbol): Recycle m_summary_id. * ipa-fnsummary.c (ipa_fn_summary_t): Switch from function_summary to fast_function_summary. * ipa-fnsummary.h (ipa_fn_summary_t): Likewise. * ipa-pure-const.c (class funct_state_summary_t): Switch from function_summary to fast_function_summary. * ipa-reference.c (class ipa_ref_var_info_summary_t): Likewise. (class ipa_ref_opt_summary_t): Switch from function_summary to fast_function_summary. * symbol-summary.h (class function_summary_base): New class that is created from base of former function_summary. (function_summary_base::unregister_hooks): New. (class function_summary): Inherit from function_summary_base. (class call_summary_base): New class that is created from base of former call_summary. (class call_summary): Inherit from call_summary_base. (struct is_same): New. (class fast_function_summary): New summary class. (class fast_call_summary): New summary class. * vec.h (vec_safe_grow_cleared): New function. From-SVN: r268979
2019-02-18Support if statement in !GCC$ builtin directive.Martin Liska11-10/+91
2019-02-18 Martin Liska <mliska@suse.cz> * config/i386/i386.c (ix86_get_multilib_abi_name): New function. (TARGET_GET_MULTILIB_ABI_NAME): New macro defined. * doc/tm.texi: Document new target hook. * doc/tm.texi.in: Likewise. * target.def: Add new target macro. * gcc.c (find_fortran_preinclude_file): Do not search multilib suffixes. 2019-02-18 Martin Liska <mliska@suse.cz> * decl.c (gfc_match_gcc_builtin): Add support for filtering of builtin directive based on multilib ABI name. 2019-02-18 Martin Liska <mliska@suse.cz> * gfortran.dg/simd-builtins-7.f90: New test. * gfortran.dg/simd-builtins-7.h: New test. From-SVN: r268978
2019-02-18Daily bump.GCC Administrator1-1/+1
From-SVN: r268977
2019-02-17re PR fortran/88299 ([F18] COMMON in a legacy module produces bogus warnings ↵Harald Anlauf4-5/+32
in dependent code) 2019-02-17 Harald Anlauf <anlauf@gmx.de> PR fortran/88299 * resolve.c (resolve_common_blocks,resolve_common_vars): Move check for obsolent COMMON feature in F2018 to better place. PR fortran/88299 * gfortran.dg/pr88299.f90: New test. From-SVN: r268974
2019-02-17re PR fortran/89077 (ICE using * as len specifier for character parameter)Harald Anlauf4-0/+46
2019-02-17 Harald Anlauf <anlauf@gmx.de> PR fortran/89077 * decl.c (gfc_set_constant_character_len): Clear original string representation after padding has been performed to target length. PR fortran/89077 * gfortran.dg/transfer_simplify_12.f90: New test. From-SVN: r268973
2019-02-17re PR c++/89356 (sorry, unimplemented: mangling implicit_conv_expr in ↵Marek Polacek3-0/+22
nodejs8 package since r268321) PR c++/89356 * g++.dg/abi/mangle68.C: New test. * g++.dg/cpp0x/decltype69.C: New test. From-SVN: r268972
2019-02-17re PR c++/89315 (Cannot convert to std::initializer_list - fails with gcc9 ↵Marek Polacek2-0/+24
works with gcc8) PR c++/89315 * g++.dg/cpp0x/initlist114.C: New test. From-SVN: r268971
2019-02-17* g++.old-deja/g++.robertl/eb82.C: Tweak dg-error.Marek Polacek2-1/+3
From-SVN: r268970
2019-02-17PR c++/89217 - ICE with list-initialization in range-based for loop.Marek Polacek6-9/+72
* constexpr.c (unshare_constructor): No longer static. * cp-tree.h (unshare_constructor): Declare. * semantics.c (finish_compound_literal): When dealing with a non-dependent expression in a template, return the original expression. Pass LOOKUP_NO_NARROWING to digest_init_flags. * g++.dg/cpp0x/range-for37.C: New test. From-SVN: r268969
2019-02-17[RS6000] Fix <bd>_<mode> and <bd>tf_<mode> splittersAlan Modra2-3/+10
This patch fixes a bug that can result in "insn does not satisfy its constraints" if these splitters fire due to not getting ctr for the jump insn. Since the jump insn can have any of r,m,d,wi,c,l as the decremented count output, it's not sufficient to check for gpc_reg_operand (which matches VSX regs for example). Seen after correcting register_move_cost when the cost of gpr <-> vsx is much lower. Since this is a prerequisite to fixing PR89271, I'm mentioning that PR in the ChangeLog. The <bd>tf_<mode> split had a further bug in that it wouldn't match if the count output was m,d,wi, or l. PR target/89271 * config/rs6000/rs6000.md (<bd>_<mode> split): Check for an int output reg on add insn. (<bd>tf_<mode> split): Likewise. Match predicates with insn. From-SVN: r268968
2019-02-17Daily bump.GCC Administrator1-1/+1
From-SVN: r268967
2019-02-16i386: Add ssse3_pmulhrswv4hi3 expanderH.J. Lu2-3/+32
There is no V4HI pmulhrsw in AVX512BW and V4HI/V8HI pmulhrsw don't require AVX2. PR target/89372 * config/i386/sse.md (ssedoublemode): Remove V4HI. (PMULHRSW): Likewise. (<ssse3_avx2>_pmulhrsw<mode>3): Require TARGET_SSSE3, not TARGET_AVX2. (ssse3_pmulhrswv4hi3): New expander. From-SVN: r268964
2019-02-16i386: Correct *vec_extractv2si_zext_memH.J. Lu2-2/+8
The second and third alternatives in *vec_extractv2si_zext_mem don't require MMX. But the second one requires SSE2. * config/i386/mmx.md (*vec_extractv2si_zext_mem): Doesn't require MMX. Add isa attribute. From-SVN: r268963
2019-02-16re PR tree-optimization/88074 (g++ hangs on math expression)Jakub Jelinek2-10/+89
PR middle-end/88074 * simplify.c (simplify_transformation_to_array): Run post_op immediately after processing corresponding row, rather than at the end. (norm2_scale): New variable. (add_squared): Rename to ... (norm2_add_squared): ... this. Scale down operand and/or result if needed. (do_sqrt): Rename to ... (norm2_do_sqrt): ... this. Handle the result == e case. Scale up result and clear norm2_scale. (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result and clear norm2_scale again. From-SVN: r268962
2019-02-16Fix excess warnings from -Wtype-limits with location wrappers (PR c++/88680)David Malcolm4-3/+77
PR c++/88680 reports excess warnings from -Wtype-limits after the C++ FE's use of location wrappers was extended in r267272 for cases such as: const unsigned n = 8; static_assert (n >= 0 && n % 2 == 0, ""); t.C:3:18: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 3 | static_assert (n >= 0 && n % 2 == 0, ""); | ~~^~~~ The root cause is that the location wrapper around "n" breaks the suppression of the warning for the "if OP0 is a constant that is >= 0" case. This patch fixes it by calling fold_for_warn on OP0, extracting the constant. gcc/c-family/ChangeLog: PR c++/88680 * c-common.c (shorten_compare): Call fold_for_warn on op0 when implementing -Wtype-limits. gcc/testsuite/ChangeLog: PR c++/88680 * g++.dg/wrappers/pr88680.C: New test. From-SVN: r268961
2019-02-16re PR fortran/71066 (ICE in set_loop_bounds, at fortran/trans-array.c:4680)Thomas Koenig4-0/+51
2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/71066 * trans-decl.c (generate_coarray_sym_init): For an array constructor in a DATA statement of a coarray variable, set the rank to 1 to avoid confusion later on. If the constructor contains only one value, use that for initiailizig. 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/71066 * gfortran.dg/coarray_data_1.f90: New test. From-SVN: r268960
2019-02-16patchable_function_entry-decl.c: Add -fno-pie on SPARC.Eric Botcazou4-0/+9
* c-c++-common/patchable_function_entry-decl.c: Add -fno-pie on SPARC. * c-c++-common/patchable_function_entry-default.c: Likewise. * c-c++-common/patchable_function_entry-definition.c: Likewise. From-SVN: r268958
2019-02-16re PR rtl-optimization/66152 (suboptimal load bytes to stack)Jakub Jelinek6-28/+93
PR rtl-optimization/66152 * builtins.h (c_readstr): Declare. * builtins.c (c_readstr): Remove forward declaration. Add null_terminated_p argument, if false, read all bytes from the string instead of stopping after '\0'. * expr.c (string_cst_read_str): New function. (store_expr): Use string_cst_read_str instead of builtin_strncpy_read_str. Try to store by pieces the whole exp_len first, and only if that fails, split it up into store by pieces followed by clear_storage. Formatting fix. * gcc.target/i386/pr66152.c: New test. From-SVN: r268957
2019-02-16i386.md (*movqi_internal): Remove static from buf variable.Jakub Jelinek3-24/+45
* config/i386/i386.md (*movqi_internal): Remove static from buf variable. Use output_asm_insn (buf, operands); return ""; instead of return buf;. * config/i386/sse.md (<sse>_andnot<mode>3<mask_name>, *<code><mode>3<mask_name>, *andnot<mode>3, *andnottf3, *<code><mode>3, *<code>tf3, <mask_codefor><code><mode>3<mask_name>): Likewise. From-SVN: r268956
2019-02-16Daily bump.GCC Administrator1-1/+1
From-SVN: r268955
2019-02-15compiler,runtime: use __builtin_dwarf_cfa for getcallerspCherry Zhang7-21/+34
Currently, the compiler lowers runtime.getcallersp to __builtin_frame_address(1). In the C side of the runtime, getcallersp is defined as __builtin_frame_address(0). They don't match. Further, neither of them actually returns the caller's SP. On AMD64, __builtin_frame_address(0) just returns the frame pointer. __builtin_frame_address(1) returns the memory content where the frame pointer points to, which is typically the caller's frame pointer but can also be garbage if the frame pointer is not enabled. This CL changes it to use __builtin_dwarf_cfa(), which returns the caller's SP at the call site. This matches the SP we get from unwinding the stack. Currently getcallersp is not used for anything real. It will be used for precise stack scan (a new version of CL 159098). Reviewed-on: https://go-review.googlesource.com/c/162905 * go-gcc.cc (Gcc_backend::Gcc_backend): Define __builtin_dwarf_cfa instead of __builtin_frame_address. From-SVN: r268952
2019-02-15asan_oob_test.cc: Skip OOB_int on SPARC.Eric Botcazou3-1/+23
* g++.dg/asan/asan_oob_test.cc: Skip OOB_int on SPARC. * g++.dg/asan/function-argument-3.C: Tweak for 32-bit SPARC. From-SVN: r268951
2019-02-15linux.h (ASAN_CC1_SPEC): Define.Eric Botcazou4-14/+24
* config/sparc/linux.h (ASAN_CC1_SPEC): Define. (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC and ASAN_CC1_SPEC. * config/sparc/linux64.h (ASAN_CC1_SPEC): Likewise. (CC1_SPEC): Likewise. * config/sparc/sparc.c (sparc_asan_shadow_offset): Adjust for 64-bit. From-SVN: r268950
2019-02-15asan.c (asan_emit_stack_protection): Use full-sized mask to align the base ↵Eric Botcazou2-7/+13
address on 64-bit strict-alignment platforms. * asan.c (asan_emit_stack_protection): Use full-sized mask to align the base address on 64-bit strict-alignment platforms. From-SVN: r268949
2019-02-15re PR go/89368 (ICE in go/gofrontend/expressions.cc:4669 after r268923)Ian Lance Taylor2-2/+3
PR go/89368 compiler: write barrier check nil-check policy tweak Tweak the recipe for generating writeBarrier loads to insure that the dereference expr is marked as not requiring a nil check (not needed for gccgo, but needed for gollvm). Fixes https://gcc.gnu.org/PR89368 Reviewed-on: https://go-review.googlesource.com/c/162904 From-SVN: r268948
2019-02-15i386: Fix ')' in VALID_MMX_REG_MODEH.J. Lu2-1/+6
Replace "(MODE == V1DImode)" with "(MODE) == V1DImode". * config/i386/i386.h (VALID_MMX_REG_MODE): Correct the misplaced ')'. From-SVN: r268947
2019-02-15darwin.h (TARGET_FPMATH_DEFAULT_P): New define.Uros Bizjak2-63/+69
* config/i386/darwin.h (TARGET_FPMATH_DEFAULT_P): New define. From-SVN: r268944
2019-02-15Arm: Remove alternative from neon_softfp_fp16 directive.Tamar Christina2-1/+6
There's a bit of a disconnect between the feature flags that don't test the fpu and ones that do when the test itself also forces an architecture. The forcing of the architecture would change the defaults and without explicitly giving the correct fpu again the test would fail. I don't see a good way to solve this problem, really the feature tests should ideally contain the extra options the test adds too, but for this specific case it can be solved by always testing the fpu explicitly. Committed under the GCC obvious gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_arm_neon_softfp_fp16_ok_nocache): Drop non-fpu checking alternative. From-SVN: r268943
2019-02-15re PR rtl-optimization/88308 (ICE in maybe_record_trace_start, at ↵Aaron Sawdey2-1/+12
dwarf2cfi.c:2309) 2019-02-15 Aaron Sawdey <acsawdey@linux.ibm.com> PR rtl-optimization/88308 * shrink-wrap.c (move_insn_for_shrink_wrap): Fix LABEL_NUSES counts on copied instruction. From-SVN: r268942
2019-02-15re PR go/89123 (Too many go test failures on s390x-linux)Ian Lance Taylor1-1/+1
PR go/89123 internal/cpu, runtime: add S/390 CPU capability support Patch by Robin Dapp. Updates https://gcc.gnu.org/PR89123 Reviewed-on: https://go-review.googlesource.com/c/162887 From-SVN: r268941
2019-02-15runtime: include <syscall.h> and <sys/syscall.h> if availableIan Lance Taylor1-1/+1
Fixes Solaris build. Reviewed-on: https://go-review.googlesource.com/c/162885 From-SVN: r268940