aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-01-27Replace -mfunction-return== with -mfunction-return=H.J. Lu2-1/+6
Fix a typo in doc/invoke.texi. * doc/invoke.texi: Replace -mfunction-return==@var{choice} with -mfunction-return=@var{choice}. From-SVN: r257124
2018-01-27re PR fortran/84065 (string_1.f90 fails since r256944)Jakub Jelinek2-15/+31
PR fortran/84065 * decl.c (add_init_expr_to_sym): Ignore initializers for too large lengths. From-SVN: r257121
2018-01-27re PR middle-end/84034 (incomplete warning message with dos line endings)Bernd Edlinger2-4/+15
2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de> PR diagnostic/84034 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace): Handle CR like TAB. (layout::print_source_line): Likewise. (test_get_line_width_without_trailing_whitespace): Add test cases. From-SVN: r257120
2018-01-27re PR middle-end/84040 (compilation time of ↵Jakub Jelinek2-1/+13
gcc.c-torture/compile/limits-blockid.c is 50x slower) PR middle-end/84040 * sched-deps.c (sched_macro_fuse_insns): Return immediately for debug insns. From-SVN: r257119
2018-01-27c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix argument.Jakub Jelinek4-10/+31
* c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix argument. (LAZY_HEX_FP_VALUES_CNT): Define. (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp values rather than just 12. (builtin_define_with_hex_fp_value): Likewise. * include/cpplib.h (enum cpp_builtin_type): Change BT_LAST_USER from BT_FIRST_USER + 31 to BT_FIRST_USER + 63. From-SVN: r257118
2018-01-27Daily bump.GCC Administrator1-1/+1
From-SVN: r257117
2018-01-26RISC-V: Allow register pairs for 64-bit target.Jim Wilson2-0/+6
gcc/ * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New. From-SVN: r257114
2018-01-26compiler: show readable names in escape analysis messagesIan Lance Taylor4-5/+5
Call message_name when printing a variable for an escape analysis message. This implies changing the AST dumps, which is fine. Reviewed-on: https://go-review.googlesource.com/90296 From-SVN: r257113
2018-01-26Regenerate .pot files.Joseph Myers4-12106/+13669
gcc/po: * gcc.pot: Regenerate. libcpp/po: * cpplib.pot: Regenerate. From-SVN: r257111
2018-01-26RISC-V: Add --specs=nosys.specs support.Jim Wilson2-1/+6
gcc/ * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs specified. From-SVN: r257109
2018-01-26rs6000: Fix safe-indirect-jump-[18].cSegher Boessenkool3-20/+17
This patch merges the safe-indirect-jump-1.c and -8.c testcases, since they do the same thing. On the 64-bit and AIX ABIs the indirect call is not a sibcall, since there is code generated after the call (the restore of r2). On the 32-bit non-AIX ABIs it is a sibcall. * gcc.target/powerpc/safe-indirect-jump-1.c: Build on all targets. Make expected output depend on whether we expect sibcalls or not. * gcc.target/powerpc/safe-indirect-jump-8.c: Delete (merged into safe-indirect-jump-1.c). From-SVN: r257108
2018-01-26PR c++/83956 - wrong dtor error with anonymous unionJason Merrill3-1/+27
* method.c (walk_field_subobs): Variant members only affect deletedness. (maybe_explain_implicit_delete): Pass &deleted_p for diagnostic. From-SVN: r257107
2018-01-26Partial Failed Images patchDamian Rouson28-78/+756
Co-Authored-By: Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> Co-Authored-By: Soren Rasmussen <s.c.rasmussen@gmail.com> From-SVN: r257105
2018-01-26re PR fortran/83998 (ICE in gfc_conv_intrinsic_dot_product, at ↵Steven G. Kargl4-15/+42
fortran/trans-intrinsic.c:4403) 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/83998 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0 or .false. The summation does the correct type conversion. (gfc_simplify_dot_product): Special case zero-sized arrays. 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/83998 * gfortran.dg/dot_product_4.f90 From-SVN: r257104
2018-01-26[AArch64] Fix gcc.target/aarch64/subs_compare_[12].cKyrylo Tkachov2-0/+45
This patch fixes the testsuite failures gcc.target/aarch64/subs_compare_1.c and subs_compare_2.c The tests check that we combine a sequence like: sub w2, w0, w1 cmp w0, w1 into subs w2, w0, w1 This is done by a couple of peepholes in aarch64.md. Unfortunately due to scheduling and other optimisations the SUB and CMP can come in a different order: cmp w0, w1 sub w0, w0, w1 And the existing peepholes cannot catch that and we fail to combine the two. This patch adds a peephole that matches the CMP as the first insn and the SUB as the second and outputs a SUBS. This is almost equivalent to the existing peephole that matches SUB first and CMP second except that it doesn't have the restriction that the output register of the SUB has to not be one of the input registers. Remember "sub w0, w0, w1 ; cmp w0, w1" is *not* equivalent to: "subs w0, w0, w1" but "cmp w0, w1 ; sub w0, w0, w1" is. So this is what this patch does. It adds a peephole for the case above and one for the SUB-immediate variant (because the SUB-immediate is represented as PLUS-of-negated-immediate and thus has different RTL structure). Bootstrapped and tested on aarch64-none-linux-gnu. * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS and CMP + SUB-immediate -> SUBS. From-SVN: r257102
2018-01-26PR c++/84036 - ICE with variadic capture.Jason Merrill3-0/+24
PR c++/82249 * pt.c (tsubst_pack_expansion): When optimizing a simple substitution, pull a single pack expansion out of its pack. From-SVN: r257101
2018-01-26PR tree-optimization/83896 - ice in get_string_len on a call to strlen withMartin Sebor4-13/+43
PR tree-optimization/83896 - ice in get_string_len on a call to strlen with non-constant length gcc/ChangeLog: PR tree-optimization/83896 * tree-ssa-strlen.c (get_string_len): Rename... (get_string_cst_length): ...to this. Return HOST_WIDE_INT. Avoid assuming length is constant. (handle_char_store): Use HOST_WIDE_INT for string length. gcc/testsuite/ChangeLog: PR tree-optimization/83896 * gcc.dg/strlenopt-43.c: New test. From-SVN: r257100
2018-01-26* ChangeLog: Fix whitespace.Uros Bizjak1-32/+32
From-SVN: r257098
2018-01-26fold-vec-abs-int.c: Remove scan-assembler stanzas.Will Schmidt15-12/+217
[testsuite] 2018-01-26 Will Schmidt <will_schmidt@vnet.ibm.com> * gcc.target/powerpc/fold-vec-abs-int.c: Remove scan-assembler stanzas. * gcc.target/powerpc/fold-vec-abs-int-fwrap.c: Same. * gcc.target/powerpc/fold-vec-abs-int.p7.c: New. * gcc.target/powerpc/fold-vec-abs-int.p8.c: New. * gcc.target/powerpc/fold-vec-abs-int.p9.c: New. * gcc.target/powerpc/fold-vec-abs-int-fwrapv.p7.c: New. * gcc.target/powerpc/fold-vec-abs-int-fwrapv.p8.c: New. * gcc.target/powerpc/fold-vec-abs-int-fwrapv.p9.c: New. * gcc.target/powerpc/fold-vec-abs-longlong.c: Remove scan-assembler stanzas. * gcc.target/powerpc/fold-vec-abs-longlong-fwrap.c: Same. * gcc.target/powerpc/fold-vec-abs-longlong.p7.c: New. * gcc.target/powerpc/fold-vec-abs-longlong.p8.c: New. * gcc.target/powerpc/fold-vec-abs-longlong.p9.c: New. * gcc.target/powerpc/fold-vec-abs-longlong-fwrapv.p7.c: New. * gcc.target/powerpc/fold-vec-abs-longlong-fwrapv.p8.c: New. * gcc.target/powerpc/fold-vec-abs-longlong-fwrapv.p9.c: New. * gcc.target/powerpc/fold-vec-abs-short.c: Add xxspltib to valid instruction list. * gcc.target/powerpc/fold-vec-abs-short-fwrapv.c: Same. From-SVN: r257097
2018-01-26re PR target/81763 (Issues with BMI on 32bit x86 apps on GCC 7.1+)Uros Bizjak2-4/+10
PR target/81763 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives. From-SVN: r257096
2018-01-26fold-vec-cmp-int.c: Delete.Will Schmidt11-21/+124
[testsuite] 2018-01-24 Will Schmidt <will_schmidt@vnet.ibm.com> * gcc.target/powerpc/fold-vec-cmp-int.c: Delete. * gcc.target/powerpc/fold-vec-cmp-int.h: New. * gcc.target/powerpc/fold-vec-cmp-int.p7.c: New. * gcc.target/powerpc/fold-vec-cmp-int.p8.c: New. * gcc.target/powerpc/fold-vec-cmp-int.p9.c: New. * gcc.target/powerpc/fold-vec-cmp-short.c: Delete. * gcc.target/powerpc/fold-vec-cmp-short.h: New. * gcc.target/powerpc/fold-vec-cmp-short.p8.c: New. * gcc.target/powerpc/fold-vec-cmp-short.p9.c: New. * gcc.target/powerpc/fold-vec-cmp-char.c: Delete. * gcc.target/powerpc/fold-vec-cmp-char.h: New. * gcc.target/powerpc/fold-vec-cmp-char.p8.c: New. * gcc.target/powerpc/fold-vec-cmp-char.p9.c: New. From-SVN: r257095
2018-01-26Fix ifunc detection.Martin Liska2-1/+6
2018-01-26 Martin Liska <mliska@suse.cz> * lib/target-supports.exp: Return a value, otherwise -Wreturn-type warning is seen. From-SVN: r257094
2018-01-26PR c++/82514 - ICE with local class in generic lambda.Jason Merrill4-23/+50
* pt.c (regenerated_lambda_fn_p): Remove. (enclosing_instantiation_of): Don't use it. (tsubst_function_decl): Call enclosing_instantiation_of. * pt.c (lookup_template_class_1): Add sanity check. * name-lookup.c (do_pushtag): Don't add closures to local_classes. From-SVN: r257093
2018-01-26powerpcfold-vec-neg-longlong.h: New.Will Schmidt8-10/+102
[testsuite] 2018-01-23 Will Schmidt <will_schmidt@vnet.ibm.com> * gcc.target/powerpcfold-vec-neg-longlong.h: New. * gcc.target/powerpc/fold-vec-neg-longlong.p8.c: New. * gcc.target/powerpc/fold-vec-neg-longlong.p9.c: New. * gcc.target/powerpc/fold-vec-neg-longlong.c: Delete. * gcc.target/powerpc/fold-vec-neg-int.c: Remove scan-assembler stanzas. * gcc.target/powerpc/fold-vec-neg-int.p7.c: New. * gcc.target/powerpc/fold-vec-neg-int.p8.c: New. * gcc.target/powerpc/fold-vec-neg-int.p9.c: New. From-SVN: r257092
2018-01-26re PR rtl-optimization/84003 (FAIL: g++.dg/torture/pr77745.C with noinline foo)Richard Biener5-2/+29
2018-01-26 Richard Biener <rguenther@suse.de> PR rtl-optimization/84003 * dse.c (record_store): Only record redundant stores when the earlier store aliases at least all accesses the later one does. * g++.dg/torture/pr77745.C: Mark foo noinline to trigger latent bug in DSE if NOINLINE is appropriately defined. * g++.dg/torture/pr77745-2.C: New testcase including pr77745.C and defining NOINLINE. From-SVN: r257091
2018-01-26[arm] XFAIL advsimd-intrinsics/vld1x2.cKyrylo Tkachov2-3/+16
This recently added test fails on arm. We haven't implemented these intrinsics for arm (any volunteers?) so for now let's XFAIL these on that target. Also, the float64 versions of these intrinsics are not supposed to be available on arm so this patch slightly adjusts the test to not include them for aarch32. In any case the entire test is XFAILed on arm, so this doesn't have any noticeable effect. The same number of tests (PASS) still occur on aarch64 but now they appear as XFAIL rather than FAIL on arm. * gcc.target/aarch64/advsimd-intrinsics/vld1x2.c: Make float64 tests specific to aarch64. XFAIL test on arm. From-SVN: r257090
2018-01-26re PR rtl-optimization/83985 (Compile time hog for 32-bit BE powerpc targets)Jakub Jelinek4-9/+40
PR rtl-optimization/83985 * dce.c (deletable_insn_p): Return false for separate shrink wrapping REG_CFA_RESTORE insns. (delete_unmarked_insns): Don't ignore separate shrink wrapping REG_CFA_RESTORE insns here. * gcc.dg/pr83985.c: New test. From-SVN: r257087
2018-01-26re PR c/83989 (-Wrestrict false positive with malloc-style functions)Jakub Jelinek4-3/+59
PR c/83989 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR. * c-c++-common/Wrestrict-3.c: New test. From-SVN: r257086
2018-01-26[ARC] Add ARCv2 core3 tune option.Claudiu Zissulescu6-30/+58
ARCv2 Core3 cpus are comming with dbnz support. Add this feature on the tune option. gcc/ 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3. * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... . (arc_init): Likewise. (arc_override_options): Likewise. (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune value. (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn support. * config/arc/arc.h (TARGET_DBNZ): Define. * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to properly set the tune attribute. (dbnz): Use TARGET_DBNZ guard. * config/arc/arc.opt (mtune): Add core3 option. From-SVN: r257085
2018-01-26[ARC] Rework delegitimate_address hookClaudiu Zissulescu4-52/+72
Delegitimize address is used to undo the obfuscating effect of PIC addresses, returning the address in a way which is understood by the compiler. The old version of the hook was outdated, not beeing able to recognize the current addresses generated by the ARC backend. gcc/ 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.c (arc_delegitimize_address_0): Refactored to recognize new pic like addresses. (arc_delegitimize_address): Clean up. testsuite/ 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gcc.target/arc/tdelegitimize_addr.c: New test. From-SVN: r257084
2018-01-26[ARC] Add support for reduced register file setClaudiu Zissulescu16-20/+108
gcc/ 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc-arches.def: Option mrf16 valid for all architectures. * config/arc/arc-c.def (__ARC_RF16__): New predefined macro. * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on. * config/arc/arc-options.def (FL_RF16): Add mrf16 option. * config/arc/arc-tables.opt: Regenerate. * config/arc/arc.c (arc_conditional_register_usage): Handle reduced register file case. (arc_file_start): Set must have build attributes. * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using mrf16 option value. * config/arc/arc.opt (mrf16): Add new option. * config/arc/elf.h (ATTRIBUTE_PCS): Define. * config/arc/genmultilib.awk: Handle new mrf16 option. * config/arc/linux.h (ATTRIBUTE_PCS): Define. * config/arc/t-multilib: Regenerate. * doc/invoke.texi (ARC Options): Document mrf16 option. libgcc/ 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/lib1funcs.S (__udivmodsi4): Use safe version for RF16 option. (__divsi3): Use RF16 safe registers. (__modsi3): Likewise. From-SVN: r257083
2018-01-26[ARC] Add SJLI support.Claudiu Zissulescu6-55/+167
gcc/ 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc-protos.h: Add arc_is_secure_call_p proto. * config/arc/arc.c (arc_handle_secure_attribute): New function. (arc_attribute_table): Add 'secure_call' attribute. (arc_print_operand): Print secure call operand. (arc_function_ok_for_sibcall): Don't optimize tail calls when secure. (arc_is_secure_call_p): New function. * config/arc/arc.md (call_i): Add support for sjli instruction. (call_value_i): Likewise. * config/arc/constraints.md (Csc): New constraint. From-SVN: r257082
2018-01-26[ARC] Add JLI support.Claudiu Zissulescu15-81/+430
The ARCv2 ISA provides the JLI instruction, which is two-byte instructions that can be used to reduce code size in an application. To make use of it, we provide two new function attributes 'jli_always' and 'jli_fixed' which will force the compiler to call the indicated function using a jli_s instruction. The compiler also generates the entries in the JLI table for the case when we use 'jli_always' attribute. In the case of 'jli_fixed' the compiler assumes a fixed position of the function into JLI table. Thus, the user needs to provide an assembly file with the JLI table for the final link. This is usefully when we want to have a table in ROM and a second table in the RAM memory. The jli instruction usage can be also forced without the need to annotate the source code via '-mjli-always' command. gcc/ 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * config/arc/arc-protos.h: Add arc_is_jli_call_p proto. * config/arc/arc.c (_arc_jli_section): New struct. (arc_jli_section): New type. (rc_jli_sections): New static variable. (arc_handle_jli_attribute): New function. (arc_attribute_table): Add jli_always and jli_fixed attribute. (arc_file_end): New function. (TARGET_ASM_FILE_END): Define. (arc_print_operand): Reuse 'S' letter for JLI output instruction. (arc_add_jli_section): New function. (jli_call_scan): Likewise. (arc_reorg): Call jli_call_scan. (arc_output_addsi): Remove 'S' from printing asm operand. (arc_is_jli_call_p): New function. * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm operand. (movhi_insn): Likewise. (movsi_insn): Likewise. (movsi_set_cc_insn): Likewise. (loadqi_update): Likewise. (load_zeroextendqisi_update): Likewise. (load_signextendqisi_update): Likewise. (loadhi_update): Likewise. (load_zeroextendhisi_update): Likewise. (load_signextendhisi_update): Likewise. (loadsi_update): Likewise. (loadsf_update): Likewise. (movsicc_insn): Likewise. (bset_insn): Likewise. (bxor_insn): Likewise. (bclr_insn): Likewise. (bmsk_insn): Likewise. (bicsi3_insn): Likewise. (cmpsi_cc_c_insn): Likewise. (movsi_ne): Likewise. (movsi_cond_exec): Likewise. (clrsbsi2): Likewise. (norm_f): Likewise. (normw): Likewise. (swap): Likewise. (divaw): Likewise. (flag): Likewise. (sr): Likewise. (kflag): Likewise. (ffs): Likewise. (ffs_f): Likewise. (fls): Likewise. (call_i): Remove 'S' asm letter, add jli instruction. (call_value_i): Likewise. * config/arc/arc.op (mjli-always): New option. * config/arc/constraints.md (Cji): New constraint. * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm operand. (subsf3_fpx): Likewise. (mulsf3_fpx): Likewise. * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing asm operand. * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed' function attrbutes. * doc/invoke.texi (ARC): Document mjli-always option. gcc/testsuite 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com> * gcc.target/arc/jli-1.c: New file. * gcc.target/arc/jli-2.c: Likewise. Co-Authored-By: John Eric Martin <John.Martin@emmicro-us.com> From-SVN: r257081
2018-01-26Corrected date in changelogSebastian Perta1-1/+1
From-SVN: r257080
2018-01-26rl78.c: if operand 2 is const avoid addition with 0 and use incw and decw ↵Sebastian Perta3-2/+62
where possible 2018-01-25 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/rl78.c: if operand 2 is const avoid addition with 0 and use incw and decw where possible * testsuite/gcc.target/rl78/test_addsi3_internal.c: new file From-SVN: r257079
2018-01-26Fix gcc.target/aarch64/sve/peel_ind_1.c for -mcmodel=tinySzabolcs Nagy4-3/+9
gcc/testsuite/ChangeLog: 2018-01-26 Szabolcs Nagy <szabolcs.nagy@arm.com> * gcc.target/aarch64/sve/peel_ind_1.c: Match (adrp|adr) in scan-assembler. * gcc.target/aarch64/sve/peel_ind_2.c: Likewise. * gcc.target/aarch64/sve/peel_ind_3.c: Likewise. From-SVN: r257078
2018-01-26re PR tree-optimization/81082 (Failure to vectorise after reassociating ↵Richard Biener6-5/+67
index computation) 2018-01-26 Richard Biener <rguenther@suse.de> PR tree-optimization/81082 * fold-const.c (fold_plusminus_mult_expr): Do not perform the association if it requires casting to unsigned. * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived from fold_plusminus_mult_expr to catch important cases late when range info is available. * gcc.dg/vect/pr81082.c: New testcase. * gcc.dg/tree-ssa/loop-15.c: XFAIL the (int)((unsigned)n + -1U) * n + n simplification to n * n. From-SVN: r257077
2018-01-26Configure USE_HIDDEN_LINKONCE on Solaris/x86Rainer Orth8-8/+75
gcc/testsuite: * gcc.target/i386/mcount_pic.c: Only xfail get_pc_thunk scan on Solaris 10. * gcc.target/i386/pr63620.c: Likewise. gcc: * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove. * configure.ac (hidden_linkonce): New test. * configure: Regenerate. * config.in: Regenerate. From-SVN: r257076
2018-01-26Fix various x86 avx512{bitalg, vpopcntdq, vbmi2} issues (PR target/83488)Julia Koval10-28/+44
gcc/ * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask, _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask, _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask, _mm_mask_bitshuffle_epi64_mask): Fix type. * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI, USI_FTYPE_V4DI_V4DI_USI): Remove. * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask, __builtin_ia32_vpshufbitqmb256_mask, __builtin_ia32_vpshufbitqmb128_mask): Fix types. * config/i386/i386.c (ix86_expand_args_builtin): Remove old types. * config/i386/sse.md (VI1_AVX512VLBW): Change types. gcc/testsuite/ * gcc.target/i386/avx512bitalg-vpshufbitqmb-1.c: Add -mavx512f -mavx512bw. * gcc.target/i386/avx512bitalgvl-vpshufbitqmb-1.c: Add -mavx512bw. * gcc.target/i386/i386.exp: Fix types. From-SVN: r257075
2018-01-26Daily bump.GCC Administrator1-1/+1
From-SVN: r257073
2018-01-26PR84033, powerpc64le -moptimize-swaps bad code with vec_vbpermqAlan Modra4-6/+52
vbpermq produces its output in bits 48..63 of the target vector reg, so the output cannot be lane swapped. gcc/ PR target/84033 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude UNSPEC_VBPERMQ. Sort other unspecs. gcc/testsuite/ PR target/84033 * gcc.target/powerpc/swaps-p8-46.c: New. From-SVN: r257070
2018-01-25compiler: look through aliases when looking for methodsIan Lance Taylor3-22/+49
Add a Type::is_alias method to remove some existing loops and avoid adding a new one. Test case is https://golang.org/cl/89935. Fixes golang/go#23489 Reviewed-on: https://go-review.googlesource.com/89975 From-SVN: r257069
2018-01-25compiler: deref receiver types in mangled namesIan Lance Taylor5-20/+24
This was the original intent, as reflected in the long comment at the start of names.cc, but I forgot to implement it. Also, remove a leading ".0" from the final name. That could occur for a method whose receiver type starts with 'u', as in that case we prepend a space to the mangled name, to avoid confusion with the Unicode mangling, and the space turns into ".0". Also, if the Unicode encoding would cause the final to start with "..u" or "..U", add a leading underscore. Patch gotest to not get fooled by some names. The result of these changes is that all symbols start with a letter or an underscore. Reviewed-on: https://go-review.googlesource.com/90015 From-SVN: r257068
2018-01-25jit: remove some unused fields from recording::union_ (PR jit/81672)David Malcolm2-4/+6
gcc::jit::recording::union_ has some stray fields, which are duplicates of those in the compound_type base class. It looks like these have been present since the initial merger of the jit branch to trunk (r217374), where it had three duplicate fields: location *m_loc; string *m_name; fields *m_fields; I removed the duplicate field "m_fields" in r219564 but missed the other two. This patch removes them. gcc/jit/ChangeLog: PR jit/81672 * jit-recording.h (gcc::jit::recording::union_): Remove fields "m_loc" and "m_name". From-SVN: r257066
2018-01-25re PR fortran/37577 ([meta-bug] change internal array descriptor format for ↵Paul Thomas22-110/+272
better syntax, C interop TR, rank 15) 2018-25-01 Paul Thomas <pault@gcc.gnu.org> PR fortran/37577 * array.c (gfc_match_array_ref): If standard earlier than F2008 it is an error if the reference dimension is greater than 7. libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the dtype masks and shifts accordingly. * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype type node to check the field. (gfc_conv_descriptor_dtype): Access the rank field of dtype. (duplicate_allocatable_coarray): Access the rank field of the dtype descriptor rather than the dtype itself. * trans-expr.c (get_scalar_to_descriptor_type): Store the type of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE (ie. a character). (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to get_scalar_to_descriptor_type if the actual expression is a constant. (gfc_trans_structure_assign): Assign the rank directly to the dtype rank field. * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result to default integer kind. (gfc_conv_intrinsic_sizeof): Obtain the element size from the 'elem_len' field of the dtype. * trans-io.c (gfc_build_io_library_fndecls): Replace gfc_int4_type_node with dtype_type_node where necessary. (transfer_namelist_element): Use gfc_get_dtype_rank_type for scalars. * trans-types.c : Provide 'get_dtype_type_node' to acces the dtype_type_node and, if necessary, build it. The maximum size of an array element is now determined by the maximum value of size_t. Update the description of the array descriptor, including the type def for the dtype_type. (gfc_get_dtype_rank_type): Build a constructor for the dtype. Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS. (gfc_get_array_descriptor_base): Change the type of the dtype field to dtype_type_node. (gfc_get_array_descr_info): Get the offset to the rank field of the dtype. * trans-types.h : Add a prototype for 'get_dtype_type_node ()'. * trans.h : Define the indices of the dtype fields. 2018-25-01 Paul Thomas <pault@gcc.gnu.org> PR fortran/37577 * gfortran.dg/coarray_18.f90: Allow dimension 15 for F2008. * gfortran.dg/coarray_lib_this_image_2.f90: Change 'array1' to 'array01' in the tree dump comparison. * gfortran.dg/coarray_lib_token_4.f90: Likewise. * gfortran.dg/inline_sum_1.f90: Similar - allow two digits. * gfortran.dg/rank_1.f90: Allow dimension 15 for F2008. 2018-25-01 Paul Thomas <pault@gcc.gnu.org> PR fortran/37577 * caf/single.c (_gfortran_caf_failed_images): Access the 'type' and 'elem_len' fields of the dtype instead of the shifts. (_gfortran_caf_stopped_images): Likewise. * intrinsics/associated.c (associated): Compare the 'type' and 'elem_len' fields instead of the dtype. * caf/date_and_time.c : Access the dtype fields rather using shifts and masks. * io/transfer.c (transfer_array ): Comment on item count. (set_nml_var,st_set_nml_var): Change dtype type and use fields. (st_set_nml_dtio_var): Likewise. * libgfortran.h : Change definition of GFC_ARRAY_DESCRIPTOR and add a typedef for the dtype_type. Change the GFC_DTYPE_* macros to access the dtype fields. From-SVN: r257065
2018-01-25Change -march to -mcpu.David Edelsohn1-1/+1
From-SVN: r257064
2018-01-25* doc/invoke.texi (PowerPC Options): Document 'native' cpu type.David Edelsohn2-1/+11
From-SVN: r257063
2018-01-25elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the desired CRC ↵Ian Lance Taylor2-7/+20
is zero. * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the desired CRC is zero. (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo. From-SVN: r257062
2018-01-25runtime: fix lfstackUnpack on ia64Ian Lance Taylor2-2/+2
The top three region number bits must be masked out before right-shifting the address bits into place, otherwise they will be copied down into the lower always-zero address bits. Reviewed-on: https://go-review.googlesource.com/84535 From-SVN: r257061
2018-01-25re PR tree-optimization/83055 (ICE in operator>, at profile-count.h:834)Jan Hubicka4-13/+35
PR middle-end/83055 * predict.c (drop_profile): Do not push/pop cfun; update also node->count. (handle_missing_profiles): Fix logic looking for zero profiles. * gcc.dg/torture/pr83055.c: New testcase. From-SVN: r257059