aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2015-10-04Fix fortran common-related error recovery ICE.Mikael Morin5-7/+37
Upon reverting a symbol in a common block (after throwing an error), the compiler was ICEing because the symbol's common_block field was set, but the symbol was not in the common block's list of symbols. Fixed by both adding the symbol to the common block list and setting the symbol's common_block field at the same time. Furthermore, the gfc_add_in_common call is delayed and its result is ignored, so that its error messages are ignored and the compiler has the opportunity to give a better error message. Another gfc_add_in_common call is added later during resolution to emit again the missing errors. PR fortran/67758 gcc/fortran/ * match.c (gfc_match_common): Delay the common_block pointer assignment after error checking. Delay the call to gfc_add_in_common attribute after the handling of array specs. * resolve.c (resolve_common_vars): Call gfc_add_in_common again. gcc/testsuite/ * gfortran.dg/common_24.f: New. From-SVN: r228457
2015-10-04Factor access to the common block head symbolMikael Morin2-4/+10
* resolve.c (resolve_common_vars): Move access to the common block's head symbol inside the function. (resolve_common_blocks, resolve_types): Update callers. From-SVN: r228456
2015-10-04Daily bump.GCC Administrator1-1/+1
From-SVN: r228454
2015-10-03Makefile.in (insn-latencytab.o): Remove -Wno-duplicated-cond.Marek Polacek2-2/+5
* Makefile.in (insn-latencytab.o): Remove -Wno-duplicated-cond. (insn-dfatab.o): Likewise. From-SVN: r228451
2015-10-03xtensa: add uclinux supportMax Filippov4-0/+112
2015-10-03 Max Filippov <jcmvbkbc@gmail.com> gcc/ * config.gcc (xtensa*-*-uclinux*): New configuration. * config/xtensa/uclinux.h: New file. * config/xtensa/uclinux.opt: New file. libgcc/ * config.host (xtensa*-*-uclinux*): New configuration. From-SVN: r228450
2015-10-03Document value of __cplusplus for C++14Jonathan Wakely2-4/+12
* doc/cpp.texi (Standard Predefined Macros): Document value of __cplusplus for C++14. From-SVN: r228448
2015-10-03pr67756.c: Fixed warnings.Bernd Edlinger2-0/+6
2015-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de> * gcc.target/arm/pr67756.c: Fixed warnings. From-SVN: r228445
2015-10-03Daily bump.GCC Administrator1-1/+1
From-SVN: r228442
2015-10-02Help the offload gcc driver find the right assemblerBernd Schmidt2-1/+6
gcc/ * gcc.c (process_command): Use spec_machine rather than spec_host_machine to build tooldir_prefix2. From-SVN: r228429
2015-10-02nvptx offloading linkingThomas Schwinge2-632/+60
gcc/ * config/nvptx/mkoffload.c (Kind, Vis): Remove enums. (Token, Stmt): Remove structs. (decls, vars, fns): Remove variables. (alloc_comment, append_stmt, is_keyword): Remove macros. (tokenize, write_token, write_tokens, alloc_stmt, rev_stmts) (write_stmt, write_stmts, parse_insn, parse_list_nosemi) (parse_init, parse_file): Remove functions. (read_file): Accept a pointer to a length and store into it. (process): Don't try to parse the input file, just write it out as a string, but looking for maps. Also write out the length. (main): Don't use "-S" to compile PTX code. libgomp/ * oacc-ptx.h: Remove file, moving its content into... * config/nvptx/fortran.c: ... here... * config/nvptx/oacc-init.c: ..., here... * config/nvptx/oacc-parallel.c: ..., and here. * config/nvptx/openacc.f90: New file. * plugin/plugin-nvptx.c: Don't include "oacc-ptx.h". (link_ptx): Don't link in predefined bits of PTX code. Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com> From-SVN: r228418
2015-10-02Re: [PATCH] Improve DOM's optimization of control statementsJeff Law2-0/+11
* tree-ssa-dom.c (optimize_stmt): Note when loop structures need fixups. From-SVN: r228415
2015-10-02[PR target/67822] OpenMP offloading to nvptx failsThomas Schwinge2-2/+11
gcc/ PR target/67822 * config/nvptx/mkoffload.c (main): Scan the argument vector for -fopenmp, and skip generating an offloading image if specified. From-SVN: r228414
2015-10-02system.h (ROUND_UP): New macro definition.Uros Bizjak5-32/+47
* system.h (ROUND_UP): New macro definition. (ROUND_DOWN): Ditto. * ggc-page.c (ROUND_UP): Remove local macro definition. (PAGE_ALIGN): Implement using ROUND_UP macro. * config/i386/i386.h (PUSH_ROUNDING): Implement using ROUND_UP macro. * config/i386/i386.c (function_arg_advance_64): Use ROUND_UP macro to align values. (ix86_compute_frame_layout): Ditto. (ix86_expand_prologue): Ditto. (ix86_adjust_stack_and_probe): Use ROUND_DOWN macro to round down values. (expand_set_or_movmem_via_rep): Ditto. From-SVN: r228410
2015-10-02re PR c/67730 (No warning when returning NULL in void function)Marek Polacek6-0/+87
PR c/67730 * c-typeck.c (convert_for_assignment): Use the expansion point location throughout. * gcc.dg/pr67730-1.c: New test. * gcc.dg/pr67730-2.c: New test. * gcc.dg/pr67730.h: New test. From-SVN: r228408
2015-10-02re PR c/67819 (-Wduplicated-cond should take macros into account)Marek Polacek6-2/+15
* genemit.c (gen_exp): Remove -Wduplicated-cond hack. * c.opt (Wduplicated-cond): Don't enable by -Wall anymore. * c-c++-common/Wduplicated-cond-2.c: Skip until PR67819 is resolved. From-SVN: r228405
2015-10-02reject loops early where ivs cannot be representedAditya Kumar3-59/+58
From-SVN: r228403
2015-10-02fix PR67754Sebastian Pop3-2/+10
From-SVN: r228402
2015-10-02add testcaseSebastian Pop2-0/+44
From-SVN: r228401
2015-10-02outline functions from stmt_simple_for_scop_pAditya Kumar2-30/+53
Outlined functions from stmt_simple_for_scop_p. No functional changes intended. Passes regtest and bootstrap. gcc/ChangeLog: 2015-10-01 Aditya Kumar <hiraditya@msn.com> * graphite-scop-detection.c (stmt_has_side_effects): New function outlined from stmt_simple_for_scop_p. (graphite_can_represent_stmt): Same. (stmt_simple_for_scop_p): Moved code out of this function for better readability. From-SVN: r228400
2015-10-02AVX-512.Kirill Yukhin4-0/+18
AVX-512. Add missing features to cpuinfo.c gcc/ * config/i386/i386.c (processor_features): Add F_AVX512VBMI, F_AVX512IFMA. (isa_names_table): Handle F_AVX512VBMI and F_AVX512IFMA. libgcc/ * config/i386/cpuinfo.c (processor_features): Add FEATURE_AVX512VBMI and FEATURE_AVX512VBMI. testsuite/ * gcc.target/i386/builtin_target.c: Handle "avx512ifma" and "avx512vbmi". From-SVN: r228399
2015-10-02[AArch64] Use default_elf_asm_named_section instead of special cased hookRamana Radhakrishnan2-3/+4
* config/aarch64/aarch64-elf.h (TARGET_ASM_NAMED_SECTION): Delete. From-SVN: r228397
2015-10-02re PR rtl-optimization/67756 (ICE compiling Linux Kernel fs/namei.c on ARM)Vladimir Makarov4-12/+94
2015-10-02 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/67756 * lra-constraints.c (match_reload): Add a new parameter. Use it for creating a pseudo with the same value. (curr_insn_transform): Pass a new argument to match_reload. 2015-10-02 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/67756 * gcc.target/arm/pr67756.c: New. From-SVN: r228396
2015-10-02[AArch64] Add more TLS local executable testcasesJiong Wang5-0/+45
2015-10-02 Jiong Wang <jiong.wang@arm.com> * gcc.target/aarch64/tlsle12_tiny_1.c: New testcase for tiny model. * gcc.target/aarch64/tlsle24_tiny_1.c: Likewise. * gcc.target/aarch64/tlsle_sizeadj_tiny_1.c: TLS size truncation test for tiny model. * gcc.target/aarch64/tlsle_sizeadj_small_1.c: TLS size truncation test for small model. From-SVN: r228395
2015-10-02Update extract_even_odd w/ AVX-512BW insns.Kirill Yukhin10-12/+288
gcc/ * config/i386/i386.c (expand_vec_perm_even_odd_trunc): New. (expand_vec_perm_even_odd_1): Handle V64QImode. (ix86_expand_vec_perm_const_1): Try expansion with expand_vec_perm_even_odd_trunc as well. * config/i386/sse.md (VI124_AVX512F): Rename to ... (define_mode_iterator VI124_AVX2_24_AVX512F_1_AVX512BW): This. Extend to V54QI. (define_mode_iterator VI248_AVX2_8_AVX512F): Rename to ... (define_mode_iterator VI248_AVX2_8_AVX512F_24_AVX512BW): This. Extend to V32HI and V16SI. (define_insn "avx512bw_<code>v32hiv32qi2"): Unhide pattern name. (define_expand "vec_pack_trunc_<mode>"): Update iterator name. (define_expand "vec_unpacks_lo_<mode>"): Ditto. (define_expand "vec_unpacks_hi_<mode>"): Ditto. (define_expand "vec_unpacku_lo_<mode>"): Ditto. (define_expand "vec_unpacku_hi_<mode>"): Ditto. gcc/testsuite/ * gcc.target/i386/vect-pack-trunc-1.c: New test. * gcc.target/i386/vect-pack-trunc-2.c: Ditto. * gcc.target/i386/vect-perm-even-1.c: Ditto. * gcc.target/i386/vect-perm-odd-1.c: Ditto. * gcc.target/i386/vect-unpack-1.c: Ditto. * gcc.target/i386/vect-unpack-2.c: Ditto. From-SVN: r228394
2015-10-02invoke.texi: Mention -mavx512vl, -mavx512bw, -mavx512dq, -mavx521vbmi, ↵Kirill Yukhin2-4/+40
-mavx512ifma. gcc/ * doc/invoke.texi: Mention -mavx512vl, -mavx512bw, -mavx512dq, -mavx521vbmi, -mavx512ifma. Add missing opindex-es. From-SVN: r228393
2015-10-02re PR c/59218 (atomic transactions: accesses to volatiles not disallowed in ↵Jason Merrill4-15/+36
transaction_safe code) PR c/59218 * trans-mem.c (volatile_lvalue_p): Rename from volatile_var_p. (diagnose_tm_1_op): Also diagnose volatile accesses in transaction_safe function. From-SVN: r228392
2015-10-02* system.h (malloc.h): Don't include obsolete header.Jonathan Wakely2-12/+4
From-SVN: r228391
2015-10-02[AArch64] Use default_elf_asm_named_section instead of special cased hookRamana Radhakrishnan2-74/+5
Hi, The hook for TARGET_ASM_NAMED_SECTION was defined separately in the backend around the time frame for GCC 4.7 under the assumption that '@' would be used as a comment character in the binutils port. This was indeed true in versions of the AArch64 port that never made it into the FSF tree. However this practice was killed before the binutils port made it upstream. Doing archaeology into various revisions including the first commit of upstream binutils, talking to Marcus about the history of this and actually testing the first commit of binutils, I can confidently say that the upstream binutils port never had any use of '@' as a comment character for AArch64 However we never got rid of the special cased handling in GCC and the duplication of code in the AArch64 backend. This was found when I was playing with Virtual Table verification on ARM and AArch64 and discovered ICEs which were similar but manifested in different places begging the obvious question. Tested on aarch64-none-elf with no regressions. Ok to apply ? Ramana 2015-10-02 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> * config/aarch64/aarch64.c (aarch64_elf_asm_named_section): Delete. (TLS_SECTION_ASM_FLAG): Delete. From-SVN: r228390
2015-10-02re PR c/64249 (Missing warning for if (A) else if (A))Marek Polacek18-29/+858
PR c/64249 * c-common.c (warn_duplicated_cond_add_or_warn): New function. * c-common.h (warn_duplicated_cond_add_or_warn): Declare. * c.opt (Wduplicated-cond): New option. * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter and pass it down to c_parser_if_statement. (c_parser_else_body): Add CHAIN parameter and pass it down to c_parser_statement_after_labels. (c_parser_if_statement): Add CHAIN parameter. Add code to warn about duplicated if-else-if conditions. * parser.c (cp_parser_statement): Add CHAIN parameter and pass it down to cp_parser_selection_statement. (cp_parser_selection_statement): Add CHAIN parameter. Add code to warn about duplicated if-else-if conditions. (cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass it down to cp_parser_statement. * doc/invoke.texi: Document -Wduplicated-cond. * Makefile.in (insn-latencytab.o): Use -Wno-duplicated-cond. (insn-dfatab.o): Likewise. * genemit.c (gen_exp): Rewrite condition to avoid -Wduplicated-cond warning. * c-c++-common/Wduplicated-cond-1.c: New test. * c-c++-common/Wduplicated-cond-2.c: New test. * c-c++-common/Wduplicated-cond-3.c: New test. * c-c++-common/Wduplicated-cond-4.c: New test. * c-c++-common/Wmisleading-indentation.c (fn_37): Avoid -Wduplicated-cond warning. From-SVN: r228388
2015-10-02[PATCH][AARCH64]Add csneg3_uxtw_insn patternRenlin Li4-0/+32
gcc/ 2015-10-02 Renlin Li <renlin.li@arm.com> * config/aarch64/aarch64.md (csneg3_uxtw_insn): New pattern. gcc/testsuite/ 2015-10-02 Renlin Li <renlin.li@arm.com> * gcc.target/aarch64/csneg-1.c: Update test. From-SVN: r228387
2015-10-02sh.md: Add new unnamed split pattern to handle movt-movt sequences.Oleg Endo2-0/+45
gcc/ * config/sh/sh.md: Add new unnamed split pattern to handle movt-movt sequences. From-SVN: r228386
2015-10-02[PATCH][AARCH64][PR66776]Add cmovdi_insn_uxtw pattern.Renlin Li4-0/+32
gcc/ 2015-10-02 Renlin Li <renlin.li@arm.com> PR target/66776 * config/aarch64/aarch64.md (cmovdi_insn_uxtw): New pattern. gcc/testsuite/ 2015-10-02 Renlin Li <renlin.li@arm.com> PR target/66776 * gcc.target/aarch64/pr66776.c: New. From-SVN: r228384
2015-10-02lang.opt (fbuiltin-printf): Accept.Doug Rupp4-7/+24
* gcc-interface/lang.opt (fbuiltin-printf): Accept. * gcc-interface/misc.c (gnat_handle_option): Ignore it. * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f* flags as -g* and -m* flags past -gnatez. Co-Authored-By: Olivier Hainque <hainque@adacore.com> From-SVN: r228381
2015-10-02trans.c (Pragma_to_gnu): Replace linear search with call to find_opt and ↵Eric Botcazou4-9/+37
issue warnings if... * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace linear search with call to find_opt and issue warnings if the -W switch is not appropriate. From-SVN: r228379
2015-10-02ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.Eric Botcazou13-6/+224
* gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag. * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by reference but whose type isn't by-ref and whose mechanism hasn't been forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on them instead of changing their type. * gcc-interface/trans.c (scan_rhs_r): New helper function. (independent_iterations_p): New predicate. (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an ivdep pragma if the iterations are independent. From-SVN: r228377
2015-10-02Delete undesirable svn:executable propertyLouis Krupp2-0/+0
From-SVN: r228376
2015-10-02[RTL ifcvt] PR 67786, 67787: Check that intermediate instructions in the ↵Kyrylo Tkachov5-1/+79
basic block don't clobber a reg used in condition PR rtl-optimization/67786 PR rtl-optimization/67787 * ifcvt.c (bb_valid_for_noce_process_p): Reject basic block if it modifies a reg used in the condition calculation. * gcc.dg/pr67786.c: New test. * gcc.dg/pr67787.c: Likewise. From-SVN: r228375
2015-10-02[Patch AArch64] Improve SIMD concatenation with zeroesJames Greenhalgh4-10/+55
gcc/ * config/aarch64/aarch64-simd.md (*aarch64_combinez<mode>): Add alternatives for reads from memory and moves from general-purpose registers. (*aarch64_combinez_be<mode>): Likewise. gcc/testsuite/ * gcc.target/aarch64/vect_combine_zeroes_1.c: New. From-SVN: r228374
2015-10-02trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.Eric Botcazou2-8/+14
* gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE. (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT. (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field. (build_stmt_group): Add blank lines. From-SVN: r228373
2015-10-02re PR target/51726 (LTO and attribute 'selectany')Kai Tietz2-1/+6
PR target/51726 * g++.dg/ext/selectany2.C: Allow uninitialized variable case. From-SVN: r228371
2015-10-02re PR target/51726 (LTO and attribute 'selectany')Kai Tietz2-23/+20
PR target/51726 * config/i386/winnt.c (ix86_handle_selectany_attribute): Handle selectany within this function without need to keep attribute. (i386_pe_encode_section_info): Remove selectany-code. From-SVN: r228370
2015-10-02tree-ssa-sccvn.c (has_VN_INFO): New function.Richard Biener2-169/+158
2015-10-02 Richard Biener <rguenther@suse.de> * tree-ssa-sccvn.c (has_VN_INFO): New function. (free_scc_vn): Use it. (visit_use): Remove dead code and refactor to use gassign and use less indentation. From-SVN: r228369
2015-10-02[multiple changes]Louis Krupp6-5/+149
2015-10-01 Louis Krupp <louis.krupp@zoho.com> PR fortran/62242 PR fortran/52332 * trans-array.c (store_backend_decl): Create new gfc_charlen instance if requested (get_array_ctor_all_strlen): Call store_backend_decl requesting new gfc_charlen (trans_array_constructor): Call store_backend_decl requesting new gfc_charlen if get_array_ctor_strlen was called (gfc_add_loop_ss_code): Don't try to convert non-constant length 2015-10-01 Louis Krupp <louis.krupp@zoho.com> PR fortran/62242 PR fortran/52332 * gfortran.dg/string_array_constructor_1.f90: New. * gfortran.dg/string_array_constructor_2.f90: New. * gfortran.dg/string_array_constructor_3.f90: New. From-SVN: r228368
2015-10-02rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)Segher Boessenkool5-2/+73
After the shrink-wrapping patches the prologue will often be pushed "deeper" into the function, which in turn means the software trace cache pass will more often want to duplicate the basic block containing the prologue. This caused failures for 32-bit SVR4 with -msecure-plt PIC. This configuration uses the load_toc_v4_PIC_1 instruction, which creates assembler labels without using the normal machinery for that. If now the compiler decides to duplicate the insn, it will emit the same label twice. Boom. It isn't so easy to fix this to use labels the compiler knows about (let alone test that properly). Instead, this patch wires up a "cannot_copy" attribute to be used by TARGET_CANNOT_COPY_P, and sets that attribute on these insns we do not want copied. 2015-10-01 Segher Boessenkool <segher@kernel.crashing.org> PR target/67788 PR target/67789 * config/rs6000/rs6000.c (TARGET_CANNOT_COPY_INSN_P): New. (rs6000_cannot_copy_insn_p): New function. * config/rs6000/rs6000.md (cannot_copy): New attribute. (load_toc_v4_PIC_1_normal): Set cannot_copy. (load_toc_v4_PIC_1_476): Ditto. gcc/testsuite/ PR target/67788 PR target/67789 * gcc.target/powerpc/pr67789.c: New testcase. From-SVN: r228366
2015-10-02PR fortran.67802Steven G. Kargl4-1/+26
2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran.67802 * decl.c (add_init_expr_to_sym): Numeric constant for character length must be an INTEGER. 2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran.67802 * gfortran.dg/pr67802.f90: New test. From-SVN: r228365
2015-10-02re PR fortran/66979 (gfortran internal compiler error with malformed FLUSH ↵Steven G. Kargl4-0/+27
statement) 2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/66979 * io.c (gfc_resolve_filepos): Check for a UNIT number. Add a nearby missing 'return false'. 2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/66979 gfortran.dg/pr66979.f90: new test. From-SVN: r228364
2015-10-02re PR fortran/67616 (ICE on data initialization of type variable in block)Steven G. Kargl4-1/+25
2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/67616 * primary.c (gfc_match_structure_constructor): Use a possibly host-associated symtree to prevent ICE. 2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/67616 * gfortran.dg/pr67616.f90: New test. From-SVN: r228363
2015-10-02Daily bump.GCC Administrator1-1/+1
From-SVN: r228362
2015-10-01use sese_l throughout scop-detectionAditya Kumar2-49/+84
Use sese_l throughout SCoP detection and create vec<scop_p> at the very end when all SCoPs have been identified. 'struct sese_l' is very lightweight (two pointers) compared to 'struct scop'. No functional change intended. Passes regtest and bootstrap. gcc/ChangeLog: 2015-10-01 Aditya Kumar <hiraditya@msn.com> * graphite-scop-detection.c (struct sese_l): New conversion constructor so that this type can be pushed into a vec. (class scop_builder): use sese_l to collect scops. (get_scops): New getter function. (remove_intersecting_scops): Use sese_l instead of scops_p. (intersects): Same. (add_scop): Same. (subsumes): Same. (remove_subscops): Same. (build_scops): Add scops to vec<scops_p> once all the scops have been detected. From-SVN: r228359
2015-10-01Rename gimple_bb to gimple_poly_bbAditya Kumar8-33/+54
Renaming gimple_bb to gimple_poly_bb because there is a function gimple_bb by the same name in gimple.h. No functional change intended. Passes regtest and bootstrap. gcc/ChangeLog: 2015-10-01 Aditya Kumar <hiraditya@msn.com> * graphite-isl-ast-to-gimple.c (class translate_isl_ast_to_gimple): Renamed type from gimple_bb_p to gimple_poly_bb_p. (translate_isl_ast_node_user): Same. * graphite-poly.c (new_poly_bb): Same. * graphite-poly.h (gbb_from_bb): Same. * sese.h: Same. * graphite-sese-to-poly.c (new_gimple_bb): gimple_bb_p -> gimple_poly_bb_p (build_scop_scattering): Same. (find_params_in_bb): Same. (add_conditions_to_domain): Same. (sese_dom_walker::before_dom_children): Same. (analyze_drs_in_stmts): Same. (new_pbb_from_pbb): Same. (free_data_refs_aux): New pointer to type base_alias_pair. * graphite-sese-to-poly.h: Same. * sese.c (if_region_set_false_region): Fixed Indentation. (move_sese_in_condition): Same. From-SVN: r228358