gcc/gcc/c-family/ChangeLog

7751 lines
248 KiB
Plaintext
Raw Normal View History

2018-01-25 Release Manager
* GCC 7.3.0 released.
2017-12-15 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
2017-11-21 Jakub Jelinek <jakub@redhat.com>
PR c++/83059
* c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
instead of tree_to_uhwi, formatting fix.
2017-09-15 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
2017-09-12 Jakub Jelinek <jakub@redhat.com>
PR target/82112
* c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
assertion check that in the condition.
(get_atomic_generic_size): Likewise. Before testing if parameter
has pointer type, if it has array type, call for C++
default_conversion to perform array-to-pointer conversion.
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-08-29 Martin Liska <mliska@suse.cz>
PR other/39851
* c-common.c (parse_optimize_options): Add argument to function
call.
* c-pragma.c (handle_pragma_diagnostic): Likewise.
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-06-28 Martin Liska <mliska@suse.cz>
PR ipa/81128
* c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
to a function declaration.
2017-09-10 Jonathan Wakely <jwakely@redhat.com>
PR c++/81852
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2017-09-07 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
2017-07-27 Jakub Jelinek <jakub@redhat.com>
PR c/45784
* c-omp.c (c_finish_omp_for): If the condition is wrapped in
rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
new COMPOUND_EXPRs around the rhs of the comparison.
2017-08-14 Release Manager
* GCC 7.2.0 released.
2017-06-07 Richard Biener <rguenther@suse.de>
Backport from mainline
2017-05-19 Richard Biener <rguenther@suse.de>
PR c++/80593
* c-warn.c (strict_aliasing_warning): Do not warn for accesses
to alias-set zero memory.
2017-06-07 Marek Polacek <polacek@redhat.com>
Backport from mainline
2017-06-04 Marek Polacek <polacek@redhat.com>
PR c/80919
* c-format.c (matching_type_p): Return false if any of the types
requires structural equality.
2017-05-02 Release Manager
* GCC 7.1.0 released.
2017-04-27 Jakub Jelinek <jakub@redhat.com>
PR c++/80534
* c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
flag on non-aggregate element types.
2017-04-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/80423
* c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2017-04-18 Jakub Jelinek <jakub@redhat.com>
PR middle-end/79788
PR middle-end/80375
* c-common.c (c_common_type_for_mode): Don't handle
widest_*_literal_type_node here.
c_common_signed_or_unsigned_type): Likewise.
(c_common_nodes_and_builtins): Set widest_*_literal_type_node
to *intTI_type_node or *intDI_type_node depending on whether
TImode is supported by the target or not.
2017-04-10 Martin Liska <mliska@suse.cz>
PR sanitizer/80350
* c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
doing an UBSAN check.
Fix numerous typos in comments gcc: * alias.c (base_alias_check): Fix typo in comment. * cgraph.h (class ipa_polymorphic_call_context): Likewise. * cgraphunit.c (symbol_table::compile): Likewise. * collect2.c (maybe_run_lto_and_relink): Likewise. * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise. * config/avr/avr-arch.h (avr_arch_info_t): Likewise. * config/avr/avr.c (avr_map_op_t): Likewise. * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise. * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise. * config/epiphany/epiphany.md (movcc): Likewise. * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise. * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue): Likewise. * config/mips/mips.c (mips_save_restore_reg): Likewise. * config/rx/rx.c (rx_is_restricted_memory_address): Likewise. * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise. * config/sh/sh.c (sh_rtx_costs): Likewise. * fold-const.c (fold_truth_andor): Likewise. * genautomata.c (collapse_flag): Likewise. * gengtype.h (struct type::u::s): Likewise. * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise. * input.c (FORMAT_AMOUNT): Likewise. * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector) (known_aggs_to_agg_replacement_list): Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise. * ipa-polymorphic-call.c (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise. * loop-unroll.c (analyze_insn_to_expand_var): Likewise. * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos): Likewise. * modulo-sched.c (apply_reg_moves): Likewise. * omp-expand.c (build_omp_regions_1): Likewise. * trans-mem.c (struct tm_wrapper_hasher): Likewise. * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise. * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise. * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise. * value-prof.c: Likewise. * var-tracking.c (val_reset): Likewise. gcc/ada: * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo. * g-socket.adb (To_Host_Entry): Fix typo in comment. * gnat_ugn.texi: Fix typo. * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment. * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment. * sem_ch3.adb (Build_Derived_Record_Type): Likewise. * sem_util.adb (Mark_Coextensions): Likewise. * sem_util.ads (Available_Full_View_Of_Component): Likewise. gcc/c: * c-array-notation.c: Fix typo in comment. gcc/c-family: * c-warn.c (do_warn_double_promotion): Fix typo in comment. gcc/cp: * class.c (update_vtable_entry_for_fn): Fix typo in comment. * decl2.c (one_static_initialization_or_destruction): Likewise. * name-lookup.c (store_bindings): Likewise. * parser.c (make_call_declarator): Likewise. * pt.c (check_explicit_specialization): Likewise. gcc/testsuite: * g++.old-deja/g++.benjamin/scope02.C: Fix typo in comment. * gcc.dg/20031012-1.c: Likewise. * gcc.dg/ipa/ipcp-1.c: Likewise. * gcc.dg/torture/matrix-3.c: Likewise. * gcc.target/powerpc/ppc-spe.c: Likewise. * gcc.target/rx/zero-width-bitfield.c: Likewise. libcpp: * include/line-map.h (LINEMAPS_MACRO_MAPS): Fix typo in comment. * lex.c (search_line_fast): Likewise. * pch.h (cpp_valid_state): Likewise. libdecnumber: * decCommon.c (decFloatFromPackedChecked): Fix typo in comment. * decNumber.c (decNumberPower, decMultiplyOp): Likewise. libgcc: * config/c6x/pr-support.c (__gnu_unwind_execute): Fix typo in comment. libitm: * libitm_i.h (sutrct gtm_thread): Fix typo in comment. From-SVN: r246664
2017-04-04 00:30:56 +02:00
2017-04-03 Jonathan Wakely <jwakely@redhat.com>
* c-warn.c (do_warn_double_promotion): Fix typo in comment.
2017-03-31 Jakub Jelinek <jakub@redhat.com>
PR c++/79572
* c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
tree *.
* c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
REFERENCE_TYPE.
2017-03-31 David Malcolm <dmalcolm@redhat.com>
PR documentation/78732
* c.opt (Wendif-labels): Fix description to refer to
#else rather than #elif.
2017-03-31 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/80251
* c-common.h (enum rid): Add RID_IS_AGGREGATE.
* c-common.c (c_common_reswords): Add __is_aggregate trait.
2017-03-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/80162
* c-common.c (c_common_mark_addressable_vec): Don't set
TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2017-03-21 Martin Sebor <msebor@redhat.com>
PR c++/79548
* c-common.c (set_underlying_type): Mark type used only when
original del is declared unused.
2017-03-10 David Malcolm <dmalcolm@redhat.com>
PR translation/79848
* c-format.c (check_format_string): Simplify uses of "%<%s%>" to
"%qs".
2017-03-10 David Malcolm <dmalcolm@redhat.com>
PR c/79921
* c-indentation.c (warn_for_misleading_indentation): Remove parens
from inform's message, so that xgettext can locate it.
2017-03-09 Marek Polacek <polacek@redhat.com>
PR c++/79962
PR c++/79984
* c-attribs.c (handle_nonnull_attribute): Save the result of default
conversion to the attribute list.
2017-03-09 Martin Liska <mliska@suse.cz>
* c-ada-spec.c (macro_length): Increment value instead of a pointer.
2017-03-03 Jason Merrill <jason@redhat.com>
* c.opt (Wnoexcept-type): New.
2017-03-02 Richard Biener <rguenther@suse.de>
PR c/79756
* c-common.c (c_common_mark_addressable_vec): Look through
C_MAYBE_CONST_EXPR.
2017-02-28 Martin Liska <mliska@suse.cz>
* c.opt: Replace space with tabular for options of <number>
type.
2017-02-28 Martin Liska <mliska@suse.cz>
* c.opt: Fix --help=option -Q for options which are of
an enum type.
2017-02-24 Jakub Jelinek <jakub@redhat.com>
PR c++/79588
* c-common.c (check_function_restrict): New function.
(check_function_arguments): Add FNDECL argument. Call
check_function_restrict if -Wrestrict.
* c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
* c-common.h (check_function_arguments): Add FNDECL argument.
(warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_function_declaration): Add comment about the
treatment of parameters with pointer-to-tagged type and tidy up.
(print_ada_methods): Remove the special treatment of C++ static member
functions.
2017-02-22 Martin Liska <mliska@suse.cz>
* c.opt: Replace inequality signs with square brackets
for -Wnornalized.
2017-02-21 Jakub Jelinek <jakub@redhat.com>
PR c++/79641
* c-attribs.c (handle_mode_attribute): Use build_qualified_type to
preserve quals.
Restore DECIMAL_DIG macro to C99/C11 value. By extending the set of floating types, TS 18661-3 thereby affected the definition of DECIMAL_DIG, which is defined in terms of the "widest supported floating type". This is not conditional on whether __STDC_WANT_IEC_60559_TYPES_EXT__ is defined when <float.h> is included. I raised this possible incompatibility with C11 (an implementation should be able to conform simultaneously with C11, and with C11 + TS 18661) in DR#501. This is not yet resolved, but the latest proposal <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2108.pdf> would obsolete DECIMAL_DIG with the intention of limiting it to the C11 types (so making it equivalent to LDBL_DECIMAL_DIG). (This proposal is intended to go along with a corresponding change to TS 18661-3 to avoid the new types and non-arithmetic interchange encodings affecting the value of DECIMAL_DIG.) To avoid releasing GCC 7 with a wider-than-C11 value of DECIMAL_DIG and possibly reverting back to a C11 value in a future release, this patch reverts back to the C11 value now. If the proposed resolution to DR#501 changes again so that DECIMAL_DIG *should* have a wider-than-C11 value, we can move back to a wider-than-C11 value in GCC 8. Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc/c-family: * c-cppbuiltin.c (builtin_define_float_constants): Define __DECIMAL_DIG__ to the value for long double. gcc/testsuite: * gcc.dg/c11-float-2.c: New test. * gcc.dg/torture/float128-floath.c, gcc.dg/torture/float128x-floath.c, gcc.dg/torture/float16-floath.c, gcc.dg/torture/float32-floath.c, gcc.dg/torture/float32x-floath.c, gcc.dg/torture/float64-floath.c, gcc.dg/torture/float64x-floath.c: Do not test comparison of *_DECIMAL_DIG macros with DECIMAL_DIG. From-SVN: r245555
2017-02-18 00:04:14 +01:00
2017-02-17 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (builtin_define_float_constants): Define
__DECIMAL_DIG__ to the value for long double.
2017-02-15 Marek Polacek <polacek@redhat.com>
PR c/79515
* c-warn.c (do_warn_double_promotion): Don't warn if an invalid
conversion has occured.
Add "__RTL" to cc1 gcc/c-family/ChangeLog: * c-common.c (c_common_reswords): Add "__RTL". * c-common.h (enum rid): Add RID_RTL. gcc/c/ChangeLog: * c-parser.c: Include "read-rtl-function.h" and "run-rtl-passes.h". (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in grammar to gimple-or-rtl-pass-list. Add rtl-function-definition production. Update for renaming of field "gimple_pass" to "gimple_or_rtl_pass". If __RTL was seen, call c_parser_parse_rtl_body. Convert a timevar_push/pop pair to an auto_timevar, to cope with early exit. (c_parser_declspecs): Update RID_GIMPLE handling for renaming of field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list. Handle RID_RTL. (c_parser_parse_rtl_body): New function. * c-tree.h (enum c_declspec_word): Add cdw_rtl. (struct c_declspecs): Rename field "gimple_pass" to "gimple_or_rtl_pass". Add field "rtl_p". * gimple-parser.c (c_parser_gimple_pass_list): Rename to... (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly. * gimple-parser.h (c_parser_gimple_pass_list): Rename to... (c_parser_gimple_or_rtl_pass_list): ...this. gcc/ChangeLog: * cfg.c (original_copy_tables_initialized_p): New function. * cfg.h (original_copy_tables_initialized_p): New decl. * cfgrtl.c (relink_block_chain): Guard the call to free_original_copy_tables with a call to original_copy_tables_initialized_p. * cgraph.h (symtab_node::native_rtl_p): New decl. * cgraphunit.c (symtab_node::native_rtl_p): New function. (symtab_node::needed_p): Don't assert for early assembly output for __RTL functions. (cgraph_node::finalize_function): Set "force_output" for __RTL functions. (cgraph_node::analyze): Bail out early for __RTL functions. (analyze_functions): Update assertion to support __RTL functions. (cgraph_node::expand): Bail out early for __RTL functions. * final.c (rest_of_clean_state): Don't call delete_tree_ssa for __RTL functions. * function.h (struct function): Update comment for field "pass_startwith". * gimple-expr.c: Include "tree-pass.h". (gimple_has_body_p): Return false for __RTL functions. * Makefile.in (OBJS): Add run-rtl-passes.o. * pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New accessor. (gcc::pass_manager::get_clean_slate): New accessor. * passes.c: Include "insn-addr.h". (should_skip_pass_p): Add logging. Update logic for running "expand" to be compatible with both __GIMPLE and __RTL. Guard property-provider override so it is only done for gimple passes. Don't skip dfinit. (skip_pass): New function. (execute_one_pass): Call skip_pass when skipping passes. * read-md.c (md_reader::read_char): Support filtering the input to a subset of line numbers. (md_reader::md_reader): Initialize fields m_first_line and m_last_line. (md_reader::read_file_fragment): New function. * read-md.h (md_reader::read_file_fragment): New decl. (md_reader::m_first_line): New field. (md_reader::m_last_line): New field. * read-rtl-function.c (function_reader::create_function): Only create cfun if it doesn't already exist. Set PROP_rtl on cfun's curr_properties. Set DECL_INITIAL to a dummy block. (read_rtl_function_body_from_file_range): New function. * read-rtl-function.h (read_rtl_function_body_from_file_range): New decl. * run-rtl-passes.c: New file. * run-rtl-passes.h: New file. gcc/testsuite/ChangeLog: * gcc.dg/rtl/aarch64/asr_div1.c: New test case. * gcc.dg/rtl/aarch64/pr71779.c: New test case. * gcc.dg/rtl/rtl.exp: New file. * gcc.dg/rtl/test.c: New file. * gcc.dg/rtl/truncated-rtl-file.c: New test case. * gcc.dg/rtl/unknown-rtx-code.c: New test case. * gcc.dg/rtl/x86_64/dfinit.c: New test case. * gcc.dg/rtl/x86_64/different-structs.c: New test case. * gcc.dg/rtl/x86_64/final.c: New test case. * gcc.dg/rtl/x86_64/into-cfglayout.c: New test case. * gcc.dg/rtl/x86_64/ira.c: New test case. * gcc.dg/rtl/x86_64/pro_and_epilogue.c: New test case. * gcc.dg/rtl/x86_64/test-multiple-fns.c: New test case. * gcc.dg/rtl/x86_64/test-return-const.c.after-expand.c: New test case. * gcc.dg/rtl/x86_64/test-return-const.c.before-fwprop.c: New test case. * gcc.dg/rtl/x86_64/test-rtl.c: New test case. * gcc.dg/rtl/x86_64/test_1.h: New file. * gcc.dg/rtl/x86_64/times-two.c.after-expand.c: New test case. * gcc.dg/rtl/x86_64/times-two.c.before-df.c: New test case. * gcc.dg/rtl/x86_64/times-two.h: New file. * gcc.dg/rtl/x86_64/vregs.c: New test case. From-SVN: r244878
2017-01-24 18:07:36 +01:00
2017-01-24 David Malcolm <dmalcolm@redhat.com>
* c-common.c (c_common_reswords): Add "__RTL".
* c-common.h (enum rid): Add RID_RTL.
re PR c/64279 (Warning missing for "(cond) ? A : A" / if(cond) expr1; else expr1; // same expression in if and else branch) PR c/64279 * c-common.h (do_warn_duplicated_branches_r): Declare. * c-gimplify.c (c_genericize): Walk the function tree calling do_warn_duplicated_branches_r. * c-warn.c (expr_from_macro_expansion_r): New. (do_warn_duplicated_branches): New. (do_warn_duplicated_branches_r): New. * c.opt (Wduplicated-branches): New option. * c-typeck.c (build_conditional_expr): Warn about duplicated branches. * call.c (build_conditional_expr_1): Warn about duplicated branches. * semantics.c (finish_expr_stmt): Build statement using the proper location. * doc/invoke.texi: Document -Wduplicated-branches. * fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR, COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT, STATEMENT_LIST, and RETURN_EXPR. For non-pure non-const functions return 0 only when not OEP_LEXICOGRAPHIC. (fold_build_cleanup_point_expr): Use the expression location when building CLEANUP_POINT_EXPR. * tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC. * tree.c (add_expr): Handle error_mark_node. * c-c++-common/Wduplicated-branches-1.c: New test. * c-c++-common/Wduplicated-branches-10.c: New test. * c-c++-common/Wduplicated-branches-11.c: New test. * c-c++-common/Wduplicated-branches-12.c: New test. * c-c++-common/Wduplicated-branches-2.c: New test. * c-c++-common/Wduplicated-branches-3.c: New test. * c-c++-common/Wduplicated-branches-4.c: New test. * c-c++-common/Wduplicated-branches-5.c: New test. * c-c++-common/Wduplicated-branches-6.c: New test. * c-c++-common/Wduplicated-branches-7.c: New test. * c-c++-common/Wduplicated-branches-8.c: New test. * c-c++-common/Wduplicated-branches-9.c: New test. * c-c++-common/Wimplicit-fallthrough-7.c: Coalesce dg-warning. * g++.dg/cpp0x/lambda/lambda-switch.C: Move dg-warning. * g++.dg/ext/builtin-object-size3.C: Likewise. * g++.dg/gomp/loop-1.C: Likewise. * g++.dg/warn/Wduplicated-branches1.C: New test. * g++.dg/warn/Wduplicated-branches2.C: New test. From-SVN: r244705
2017-01-20 13:02:50 +01:00
2017-01-20 Marek Polacek <polacek@redhat.com>
PR c/64279
* c-common.h (do_warn_duplicated_branches_r): Declare.
* c-gimplify.c (c_genericize): Walk the function tree calling
do_warn_duplicated_branches_r.
* c-warn.c (expr_from_macro_expansion_r): New.
(do_warn_duplicated_branches): New.
(do_warn_duplicated_branches_r): New.
* c.opt (Wduplicated-branches): New option.
2017-01-17 David Malcolm <dmalcolm@redhat.com>
PR c++/71497
* c-indentation.c (warn_for_misleading_indentation): Use the past
subjunctive in the note.
2017-01-17 Aldy Hernandez <aldyh@redhat.com>
PR c/79116
* array-notation-common.c (cilkplus_extract_an_triplets): Convert
start type to integer_type.
2017-01-16 Jakub Jelinek <jakub@redhat.com>
PR driver/49726
* c.opt (gen-decls): Add Driver flag.
2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
Revert:
2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71737
* c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71737
* c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2017-01-12 Martin Sebor <msebor@redhat.com>
(-Wformat-overflow): ...to this.
2017-01-11 Martin Sebor <msebor@redhat.com>
PR c/78768
* c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
Also enable for LTO.
2017-01-10 Jason Merrill <jason@redhat.com>
Implement P0195R2, C++17 variadic using.
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
re PR translation/79019 (translatable string typo in cif-code.def:141) PR translation/79019 PR translation/79020 * params.def (PARAM_INLINE_MIN_SPEEDUP, PARAM_IPA_CP_SINGLE_CALL_PENALTY, PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos in descriptions. * config/avr/avr.opt (maccumulate-args): Likewise. * config/msp430/msp430.opt (mwarn-mcu): Likewise. * common.opt (freport-bug): Likewise. * cif-code.def (CIF_FINAL_ERROR): Likewise. * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise. * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in translatable string. * config/i386/i386.c (function_value_32): Likewise. * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise. * config/msp430/msp430.c (msp430_option_override, msp430_attr): Likewise. * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise. * common/config/msp430/msp430-common.c (msp430_handle_option): Likewise. * symtab.c (symtab_node::verify_base): Likewise. * opts.c (set_debug_level): Likewise. * tree.c (verify_type_variant): Likewise. Fix typo in comment. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add missing whitespace to translatable strings. * config/avr/avr.md (bswapsi2): Fix typo in comment. * config/sh/superh.h: Likewise. * config/i386/xopintrin.h: Likewise. * config/i386/znver1.md: Likewise. * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise. * ipa-inline-analysis.c (compute_inline_parameters): Likewise. * double-int.h (struct double_int): Likewise. * double-int.c (div_and_round_double): Likewise. * wide-int.cc: Likewise. * tree-ssa.c (non_rewritable_mem_ref_base): Likewise. * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise. * cfgcleanup.c (crossjumps_occured): Renamed to ... (crossjumps_occurred): ... this. (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg): Adjust all uses. cp/ * semantics.c (finish_omp_clauses): Add missing whitespace to translatable strings. * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo. lto/ * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo. fortran/ * decl.c (attr_decl1): Fix spelling in translatable string. * intrinsic.texi: Fix spelling - invokation -> invocation. * lang.opt (faggressive-function-elimination, gfc_convert): Fix typos in descriptions. * openmp.c (resolve_omp_clauses): Add missing whitespace to translatable strings. c-family/ * c.opt (Wnormalized=): Fix typo in description. testsuite/ * c-c++-common/goacc/host_data-2.c (f): Adjust expected spelling of diagnostics. * gfortran.dg/initialization_17.f90: Likewise. From-SVN: r244245
2017-01-09 22:48:33 +01:00
2017-01-09 Jakub Jelinek <jakub@redhat.com>
PR translation/79019
PR translation/79020
* c.opt (Wnormalized=): Fix typo in description.
2017-01-08 Martin Sebor <msebor@redhat.com>
PR middle-end/77708
* c.opt (-Wformat-truncation): New option.
2017-01-06 Alexandre Oliva <aoliva@redhat.com>
* c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
value to unsigned short to fit in 4 hex digits without
warnings.
2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
* c.opt (fsso-struct): Add 'native' value.
2017-01-05 Martin Liska <mliska@suse.cz>
PR pch/78970
* c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
header.
2017-01-04 Marek Polacek <polacek@redhat.com>
PR c++/64767
* c.opt (Wpointer-compare): New option.
2017-01-04 Jakub Jelinek <jakub@redhat.com>
PR driver/78957
* c.opt (fsso-struct=): Add RejectNegative.
2017-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2016-12-29 Martin Liska <mliska@suse.cz>
PR c/78933
* c.opt (strong-eval-order): Add RejectNegative keyword.
2016-12-22 Jason Merrill <jason@redhat.com>
Implement P0522R0, matching of template template arguments.
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_template_template_args.
re PR bootstrap/78817 (stage2 bootstrap failure in vec.h:1613:5: error: argument 1 null where non-null expected after r243661) PR bootstrap/78817 * tree-pass.h (make_pass_post_ipa_warn): Declare. * builtins.c (validate_arglist): Adjust get_nonnull_args call. Check for NULL pointer argument to nonnull arg here. (validate_arg): Revert 2016-12-14 changes. * calls.h (get_nonnull_args): Remove declaration. * tree-ssa-ccp.c: Include diagnostic-core.h. (pass_data_post_ipa_warn): New variable. (pass_post_ipa_warn): New class. (pass_post_ipa_warn::execute): New method. (make_pass_post_ipa_warn): New function. * tree.h (get_nonnull_args): Declare. * tree.c (get_nonnull_args): New function. * calls.c (maybe_warn_null_arg): Removed. (maybe_warn_null_arg): Removed. (initialize_argument_information): Revert 2016-12-14 changes. * passes.def: Add pass_post_ipa_warn after first ccp after IPA. c-family/ * c-common.c (struct nonnull_arg_ctx): New type. (check_function_nonnull): Return bool instead of void. Use nonnull_arg_ctx as context rather than just location_t. (check_nonnull_arg): Adjust for the new context type, set warned_p to true if a warning has been diagnosed. (check_function_arguments): Return bool instead of void. * c-common.h (check_function_arguments): Adjust prototype. c/ * c-typeck.c (build_function_call_vec): If check_function_arguments returns true, set TREE_NO_WARNING on CALL_EXPR. cp/ * typeck.c (cp_build_function_call_vec): If check_function_arguments returns true, set TREE_NO_WARNING on CALL_EXPR. * call.c (build_over_call): Likewise. From-SVN: r243874
2016-12-21 23:15:59 +01:00
2016-12-21 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/78817
* c-common.c (struct nonnull_arg_ctx): New type.
(check_function_nonnull): Return bool instead of void. Use
nonnull_arg_ctx as context rather than just location_t.
(check_nonnull_arg): Adjust for the new context type, set
warned_p to true if a warning has been diagnosed.
(check_function_arguments): Return bool instead of void.
* c-common.h (check_function_arguments): Adjust prototype.
2016-12-21 Jason Merrill <jason@redhat.com>
* c.opt (-fnew-ttp-matching): New flag.
* c-opts.c (c_common_post_options): Default on if -std=c++1z.
Split omp-low into multiple files 2016-12-14 Martin Jambor <mjambor@suse.cz> * omp-general.h: New file. * omp-general.c: New file. * omp-expand.h: Likewise. * omp-expand.c: Likewise. * omp-offload.h: Likewise. * omp-offload.c: Likewise. * omp-grid.c: Likewise. * omp-grid.c: Likewise. * omp-low.h: Include omp-general.h and omp-grid.h. Removed includes of params.h, symbol-summary.h, lto-section-names.h, cilk.h, tree-eh.h, ipa-prop.h, tree-cfgcleanup.h, cfgloop.h, except.h, expr.h, stmt.h, varasm.h, calls.h, explow.h, dojump.h, flags.h, tree-into-ssa.h, tree-cfg.h, cfganal.h, alias.h, emit-rtl.h, optabs.h, expmed.h, alloc-pool.h, cfghooks.h, rtl.h and memmodel.h. (omp_find_combined_for): Declare. (find_omp_clause): Renamed to omp_find_clause and moved to omp-general.h. (free_omp_regions): Renamed to omp_free_regions and moved to omp-expand.h. (replace_oacc_fn_attrib): Renamed to oacc_replace_fn_attrib and moved to omp-general.h. (set_oacc_fn_attrib): Renamed to oacc_set_fn_attrib and moved to omp-general.h. (build_oacc_routine_dims): Renamed to oacc_build_routine_dims and moved to omp-general.h. (get_oacc_fn_attrib): Renamed to oacc_get_fn_attrib and moved to omp-general.h. (oacc_fn_attrib_kernels_p): Moved to omp-general.h. (get_oacc_fn_dim_size): Renamed to oacc_get_fn_dim_size and moved to omp-general.c. (omp_expand_local): Moved to omp-expand.h. (make_gimple_omp_edges): Renamed to omp_make_gimple_edges and moved to omp-expand.h. (omp_finish_file): Moved to omp-offload.h. (default_goacc_validate_dims): Renamed to oacc_default_goacc_validate_dims and moved to omp-offload.h. (offload_funcs, offload_vars): Moved to omp-offload.h. * omp-low.c: Include omp-general.h, omp-offload.h and omp-grid.h. (omp_region): Moved to omp-expand.c. (omp_for_data_loop): Moved to omp-general.h. (omp_for_data): Likewise. (oacc_loop): Moved to omp-offload.c. (oacc_loop_flags): Moved to omp-general.h. (offload_funcs, offload_vars): Moved to omp-offload.c. (root_omp_region): Moved to omp-expand.c. (omp_any_child_fn_dumped): Likewise. (find_omp_clause): Renamed to omp_find_clause and moved to omp-general.c. (is_combined_parallel): Moved to omp-expand.c. (is_reference): Renamed to omp_is_reference and and moved to omp-general.c. (adjust_for_condition): Renamed to omp_adjust_for_condition and moved to omp-general.c. (get_omp_for_step_from_incr): Renamed to omp_get_for_step_from_incr and moved to omp-general.c. (extract_omp_for_data): Renamed to omp_extract_for_data and moved to omp-general.c. (workshare_safe_to_combine_p): Moved to omp-expand.c. (omp_adjust_chunk_size): Likewise. (get_ws_args_for): Likewise. (get_base_type): Removed. (dump_omp_region): Moved to omp-expand.c. (debug_omp_region): Likewise. (debug_all_omp_regions): Likewise. (new_omp_region): Likewise. (free_omp_region_1): Likewise. (free_omp_regions): Renamed to omp_free_regions and moved to omp-expand.c. (find_combined_for): Renamed to omp_find_combined_for, made global. (build_omp_barrier): Renamed to omp_build_barrier and moved to omp-general.c. (omp_max_vf): Moved to omp-general.c. (omp_max_simt_vf): Likewise. (gimple_build_cond_empty): Moved to omp-expand.c. (parallel_needs_hsa_kernel_p): Likewise. (expand_omp_build_assign): Moved declaration to omp-expand.c. (expand_parallel_call): Moved to omp-expand.c. (expand_cilk_for_call): Likewise. (expand_task_call): Likewise. (vec2chain): Likewise. (remove_exit_barrier): Likewise. (remove_exit_barriers): Likewise. (optimize_omp_library_calls): Likewise. (expand_omp_regimplify_p): Likewise. (expand_omp_build_assign): Likewise. (expand_omp_taskreg): Likewise. (oacc_collapse): Likewise. (expand_oacc_collapse_init): Likewise. (expand_oacc_collapse_vars): Likewise. (expand_omp_for_init_counts): Likewise. (expand_omp_for_init_vars): Likewise. (extract_omp_for_update_vars): Likewise. (expand_omp_ordered_source): Likewise. (expand_omp_ordered_sink): Likewise. (expand_omp_ordered_source_sink): Likewise. (expand_omp_for_ordered_loops): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (find_phi_with_arg_on_edge): Likewise. (expand_omp_for_static_chunk): Likewise. (expand_cilk_for): Likewise. (expand_omp_simd): Likewise. (expand_omp_taskloop_for_outer): Likewise. (expand_omp_taskloop_for_inner): Likewise. (expand_oacc_for): Likewise. (expand_omp_for): Likewise. (expand_omp_sections): Likewise. (expand_omp_single): Likewise. (expand_omp_synch): Likewise. (expand_omp_atomic_load): Likewise. (expand_omp_atomic_store): Likewise. (expand_omp_atomic_fetch_op): Likewise. (expand_omp_atomic_pipeline): Likewise. (expand_omp_atomic_mutex): Likewise. (expand_omp_atomic): Likewise. (oacc_launch_pack): and moved to omp-general.c, made public. (OACC_FN_ATTRIB): Likewise. (replace_oacc_fn_attrib): Renamed to oacc_replace_fn_attrib and moved to omp-general.c. (set_oacc_fn_attrib): Renamed to oacc_set_fn_attrib and moved to omp-general.c. (build_oacc_routine_dims): Renamed to oacc_build_routine_dims and moved to omp-general.c. (get_oacc_fn_attrib): Renamed to oacc_get_fn_attrib and moved to omp-general.c. (oacc_fn_attrib_kernels_p): Moved to omp-general.c. (oacc_fn_attrib_level): Moved to omp-offload.c. (get_oacc_fn_dim_size): Renamed to oacc_get_fn_dim_size and moved to omp-general.c. (get_oacc_ifn_dim_arg): Renamed to oacc_get_ifn_dim_arg and moved to omp-general.c. (mark_loops_in_oacc_kernels_region): Moved to omp-expand.c. (grid_launch_attributes_trees): Likewise. (grid_attr_trees): Likewise. (grid_create_kernel_launch_attr_types): Likewise. (grid_insert_store_range_dim): Likewise. (grid_get_kernel_launch_attributes): Likewise. (get_target_argument_identifier_1): Likewise. (get_target_argument_identifier): Likewise. (get_target_argument_value): Likewise. (push_target_argument_according_to_value): Likewise. (get_target_arguments): Likewise. (expand_omp_target): Likewise. (grid_expand_omp_for_loop): Moved to omp-grid.c. (grid_arg_decl_map): Likewise. (grid_remap_kernel_arg_accesses): Likewise. (grid_expand_target_grid_body): Likewise. (expand_omp): Renamed to omp_expand and moved to omp-expand.c. (build_omp_regions_1): Moved to omp-expand.c. (build_omp_regions_root): Likewise. (omp_expand_local): Likewise. (build_omp_regions): Likewise. (execute_expand_omp): Likewise. (pass_data_expand_omp): Likewise. (pass_expand_omp): Likewise. (make_pass_expand_omp): Likewise. (pass_data_expand_omp_ssa): Likewise. (pass_expand_omp_ssa): Likewise. (make_pass_expand_omp_ssa): Likewise. (grid_lastprivate_predicate): Renamed to omp_grid_lastprivate_predicate and moved to omp-grid.c, made public. (grid_prop): Moved to omp-grid.c. (GRID_MISSED_MSG_PREFIX): Likewise. (grid_safe_assignment_p): Likewise. (grid_seq_only_contains_local_assignments): Likewise. (grid_find_single_omp_among_assignments_1): Likewise. (grid_find_single_omp_among_assignments): Likewise. (grid_find_ungridifiable_statement): Likewise. (grid_parallel_clauses_gridifiable): Likewise. (grid_inner_loop_gridifiable_p): Likewise. (grid_dist_follows_simple_pattern): Likewise. (grid_gfor_follows_tiling_pattern): Likewise. (grid_call_permissible_in_distribute_p): Likewise. (grid_handle_call_in_distribute): Likewise. (grid_dist_follows_tiling_pattern): Likewise. (grid_target_follows_gridifiable_pattern): Likewise. (grid_remap_prebody_decls): Likewise. (grid_var_segment): Likewise. (grid_mark_variable_segment): Likewise. (grid_copy_leading_local_assignments): Likewise. (grid_process_grid_body): Likewise. (grid_eliminate_combined_simd_part): Likewise. (grid_mark_tiling_loops): Likewise. (grid_mark_tiling_parallels_and_loops): Likewise. (grid_process_kernel_body_copy): Likewise. (grid_attempt_target_gridification): Likewise. (grid_gridify_all_targets_stmt): Likewise. (grid_gridify_all_targets): Renamed to omp_grid_gridify_all_targets and moved to omp-grid.c, made public. (make_gimple_omp_edges): Renamed to omp_make_gimple_edges and moved to omp-expand.c. (add_decls_addresses_to_decl_constructor): Moved to omp-offload.c. (omp_finish_file): Likewise. (oacc_thread_numbers): Likewise. (oacc_xform_loop): Likewise. (oacc_default_dims, oacc_min_dims): Likewise. (oacc_parse_default_dims): Likewise. (oacc_validate_dims): Likewise. (new_oacc_loop_raw): Likewise. (new_oacc_loop_outer): Likewise. (new_oacc_loop): Likewise. (new_oacc_loop_routine): Likewise. (finish_oacc_loop): Likewise. (free_oacc_loop): Likewise. (dump_oacc_loop_part): Likewise. (dump_oacc_loop): Likewise. (debug_oacc_loop): Likewise. (oacc_loop_discover_walk): Likewise. (oacc_loop_sibling_nreverse): Likewise. (oacc_loop_discovery): Likewise. (oacc_loop_xform_head_tail): Likewise. (oacc_loop_xform_loop): Likewise. (oacc_loop_process): Likewise. (oacc_loop_fixed_partitions): Likewise. (oacc_loop_auto_partitions): Likewise. (oacc_loop_partition): Likewise. (default_goacc_fork_join): Likewise. (default_goacc_reduction): Likewise. (execute_oacc_device_lower): Likewise. (default_goacc_validate_dims): Likewise. (default_goacc_dim_limit): Likewise. (pass_data_oacc_device_lower): Likewise. (pass_oacc_device_lower): Likewise. (make_pass_oacc_device_lower): Likewise. (execute_omp_device_lower): Likewise. (pass_data_omp_device_lower): Likewise. (pass_omp_device_lower): Likewise. (make_pass_omp_device_lower): Likewise. (pass_data_omp_target_link): Likewise. (pass_omp_target_link): Likewise. (find_link_var_op): Likewise. (pass_omp_target_link::execute): Likewise. (make_pass_omp_target_link): Likewise. * Makefile.in (OBJS): Added omp-offload.o, omp-expand.o, omp-general.o and omp-grid.o. (GTFILES): Added omp-offload.h, omp-offload.c and omp-expand.c, removed omp-low.h. * gimple-fold.c: Include omp-general.h instead of omp-low.h. (fold_internal_goacc_dim): Adjusted calls to get_oacc_ifn_dim_arg and get_oacc_fn_dim_size to use their new names. * gimplify.c: Include omp-low.h. (omp_notice_variable): Adjust the call to get_oacc_fn_attrib to use its new name. (gimplify_omp_task): Adjusted calls to find_omp_clause to use its new name. (gimplify_omp_for): Likewise. * lto-cgraph.c: Include omp-offload.h instead of omp-low.h. * toplev.c: Include omp-offload.h instead of omp-low.h. * tree-cfg.c: Include omp-general.h instead of omp-low.h. Also include omp-expand.h. (make_edges_bb): Adjusted the call to make_gimple_omp_edges to use its new name. (make_edges): Adjust the call to free_omp_regions to use its new name. * tree-parloops.c: Include omp-general.h. (create_parallel_loop): Adjusted the call to set_oacc_fn_attrib to use its new name. (parallelize_loops): Adjusted the call to get_oacc_fn_attrib to use its new name. * tree-ssa-loop.c: Include omp-general.h instead of omp-low.h. (gate_oacc_kernels): Adjusted the call to get_oacc_fn_attrib to use its new name. * tree-vrp.c: Include omp-general.h instead of omp-low.h. (extract_range_basic): Adjusted calls to get_oacc_ifn_dim_arg and get_oacc_fn_dim_size to use their new names. * varpool.c: Include omp-offload.h instead of omp-low.h. * gengtype.c (open_base_files): Replace omp-low.h with omp-offload.h in ifiles. * config/nvptx/nvptx.c: Include omp-general.c. (nvptx_expand_call): Adjusted the call to get_oacc_fn_attrib to use its new name. (nvptx_reorg): Likewise. (nvptx_record_offload_symbol): Likewise. gcc/c-family: * c-omp.c: Include omp-general.h instead of omp-low.h. (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new name. gcc/c/ * c-parser.c: Include omp-general.h and omp-offload.h instead of omp-low.h. (c_finish_oacc_routine): Adjusted call to get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib to use their new names. (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to use its new name. (c_parser_oacc_update): Likewise. (c_parser_omp_simd): Likewise. (c_parser_omp_target_update): Likewise. * c-typeck.c: Include omp-general.h instead of omp-low.h. (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new name. (c_finish_omp_cancellation_point): Likewise. * gimple-parser.c: Do not include omp-low.h gcc/cp/ * parser.c: Include omp-general.h and omp-offload.h instead of omp-low.h. (cp_parser_omp_simd): Adjusted calls to find_omp_clause to use its new name. (cp_parser_omp_target_update): Likewise. (cp_parser_oacc_declare): Likewise. (cp_parser_oacc_enter_exit_data): Likewise. (cp_parser_oacc_update): Likewise. (cp_finalize_oacc_routine): Adjusted call to get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib to use their new names. * semantics.c: Include omp-general insteda of omp-low.h. (finish_omp_for): Adjusted calls to find_omp_clause to use its new name. (finish_omp_cancel): Likewise. (finish_omp_cancellation_point): Likewise. fortran/ * trans-openmp.c: Include omp-general.h. From-SVN: r243673
2016-12-14 23:30:41 +01:00
2016-12-14 Martin Jambor <mjambor@suse.cz>
* c-omp.c: Include omp-general.h instead of omp-low.h.
(c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
name.
PR c/78673 - sprintf missing attribute nonnull on destination argument PR c/78673 - sprintf missing attribute nonnull on destination argument PR c/17308 - nonnull attribute not as useful as it could be gcc/ChangeLog: PR c/17308 * builtin-attrs.def (ATTR_NONNULL_1_1, ATTR_NONNULL_1_2): Defined. (ATTR_NONNULL_1_3, ATTR_NONNULL_1_4, ATTR_NONNULL_1_5): Same. (ATTR_NOTHROW_NONNULL_1_1, ATTR_NOTHROW_NONNULL_1_2): Same. (ATTR_NOTHROW_NONNULL_1_3, ATTR_NOTHROW_NONNULL_1_4): Same. (ATTR_NOTHROW_NONNULL_1_5): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_1_2): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_2_0): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_2_3): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_3_0): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_3_4): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_4_0): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_4_5): Same. * builtins.c (validate_arg): Add argument. Treat null pointers passed to nonnull arguments as invalid. (validate_arglist): Same. * builtins.def (fprintf, fprintf_unlocked): Add nonnull attribute. (printf, printf_unlocked, sprintf. vfprintf, vsprintf): Same. (__sprintf_chk, __vsprintf_chk, __fprintf_chk, __vfprintf_chk): Same. * calls.c (get_nonnull_ags, maybe_warn_null_arg): New functions. (initialize_argument_information): Diagnose null pointers passed to arguments declared nonnull. * calls.h (get_nonnull_args): Declared. gcc/c-family/ChangeLog: PR c/17308 * c-common.c (check_nonnull_arg): Disable when optimization is enabled. gcc/testsuite/ChangeLog: PR c/17308 * gcc.dg/builtins-nonnull.c: New test. * gcc.dg/nonnull-4.c: New test. From-SVN: r243661
2016-12-14 18:23:16 +01:00
2016-12-14 Martin Sebor <msebor@redhat.com>
PR c/17308
* c-common.c (check_nonnull_arg): Disable when optimization
is enabled.
2016-12-12 Marek Polacek <polacek@redhat.com>
PR c++/78647
* c-common.c (attribute_fallthrough_p): Return false for
error_mark_node.
PR c/77531 - __attribute__((alloc_size(1,2))) could also warn on multiplication overflow PR c/77531 - __attribute__((alloc_size(1,2))) could also warn on multiplication overflow PR c/78284 - warn on malloc with very large arguments gcc/c-family/ChangeLog: PR c/78284 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options. gcc/ChangeLog: PR c/78284 * builtin-attrs.def (ATTR_ALLOC_SIZE, ATTR_RETURNS_NONNULL): New identifier tree nodes. (ATTR_ALLOCA_SIZE_1_NOTHROW_LEAF_LIST): New attribute list. (ATTR_MALLOC_SIZE_1_NOTHROW_LIST): Same. (ATTR_MALLOC_SIZE_1_NOTHROW_LEAF_LIST): Same. (ATTR_MALLOC_SIZE_1_2_NOTHROW_LEAF_LIST): Same. (ATTR_ALLOC_SIZE_2_NOTHROW_LEAF_LIST): Same. * builtins.c (expand_builtin_alloca): Call maybe_warn_alloc_args_overflow. * builtins.def (aligned_alloc, calloc, malloc, realloc): Add attribute alloc_size. (alloca): Add attribute alloc_size and returns_nonnull. * calls.h (maybe_warn_alloc_args_overflow): Declare. * calls.c (alloc_max_size, operand_signed_p): New functions. (maybe_warn_alloc_args_overflow): Define. (initialize_argument_information): Diagnose overflow in functions declared with attaribute alloc_size. * doc/invoke.texi (Warning Options): Document -Walloc-zero and -Walloc-size-larger-than. gcc/testsuite/ChangeLog: PR c/78284 * gcc.dg/attr-alloc_size-3.c: New test. * gcc.dg/attr-alloc_size-4.c: New test. * gcc.dg/attr-alloc_size-5.c: New test. * gcc.dg/attr-alloc_size-6.c: New test. * gcc.dg/attr-alloc_size-7.c: New test. * gcc.dg/attr-alloc_size-8.c: New test. * gcc.dg/attr-alloc_size-9.c: New test. * gcc/testsuite/gcc.dg/errno-1.c: Adjust. From-SVN: r243470
2016-12-09 00:50:40 +01:00
2016-12-08 Martin Sebor <msebor@redhat.com>
PR c/78284
* c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2016-12-08 Martin Sebor <msebor@redhat.com>
PR c/78165
* c-pretty-print (pp_c_integer_constant): Avoid formatting type
suffix.
PR c/53562 - Add -Werror= support for -D_FORTIFY_SOURCE / __builtin___memcpy_chk PR c/53562 - Add -Werror= support for -D_FORTIFY_SOURCE / __builtin___memcpy_chk PR middle-end/77784 - duplicate warning for snprintf when n > object size PR middle-end/78149 - missing warning on strncpy buffer overflow due to an excessive bound PR middle-end/78138 - missing warnings on buffer overflow with non-constant source length gcc/c-family/ChangeLog: PR c/53562 PR middle-end/77784 PR middle-end/78149 PR middle-end/78138 * c.opt (-Wstringop-overflow): New option. gcc/ChangeLog: PR middle-end/77784 PR middle-end/78149 PR middle-end/78138 * builtins.c (expand_builtin_strcat, expand_builtin_strncat): New functions. (compute_dest_size, get_size_range, check_sizes, check_strncat_sizes) (check_memop_sizes): Same. (expand_builtin_memcpy): Call check memop_sizes. (expand_builtin_mempcpy): Same. (expand_builtin_memset): Same, (expand_builtin_bzero): Same. (expand_builtin_memory_chk): Call check_sizes. (expand_builtin_strcpy): Same. (expand_builtin_strncpy): Same. (maybe_emit_sprintf_chk_warning): Same. (expand_builtin): Handle strcat and strncat. (fini_object_sizes): Reset pointers. (compute_object_size): New function. * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid issuing warnings also issued during built-in expansion. * doc/invoke.texi (Warning Options): Document -Wstringop-overflow. gcc/testsuite/ChangeLog: PR middle-end/77784 PR middle-end/78149 PR middle-end/78138 * c-c++-common/Wsizeof-pointer-memaccess2.c: Adjust expected diagnostic. * g++.dg/ext/builtin-object-size3.C (bar): Same. * g++.dg/ext/strncpy-chk1.C: Same. * g++.dg/opt/memcpy1.C: Same. * g++.dg/torture/Wsizeof-pointer-memaccess1.C: Same. * gcc.c-torture/compile/pr55569.c: Disable -Wstringop-overflow. * gcc.dg/Wobjsize-1.c: Adjust expected diagnostic. * gcc.dg/attr-alloc_size.c: Same. * gcc.dg/builtin-stringop-chk-1.c: Adjust expected diagnostic. * gcc.dg/builtin-stringop-chk-2.c: Same. * gcc.dg/builtin-stringop-chk-4.c: New test. * gcc.dg/builtin-strncat-chk-1.c: Adjust expected diagnostic. * gcc.dg/memcpy-2.c: Same. * gcc.dg/pr40340-1.c: Same. * gcc.dg/pr40340-2.c (main): Same. * gcc.dg/pr40340-5.c (main): Same. * gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Same. * gcc.dg/torture/pr71132.c: Disable -Wstringop-overflow. * gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Adjust text of expected warning. * gfortran.dg/char_length_3.f90: Prune expected warnings. * gfortran.dg/pr38868.f: Add expected warnings. From-SVN: r243419
2016-12-08 01:01:33 +01:00
2016-12-07 Martin Sebor <msebor@redhat.com>
PR c/53562
PR middle-end/77784
PR middle-end/78149
PR middle-end/78138
* c.opt (-Wstringop-overflow): New option.
2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
* c-attribs.c (asan odr indicator): New attribute.
(handle_asan_odr_indicator_attribute): New function.
2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* c-common.c (c_common_nodes_and_builtins): Remove initialization of
ptrdiff_type_node;
2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
* c-common.c (excess_precision_mode_join): New.
(c_ts18661_flt_eval_method): New.
(c_c11_flt_eval_method): Likewise.
(c_flt_eval_method): Likewise.
* c-common.h (excess_precision_mode_join): New.
(c_flt_eval_method): Likewise.
* c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
(cpp_iec_559_value): Call it.
(c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
__FLT_EVAL_METHOD_TS_18661_3__.
2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
* c-opts.c (c_common_post_options): Add logic to handle the default
case for -fpermitted-flt-eval-methods.
2016-11-23 Paolo Bonzini <bonzini@gnu.org>
* c.opt (Wexpansion-to-defined): New.
2016-11-23 Jakub Jelinek <jakub@redhat.com>
PR target/78451
* c-pragma.c (handle_pragma_target): Don't replace
current_target_pragma, but chainon the new args to the current one.
2016-11-22 Nathan Sidwell <nathan@acm.org>
* array-notation-common.c (cilkplus_extract_an_trplets): Fix
indentation and formatting.
2016-11-21 Martin Sebor <msebor@redhat.com>
* c.opt (-fprintf-return-value): Enable by default.
re PR c++/71973 (c++ handles built-in functions inconsistently) gcc: 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/71973 * doc/invoke.texi (-Wno-builtin-declaration-mismatch): Document the new default-enabled warning.. * builtin-types.def (BT_CONST_TM_PTR): New primitive type. (BT_PTR_CONST_STRING): Updated. (BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_PTR): Removed. (BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_TM_PTR): New function type. * builtins.def (DEF_TM_BUILTIN): Disable BOTH_P for TM builtins. (strftime): Update builtin function. * tree-core.h (TI_CONST_TM_PTR_TYPE): New enum value. * tree.h (const_tm_ptr_type_node): New type node. * tree.c (free_lang_data, build_common_tree_nodes): Initialize const_tm_ptr_type_node. c-family: 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/71973 * c.opt (-Wbuiltin-declaration-mismatch): New warning. * c-common.c (c_common_nodes_and_builtins): Initialize const_tm_ptr_type_node. c: 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/71973 * c-decl.c (diagnose_mismatched_decls): Use OPT_Wbuiltin_declaration_mismatch here too. cp: 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/71973 * decl.c (duplicate_decls): Warn when a built-in function is redefined. Don't overload builtin functions with C++ functions. Handle const_tm_ptr_type_node like file_ptr_node. Copy the TREE_NOTHROW flag unmodified to the old decl. lto: 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/71973 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane. testsuite: 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/71973 * g++.dg/pr71973-1.C: New test. * g++.dg/pr71973-2.C: New test. * g++.dg/pr71973-3.C: New test. * g++.dg/lto/pr68811_0.C: Add -w to first lto-options. * g++.dg/lookup/extern-c-redecl4.C: Adjust test expectations. * g++.old-deja/g++.mike/p700.C: Add -Wno-builtin-declaration-mismatch to dg-options. * g++.old-deja/g++.other/realloc.C: Likewise. * g++.old-deja/g++.other/builtins10.C: Adjust test expectations. From-SVN: r242662
2016-11-21 15:17:05 +01:00
2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/71973
* c.opt (-Wbuiltin-declaration-mismatch): New warning.
* c-common.c (c_common_nodes_and_builtins): Initialize
const_tm_ptr_type_node.
2016-11-16 Marek Polacek <polacek@redhat.com>
PR c/78285
* c-common.c (c_add_case_label): Turn error_at calls into inform.
2016-11-14 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o. 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com> Richard Biener <rguenther@suse.de> c/ * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o. * config-lang.in (gtfiles): Add c/c-parser.h. * c-tree.h (enum c_declspec_word): Add cdw_gimple. (struct c_declspecs): Add gimple_pass member and gimple_p flag. * c-parser.c (enum c_id_kind, struct c_token, c_parser_next_token_is, c_parser_next_token_is_not, c_parser_next_token_is_keyword, enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec): Split out to ... * c-parser.h: ... new header. * c-parser.c: Include c-parser.h and gimple-parser.h. (c_parser_peek_token, c_parser_peek_2nd_token, c_token_starts_typename, c_parser_next_token_starts_declspecs, c_parser_next_tokens_start_declaration, c_parser_consume_token, c_parser_error, c_parser_require, c_parser_skip_until_found, c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token, c_parser_type_name): Export. (c_parser_tokens_buf): New function. (c_parser_error): Likewise. (c_parser_set_error): Likewise. (c_parser_declspecs): Handle RID_GIMPLE. (c_parser_declaration_or_fndef): Parse __GIMPLE marked body via c_parser_parse_gimple_body. * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token, c_token_starts_typename, c_parser_next_token_starts_declspecs, c_parser_next_tokens_start_declaration, c_parser_consume_token, c_parser_error, c_parser_require, c_parser_skip_until_found, c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token, c_parser_type_name): Declare. (struct c_parser): Declare forward. (c_parser_tokens_buf): Declare. (c_parser_error): Likewise. (c_parser_set_error): Likewise. * gimple-parser.c: New file. * gimple-parser.h: Likewise. obj-c/ * config-lang.in (gtfiles): Add c/c-parser.h. c-family/ * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types. * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI. * c.opt (fgimple): New option. * doc/invoke.texi (fgimple): Document. * dumpfile.h (TDF_GIMPLE): Add. * dumpfile.c (dump_options): Add gimple. * gimple-pretty-print.c (dump_gimple_switch): Adjust dump for TDF_GIMPLE. (dump_gimple_label): Likewise. (dump_gimple_phi): Likewise. (dump_gimple_bb_header): Likewise. (dump_phi_nodes): Likewise. (pp_cfg_jump): Likewise. Pass in dump flags. (dump_implicit_edges): Adjust. * passes.c (pass_init_dump_file): Do not dump function header for TDF_GIMPLE. * tree-cfg.c (dump_function_to_file): Dump function return type and __GIMPLE keyword for TDF_GIMPLE. Change guard for dumping GIMPLE stmts. * tree-pretty-print.c (dump_decl_name): Adjust dump for TDF_GIMPLE. (dump_generic_node): Likewise. * function.h (struct function): Add pass_startwith member. * passes.c (execute_one_pass): Implement startwith. * tree-ssanames.c (make_ssa_name_fn): New argument, check for version and assign proper version for parsed ssa names. * tree-ssanames.h (make_ssa_name_fn): Add new argument to the function. * internal-fn.c (expand_PHI): New function. * internal-fn.h (expand_PHI): Declared here. * internal-fn.def: New defination for PHI. * tree-cfg.c (lower_phi_internal_fn): New function. (build_gimple_cfg): Call it. (verify_gimple_call): Condition for passing label as arg in internal function PHI. * tree-into-ssa.c (rewrite_add_phi_arguments): Handle already present PHIs with arguments. testsuite/ * gcc.dg/gimplefe-1.c: New testcase. * gcc.dg/gimplefe-2.c: Likewise. * gcc.dg/gimplefe-3.c: Likewise. * gcc.dg/gimplefe-4.c: Likewise. * gcc.dg/gimplefe-5.c: Likewise. * gcc.dg/gimplefe-6.c: Likewise. * gcc.dg/gimplefe-7.c: Likewise. * gcc.dg/gimplefe-8.c: Likewise. * gcc.dg/gimplefe-9.c: Likewise. * gcc.dg/gimplefe-10.c: Likewise. * gcc.dg/gimplefe-11.c: Likewise. * gcc.dg/gimplefe-12.c: Likewise. * gcc.dg/gimplefe-13.c: Likewise. * gcc.dg/gimplefe-14.c: Likewise. * gcc.dg/gimplefe-15.c: Likewise. * gcc.dg/gimplefe-16.c: Likewise. * gcc.dg/gimplefe-17.c: Likewise. * gcc.dg/gimplefe-18.c: Likewise. Co-Authored-By: Richard Biener <rguenther@suse.de> From-SVN: r242387
2016-11-14 14:51:48 +01:00
2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
Richard Biener <rguenther@suse.de>
* c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
* c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
* c.opt (fgimple): New option.
Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o. 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com> Richard Biener <rguenther@suse.de> c/ * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o. * config-lang.in (gtfiles): Add c/c-parser.h. * c-tree.h (enum c_declspec_word): Add cdw_gimple. (struct c_declspecs): Add gimple_pass member and gimple_p flag. * c-parser.c (enum c_id_kind, struct c_token, c_parser_next_token_is, c_parser_next_token_is_not, c_parser_next_token_is_keyword, enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec): Split out to ... * c-parser.h: ... new header. * c-parser.c: Include c-parser.h and gimple-parser.h. (c_parser_peek_token, c_parser_peek_2nd_token, c_token_starts_typename, c_parser_next_token_starts_declspecs, c_parser_next_tokens_start_declaration, c_parser_consume_token, c_parser_error, c_parser_require, c_parser_skip_until_found, c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token, c_parser_type_name): Export. (c_parser_tokens_buf): New function. (c_parser_error): Likewise. (c_parser_set_error): Likewise. (c_parser_declspecs): Handle RID_GIMPLE. (c_parser_declaration_or_fndef): Parse __GIMPLE marked body via c_parser_parse_gimple_body. * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token, c_token_starts_typename, c_parser_next_token_starts_declspecs, c_parser_next_tokens_start_declaration, c_parser_consume_token, c_parser_error, c_parser_require, c_parser_skip_until_found, c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token, c_parser_type_name): Declare. (struct c_parser): Declare forward. (c_parser_tokens_buf): Declare. (c_parser_error): Likewise. (c_parser_set_error): Likewise. * gimple-parser.c: New file. * gimple-parser.h: Likewise. obj-c/ * config-lang.in (gtfiles): Add c/c-parser.h. c-family/ * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types. * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI. * c.opt (fgimple): New option. * doc/invoke.texi (fgimple): Document. * dumpfile.h (TDF_GIMPLE): Add. * dumpfile.c (dump_options): Add gimple. * gimple-pretty-print.c (dump_gimple_switch): Adjust dump for TDF_GIMPLE. (dump_gimple_label): Likewise. (dump_gimple_phi): Likewise. (dump_gimple_bb_header): Likewise. (dump_phi_nodes): Likewise. (pp_cfg_jump): Likewise. Pass in dump flags. (dump_implicit_edges): Adjust. * passes.c (pass_init_dump_file): Do not dump function header for TDF_GIMPLE. * tree-cfg.c (dump_function_to_file): Dump function return type and __GIMPLE keyword for TDF_GIMPLE. Change guard for dumping GIMPLE stmts. * tree-pretty-print.c (dump_decl_name): Adjust dump for TDF_GIMPLE. (dump_generic_node): Likewise. * function.h (struct function): Add pass_startwith member. * passes.c (execute_one_pass): Implement startwith. * tree-ssanames.c (make_ssa_name_fn): New argument, check for version and assign proper version for parsed ssa names. * tree-ssanames.h (make_ssa_name_fn): Add new argument to the function. * internal-fn.c (expand_PHI): New function. * internal-fn.h (expand_PHI): Declared here. * internal-fn.def: New defination for PHI. * tree-cfg.c (lower_phi_internal_fn): New function. (build_gimple_cfg): Call it. (verify_gimple_call): Condition for passing label as arg in internal function PHI. * tree-into-ssa.c (rewrite_add_phi_arguments): Handle already present PHIs with arguments. testsuite/ * gcc.dg/gimplefe-1.c: New testcase. * gcc.dg/gimplefe-2.c: Likewise. * gcc.dg/gimplefe-3.c: Likewise. * gcc.dg/gimplefe-4.c: Likewise. * gcc.dg/gimplefe-5.c: Likewise. * gcc.dg/gimplefe-6.c: Likewise. * gcc.dg/gimplefe-7.c: Likewise. * gcc.dg/gimplefe-8.c: Likewise. * gcc.dg/gimplefe-9.c: Likewise. * gcc.dg/gimplefe-10.c: Likewise. * gcc.dg/gimplefe-11.c: Likewise. * gcc.dg/gimplefe-12.c: Likewise. * gcc.dg/gimplefe-13.c: Likewise. * gcc.dg/gimplefe-14.c: Likewise. * gcc.dg/gimplefe-15.c: Likewise. * gcc.dg/gimplefe-16.c: Likewise. * gcc.dg/gimplefe-17.c: Likewise. * gcc.dg/gimplefe-18.c: Likewise. Co-Authored-By: Richard Biener <rguenther@suse.de> From-SVN: r242387
2016-11-14 14:51:48 +01:00
2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR c/35503
* c-common.h (warn_for_restrict): Declare.
* c-warn.c: Include gcc-rich-location.h.
(warn_for_restrict): New function.
* c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
(gcc_cdiag_char_table): Likewise.
(gcc_cxxdiag_char_table): Likewise.
* c.opt (Wrestrict): New option.
2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (print_ada_declaration): For typedef declarations, look
for nested types only if the type is a record or union and dump SLOC.
2016-11-09 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2016-11-09 Jakub Jelinek <jakub@redhat.com>
* c-ubsan.c (ubsan_instrument_shift): Handle split
-fsanitize=shift-base and -fsanitize=shift-exponent.
Implement P0012R1, Make exception specifications part of the type system. gcc/cp/ * cp-tree.h (enum tsubst_flags): Add tf_fndecl_type. (flag_noexcept_type, ce_type): New. * call.c (build_conv): Add ck_fnptr. (enum conversion_kind): Change ck_tsafe to ck_fnptr. (convert_like_real): Likewise. (standard_conversion): Likewise. Allow function pointer conversions for pointers to member functions. (reference_compatible_p): Allow function pointer conversions. (direct_reference_binding): Likewise. (reference_binding): Reference-compatible is no longer a subset of reference-related. (is_subseq): Also strip ck_lvalue after next_conversion. * class.c (instantiate_type): Check fnptr_conv_p. (resolve_address_of_overloaded_function): Likewise. * cvt.c (can_convert_tx_safety): Now static. (noexcept_conv_p, fnptr_conv_p, strip_fnptr_conv): New. * decl.c (flag_noexcept_type): Define. (cxx_init_decl_processing): Set it. (bad_specifiers): Check it. (grokdeclarator) [cdk_function]: Add exception-spec to type here. * lambda.c (maybe_add_lambda_conv_op): Add exception-spec to returned pointer. * mangle.c (struct globals): Add need_cxx1z_warning. (mangle_decl): Check it. (write_exception_spec): New. (write_function_type): Call it. (canonicalize_for_substitution): Handle exception spec. (write_type): Likewise. (write_encoding): Set processing_template_decl across mangling of partially-instantiated type. * pt.c (determine_specialization): Pass tf_fndecl_type. (tsubst_decl, fn_type_unification): Likewise. (tsubst): Strip tf_fndecl_type, pass it to tsubst_exception_specification. (convert_nontype_argument_function): Handle function pointer conversion. (convert_nontype_argument): Likewise. (unify, for_each_template_parm_r): Walk into noexcept-specifier. * rtti.c (ptr_initializer): Encode noexcept. * tree.c (canonical_eh_spec): New. (build_exception_variant): Use it. * typeck.c (composite_pointer_type): Handle fnptr conversion. (comp_except_specs): Compare canonical EH specs. (structural_comptypes): Call it. gcc/c-family/ * c.opt (Wc++1z-compat): New. * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type. libstdc++-v3/ * include/bits/c++config (_GLIBCXX_NOEXCEPT_PARM) (_GLIBCXX_NOEXCEPT_QUAL): New. * include/std/type_traits (is_function): Use them. * libsubc++/new (launder): Likewise. * libsupc++/cxxabi.h (__pbase_type_info::__masks): Add __noexcept_mask. * libsupc++/pbase_type_info.cc (__do_catch): Handle function pointer conversion. libiberty/ * cp-demangle.c (is_fnqual_component_type): New. (d_encoding, d_print_comp_inner, d_print_mod_list): Use it. (FNQUAL_COMPONENT_CASE): New. (d_make_comp, has_return_type, d_print_comp_inner) (d_print_function_type): Use it. (next_is_type_qual): New. (d_cv_qualifiers, d_print_mod): Handle noexcept and throw-spec. include/ * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_NOEXCEPT, DEMANGLE_COMPONENT_THROW_SPEC. From-SVN: r241944
2016-11-08 00:09:29 +01:00
2016-11-07 Jason Merrill <jason@redhat.com>
* c.opt (Wc++1z-compat): New.
* c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
Introduce -fsanitize-address-use-after-scope * c-warn.c (warn_for_unused_label): Save all labels used in goto or in &label. * asan.c (enum asan_check_flags): Move the enum to header file. (asan_init_shadow_ptr_types): Make type creation more generic. (shadow_mem_size): New function. (asan_emit_stack_protection): Use newly added ASAN_SHADOW_GRANULARITY. Rewritten stack unpoisoning code. (build_shadow_mem_access): Add new argument return_address. (instrument_derefs): Instrument local variables if use after scope sanitization is enabled. (asan_store_shadow_bytes): New function. (asan_expand_mark_ifn): Likewise. (asan_sanitize_stack_p): Moved from asan_sanitize_stack_p. * asan.h (enum asan_mark_flags): Moved here from asan.c (asan_protect_stack_decl): Protect all declaration that need to live in memory. (asan_sanitize_use_after_scope): New function. (asan_no_sanitize_address_p): Likewise. * cfgexpand.c (partition_stack_vars): Consider asan_sanitize_use_after_scope in condition. (expand_stack_vars): Likewise. * common.opt (-fsanitize-address-use-after-scope): New option. * doc/invoke.texi (use-after-scope-direct-emission-threshold): Explain the parameter. * flag-types.h (enum sanitize_code): Define SANITIZE_USE_AFTER_SCOPE. * gimplify.c (build_asan_poison_call_expr): New function. (asan_poison_variable): Likewise. (gimplify_bind_expr): Generate poisoning/unpoisoning for local variables that have address taken. (gimplify_decl_expr): Likewise. (gimplify_target_expr): Likewise for C++ temporaries. (sort_by_decl_uid): New function. (gimplify_expr): Unpoison all variables for a label we can jump from outside of a scope. (gimplify_switch_expr): Unpoison variables defined in the switch context. (gimplify_function_tree): Clear asan_poisoned_variables. (asan_poison_variables): New function. (warn_switch_unreachable_r): Handle IFN_ASAN_MARK. * internal-fn.c (expand_ASAN_MARK): New function. * internal-fn.def (ASAN_MARK): Declare. * opts.c (finish_options): Handle -fstack-reuse if -fsanitize-address-use-after-scope is enabled. (common_handle_option): Enable address sanitization if -fsanitize-address-use-after-scope is enabled. * params.def (PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): New parameter. * params.h: Likewise. * sancov.c (pass_sanopt::execute): Handle IFN_ASAN_MARK. * sanitizer.def: Define __asan_poison_stack_memory and __asan_unpoison_stack_memory functions. * asan.c (asan_mark_poison_p): New function. (transform_statements): Handle asan_mark_poison_p calls. * gimple.c (nonfreeing_call_p): Handle IFN_ASAN_MARK. From-SVN: r241896
2016-11-07 11:23:38 +01:00
2016-11-07 Martin Liska <mliska@suse.cz>
* c-warn.c (warn_for_unused_label): Save all labels used
in goto or in &label.
2016-11-03 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Correct
__cpp_inheriting_constructors.
Implement P0136R1, Rewording inheriting constructors. gcc/c-family/ * c.opt (-fnew-inheriting-ctors): New. * c-opts.c: Default to on for ABI 11+. gcc/cp/ * call.c (enum rejection_reason_code): Add rr_inherited_ctor. (inherited_ctor_rejection): New. (add_function_candidate): Reject inherited ctors for copying. (enforce_access): Use strip_inheriting_ctors. (print_z_candidate): Likewise. Handle rr_inherited_ctor. (convert_like_real): Avoid copying inheriting ctor parameters. (build_over_call): Likewise. A base ctor inheriting from vbase has no parms. Sorry about varargs. (joust): A local constructor beats inherited with the same convs. * class.c (add_method): Handle hiding inheriting ctors. (one_inherited_ctor): Handle new semantics. (add_implicitly_declared_members): Pass using_decl down. (build_clone): A base ctor inheriting from vbase has no parms. * cp-tree.h (DECL_INHERITED_CTOR): Store this instead of the base. (SET_DECL_INHERITED_CTOR): Likewise. (DECL_INHERITED_CTOR_BASE): Adjust. * constexpr.c: Adjust. * error.c (dump_function_decl): Decorate inheriting ctors. * init.c (emit_mem_initializers): Suppress access control in inheriting ctor. * mangle.c (write_special_name_constructor): Handle new inheriting ctor mangling. * method.c (strip_inheriting_ctors, inherited_ctor_binfo) (ctor_omit_inherited_parms, binfo_inherited_from): New. (synthesized_method_walk): Use binfo_inherited_from. Suppress access control in inheriting ctor. (deduce_inheriting_ctor): Deleted if ambiguous ctor inheritance. (maybe_explain_implicit_delete): Explain ambigous ctor inheritance. (add_one_base_init, do_build_copy_constructor): Adjust. (locate_fn_flags, explain_implicit_non_constexpr): Adjust. (implicitly_declare_fn): Adjust. (get_inherited_ctor): Remove. * name-lookup.c (do_class_using_decl): Check for indirect ctor inheritance. * optimize.c (cdtor_comdat_group): Adjust for new mangling. (maybe_clone_body): Handle omitted parms in base clone. (maybe_thunk_body): Don't thunk if base clone omits parms. * pt.c (tsubst_decl): Adjust. (instantiate_template_1): Suppress access control in inheriting ctor. (fn_type_unification): Do deduction with inherited ctor. * tree.c (special_function_p): Adjust. gcc/ * tree-inline.c (copy_tree_body_r): Only copy the taken branch of a COND_EXPR with constant condition. libiberty/ * cp-demangle.c (d_ctor_dtor_name): Handle inheriting constructor. From-SVN: r241765
2016-11-02 02:50:29 +01:00
2016-11-01 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Update
__cpp_inheriting_constructors.
Implement P0136R1, Rewording inheriting constructors. gcc/c-family/ * c.opt (-fnew-inheriting-ctors): New. * c-opts.c: Default to on for ABI 11+. gcc/cp/ * call.c (enum rejection_reason_code): Add rr_inherited_ctor. (inherited_ctor_rejection): New. (add_function_candidate): Reject inherited ctors for copying. (enforce_access): Use strip_inheriting_ctors. (print_z_candidate): Likewise. Handle rr_inherited_ctor. (convert_like_real): Avoid copying inheriting ctor parameters. (build_over_call): Likewise. A base ctor inheriting from vbase has no parms. Sorry about varargs. (joust): A local constructor beats inherited with the same convs. * class.c (add_method): Handle hiding inheriting ctors. (one_inherited_ctor): Handle new semantics. (add_implicitly_declared_members): Pass using_decl down. (build_clone): A base ctor inheriting from vbase has no parms. * cp-tree.h (DECL_INHERITED_CTOR): Store this instead of the base. (SET_DECL_INHERITED_CTOR): Likewise. (DECL_INHERITED_CTOR_BASE): Adjust. * constexpr.c: Adjust. * error.c (dump_function_decl): Decorate inheriting ctors. * init.c (emit_mem_initializers): Suppress access control in inheriting ctor. * mangle.c (write_special_name_constructor): Handle new inheriting ctor mangling. * method.c (strip_inheriting_ctors, inherited_ctor_binfo) (ctor_omit_inherited_parms, binfo_inherited_from): New. (synthesized_method_walk): Use binfo_inherited_from. Suppress access control in inheriting ctor. (deduce_inheriting_ctor): Deleted if ambiguous ctor inheritance. (maybe_explain_implicit_delete): Explain ambigous ctor inheritance. (add_one_base_init, do_build_copy_constructor): Adjust. (locate_fn_flags, explain_implicit_non_constexpr): Adjust. (implicitly_declare_fn): Adjust. (get_inherited_ctor): Remove. * name-lookup.c (do_class_using_decl): Check for indirect ctor inheritance. * optimize.c (cdtor_comdat_group): Adjust for new mangling. (maybe_clone_body): Handle omitted parms in base clone. (maybe_thunk_body): Don't thunk if base clone omits parms. * pt.c (tsubst_decl): Adjust. (instantiate_template_1): Suppress access control in inheriting ctor. (fn_type_unification): Do deduction with inherited ctor. * tree.c (special_function_p): Adjust. gcc/ * tree-inline.c (copy_tree_body_r): Only copy the taken branch of a COND_EXPR with constant condition. libiberty/ * cp-demangle.c (d_ctor_dtor_name): Handle inheriting constructor. From-SVN: r241765
2016-11-02 02:50:29 +01:00
* c.opt (-fnew-inheriting-ctors): New.
* c-opts.c: Default to on for ABI 11+.
2016-10-31 Jakub Jelinek <jakub@redhat.com>
PR c++/77948
* c.opt (fext-numeric-literals): Add Var and Init.
* c-opts.c (c_common_handle_option): Don't clear
cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
(c_common_post_options): Clear it here if not set
explicitly.
2016-10-28 Aldy Hernandez <aldyh@redhat.com>
PR debug/77773
* c-pretty-print.c (simple_type_specifier): Do not dereference `t'
if NULL.
2016-10-25 Jakub Jelinek <jakub@redhat.com>
* c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
* c-common.c (c_common_reswords): Add __builtin_launder.
2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn for
multiplications in boolean context. Fix the quoting of '<<' and '<'
in the shift warning.
2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Fix the comment.
2016-10-20 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn only for signed
integer shift ops in boolean context.
2016-10-18 Aldy Hernandez <aldyh@redhat.com>
* c.opt (Walloca): New.
(Walloca-larger-than=): New.
(Wvla-larger-than=): New.
2016-10-17 Marek Polacek <polacek@redhat.com>
* c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
Return immediately when finding a match.
(warn_tautological_cmp): Remove a boolean variable that is no longer
needed.
2016-10-17 Marek Polacek <polacek@redhat.com>
* c-attribs.c: New file.
* c-common.c: Move attributes handling to c-attribs.c.
(get_nonnull_operand): No longer static.
* c-common.h: Move the declarations from c-attribs.c to its own section.
2016-10-14 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
and __cpp_deduction_guides.
Implement P0386R2 - C++17 inline variables 2016-10-11 Jakub Jelinek <jakub@redhat.com> * dwarf2out.c (gen_member_die): Handle inline static data member definitions. c-family/ * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables. cp/ * cp-tree.h (struct lang_type): Shrink language field to 1 bit from 4. Add var_declared_inline_p field. Mention 2 spare bits. (DECL_VAR_DECLARED_INLINE_P): Define. (SET_DECL_VAR_DECLARED_INLINE_P): Define. (DECL_INLINE_VAR_P): Define. (diagnose_inline_vars_for_namespace): Declare. * decl.c (diagnose_inline_vars_for_namespace): New function. (duplicate_decls): For static data members copy DECL_DECLARED_CONSTEXPR_P. (redeclaration_error_message): Handle C++17 redundant redeclaration of constexpr static data member outside of class. (maybe_commonize_var): Handle inline variables. (check_initializer): Ignore inline variables for diagnostics. Adjust diagnostic wording for C++17. (make_rtl_for_nonlocal_decl): Allow in-class definition of inline static data members. (bad_specifiers): Don't diagnose inline on variables here. (grokvardecl): Add inlinep argument, non-static const inline variables are TREE_PUBLIC. (check_static_variable_definition): Return early also for inline variables. (grokdeclarator): Handle inline variables and inline static data members. * typeck2.c (store_init_value): Don't diagnose non-constant initializers for non-constexpr inline static data members. * decl2.c (vague_linkage_p): Return true for inline variables. (c_parse_final_cleanups): In-class declaration of inline static data members is a definition. Call diagnose_inline_vars_for_namespace through walk_namespaces. * pt.c (instantiate_decl): Set pattern_defined for in-class definitions of inline static data members. From-SVN: r241137
2016-10-13 21:26:54 +02:00
2016-10-13 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
Move MEMMODEL_* from coretypes.h to memmodel.h 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * coretypes.h: Move MEMMODEL_* macros and enum memmodel definition into ... * memmodel.h: This file. * alias.c, asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, caller-save.c, calls.c, ccmp.c, cfgbuild.c, cfgcleanup.c, cfgexpand.c, cfgloopanal.c, cfgrtl.c, cilk-common.c, combine.c, combine-stack-adj.c, common/config/aarch64/aarch64-common.c, common/config/arm/arm-common.c, common/config/bfin/bfin-common.c, common/config/c6x/c6x-common.c, common/config/i386/i386-common.c, common/config/ia64/ia64-common.c, common/config/nvptx/nvptx-common.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-c.c, config/aarch64/cortex-a57-fma-steering.c, config/arc/arc.c, config/arc/arc-c.c, config/arm/arm-builtins.c, config/arm/arm-c.c, config/avr/avr.c, config/avr/avr-c.c, config/avr/avr-log.c, config/bfin/bfin.c, config/c6x/c6x.c, config/cr16/cr16.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/epiphany/epiphany.c, config/epiphany/mode-switch-use.c, config/epiphany/resolve-sw-modes.c, config/fr30/fr30.c, config/frv/frv.c, config/ft32/ft32.c, config/h8300/h8300.c, config/i386/i386-c.c, config/i386/winnt.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68k/m68k.c, config/mcore/mcore.c, config/microblaze/microblaze.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-memory-manipulation.c, config/nds32/nds32-predicates.c, config/nds32/nds32.c, config/nios2/nios2.c, config/nvptx/nvptx.c, config/pa/pa.c, config/pdp11/pdp11.c, config/rl78/rl78.c, config/rs6000/rs6000-c.c, config/rx/rx.c, config/s390/s390-c.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh-c.c, config/sh/sh-mem.cc, config/sh/sh_treg_combine.cc, config/sol2.c, config/spu/spu.c, config/stormy16/stormy16.c, config/tilegx/tilegx.c, config/tilepro/tilepro.c, config/v850/v850.c, config/vax/vax.c, config/visium/visium.c, config/vms/vms-c.c, config/xtensa/xtensa.c, coverage.c, cppbuiltin.c, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, df-core.c, df-problems.c, df-scan.c, dojump.c, dse.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, fold-const.c, function.c, fwprop.c, gcse.c, ggc-page.c, haifa-sched.c, hsa-brig.c, hsa-gen.c, hw-doloop.c, ifcvt.c, init-regs.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-lives.c, ira.c, jump.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lra.c, lra-assigns.c, lra-coalesce.c, lra-constraints.c, lra-eliminations.c, lra-lives.c, lra-remat.c, lra-spills.c, mode-switching.c, modulo-sched.c, omp-low.c, passes.c, postreload-gcse.c, postreload.c, predict.c, print-rtl-function.c, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, reload.c, reload1.c, reorg.c, resource.c, rtl-chkp.c, rtl-tests.c, rtlanal.c, rtlhooks.c, sched-deps.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, shrink-wrap.c, simplify-rtx.c, stack-ptr-mod.c, stmt.c, stor-layout.c, target-globals.c, targhooks.c, toplev.c, tree-nested.c, tree-outof-ssa.c, tree-profile.c, tree-ssa-coalesce.c, tree-ssa-ifcombine.c, tree-ssa-loop-ivopts.c, tree-ssa-loop.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-vect-data-refs.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Include memmodel.h. * genattrtab.c (write_header): Include memmodel.h in generated file. * genautomata.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genconditions.c (write_header): Include memmodel.h earlier in generated file. * genemit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * Makefile.in (PLUGIN_HEADERS): Include memmodel.h gcc/ada/ * gcc-interface/utils2.c: Include memmodel.h. gcc/c-family/ * c-cppbuiltin.c: Include memmodel.h. * c-opts.c: Likewise. * c-pragma.c: Likewise. * c-warn.c: Likewise. gcc/c/ * c-typeck.c: Include memmodel.h. gcc/cp/ * decl2.c: Include memmodel.h. * rtti.c: Likewise. gcc/fortran/ * trans-intrinsic.c: Include memmodel.h. gcc/go/ * go-backend.c: Include memmodel.h. libgcc/ * libgcov-profiler.c: Replace MEMMODEL_* macros by their __ATOMIC_* equivalent. * config/tilepro/atomic.c: Likewise and stop casting model to enum memmodel. From-SVN: r241121
2016-10-13 16:17:52 +02:00
2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
* c-cppbuiltin.c: Include memmodel.h.
* c-opts.c: Likewise.
* c-pragma.c: Likewise.
* c-warn.c: Likewise.
2016-10-12 Jakub Jelinek <jakub@redhat.com>
* c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
(Wimplicit-fallthrough=): Enable for these languages by -Wextra.
* c-opts.c (sanitize_cpp_opts): Initialize
cpp_opts->cpp_warn_implicit_fallthrough.
2016-10-11 Marek Polacek <polacek@redhat.com>
* c-common.c (warning_candidate_p): Change the return type to bool
and return true/false instead of 1/0.
(vector_mode_valid_p): Likewise.
Makefile.in (C_COMMON_OBJS): Add c-family/c-warn.o. * Makefile.in (C_COMMON_OBJS): Add c-family/c-warn.o. * c-common.c (fold_for_warn): No longer static. (bool_promoted_to_int_p): Likewise. (c_common_get_narrower): Likewise. (constant_expression_warning): Move to c-warn.c. (constant_expression_error): Likewise. (overflow_warning): Likewise. (warn_logical_operator): Likewise. (find_array_ref_with_const_idx_r): Likewise. (warn_tautological_cmp): Likewise. (expr_has_boolean_operands_p): Likewise. (warn_logical_not_parentheses): Likewise. (warn_if_unused_value): Likewise. (strict_aliasing_warning): Likewise. (sizeof_pointer_memaccess_warning): Likewise. (check_main_parameter_types): Likewise. (conversion_warning): Likewise. (warnings_for_convert_and_check): Likewise. (match_case_to_enum_1): Likewise. (match_case_to_enum): Likewise. (c_do_switch_warnings): Likewise. (warn_for_omitted_condop): Likewise. (readonly_error): Likewise. (lvalue_error): Likewise. (invalid_indirection_error): Likewise. (warn_array_subscript_with_type_char): Likewise. (warn_about_parentheses): Likewise. (warn_for_unused_label): Likewise. (warn_for_div_by_zero): Likewise. (warn_for_memset): Likewise. (warn_for_sign_compare): Likewise. (do_warn_double_promotion): Likewise. (do_warn_unused_parameter): Likewise. (record_locally_defined_typedef): Likewise. (maybe_record_typedef_use): Likewise. (maybe_warn_unused_local_typedefs): Likewise. (maybe_warn_bool_compare): Likewise. (maybe_warn_shift_overflow): Likewise. (warn_duplicated_cond_add_or_warn): Likewise. (diagnose_mismatched_attributes): Likewise. * c-common.h: Move the declarations from c-warn.c to its own section. * c-warn.c: New file. From-SVN: r240963
2016-10-11 09:02:40 +02:00
2016-10-11 Marek Polacek <polacek@redhat.com>
* c-common.c (fold_for_warn): No longer static.
(bool_promoted_to_int_p): Likewise.
(c_common_get_narrower): Likewise.
(constant_expression_warning): Move to c-warn.c.
(constant_expression_error): Likewise.
(overflow_warning): Likewise.
(warn_logical_operator): Likewise.
(find_array_ref_with_const_idx_r): Likewise.
(warn_tautological_cmp): Likewise.
(expr_has_boolean_operands_p): Likewise.
(warn_logical_not_parentheses): Likewise.
(warn_if_unused_value): Likewise.
(strict_aliasing_warning): Likewise.
(sizeof_pointer_memaccess_warning): Likewise.
(check_main_parameter_types): Likewise.
(conversion_warning): Likewise.
(warnings_for_convert_and_check): Likewise.
(match_case_to_enum_1): Likewise.
(match_case_to_enum): Likewise.
(c_do_switch_warnings): Likewise.
(warn_for_omitted_condop): Likewise.
(readonly_error): Likewise.
(lvalue_error): Likewise.
(invalid_indirection_error): Likewise.
(warn_array_subscript_with_type_char): Likewise.
(warn_about_parentheses): Likewise.
(warn_for_unused_label): Likewise.
(warn_for_div_by_zero): Likewise.
(warn_for_memset): Likewise.
(warn_for_sign_compare): Likewise.
(do_warn_double_promotion): Likewise.
(do_warn_unused_parameter): Likewise.
(record_locally_defined_typedef): Likewise.
(maybe_record_typedef_use): Likewise.
(maybe_warn_unused_local_typedefs): Likewise.
(maybe_warn_bool_compare): Likewise.
(maybe_warn_shift_overflow): Likewise.
(warn_duplicated_cond_add_or_warn): Likewise.
(diagnose_mismatched_attributes): Likewise.
* c-common.h: Move the declarations from c-warn.c to its own section.
* c-warn.c: New file.
2016-10-08 Jason Merrill <jason@redhat.com>
* c-common.c (c_common_truthvalue_conversion): Don't distribute
into COND_EXPR in C++.
2016-10-08 Jakub Jelinek <jakub@redhat.com>
* c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2016-10-07 Jakub Jelinek <jakub@redhat.com>
Implement LWG2296 helper intrinsic
* c-common.h (enum rid): Add RID_ADDRESSOF.
* c-common.c (c_common_reswords): Add __builtin_addressof.
2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/77700
* c-common.c (c_common_truthvalue_conversion): Warn also for
suspicious enum values in boolean context.
2016-10-06 Jakub Jelinek <jakub@redhat.com>
Implement P0258R2 - helper for C++17
std::has_unique_object_representations trait
* c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
* c-common.c (c_common_reswords): Add
__has_unique_object_representations.
2016-10-05 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/66343
* c-ubsan.c (ubsan_instrument_return): Don't call
initialize_sanitizer_builtins here.
2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
conditional expression in boolean context when only one arm is
non-boolean.
2016-10-05 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/77823
* c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
is not integral.
* c-common.c (c_common_reswords): Update comment for C++11.
2016-10-04 Jason Merrill <jason@redhat.com>
* c-common.c (make_tree_vector_from_ctor): New.
* c-common.h: Declare it.
2016-10-04 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Don't define
__LIBGCC_JCR_SECTION_NAME__.
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn for suspicious
left shift in boolean context.
2016-09-29 22:54:56 +02:00
2016-09-29 Jakub Jelinek <jakub@redhat.com>
Implement P0001R1 - C++17 removal of register storage class specifier
* c.opt (Wregister): New warning.
* c-opts.c (c_common_post_options): Enable -Wregister by
default for C++17.
2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
* c-opts.c (c_common_post_options): Remove special case for
TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
in C++.
2016-09-27 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
-std=c++1z.
* c-ada-spec.c (print_ada_declaration): Remove break after return.
2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
* c-common.c: Include memmodel.h.
2016-09-26 Marek Polacek <polacek@redhat.com>
* c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2016-09-26 Marek Polacek <polacek@redhat.com>
PR c/7652
* c-common.c (c_common_attribute_table): Add fallthrough attribute.
(handle_fallthrough_attribute): New function.
(attribute_fallthrough_p): New function.
* c-common.h (attribute_fallthrough_p): Declare.
2016-09-24 Marek Polacek <polacek@redhat.com>
PR c/77490
* c.opt (Wbool-operation): New.
2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Inhibit
Wint-in-bool-context warning with from_macro_definition_at.
Mention the expression will always evaluate to true.
2016-09-21 Martin Sebor <msebor@redhat.com>
PR bootstrap/77676
* c.opt (fprintf-return-value): Temporarily initialize to zero
to unblock bootstrap failures.
2016-09-21 Jakub Jelinek <jakub@redhat.com>
PR c++/77651
* c.opt (Waligned-new=): Add RejectNegative.
(faligned-new=): Likewise. Spelling fix - change
aligned_new_threshhold to aligned_new_threshold.
* c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
to aligned_new_threshold.
PR middle-end/49905 - Better sanity checking on sprintf src & dest to gcc/ChangeLog: PR middle-end/49905 * Makefile.in (OBJS): Add gimple-ssa-sprintf.o. * config/linux.h (TARGET_PRINTF_POINTER_FORMAT): Redefine. * config/linux.c (gnu_libc_printf_pointer_format): New function. * config/sol2.h (TARGET_PRINTF_POINTER_FORMAT): Same. * config/sol2.c (solaris_printf_pointer_format): New function. * doc/invoke.texi (-Wformat-length, -fprintf-return-value): New options. * doc/tm.texi.in (TARGET_PRINTF_POINTER_FORMAT): Document. * doc/tm.texi: Regenerate. * gimple-fold.h (get_range_strlen): New function. (get_maxval_strlen): Declare existing function. * gimple-fold.c (get_range_strlen): Add arguments and compute both maximum and minimum. (get_range_strlen): Define overload. (get_maxval_strlen): Adjust. * gimple-ssa-sprintf.c: New file and pass. * passes.def (pass_sprintf_length): Add new pass. * targhooks.h (default_printf_pointer_format): Declare new function. (gnu_libc_printf_pointer_format): Same. (solaris_libc_printf_pointer_format): Same. * targhooks.c (default_printf_pointer_format): Define new function. * tree-pass.h (make_pass_sprintf_length): Declare new function. * print-tree.c: Increase buffer size. gcc/c-family/ChangeLog: PR middle-end/49905 * c.opt: Add -Wformat-length and -fprintf-return-value. gcc/testsuite/ChangeLog: PR middle-end/49905 * gcc.dg/builtin-stringop-chk-1.c: Adjust. * gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: New test. * gcc.dg/tree-ssa/builtin-sprintf-warn-2.c: New test. * gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: New test. * gcc.dg/tree-ssa/builtin-sprintf-warn-4.c: New test. * gcc.dg/tree-ssa/builtin-sprintf.c: New test. * gcc.dg/tree-ssa/builtin-sprintf-2.c: New test. From-SVN: r240298
2016-09-21 03:39:27 +02:00
2016-09-20 Martin Sebor <msebor@redhat.com>
PR middle-end/49905
* c.opt: Add -Wformat-length and -fprintf-return-value.
2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/77434
* c.opt (Wint-in-bool-context): New warning.
* c-common.c (c_common_truthvalue_conversion): Warn on integer
constants in boolean context.
Make max_align_t respect _Float128. The _FloatN, _FloatNx, _DecimalN and _DecimalNx types are specified in such a way that they are basic types, meaning that max_align_t must be at least as aligned as those types. On 32-bit x86, max_align_t is currently 8-byte aligned, but _Decimal128 and _Float128 are 16-byte aligned, so the alignment of max_align_t needs to increase to meet the standard requirements for these types. This patch implements such an increase. Because max_align_t needs to be usable for C++ as well as for C, <stddef.h> can't actually refer to _Float128, but needs to use __float128 (or some other notation for the type) instead. And since __float128 is architecture-specific, there isn't a preprocessor conditional that means "__float128 is available" (whereas one could test __FLT128_MANT_DIG__ to see if _Float128 is available; __SIZEOF_FLOAT128__ is available on x86 only). But I believe the only case that actually has an alignment problem here is 32-bit x86, and <stddef.h> already has lots of conditional specific to particular architectures or OSes, so this patch uses a conditional on __i386__; that also is the minimal change that ensures neither size nor alignment of max_align_t is changed in any case other than where it is necessary. If any other architectures turn out to have such an issue, it will show up as failures of one of the testcases added by this patch. Such an increase is of course an ABI change, but a reasonably safe one, in that max_align_t doesn't tend to appear in library interfaces (rather, it's something to use when writing allocators and similar code; most matches found on codesearch.debian.net look like copies of the gnulib stddef.h module rather than anything actually using max_align_t at all). max_align_t_align has a corresponding change (adding _Float128 to the types considered). (I think glibc malloc alignment should also increase to 16-byte on 32-bit x86 so it works for allocating objects of these types, which is now straightforward given the fix made for 32-bit powerpc.) Bootstrapped with no regressions on x86_64-pc-linux-gnu, and spot-tested with -m32 that the new float128-align.c test now compiles where previously it didn't. gcc: * ginclude/stddef.h (max_align_t) [__i386__]: Add __float128 element. gcc/c-family: * c-common.c (max_align_t_align): Also consider alignment of float128_type_node. gcc/testsuite: * gcc.dg/float128-align.c, gcc.dg/float128x-align.c, gcc.dg/float16-align.c, gcc.dg/float32-align.c, gcc.dg/float32x-align.c, gcc.dg/float64-align.c, gcc.dg/float64x-align.c, gcc.dg/floatn-align.h: New tests. From-SVN: r240248
2016-09-19 23:51:56 +02:00
2016-09-19 Joseph Myers <joseph@codesourcery.com>
* c-common.c (max_align_t_align): Also consider alignment of
float128_type_node.
2016-09-15 Jason Merrill <jason@redhat.com>
* c-common.c (check_cxx_fundamental_alignment_constraints): Check
DECL_EXTERNAL.
2016-09-14 Jason Merrill <jason@redhat.com>
* c-common.c (check_cxx_fundamental_alignment_constraints): Don't
limit FIELD_DECL, either.
2016-09-14 Marek Polacek <polacek@redhat.com>
* c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
* c-common.h (build_unary_op): Change nonconvert parameter type to bool.
* c-omp.c (c_finish_omp_atomic): Use false instead of 0.
fix-it hints: insert_before vs insert_after The API for adding "insert text" fix-it hints was unclear about exactly where the text should be inserted relative to the given insertion point. This patch clarifies things by renaming the pertinent methods from richloc.add_fixit_insert to richloc.add_fixit_insert_before and adding: richloc.add_fixit_insert_after The latter allows us to consolidate some failure-handling into class rich_location, rather than having to have every such diagnostic check for it. The patch also adds a description of how fix-it hints work to the comment for class rich_location within libcpp/include/line-map.h. gcc/c-family/ChangeLog: * c-common.c (warn_logical_not_parentheses): Replace rich_location::add_fixit_insert calls with add_fixit_insert_before and add_fixit_insert_after, eliminating the "next_loc" calculation. gcc/c/ChangeLog: * c-parser.c (c_parser_declaration_or_fndef): Update for renaming of add_fixit_insert to add_fixit_insert_before. gcc/cp/ChangeLog: * parser.c (cp_parser_class_specifier_1): Update for renaming of add_fixit_insert to add_fixit_insert_before. (cp_parser_class_head): Likewise. gcc/ChangeLog: * diagnostic-show-locus.c (selftest::test_one_liner_fixit_insert): Rename to... (selftest::test_one_liner_fixit_insert_before): ...this, and update for renaming of add_fixit_insert to add_fixit_insert_before. (selftest::test_one_liner_fixit_insert_after): New function. (selftest::test_one_liner_fixit_validation_adhoc_locations): Update for renaming of add_fixit_insert to add_fixit_insert_before. (selftest::test_one_liner_many_fixits): Likewise. (selftest::test_diagnostic_show_locus_one_liner): Update for renaming, call new test function. (selftest::test_diagnostic_show_locus_fixit_lines): Update for renaming of add_fixit_insert to add_fixit_insert_before. (selftest::test_fixit_consolidation): Likewise. * diagnostic.c (selftest::test_print_parseable_fixits_insert): Likewise. * edit-context.c (selftest::test_applying_fixits_insert): Rename to... (selftest::test_applying_fixits_insert_before): ...this. (selftest::test_applying_fixits_insert): Update for renaming of add_fixit_insert to add_fixit_insert_before. (selftest::test_applying_fixits_insert_after): New function. (selftest::test_applying_fixits_insert_after_at_line_end): New function. (selftest::test_applying_fixits_insert_after_failure): New function. (selftest::test_applying_fixits_multiple): Update for renaming of add_fixit_insert to add_fixit_insert_before. (selftest::change_line): Likewise. (selftest::test_applying_fixits_unreadable_file): Likewise. (selftest::test_applying_fixits_line_out_of_range): Likewise. (selftest::test_applying_fixits_column_validation): Likewise. (selftest::test_applying_fixits_column_validation): Likewise. (selftest::edit_context_c_tests): Update for renamed test function; call new test functions. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic_plugin_test_show_locus.c (test_show_locus): Replace rich_location::add_fixit_insert calls with add_fixit_insert_before and add_fixit_insert_after. libcpp/ChangeLog: * include/line-map.h (class rich_location): Add description of fix-it hints to leading comment. (rich_location::add_fixit_insert): Rename both overloaded methods to.. (rich_location::add_fixit_insert_before): ...this, updating their comments. (rich_location::add_fixit_insert_after): Two new overloaded methods. (rich_location::stop_supporting_fixits): New method. * line-map.c (rich_location::add_fixit_insert): Rename both overloaded methods to.. (rich_location::add_fixit_insert_before): ...this, updating their comments. (rich_location::add_fixit_insert_after): Two new methods. (rich_location::reject_impossible_fixit): Split out failure-handling into... (rich_location::stop_supporting_fixits): New method. From-SVN: r240115
2016-09-13 18:08:59 +02:00
2016-09-13 David Malcolm <dmalcolm@redhat.com>
* c-common.c (warn_logical_not_parentheses): Replace
rich_location::add_fixit_insert calls with add_fixit_insert_before
and add_fixit_insert_after, eliminating the "next_loc" calculation.
2016-09-13 Jason Merrill <jason@redhat.com>
Tom de Vries <tom@codesourcery.com>
PR c++/77427
* c-common.c (set_underlying_type): Don't treat array as builtin type.
2016-09-13 Jason Merrill <jason@redhat.com>
* c-common.c (check_cxx_fundamental_alignment_constraints): Don't
limit types at all.
2016-09-12 Jason Merrill <jason@redhat.com>
* c-common.c (check_cxx_fundamental_alignment_constraints): Fix
bit/byte confusion, allow large alignment for types.
2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/77496
* c-common.c (warn_for_omitted_condop): Also warn for boolean data.
Fix suggestions for non-trivial Wformat type cases (PR c/72858) gcc/c-family/ChangeLog: PR c/72858 * c-format.c (argument_parser::check_argument_type): Add params "type_start" and "conversion_char". Use the former to generate offset_to_type_start and pass it and conversion_char to check_format_types. (check_format_info_main): Capture the start of the type information as "type_start", and pass it an format_char to arg_parser.check_argument_type. (check_format_types): Provide an example in the leading comment. Add params "offset_to_type_start" and "conversion_char"; pass them to format_type_warning calls. (test_get_modifier_for_format_len): Likewise. (matching_type_p): New function. (get_format_for_type): Add param "conversion_char" and move implementation into... (get_format_for_type_1): ...new function, called twice. Use new function matching_type_p rather than checking for TYPE_CANONICAL equality. (get_corrected_substring): New function. (format_type_warning): Provide an example in the leading comment. Add params "offset_to_type_start" and "conversion_char". Replace call to get_format_for_type with call to get_corrected_substring and move rejection of hints for widths/precisions there. (assert_format_for_type_streq): Add param "conversion_char". (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR. (test_get_format_for_type_printf): Add conversion chars to the tests, adding coverage for various combinations of integer vs double conversions, and for preserving octal and hexadecimal conversions. (test_get_format_for_type_scanf): Add conversion chars to the tests. gcc/testsuite/ChangeLog: PR c/72858 * gcc.dg/format/diagnostic-ranges.c: Update expected suggestions to preserve conversion chars, and to preserve prefix information. * gcc.dg/format/pr72858.c: New test case. From-SVN: r240095
2016-09-12 18:01:02 +02:00
2016-09-12 David Malcolm <dmalcolm@redhat.com>
PR c/72858
* c-format.c (argument_parser::check_argument_type): Add params
"type_start" and "conversion_char". Use the former to generate
offset_to_type_start and pass it and conversion_char to
check_format_types.
(check_format_info_main): Capture the start of the type
information as "type_start", and pass it an format_char
to arg_parser.check_argument_type.
(check_format_types): Provide an example in the leading comment.
Add params "offset_to_type_start" and "conversion_char"; pass
them to format_type_warning calls.
(test_get_modifier_for_format_len): Likewise.
(matching_type_p): New function.
(get_format_for_type): Add param "conversion_char" and move
implementation into...
(get_format_for_type_1): ...new function, called twice.
Use new function matching_type_p rather than checking for
TYPE_CANONICAL equality.
(get_corrected_substring): New function.
(format_type_warning): Provide an example in the leading comment.
Add params "offset_to_type_start" and "conversion_char". Replace
call to get_format_for_type with call to get_corrected_substring
and move rejection of hints for widths/precisions there.
(assert_format_for_type_streq): Add param "conversion_char".
(ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
(test_get_format_for_type_printf): Add conversion chars to the
tests, adding coverage for various combinations of integer
vs double conversions, and for preserving octal and hexadecimal
conversions.
(test_get_format_for_type_scanf): Add conversion chars to the
tests.
2016-09-10 Tom de Vries <tom@codesourcery.com>
PR C/71602
* c-common.c (build_va_arg): Handle more strict
targetm.canonical_va_list_type. Replace first argument type error with
assert.
2016-09-09 Martin Sebor <msebor@redhat.com>
PR c/77520
PR c/77521
* c-format.c (argument_parser::find_format_char_info): Use %qc
format directive unconditionally.
2016-09-09 Jason Merrill <jason@redhat.com>
Implement C++17 new of over-aligned types.
* c.opt: Add -faligned-new and -Waligned-new.
* c-common.c (max_align_t_align): Split out from...
(cxx_fundamental_alignment_p): ...here.
* c-common.h: Declare it.
* c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
Define TS 18661-1 type width macros in <limits.h> and <stdint.h>. TS 18661-1 defines <limits.h> and <stdint.h> macros for widths of standard integer types and the typedefs defined in, or whose limits are defined in, <stdint.h>. (The connection to the main floating-point subject matter of TS 18661-1 is that these are intended to be used with the fromfp functions to convert from floating point to integer types of any width in any rounding direction, though these macros may be of more general use.) This patch implements support for these macros in GCC's <limits.h> and <stdint.h>. To avoid needing to implement fixincludes for system headers where GCC wraps the system libc's <stdint.h> in hosted mode, the test for the <stdint.h> macros uses -ffreestanding (I'll add the macros to glibc's headers separately) - but as usual for new features in these headers, platforms (primarily OpenBSD) that use USER_H to avoid using GCC's headers at all will have failures until the system headers have the feature added or appropriate fixincludes are implemented. The header macros are implemented using appropriate new predefined macros, with the code avoiding defining more such macros than necessary (so one predefined macro suffices for corresponding signed and unsigned types, while no such predefined macros are needed for the exact-width types such as int8_t). Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc: * doc/cpp.texi (__SCHAR_WIDTH__, __SHRT_WIDTH__, __INT_WIDTH__) (__LONG_WIDTH__, __LONG_LONG_WIDTH__, __PTRDIFF_WIDTH__) (__SIG_ATOMIC_WIDTH__, __SIZE_WIDTH__, __WCHAR_WIDTH__) (__WINT_WIDTH__, __INT_LEAST8_WIDTH__, __INT_LEAST16_WIDTH__) (__INT_LEAST32_WIDTH__, __INT_LEAST64_WIDTH__) (__INT_FAST8_WIDTH__, __INT_FAST16_WIDTH__, __INT_FAST32_WIDTH__) (__INT_FAST64_WIDTH__, __INTPTR_WIDTH__, __INTMAX_WIDTH__): Document. * ginclude/stdint-gcc.h [__STDC_WANT_IEC_60559_BFP_EXT__]: Define width macros from TS 18661-1. * glimits.h [__STDC_WANT_IEC_60559_BFP_EXT__]: Likewise. gcc/c-family: * c-cppbuiltin.c (builtin_define_type_width): New function. (builtin_define_stdint_macros, c_cpp_builtins): Define type width macros. gcc/testsuite: * gcc.dg/limits-width-1.c, gcc.dg/stdint-width-1.c: New tests. From-SVN: r240048
2016-09-09 18:59:43 +02:00
2016-09-09 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (builtin_define_type_width): New function.
(builtin_define_stdint_macros, c_cpp_builtins): Define type width
macros.
Move class substring_loc from c-family into gcc gcc/ChangeLog: * Makefile.in (OBJS): Add substring-locations.o. * langhooks-def.h (class substring_loc): New forward decl. (lhd_get_substring_location): New decl. (LANG_HOOKS_GET_SUBSTRING_LOCATION): New macro. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_GET_SUBSTRING_LOCATION. * langhooks.c (lhd_get_substring_location): New function. * langhooks.h (class substring_loc): New forward decl. (struct lang_hooks): Add field get_substring_location. * substring-locations.c: New file, taking definition of format_warning_va and format_warning_at_substring from c-family/c-format.c, making them non-static. * substring-locations.h (class substring_loc): Move class here from c-family/c-common.h. Add and rewrite comments. (format_warning_va): New decl. (format_warning_at_substring): New decl. (get_source_location_for_substring): Add comment. gcc/c-family/ChangeLog: * c-common.c (get_cpp_ttype_from_string_type): Handle being passed a POINTER_TYPE. (substring_loc::get_location): Move to substring-locations.c, keeping implementation as... (c_get_substring_location): New function, from the above, reworked to use accessors rather than member lookup. * c-common.h (class substring_loc): Move to substring-locations.h, replacing with a forward decl. (c_get_substring_location): New decl. * c-format.c: Include "substring-locations.h". (format_warning_va): Move to substring-locations.c. (format_warning_at_substring): Likewise. gcc/c/ChangeLog: * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use c_get_substring_location for this new langhook. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic_plugin_test_string_literals.c: Include "substring-locations.h". From-SVN: r240028
2016-09-07 18:56:23 +02:00
2016-09-07 David Malcolm <dmalcolm@redhat.com>
* c-common.c (get_cpp_ttype_from_string_type): Handle being passed
a POINTER_TYPE.
(substring_loc::get_location): Move to substring-locations.c,
keeping implementation as...
(c_get_substring_location): New function, from the above, reworked
to use accessors rather than member lookup.
* c-common.h (class substring_loc): Move to substring-locations.h,
replacing with a forward decl.
(c_get_substring_location): New decl.
* c-format.c: Include "substring-locations.h".
(format_warning_va): Move to substring-locations.c.
(format_warning_at_substring): Likewise.
2016-09-06 Martin Sebor <msebor@redhat.com>
PR c/77336
* c-format.c (check_function_format): Avoid issuing warnings for
functions unless they call format functions with non-constant
format strings.
2016-09-06 Richard Biener <rguenther@suse.de>
PR c/77450
* c-common.c (c_common_mark_addressable_vec): Handle
COMPOUND_LITERAL_EXPR.
2016-09-05 Marek Polacek <polacek@redhat.com>
PR c/77423
* c-common.c (bool_promoted_to_int_p): New function.
(expr_has_boolean_operands_p): New function.
(warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
(maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2016-09-04 Tom de Vries <tom@codesourcery.com>
revert:
2016-08-29 Tom de Vries <tom@codesourcery.com>
* c-common.c (build_va_arg): Replace first argument type error
with assert.
re PR c/65467 ([libgomp] sorry, unimplemented: '_Atomic' with OpenMP) PR c/65467 * gimplify.c (gimplify_adjust_omp_clauses_1): Diagnose implicit map and firstprivate clauses on target construct for _Atomic qualified decls. (gimplify_adjust_omp_clauses): Diagnose explicit firstprivate clauses on target construct for _Atomic qualified decls. * omp-low.c (use_pointer_for_field): Return true for _Atomic qualified decls. * omp-simd-clone.c (simd_clone_clauses_extract): Warn and give up for _Atomic qualified arguments not mentioned in uniform clause. c/ * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if flag_openmp. (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue instead of mark_exp_read on low_bound/length expression. (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize, c_parser_omp_clause_priority, c_parser_omp_clause_hint, c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause, c_parser_oacc_clause_tile, c_parser_omp_clause_schedule, c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned, c_parser_omp_clause_linear, c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen, c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue instead of mark_expr_read. (c_parser_omp_declare_reduction): Reject _Atomic qualified types. * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR, LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine. * c-tree.h (c_omp_clause_copy_ctor): New prototype. * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified array section bases outside of depend clause, for depend clause use convert_lvalue_to_rvalue on the base. (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction, linear, aligned, map, to and from clauses. (c_omp_clause_copy_ctor): New function. c-family/ * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions. (c_finish_omp_for): Reject _Atomic qualified iterators. testsuite/ * gcc.dg/gomp/_Atomic-1.c: New test. * gcc.dg/gomp/_Atomic-2.c: New test. * gcc.dg/gomp/_Atomic-3.c: New test. * gcc.dg/gomp/_Atomic-4.c: New test. * gcc.dg/gomp/_Atomic-5.c: New test. From-SVN: r239964
2016-09-02 20:38:07 +02:00
2016-09-02 Jakub Jelinek <jakub@redhat.com>
PR c/65467
* c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
(c_finish_omp_for): Reject _Atomic qualified iterators.
2016-09-01 Martin Sebor <msebor@redhat.com>
* c-ada-spec.c (dump_ada_function_declaration): Increase buffer
size to guarantee it fits the output of the formatted function
regardless of its arguments.
2016-09-01 Marek Polacek <polacek@redhat.com>
PR c/7652
* c-common.c (resolve_overloaded_builtin): Fix formatting. Add
FALLTHRU comments.
2016-08-29 Marek Polacek <polacek@redhat.com>
PR c/77292
* c-common.c (warn_logical_not_parentheses): Don't warn for
a comparison or a logical operator.
2016-08-29 Tom de Vries <tom@codesourcery.com>
* c-common.c (build_va_arg): Fix type comparison assert.
2016-08-29 Tom de Vries <tom@codesourcery.com>
* c-common.c (build_va_arg): Replace first argument type error
with assert.
2016-08-29 Tom de Vries <tom@codesourcery.com>
PR c/77398
* c-common.c (build_va_arg): Add first argument error. Build va_arg
with error_mark_node as va_list instead of with illegal va_list.
2016-08-25 Marek Polacek <polacek@redhat.com>
David Malcolm <dmalcolm@redhat.com>
* c-common.c (warn_logical_not_parentheses): Print fixit hints.
* c-common.h (warn_logical_not_parentheses): Update declaration.
2016-08-22 Marek Polacek <polacek@redhat.com>
PR c++/77321
* c-common.c (warn_for_memset): Check type for null.
Add minimal _FloatN, _FloatNx built-in functions. This patch adds a minimal set of built-in functions for the new _FloatN and _FloatNx types. The functions added are __builtin_fabs*, __builtin_copysign*, __builtin_huge_val*, __builtin_inf*, __builtin_nan* and __builtin_nans* (where * = fN or fNx). That is, 42 new entries are added to the enum of built-in functions and the associated array of decls, where not all of them are actually supported on any one target. These functions are believed to be sufficient for libgcc (complex multiplication and division use __builtin_huge_val*, __builtin_copysign* and __builtin_fabs*) and for glibc (which also depends on complex multiplication from libgcc, as well as using such functions itself). The basic target-independent support for folding / expanding calls to these built-in functions is wired up, so those for constants can be used in static initializers, and the fabs and copysign built-ins can always be expanded to bit-manipulation inline (for any format setting signbit_ro and signbit_rw, which covers all formats supported for _FloatN and _FloatNx), although insn patterns for fabs (abs<mode>2) and copysign (copysign<mode>3) will be used when available and may result in more optimal code. The complex multiplication and division functions in libgcc rely on predefined macros (defined with -fbuilding-libgcc) to say what the built-in function suffixes to use with a particular mode are. This patch updates that code accordingly, where previously it involved a hack supposing that machine-specific suffixes for constants were also suffixes for built-in functions. As with the main _FloatN / _FloatNx patch, this patch does not update code dealing only with optimizations that currently has cases only covering float, double and long double, though some such cases are straightforward and may be covered in a followup patch. The functions are defined with DEF_GCC_BUILTIN, so calls to the TS 18661-3 functions such as fabsf128 and copysignf128, without the __builtin_, will not be optimized. As noted in the original _FloatN / _FloatNx patch submission, in principle the bulk of the libm functions that have built-in versions should have those versions extended to cover the new types, but that would require more consideration of the effects of increasing the size of the enum and initializing many more functions at startup. I don't know whether target-specific built-in functions can readily be made into aliases for target-independent functions, but if they can, it would make sense to do so for the x86, ia64 and rs6000 *q functions corresponding to these, so that they can benefit from the architecture-independent folding logic and from any optimizations enabled for these functions in future, and so that less target-specific code is needed to support them. Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc: * tree.h (CASE_FLT_FN_FLOATN_NX, float16_type_node) (float32_type_node, float64_type_node, float32x_type_node) (float128x_type_node): New macros. * builtin-types.def (BT_FLOAT16, BT_FLOAT32, BT_FLOAT64) (BT_FLOAT128, BT_FLOAT32X, BT_FLOAT64X, BT_FLOAT128X) (BT_FN_FLOAT16, BT_FN_FLOAT32, BT_FN_FLOAT64, BT_FN_FLOAT128) (BT_FN_FLOAT32X, BT_FN_FLOAT64X, BT_FN_FLOAT128X) (BT_FN_FLOAT16_FLOAT16, BT_FN_FLOAT32_FLOAT32) (BT_FN_FLOAT64_FLOAT64, BT_FN_FLOAT128_FLOAT128) (BT_FN_FLOAT32X_FLOAT32X, BT_FN_FLOAT64X_FLOAT64X) (BT_FN_FLOAT128X_FLOAT128X, BT_FN_FLOAT16_CONST_STRING) (BT_FN_FLOAT32_CONST_STRING, BT_FN_FLOAT64_CONST_STRING) (BT_FN_FLOAT128_CONST_STRING, BT_FN_FLOAT32X_CONST_STRING) (BT_FN_FLOAT64X_CONST_STRING, BT_FN_FLOAT128X_CONST_STRING) (BT_FN_FLOAT16_FLOAT16_FLOAT16, BT_FN_FLOAT32_FLOAT32_FLOAT32) (BT_FN_FLOAT64_FLOAT64_FLOAT64, BT_FN_FLOAT128_FLOAT128_FLOAT128) (BT_FN_FLOAT32X_FLOAT32X_FLOAT32X) (BT_FN_FLOAT64X_FLOAT64X_FLOAT64X) (BT_FN_FLOAT128X_FLOAT128X_FLOAT128X): New type definitions. * builtins.def (DEF_GCC_FLOATN_NX_BUILTINS): New macro. (copysign, fabs, huge_val, inf, nan, nans): Use it. * builtins.c (expand_builtin): Use CASE_FLT_FN_FLOATN_NX for fabs and copysign. (fold_builtin_0): Use CASE_FLT_FN_FLOATN_NX for inf and huge_val. (fold_builtin_1): Use CASE_FLT_FN_FLOATN_NX for fabs. * doc/extend.texi (Other Builtins): Document these built-in functions. * fold-const-call.c (fold_const_call): Use CASE_FLT_FN_FLOATN_NX for nan and nans. gcc/c-family: * c-family/c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and _FloatNx types for suffixes for built-in functions. gcc/testsuite: * gcc.dg/torture/float128-builtin.c, gcc.dg/torture/float128-ieee-nan.c, gcc.dg/torture/float128x-builtin.c, gcc.dg/torture/float128x-nan.c, gcc.dg/torture/float16-builtin.c, gcc.dg/torture/float16-nan.c, gcc.dg/torture/float32-builtin.c, gcc.dg/torture/float32-nan.c, gcc.dg/torture/float32x-builtin.c, gcc.dg/torture/float32x-nan.c, gcc.dg/torture/float64-builtin.c, gcc.dg/torture/float64-nan.c, gcc.dg/torture/float64x-builtin.c, gcc.dg/torture/float64x-nan.c, gcc.dg/torture/floatn-builtin.h, gcc.dg/torture/floatn-nan.h: New tests. From-SVN: r239658
2016-08-22 13:57:39 +02:00
2016-08-22 Joseph Myers <joseph@codesourcery.com>
* c-family/c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
_FloatNx types for suffixes for built-in functions.
Implement C _FloatN, _FloatNx types. ISO/IEC TS 18661-3:2015 defines C bindings to IEEE interchange and extended types, in the form of _FloatN and _FloatNx type names with corresponding fN/FN and fNx/FNx constant suffixes and FLTN_* / FLTNX_* <float.h> macros. This patch implements support for this feature in GCC. The _FloatN types, for N = 16, 32, 64 or >= 128 and a multiple of 32, are types encoded according to the corresponding IEEE interchange format (endianness unspecified; may use either the NaN conventions recommended in IEEE 754-2008, or the MIPS NaN conventions, since the choice of convention is only an IEEE recommendation, not a requirement). The _FloatNx types, for N = 32, 64 and 128, are IEEE "extended" types: types extending a narrower format with range and precision at least as big as those specified in IEEE 754 for each extended type (and with unspecified representation, but still following IEEE semantics for their values and operations - and with the set of values being determined by the precision and the maximum exponent, which means that while Intel "extended" is suitable for _Float64x, m68k "extended" is not). These types are always distinct from and not compatible with each other and the standard floating types float, double, long double; thus, double, _Float64 and _Float32x may all have the same ABI, but they are three still distinct types. The type names may be used with _Complex to construct corresponding complex types (unlike __float128, which acts more like a typedef name than a keyword - thus, this patch may be considered to fix PR c/32187). The new suffixes can be combined with GNU "i" and "j" suffixes for constants of complex types (e.g. 1.0if128, 2.0f64i). The set of types supported is implementation-defined. In this GCC patch, _Float32 is SFmode if that is suitable; _Float32x and _Float64 are DFmode if that is suitable; _Float128 is TFmode if that is suitable; _Float64x is XFmode if that is suitable, and otherwise TFmode if that is suitable. There is a target hook to override the choices if necessary. "Suitable" means both conforming to the requirements of that type, and supported as a scalar type including in libgcc. The ABI is whatever the back end does for scalars of that mode (but note that _Float32 is passed without promotion in variable arguments, unlike float). All the existing issues with exceptions and rounding modes for existing types apply equally to the new type names. No GCC port supports a floating-point format suitable for _Float128x. Although there is HFmode support for ARM and AArch64, use of that for _Float16 is not enabled. Supporting _Float16 would require additional work on the excess precision aspects of TS 18661-3: there are new values of FLT_EVAL_METHOD, which are not currently supported in GCC, and FLT_EVAL_METHOD == 0 now means that operations and constants on types narrower than float are evaluated to the range and precision of float. Implementing that, so that _Float16 gets evaluated with excess range and precision, would involve changes to the excess precision infrastructure so that the _Float16 case is enabled by default, unlike the x87 case which is only enabled for -fexcess-precision=standard. Other differences between _Float16 and __fp16 would also need to be disentangled. GCC has some prior support for nonstandard floating-point types in the form of __float80 and __float128. Where these were previously types distinct from long double, they are made by this patch into aliases for _Float64x / _Float128 if those types have the required properties. In principle the set of possible _FloatN types is infinite. This patch hardcodes the four such types for N <= 128, but with as much code as possible using loops over types to minimize the number of places with such hardcoding. I don't think it's likely any further such types will be of use in future (or indeed that formats suitable for _Float128x will actually be implemented). There is a corner case that all _FloatN, for N >= 128 and a multiple of 32, should be treated as keywords even when the corresponding type is not supported; I intend to deal with that in a followup patch. Tests are added for various functionality of the new types, mostly using type-generic headers. The tests use dg-add-options to pass any extra options needed to enable the types; this is wired up to use the same options as for __float128 on powerpc to enable _Float128 and _Float64x, and effective-target keywords for runtime support do the same hardware test as for __float128 to make sure the VSX instructions generated by those options are supported. (Corresponding additions would be needed for _Float16 on ARM as well if that were enabled with -mfp16-format=ieee required to use it rather than unconditionally available. Of course, -mfp16-format=alternative enables use of a format which is not compatible with the requirements of the _Float16 type.) C++ note: no support for the new types or constant suffixes is added for C++. C++ decimal floating-point support was very different from the C support, using class types, and the same may well apply to any future C++ bindings for IEEE interchange and extended types. There is a case, however, for supporting at least *f128 constants in C++, so that code using __float128 can use the newer style for constants throughout rather than needing to use the older *q constants in C++. Also, if built-in functions are added that may provide a way in which the types could leak into C++ code. Fortran note: the float128_type_node used in the Fortran front end is renamed to gfc_float128_type_node, since the semantics are different: in particular, if long double has binary128 format, then the new language-independent float128_type_node is a distinct type that also has binary128 format, but the Fortran node is expected to be NULL in that case. Likewise, Fortran's complex_float128_type_node is renamed to gfc_complex_float128_type_node. PowerPC note: the back end had an inconsistency that if TFmode was binary128, *q constants were TFmode instead of KFmode but __float128 was KFmode. This patch follows the same logic as for *q constants, so that _Float128 prefers TFmode (and __float128 becomes an alias for _Float128). ARM note: __fp16 is promoted to double (by convert_arguments) when passed without a prototype / in variable arguments. But this is only about the argument promotion; it is not handled as promoting in c-common.c:self_promoting_args_p / c-typeck.c:c_type_promotes_to, meaning that a K&R function definition for an argument of type __fp16 corresponds to a prototype with an argument of that type, not to one with an argument of type double, whereas a float argument in a K&R function definition corresponds to a double prototype argument - and the same functions are also what's involved in making va_arg give a warning and generate a call to abort when called with type float. This is preserved by this patch, while arranging for _Float16 not to be promoted when passed without a prototype / in variable arguments (the promotion of float being considered a legacy feature, not applied to any new types in C99 or later). TS 18661-3 extends the set of decimal floating-point types similarly, and adds new constant suffixes for the existing types, but this patch does not do anything regarding that extension. This patch does nothing regarding built-in functions, although type-generic functions such as __builtin_isinf work for the new types and associated tests are included. There are at least two levels of built-in function support possible for these types. The minimal level, implemented in <https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01702.html> (which needs updating to use dg-add-options), adds built-in functions similar to those x86 has for __float128: __builtin_inf* __builtin_huge_val*, __builtin_nan*, __builtin_nans*, __builtin_fabs*, __builtin_copysign*. That would be sufficient for glibc to use the *f128 names for built-in functions by default with *q used only for backwards compatibility when using older GCC versions. That would also allow c_cpp_builtins's flag_building_libgcc code, defining __LIBGCC_%s_FUNC_EXT__, to use such suffixes rather than the present code hardcoding logic about target-specific constant suffixes and how those relate to function suffixes. Full built-in function support would cover the full range of built-in functions for existing floating-point types, adding variants for all the new types, except for a few obsolescent functions and non-type-generic variants of type-generic functions. Some but not all references to such functions in GCC use macros such as CASE_FLT_FN to be type-generic; a fair amount of work would be needed to identify all places to update. Adding all those functions would enable optimizations (for constant arguments and otherwise) for TS 18661-3 functions, but it would also substantially expand the enum listing built-in functions (and we've had problems with the size of that enum in the past), and increase the amount of built-in function initialization to do - I don't know what the startup cost involved in built-in function initialization is, but it would be something to consider when adding such a large set of functions. There are also a range of optimizations, in match.pd and elsewhere, that only operate on the three standard floating-point types. Ideally those would be made generic to all floating-point types, but this patch does nothing in that regard. Special care would be needed regarding making sure library functions to which calls are generated actually exist. For example, if sqrt is called on an argument of type _Float32, and the result converted to _Float32, this is equivalent to doing a square root operation directly on _Float32. But if the user's libm does not have the sqrtf32 function, or the name is not reserved because __STDC_WANT_IEC_60559_TYPES_EXT__ was not defined before including <math.h>, you can only do that optimization if you convert to a call to sqrtf instead. DECIMAL_DIG now relates to all supported floating-point formats, not just float, double and long double; I've raised the question with WG14 of how this relates to the formula for DECIMAL_DIG in C11 not considering this. TS 18661-3 says it also covers non-arithmetic formats only supported by library conversion functions; this patch does not add any target hooks to allow for the case where there are such formats wider than any supported for arithmetic types (where e.g. libc supports conversions involving the binary128 representation, but the _Float128 type is not supported). GCC provides its own <tgmath.h> for some targets. No attempt is made to adapt this to handle the new types. Nothing is done regarding debug info for the new types (see the "Debugger support for __float128 type?" thread on gcc@, Sep/Oct 2015). No __SIZEOF_*__ macros are added for the new types. Nothing is done with do_warn_double_promotion. Nothing is done to include the new types in those determining max_align_t, although properly it should be sufficiently aligned for any of those types. The logic for usual arithmetic conversions in c_common_type relies on TYPE_PRECISION for floating-point types, which is less than ideal (doesn't necessarily correspond to whether one type's values are subset of another); looking in more detail at the formats might be better. But since I included code in build_common_tree_nodes to work around rs6000 KFmode having precision 113 not 128, I think it should work. Ideally one might have errors in generic code for the case where the two types do not have one type's values a subset of the other (which is undefined behavior). But the only case where this can actually occur is mixing IBM long double with binary128 on powerpc, and rs6000_invalid_binary_op deals with that at present. TS 18661-3 does not fully specify the type resulting from the usual arithmetic conversions in the case where two _FloatNx types have the same set of values; I arranged the code to prefer the greater value of N in that case. The __FP_FAST_FMA* macros are not extended to cover the new types, since there are no corresponding built-in functions (if built-in fmafN, fmafNx are added, the macros should be extended, and the new macros documented). Also, only a limited set of modes is handled in mode_has_fma. Diagnostics relating to the use of the new types with -pedantic do not try to distinguish them from purely nonstandard types such as __int128 and constant suffixes such as *q. If you use an unsupported _FloatN / _FloatNx type you get a warning about the type defaulting to int after the warning about the type not being supported. That's less than ideal, but it's also a pre-existing condition if you use __int128 on a 32-bit system where it's unsupported. Bootstrapped with no regressions on x86_64-pc-linux-gnu. Other back-end changes minimally tested by building cc1 for ia64-linux-gnu, powerpc64le-linux-gnu, pdp11-none (the last failed for unrelated reasons). PR c/32187 gcc: * tree-core.h (TI_COMPLEX_FLOAT16_TYPE) (TI_COMPLEX_FLOATN_NX_TYPE_FIRST, TI_COMPLEX_FLOAT32_TYPE) (TI_COMPLEX_FLOAT64_TYPE, TI_COMPLEX_FLOAT128_TYPE) (TI_COMPLEX_FLOAT32X_TYPE, TI_COMPLEX_FLOAT64X_TYPE) (TI_COMPLEX_FLOAT128X_TYPE, TI_FLOAT16_TYPE, TI_FLOATN_TYPE_FIRST) (TI_FLOATN_NX_TYPE_FIRST, TI_FLOAT32_TYPE, TI_FLOAT64_TYPE) (TI_FLOAT128_TYPE, TI_FLOATN_TYPE_LAST, TI_FLOAT32X_TYPE) (TI_FLOATNX_TYPE_FIRST, TI_FLOAT64X_TYPE, TI_FLOAT128X_TYPE) (TI_FLOATNX_TYPE_LAST, TI_FLOATN_NX_TYPE_LAST): New enum tree_index values. (NUM_FLOATN_TYPES, NUM_FLOATNX_TYPES, NUM_FLOATN_NX_TYPES): New macros. (struct floatn_type_info): New structure type. (floatn_nx_types): New variable declaration. * tree.h (FLOATN_TYPE_NODE, FLOATN_NX_TYPE_NODE) (FLOATNX_TYPE_NODE, float128_type_node, float64x_type_node) (COMPLEX_FLOATN_NX_TYPE_NODE): New macros. * tree.c (floatn_nx_types): New variable. (build_common_tree_nodes): Initialize _FloatN, _FloatNx and corresponding complex types. * target.def (floatn_mode): New hook. * targhooks.c: Include "real.h". (default_floatn_mode): New function. * targhooks.h (default_floatn_mode): New prototype. * doc/extend.texi (Floating Types): Document _FloatN and _FloatNx types. * doc/sourcebuild.texi (float@var{n}, float@var{n}x): Document new effective-target and dg-add-options keywords. (float@var{n}_runtime, float@var{n}x_runtime, floatn_nx_runtime): Document new effective-target keywords. * doc/tm.texi.in (TARGET_FLOATN_MODE): New @hook. * doc/tm.texi: Regenerate. * ginclude/float.h (LDBL_DECIMAL_DIG): Define to __LDBL_DECIMAL_DIG__, not __DECIMAL_DIG__. [__STDC_WANT_IEC_60559_TYPES_EXT__]: Define macros from TS 18661-3. * real.h (struct real_format): Add field ieee_bits. * real.c (ieee_single_format, mips_single_format) (motorola_single_format, spu_single_format, ieee_double_format) (mips_double_format, motorola_double_format) (ieee_extended_motorola_format, ieee_extended_intel_96_format) (ieee_extended_intel_128_format) (ieee_extended_intel_96_round_53_format, ibm_extended_format) (mips_extended_format, ieee_quad_format, mips_quad_format) (vax_f_format, vax_d_format, vax_g_format, decimal_single_format) (decimal_double_format, decimal_quad_format, ieee_half_format) (arm_half_format, real_internal_format: Initialize ieee_bits field. * config/i386/i386.c (ix86_init_builtin_types): Do not initialize float128_type_node. Set float80_type_node to float64x_type_node if appropriate and long_double_type_node not appropriate. * config/ia64/ia64.c (ia64_init_builtins): Likewise. * config/pdp11/pdp11.c (pdp11_f_format, pdp11_d_format): Initialize ieee_bits field. * config/rs6000/rs6000.c (TARGET_FLOATN_MODE): New macro. (rs6000_init_builtins): Set ieee128_float_type_node to float128_type_node. (rs6000_floatn_mode): New function. gcc/c: * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value. (struct c_declspecs): Add field floatn_nx_idx. * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN and _FloatNx type specifiers. * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs) (c_parser_declspecs, c_parser_attribute_any_word) (c_parser_objc_selector): Use CASE_RID_FLOATN_NX. * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types. (convert_arguments): Avoid promoting _FloatN and _FloatNx types narrower than double. gcc/c-family: * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32) (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X) (RID_FLOAT128X): New enum rid values. (CASE_RID_FLOATN_NX): New macro. * c-common.c (c_common_reswords): Add _FloatN and _FloatNx keywords. (c_common_type_for_mode): Check for _FloatN and _FloatNx and corresponding complex types. (c_common_nodes_and_builtins): For non-C++, register _FloatN and _FloatNx and corresponding complex types. (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX. * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN and _FloatNx types for the widest type for determining DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL. (c_cpp_builtins): Call builtin_define_float_constants for _FloatN and _FloatNx types. * c-lex.c (interpret_float): Handle _FloatN and _FloatNx constants. * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and _FloatNx types. gcc/fortran: * trans-types.h (float128_type_node): Rename to gfc_float128_type_node. (complex_float128_type_node): Rename to gfc_complex_float128_type_node. * iso-c-binding.def, trans-intrinsic.c, trans-types.c: All users changed. gcc/testsuite: * lib/target-supports.exp (check_effective_target_float16) (check_effective_target_float32, check_effective_target_float64) (check_effective_target_float128, check_effective_target_float32x) (check_effective_target_float64x) (check_effective_target_float128x) (check_effective_target_float16_runtime) (check_effective_target_float32_runtime) (check_effective_target_float64_runtime) (check_effective_target_float128_runtime) (check_effective_target_float32x_runtime) (check_effective_target_float64x_runtime) (check_effective_target_float128x_runtime) (check_effective_target_floatn_nx_runtime) (add_options_for_float16, add_options_for_float32) (add_options_for_float64, add_options_for_float128) (add_options_for_float32x, add_options_for_float64x) (add_options_for_float128x): New procedures. * gcc.dg/dfp/floatn.c, gcc.dg/float128-typeof.c, gcc.dg/float128x-typeof.c, gcc.dg/float16-typeof.c, gcc.dg/float32-typeof.c, gcc.dg/float32x-typeof.c, gcc.dg/float64-typeof.c, gcc.dg/float64x-typeof.c, gcc.dg/floatn-arithconv.c, gcc.dg/floatn-errs.c, gcc.dg/floatn-typeof.h, gcc.dg/torture/float128-basic.c, gcc.dg/torture/float128-complex.c, gcc.dg/torture/float128-floath.c, gcc.dg/torture/float128-tg.c, gcc.dg/torture/float128x-basic.c, gcc.dg/torture/float128x-complex.c, gcc.dg/torture/float128x-floath.c, gcc.dg/torture/float128x-tg.c, gcc.dg/torture/float16-basic.c, gcc.dg/torture/float16-complex.c, gcc.dg/torture/float16-floath.c, gcc.dg/torture/float16-tg.c, gcc.dg/torture/float32-basic.c, gcc.dg/torture/float32-complex.c, gcc.dg/torture/float32-floath.c, gcc.dg/torture/float32-tg.c, gcc.dg/torture/float32x-basic.c, gcc.dg/torture/float32x-complex.c, gcc.dg/torture/float32x-floath.c, gcc.dg/torture/float32x-tg.c, gcc.dg/torture/float64-basic.c, gcc.dg/torture/float64-complex.c, gcc.dg/torture/float64-floath.c, gcc.dg/torture/float64-tg.c, gcc.dg/torture/float64x-basic.c, gcc.dg/torture/float64x-complex.c, gcc.dg/torture/float64x-floath.c, gcc.dg/torture/float64x-tg.c, gcc.dg/torture/floatn-basic.h, gcc.dg/torture/floatn-complex.h, gcc.dg/torture/floatn-convert.c, gcc.dg/torture/floatn-floath.h, gcc.dg/torture/floatn-tg.h, gcc.dg/torture/fp-int-convert-float128-ieee-timode.c, gcc.dg/torture/fp-int-convert-float128-ieee.c, gcc.dg/torture/fp-int-convert-float128x-timode.c, gcc.dg/torture/fp-int-convert-float128x.c, gcc.dg/torture/fp-int-convert-float16-timode.c, gcc.dg/torture/fp-int-convert-float16.c, gcc.dg/torture/fp-int-convert-float32-timode.c, gcc.dg/torture/fp-int-convert-float32.c, gcc.dg/torture/fp-int-convert-float32x-timode.c, gcc.dg/torture/fp-int-convert-float32x.c, gcc.dg/torture/fp-int-convert-float64-timode.c, gcc.dg/torture/fp-int-convert-float64.c, gcc.dg/torture/fp-int-convert-float64x-timode.c, gcc.dg/torture/fp-int-convert-float64x.c: New tests. * gcc.dg/torture/fp-int-convert.h (TEST_I_F): Add argument for maximum exponent of floating-point type. Use it in testing whether 0x8...0 fits in the floating-point type. Always treat -1 (signed 0xf...f) as fitting in the floating-point type. (M_OK1): New macro. * gcc.dg/torture/fp-int-convert-double.c, gcc.dg/torture/fp-int-convert-float.c, gcc.dg/torture/fp-int-convert-float128-timode.c, gcc.dg/torture/fp-int-convert-float128.c, gcc.dg/torture/fp-int-convert-float80-timode.c, gcc.dg/torture/fp-int-convert-float80.c, gcc.dg/torture/fp-int-convert-long-double.c, gcc.dg/torture/fp-int-convert-timode.c: Update calls to TEST_I_F. libcpp: * include/cpplib.h (CPP_N_FLOATN, CPP_N_FLOATNX) (CPP_N_WIDTH_FLOATN_NX, CPP_FLOATN_SHIFT, CPP_FLOATN_MAX): New macros. * expr.c (interpret_float_suffix): Handle fN, fNx, FN and FNx suffixes. From-SVN: r239625
2016-08-19 19:43:26 +02:00
2016-08-19 Joseph Myers <joseph@codesourcery.com>
PR c/32187
* c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
(RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
(RID_FLOAT128X): New enum rid values.
(CASE_RID_FLOATN_NX): New macro.
* c-common.c (c_common_reswords): Add _FloatN and _FloatNx
keywords.
(c_common_type_for_mode): Check for _FloatN and _FloatNx and
corresponding complex types.
(c_common_nodes_and_builtins): For non-C++, register _FloatN and
_FloatNx and corresponding complex types.
(keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
* c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
and _FloatNx types for the widest type for determining
DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
__DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
(c_cpp_builtins): Call builtin_define_float_constants for _FloatN
and _FloatNx types.
* c-lex.c (interpret_float): Handle _FloatN and _FloatNx
constants.
* c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
_FloatNx types.
Allow calling diagnostic_show_locus without a diagnostic_info Much of diagnostic-show-locus.c currently expects a diagnostic_info *, but it only uses the rich_location and the diagnostic_t. Change the signature of diagnostic_show_locus from: void diagnostic_show_locus (diagnostic_context *, const diagnostic_info *); to: void diagnostic_show_locus (diagnostic_context *, rich_location *richloc, diagnostic_t diagnostic_kind); so that it can be used for things other than diagnostics. Use this flexibility to add selftests for diagnostic_show_locus. gcc/c-family/ChangeLog: * c-opts.c (c_diagnostic_finalizer): Update for change to diagnostic_show_locus. gcc/ChangeLog: * diagnostic-show-locus.c (colorizer::colorizer): Replace diagnostic param with diagnostic_kind. (class colorizer): Similarly replace field m_diagnostic with m_diagnostic_kind. (colorizer::colorizer): Replace diagnostic param with diagnostic_kind. (colorizer::begin_state): Update for above field change. (layout::layout): Replace diagnostic param with rich_location * and diagnostic_kind. (diagnostic_show_locus): Replace diagnostic param with richloc and diagnostic_kind. (class selftest::test_diagnostic_context): New class. (selftest::test_diagnostic_show_locus_unknown_location): New function. (selftest::test_one_liner_simple_caret): New function. (selftest::test_one_liner_caret_and_range): New function. (selftest::test_one_liner_multiple_carets_and_ranges): New function. (selftest::test_one_liner_fixit_remove): New function. (selftest::test_one_liner_fixit_replace): New function. (selftest::test_diagnostic_show_locus_one_liner): New function. (selftest::diagnostic_show_locus_c_tests): Call the new test functions. * diagnostic.c (diagnostic_initialize): Initialize colorize_source_p, show_ruler_p and parseable_fixits_p. (default_diagnostic_finalizer): Update for change to diagnostic_show_locus. (diagnostic_append_note): Likewise. * diagnostic.h (diagnostic_show_locus): Replace const diagnostic_info * param with location * and diagnostic_t. gcc/fortran/ChangeLog: * error.c (gfc_diagnostic_starter): Update for change to diagnostic_show_locus. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic_plugin_test_show_locus.c (custom_diagnostic_finalizer): Update for change to diagnostic_show_locus. From-SVN: r239586
2016-08-18 21:12:54 +02:00
2016-08-18 David Malcolm <dmalcolm@redhat.com>
* c-opts.c (c_diagnostic_finalizer): Update for change to
diagnostic_show_locus.
2016-08-18 David Malcolm <dmalcolm@redhat.com>
* c-common.c: Include "spellcheck.h".
(cb_get_suggestion): New function.
* c-common.h (cb_get_suggestion): New decl.
* c-lex.c (init_c_lex): Initialize cb->get_suggestion to
cb_get_suggestion.
2016-08-18 Marek Polacek <polacek@redhat.com>
PR c/71514
* c-common.c (get_atomic_generic_size): Disallow pointer-to-function
and pointer-to-VLA.
Fix caret locations in format_type_warning (PR c/72857) gcc/c-family/ChangeLog: PR c/72857 * c-common.c (substring_loc::get_range): Rename to... (substring_loc::get_location): ...this, converting param from a source_range * to a location_t *. Call get_source_location_for_substring rather than get_source_range_for_substring, and pass in m_caret_idx. * c-common.h (substring_loc::substring_loc): Add param "caret_idx". (substring_loc::get_range): Replace with... (substring_loc::get_location): ...this. (substring_loc::set_caret_index): New method. (substring_loc): Add field m_caret_idx. * c-format.c (format_warning_va): Update for above changes. Rename local "substring_loc" to "fmt_substring_loc" to avoid clashing with type name. (format_warning_at_char): Add caret_idx param to substring_loc ctor. (check_argument_type): Likewise. (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc" Use a copy when emitting warnings, setting the caret index from TYPE. gcc/ChangeLog: PR c/72857 * input.c (get_source_range_for_substring): Rename to... (get_source_location_for_substring): ...this, adding param "caret_idx", and converting output param from source_range * to location_t *. (get_source_range_for_char): New function. (get_num_source_ranges_for_substring): Update comment to reflect above renaming. (assert_char_at_range): Update to use get_source_range_for_char rather than get_source_range_for_substring. (test_lexer_string_locations_concatenation_2): Likewise. * substring-locations.h (get_source_range_for_substring): Rename to... (get_source_location_for_substring): ...this, and adding param "caret_idx", and converting output param from source_range * to location_t *. gcc/testsuite/ChangeLog: PR c/72857 * gcc.dg/format/asm_fprintf-1.c: Restore column numbers for embedded NUL. * gcc.dg/format/c90-printf-1.c: Restore column numbers. * gcc.dg/format/diagnostic-ranges.c (test_hex): Update expected caret placement. (test_oct): Likewise. (test_multiple): Likewise. (test_field_width_specifier): Likewise. (test_field_width_specifier_2): New function. (test_field_precision_specifier): New function. (test_embedded_nul): Update expected caret placement. (test_non_contiguous_strings): Update line number. * gcc.dg/plugin/diagnostic-test-string-literals-1.c (__emit_string_literal_range): Add "caret_idx" param. (test_simple_string_literal): Add value for new param, updating expected output.. (test_concatenated_string_literal): Likewise. (test_multiline_string_literal): Likewise. (test_hex): Likewise. (test_oct): Likewise. (test_multiple): Likewise. (test_ucn4): Likewise. (test_ucn8): Likewise. (test_u8): Likewise. (test_u): Likewise; update expected message, from "range" to "location". (test_U): Likewise. (test_L): Likewise. (test_macro): Add value for new param. * gcc.dg/plugin/diagnostic-test-string-literals-2.c (__emit_string_literal_range): Add "caret_idx" param. (test_stringified_token_1): Add value for new param. Update expected message, from "range" to "location". (test_stringized_token_2): Likewise, adding param to macro. (test_stringified_token_3): Likewise. * gcc.dg/plugin/diagnostic_plugin_test_string_literals.c (emit_warning): Convert param from source_range to location_t. (test_string_literals): Add caret_idx param, and use it when constructing a substring_loc. Update error message, from "range" to "location". From-SVN: r239510
2016-08-16 20:19:34 +02:00
2016-08-16 David Malcolm <dmalcolm@redhat.com>
PR c/72857
* c-common.c (substring_loc::get_range): Rename to...
(substring_loc::get_location): ...this, converting param from a
source_range * to a location_t *. Call
get_source_location_for_substring rather than
get_source_range_for_substring, and pass in m_caret_idx.
* c-common.h (substring_loc::substring_loc): Add param "caret_idx".
(substring_loc::get_range): Replace with...
(substring_loc::get_location): ...this.
(substring_loc::set_caret_index): New method.
(substring_loc): Add field m_caret_idx.
* c-format.c (format_warning_va): Update for above changes.
Rename local "substring_loc" to "fmt_substring_loc" to avoid
clashing with type name.
(format_warning_at_char): Add caret_idx param to substring_loc ctor.
(check_argument_type): Likewise.
(format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
Use a copy when emitting warnings, setting the caret index from TYPE.
2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
Arnaud Charlet <charlet@adacore.com>
* c-ada-spec.c (dump_number): New function.
(handle_escape_character): Likewise.
(print_ada_macros): Add handling of constant integers and strings.
re PR c/7652 (-Wswitch-break : Warn if a switch case falls through) PR c/7652 gcc/ * alias.c (find_base_value): Adjust fall through comment. * cfgexpand.c (expand_debug_expr): Likewise. * combine.c (find_split_point): Likewise. (expand_compound_operation): Likewise. Add FALLTHRU. (make_compound_operation): Adjust fall through comment. (canon_reg_for_combine): Add FALLTHRU. (force_to_mode): Adjust fall through comment. (simplify_shift_const_1): Likewise. (simplify_comparison): Likewise. * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Add FALLTHRU. * config/aarch64/predicates.md: Likewise. * config/i386/i386.c (function_arg_advance_32): Likewise. (ix86_gimplify_va_arg): Likewise. (print_reg): Likewise. (ix86_print_operand): Likewise. (ix86_build_const_vector): Likewise. (ix86_expand_branch): Likewise. (ix86_sched_init_global): Adjust fall through comment. (ix86_expand_args_builtin): Add FALLTHRU. (ix86_expand_builtin): Likewise. (ix86_expand_vector_init_one_var): Likewise. * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise. (rs6000_adjust_cost): Likewise. (insn_must_be_first_in_group): Likewise. * config/rs6000/rs6000.md: Likewise. Adjust fall through comment. * dbxout.c (dbxout_symbol): Adjust fall through comment. * df-scan.c (df_uses_record): Likewise. * dojump.c (do_jump): Add FALLTHRU. * dwarf2out.c (mem_loc_descriptor): Likewise. Adjust fall through comment. (resolve_args_picking_1): Adjust fall through comment. (loc_list_from_tree_1): Likewise. * expmed.c (make_tree): Likewise. * expr.c (expand_expr_real_2): Add FALLTHRU. (expand_expr_real_1): Likewise. Adjust fall through comment. * fold-const.c (const_binop): Adjust fall through comment. (fold_truth_not_expr): Likewise. (fold_cond_expr_with_comparison): Add FALLTHRU. (fold_binary_loc): Likewise. (contains_label_1): Adjust fall through comment. (multiple_of_p): Likewise. * gcov-tool.c (process_args): Add FALLTHRU. * genattrtab.c (check_attr_test): Likewise. (write_test_expr): Likewise. * genconfig.c (walk_insn_part): Likewise. * genpreds.c (validate_exp): Adjust fall through comment. (needs_variable): Likewise. * gensupport.c (get_alternatives_number): Add FALLTHRU. (subst_dup): Likewise. * gimple-pretty-print.c (dump_gimple_assign): Likewise. * gimplify.c (gimplify_addr_expr): Adjust fall through comment. (gimplify_scan_omp_clauses): Add FALLTHRU. (goa_stabilize_expr): Likewise. * graphite-isl-ast-to-gimple.c (substitute_ssa_name): Adjust fall through comment. * hsa-gen.c (get_address_from_value): Likewise. * ipa-icf.c (sem_function::hash_stmt): Likewise. * ira.c (ira_setup_alts): Add FALLTHRU. * lra-eliminations.c (lra_eliminate_regs_1): Adjust fall through comment. * lto-streamer-out.c (lto_output_tree_ref): Add FALLTHRU. * opts.c (common_handle_option): Likewise. * read-rtl.c (read_rtx_code): Likewise. * real.c (round_for_format): Likewise. * recog.c (asm_operand_ok): Likewise. * reginfo.c (reg_scan_mark_refs): Adjust fall through comment. * reload1.c (set_label_offsets): Likewise. (eliminate_regs_1): Likewise. (reload_reg_reaches_end_p): Likewise. * rtlanal.c (commutative_operand_precedence): Add FALLTHRU. (rtx_cost): Likewise. * sched-rgn.c (is_exception_free): Likewise. * simplify-rtx.c (simplify_rtx): Adjust fall through comment. * stor-layout.c (int_mode_for_mode): Likewise. * toplev.c (print_to_asm_out_file): Likewise. (print_to_stderr): Likewise. * tree-cfg.c (gimple_verify_flow_info): Likewise. * tree-chrec.c (chrec_fold_plus_1): Add FALLTHRU. (chrec_fold_multiply): Likewise. (evolution_function_is_invariant_rec_p): Likewise. (for_each_scev_op): Likewise. * tree-data-ref.c (siv_subscript_p): Likewise. (get_references_in_stmt): Likewise. * tree.c (find_placeholder_in_expr): Adjust fall through comment. (substitute_in_expr): Likewise. (type_cache_hasher::equal): Likewise. (walk_type_fields): Likewise. * var-tracking.c (adjust_mems): Add FALLTHRU. (set_dv_changed): Adjust fall through comment. * varasm.c (default_function_section): Add FALLTHRU. gcc/c-family/ * c-common.c (scalar_to_vector): Adjust fall through comment. * c-opts.c (c_common_handle_option): Likewise. * c-pragma.c (handle_pragma_pack): Add FALLTHRU. * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust fall through comment. * cilk.c (extract_free_variables): Add FALLTHRU. gcc/c/ * c-parser.c (c_parser_external_declaration): Add FALLTHRU. (c_parser_postfix_expression): Likewise. * c-typeck.c (build_unary_op): Adjust fall through comment. (c_mark_addressable): Likewise. gcc/cp/ * call.c (add_builtin_candidate): Add FALLTHRU. (build_integral_nontype_arg_conv): Adjust fall through comment. (build_new_op_1): Add FALLTHRU. (convert_like_real): Adjust fall through comment. * class.c (fixed_type_or_null): Likewise. * constexpr.c (cxx_eval_constant_expression): Likewise. (potential_constant_expression_1): Likewise. Add FALLTHRU. * cp-gimplify.c (cp_gimplify_expr): Adjust fall through comment. (cp_fold): Add FALLTHRU. * cvt.c (build_expr_type_conversion): Adjust fall through comment. * cxx-pretty-print.c (pp_cxx_unqualified_id): Add FALLTHRU. (pp_cxx_qualified_id): Likewise. (cxx_pretty_printer::constant): Adjust fall through comment. (cxx_pretty_printer::primary_expression): Add FALLTHRU. (pp_cxx_pm_expression): Adjust fall through comment. (cxx_pretty_printer::expression): Add FALLTHRU. (cxx_pretty_printer::declaration_specifiers): Reformat code. (pp_cxx_type_specifier_seq): Adjust fall through comment. (pp_cxx_ptr_operator): Likewise. Add FALLTHRU. * error.c (dump_type): Adjust fall through comment. (dump_decl): Likewise. * mangle.c (write_type): Likewise. * method.c (synthesized_method_walk): Add FALLTHRU. * name-lookup.c (arg_assoc_type): Likewise. * parser.c (cp_lexer_print_token): Adjust fall through comment. (cp_parser_primary_expression): Add FALLTHRU. (cp_parser_operator): Likewise. * pt.c (find_parameter_packs_r): Likewise. (tsubst_aggr_type): Adjust fall through comment. * semantics.c (finish_omp_clauses): Add FALLTHRU. * tree.c (lvalue_kind): Likewise. gcc/fortran/ * decl.c (match_attr_spec): Add FALLTHRU. * primary.c (match_arg_list_function): Likewise. * resolve.c (resolve_operator): Adjust fall through comment. (fixup_charlen): Add FALLTHRU. (resolve_allocate_expr): Adjust fall through comment. * trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU. * trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through comment. gcc/java/ * expr.c (java_truthvalue_conversion): Adjust fall through comment. * jcf-io.c (verify_constant_pool): Likewise. * typeck.c (promote_type): Likewise. gcc/objc/ * objc-encoding.c (encode_type): Add FALLTHRU. libcpp/ * lex.c (search_line_fast): Add FALLTHRU. (_cpp_lex_direct): Likewise. (cpp_token_val_index): Adjust fall through comment. * macro.c (parse_params): Add FALLTHRU. * pch.c (count_defs): Adjust fall through comment. (write_defs): Likewise. libiberty/ * cp-demangle.c (d_print_mod): Add FALLTHRU. From-SVN: r239410
2016-08-12 12:30:47 +02:00
2016-08-12 Marek Polacek <polacek@redhat.com>
PR c/7652
* c-common.c (scalar_to_vector): Adjust fall through comment.
* c-opts.c (c_common_handle_option): Likewise.
* c-pragma.c (handle_pragma_pack): Add FALLTHRU.
* c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
fall through comment.
* cilk.c (extract_free_variables): Add FALLTHRU.
2016-08-10 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
2016-08-09 Jason Merrill <jason@redhat.com>
* c-common.c (c_common_attribute_table): vector_size affects type
identity.
2016-08-09 Marek Polacek <polacek@redhat.com>
PR c/7652
* c-ada-spec.c (dump_generic_ada_node): Add return.
2016-08-09 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
C++17 constexpr lambdas.
c-format.c: suggest the correct format string to use (PR c/64955) This adds fix-it hints to c-format.c so that it can (sometimes) suggest the format string the user should have used. The patch adds selftests for the new code in c-format.c. These selftests are thus lang-specific. This is the first time we've had lang-specific selftests, and hence the patch also adds a langhook for running them. (Note that currently the Makefile only invokes the selftests for cc1). gcc/c-family/ChangeLog: PR c/64955 * c-common.h (selftest::c_format_c_tests): New declaration. (selftest::run_c_tests): New declaration. * c-format.c: Include "selftest.h. (format_warning_va): Add param "corrected_substring" and use it to add a replacement fix-it hint. (format_warning_at_substring): Likewise. (format_warning_at_char): Update for new param of format_warning_va. (argument_parser::check_argument_type): Pass "fki" to check_format_types. (check_format_types): Add param "fki" and pass it to format_type_warning. (deref_n_times): New function. (get_modifier_for_format_len): New function. (selftest::test_get_modifier_for_format_len): New function. (get_format_for_type): New function. (format_type_warning): Add param "fki" and use it to attempt to provide hints for argument types when calling format_warning_at_substring. (selftest::get_info): New function. (selftest::assert_format_for_type_streq): New function. (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro. (selftest::test_get_format_for_type_printf): New function. (selftest::test_get_format_for_type_scanf): New function. (selftest::c_format_c_tests): New function. gcc/c/ChangeLog: PR c/64955 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire this up to selftest::run_c_tests. (selftest::run_c_tests): New function. gcc/ChangeLog: PR c/64955 * langhooks-def.h (LANG_HOOKS_RUN_LANG_SELFTESTS): New default do-nothing langhook. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_RUN_LANG_SELFTESTS. * langhooks.h (struct lang_hooks): Add run_lang_selftests. * selftest-run-tests.c: Include "tree.h" and "langhooks.h". (selftest::run_tests): Call lang_hooks.run_lang_selftests. gcc/testsuite/ChangeLog: PR c/64955 * gcc.dg/format/diagnostic-ranges.c: Add fix-it hints to expected output. From-SVN: r239260
2016-08-09 00:50:47 +02:00
2016-08-08 David Malcolm <dmalcolm@redhat.com>
PR c/64955
* c-common.h (selftest::c_format_c_tests): New declaration.
(selftest::run_c_tests): New declaration.
* c-format.c: Include "selftest.h.
(format_warning_va): Add param "corrected_substring" and use
it to add a replacement fix-it hint.
(format_warning_at_substring): Likewise.
(format_warning_at_char): Update for new param of
format_warning_va.
(argument_parser::check_argument_type): Pass "fki" to
check_format_types.
(check_format_types): Add param "fki" and pass it to
format_type_warning.
(deref_n_times): New function.
(get_modifier_for_format_len): New function.
(selftest::test_get_modifier_for_format_len): New function.
(get_format_for_type): New function.
(format_type_warning): Add param "fki" and use it to attempt
to provide hints for argument types when calling
format_warning_at_substring.
(selftest::get_info): New function.
(selftest::assert_format_for_type_streq): New function.
(ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
(selftest::test_get_format_for_type_printf): New function.
(selftest::test_get_format_for_type_scanf): New function.
(selftest::c_format_c_tests): New function.
Use class substring_loc in c-format.c (PR c/52952) gcc/c-family/ChangeLog: PR c/52952 * c-format.c: Include "diagnostic.h". (location_column_from_byte_offset): Delete. (location_from_offset): Delete. (format_warning_va): New function. (format_warning_at_substring): New function. (format_warning_at_char): New function. (check_format_arg): Capture location of format_tree and pass to check_format_info_main. (argument_parser): Add fields "start_of_this_format" and "format_string_cst". (flag_chars_t::validate): Add param "format_string_cst". Convert warning_at call using location_from_offset to call to format_warning_at_char. (argument_parser::argument_parser): Add param "format_string_cst_" and use use it to initialize field "format_string_cst". Initialize new field "start_of_this_format". (argument_parser::read_format_flags): Convert warning_at call using location_from_offset to a call to format_warning_at_char. (argument_parser::read_any_format_left_precision): Likewise. (argument_parser::read_any_format_precision): Likewise. (argument_parser::read_any_other_modifier): Likewise. (argument_parser::find_format_char_info): Likewise, in three places. (argument_parser::parse_any_scan_set): Likewise, in one place. (argument_parser::handle_conversions): Likewise, in two places. (argument_parser::check_argument_type): Add param "fmt_param_loc" and use it to make a substring_loc. Pass the latter to check_format_types. (check_format_info_main): Add params "fmt_param_loc" and "format_string_cst". Convert warning_at calls using location_from_offset to calls to format_warning_at_char. Pass the new params to the arg_parser ctor. Pass "format_string_cst" to flag_chars.validate. Pass "fmt_param_loc" to arg_parser.check_argument_type. (check_format_types): Convert first param from a location_t to a const substring_loc & and rename to "fmt_loc". Attempt to extract the range of the relevant parameter and pass it to format_type_warning. (format_type_warning): Convert first param from a location_t to a const substring_loc & and rename to "fmt_loc". Add params "param_range" and "type". Replace calls to warning_at with calls to format_warning_at_substring. gcc/testsuite/ChangeLog: PR c/52952 * gcc.dg/cpp/pr66415-1.c: Likewise. * gcc.dg/format/asm_fprintf-1.c: Update column numbers. * gcc.dg/format/c90-printf-1.c: Likewise. * gcc.dg/format/diagnostic-ranges.c: New test case. From-SVN: r239253
2016-08-08 22:10:19 +02:00
2016-08-08 David Malcolm <dmalcolm@redhat.com>
PR c/52952
* c-format.c: Include "diagnostic.h".
(location_column_from_byte_offset): Delete.
(location_from_offset): Delete.
(format_warning_va): New function.
(format_warning_at_substring): New function.
(format_warning_at_char): New function.
(check_format_arg): Capture location of format_tree and pass to
check_format_info_main.
(argument_parser): Add fields "start_of_this_format" and
"format_string_cst".
(flag_chars_t::validate): Add param "format_string_cst". Convert
warning_at call using location_from_offset to call to
format_warning_at_char.
(argument_parser::argument_parser): Add param "format_string_cst_"
and use use it to initialize field "format_string_cst".
Initialize new field "start_of_this_format".
(argument_parser::read_format_flags): Convert warning_at call
using location_from_offset to a call to format_warning_at_char.
(argument_parser::read_any_format_left_precision): Likewise.
(argument_parser::read_any_format_precision): Likewise.
(argument_parser::read_any_other_modifier): Likewise.
(argument_parser::find_format_char_info): Likewise, in three places.
(argument_parser::parse_any_scan_set): Likewise, in one place.
(argument_parser::handle_conversions): Likewise, in two places.
(argument_parser::check_argument_type): Add param "fmt_param_loc"
and use it to make a substring_loc. Pass the latter to
check_format_types.
(check_format_info_main): Add params "fmt_param_loc" and
"format_string_cst". Convert warning_at calls using
location_from_offset to calls to format_warning_at_char. Pass the
new params to the arg_parser ctor. Pass "format_string_cst" to
flag_chars.validate. Pass "fmt_param_loc" to
arg_parser.check_argument_type.
(check_format_types): Convert first param from a location_t
to a const substring_loc & and rename to "fmt_loc". Attempt
to extract the range of the relevant parameter and pass it
to format_type_warning.
(format_type_warning): Convert first param from a location_t
to a const substring_loc & and rename to "fmt_loc". Add
params "param_range" and "type". Replace calls to warning_at
with calls to format_warning_at_substring.
2016-08-08 David Malcolm <dmalcolm@redhat.com>
* c-format.c (class flag_chars_t): New class.
(struct length_modifier): New struct.
(class argument_parser): New class.
(flag_chars_t::flag_chars_t): New ctor.
(flag_chars_t::has_char_p): New method.
(flag_chars_t::add_char): New method.
(flag_chars_t::validate): New method.
(flag_chars_t::get_alloc_flag): New method.
(flag_chars_t::assignment_suppression_p): New method.
(argument_parser::argument_parser): New ctor.
(argument_parser::read_any_dollar): New method.
(argument_parser::read_format_flags): New method.
(argument_parser::read_any_format_width): New method.
(argument_parser::read_any_format_left_precision): New method.
(argument_parser::read_any_format_precision): New method.
(argument_parser::handle_alloc_chars): New method.
(argument_parser::read_any_length_modifier): New method.
(argument_parser::read_any_other_modifier): New method.
(argument_parser::find_format_char_info): New method.
(argument_parser::validate_flag_pairs): New method.
(argument_parser::give_y2k_warnings): New method.
(argument_parser::parse_any_scan_set): New method.
(argument_parser::handle_conversions): New method.
(argument_parser::check_argument_type): New method.
(check_format_info_main): Introduce classes argument_parser
and flag_chars_t, moving the code within the loop into methods
of these classes. Make various locals "const".
On-demand locations within string-literals gcc/c-family/ChangeLog: * c-common.c: Include "substring-locations.h". (get_cpp_ttype_from_string_type): New function. (g_string_concat_db): New global. (substring_loc::get_range): New method. * c-common.h (g_string_concat_db): New declaration. (class substring_loc): New class. * c-lex.c (lex_string): When concatenating strings, capture the locations of all tokens using a new obstack, and record the concatenation locations within g_string_concat_db. * c-opts.c (c_common_init_options): Construct g_string_concat_db on the ggc-heap. gcc/ChangeLog: * input.c (string_concat::string_concat): New constructor. (string_concat_db::string_concat_db): New constructor. (string_concat_db::record_string_concatenation): New method. (string_concat_db::get_string_concatenation): New method. (string_concat_db::get_key_loc): New method. (class auto_cpp_string_vec): New class. (get_substring_ranges_for_loc): New function. (get_source_range_for_substring): New function. (get_num_source_ranges_for_substring): New function. (class selftest::lexer_test_options): New class. (struct selftest::lexer_test): New struct. (class selftest::ebcdic_execution_charset): New class. (selftest::ebcdic_execution_charset::s_singleton): New variable. (selftest::lexer_test::lexer_test): New constructor. (selftest::lexer_test::~lexer_test): New destructor. (selftest::lexer_test::get_token): New method. (selftest::assert_char_at_range): New function. (ASSERT_CHAR_AT_RANGE): New macro. (selftest::assert_num_substring_ranges): New function. (ASSERT_NUM_SUBSTRING_RANGES): New macro. (selftest::assert_has_no_substring_ranges): New function. (ASSERT_HAS_NO_SUBSTRING_RANGES): New macro. (selftest::test_lexer_string_locations_simple): New function. (selftest::test_lexer_string_locations_ebcdic): New function. (selftest::test_lexer_string_locations_hex): New function. (selftest::test_lexer_string_locations_oct): New function. (selftest::test_lexer_string_locations_letter_escape_1): New function. (selftest::test_lexer_string_locations_letter_escape_2): New function. (selftest::test_lexer_string_locations_ucn4): New function. (selftest::test_lexer_string_locations_ucn8): New function. (selftest::uint32_from_big_endian): New function. (selftest::test_lexer_string_locations_wide_string): New function. (selftest::uint16_from_big_endian): New function. (selftest::test_lexer_string_locations_string16): New function. (selftest::test_lexer_string_locations_string32): New function. (selftest::test_lexer_string_locations_u8): New function. (selftest::test_lexer_string_locations_utf8_source): New function. (selftest::test_lexer_string_locations_concatenation_1): New function. (selftest::test_lexer_string_locations_concatenation_2): New function. (selftest::test_lexer_string_locations_concatenation_3): New function. (selftest::test_lexer_string_locations_macro): New function. (selftest::test_lexer_string_locations_stringified_macro_argument): New function. (selftest::test_lexer_string_locations_non_string): New function. (selftest::test_lexer_string_locations_long_line): New function. (selftest::test_lexer_char_constants): New function. (selftest::input_c_tests): Call the new test functions once per case within the line_table test matrix. * input.h (struct string_concat): New struct. (struct location_hash): New struct. (class string_concat_db): New class. * substring-locations.h: New header. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic-test-string-literals-1.c: New file. * gcc.dg/plugin/diagnostic-test-string-literals-2.c: New file. * gcc.dg/plugin/diagnostic_plugin_test_string_literals.c: New file. * gcc.dg/plugin/plugin.exp (plugin_test_list): Add the above new files. libcpp/ChangeLog: * charset.c (cpp_substring_ranges::cpp_substring_ranges): New constructor. (cpp_substring_ranges::~cpp_substring_ranges): New destructor. (cpp_substring_ranges::add_range): New method. (cpp_substring_ranges::add_n_ranges): New method. (_cpp_valid_ucn): Add "char_range" and "loc_reader" params; if they are non-NULL, read position information from *loc_reader and update char_range->m_finish accordingly. (convert_ucn): Add "char_range", "loc_reader", and "ranges" params. If loc_reader is non-NULL, read location information from it, and update *ranges accordingly, using char_range. Conditionalize the conversion into tbuf on tbuf being non-NULL. (convert_hex): Likewise, conditionalizing the call to emit_numeric_escape on tbuf. (convert_oct): Likewise. (convert_escape): Add params "loc_reader" and "ranges". If loc_reader is non-NULL, read location information from it, and update *ranges accordingly. Conditionalize the conversion into tbuf on tbuf being non-NULL. (cpp_interpret_string): Rename to... (cpp_interpret_string_1): ...this, adding params "loc_readers" and "out". Use "to" to conditionalize the initialization and usage of "tbuf", such as running the converter. If "loc_readers" is non-NULL, use the instances within it, reading location information from them, and passing them to convert_escape; likewise write to "out" if loc_readers is non-NULL. Check for leading quote and issue an error if it is not present. Update boundary check from "== limit" to ">= limit" to protect against erroneous location values to calls that are not parsing string literals. (cpp_interpret_string): Reimplement in terms to cpp_interpret_string_1. (noop_error_cb): New function. (cpp_interpret_string_ranges): New function. (cpp_string_location_reader::cpp_string_location_reader): New constructor. (cpp_string_location_reader::get_next): New method. * include/cpplib.h (class cpp_string_location_reader): New class. (class cpp_substring_ranges): New class. (cpp_interpret_string_ranges): New prototype. * internal.h (_cpp_valid_ucn): Add params "char_range" and "loc_reader". * lex.c (forms_identifier_p): Pass NULL for new params to _cpp_valid_ucn. From-SVN: r239175
2016-08-05 20:08:33 +02:00
2016-08-05 David Malcolm <dmalcolm@redhat.com>
* c-common.c: Include "substring-locations.h".
(get_cpp_ttype_from_string_type): New function.
(g_string_concat_db): New global.
(substring_loc::get_range): New method.
* c-common.h (g_string_concat_db): New declaration.
(class substring_loc): New class.
* c-lex.c (lex_string): When concatenating strings, capture the
locations of all tokens using a new obstack, and record the
concatenation locations within g_string_concat_db.
* c-opts.c (c_common_init_options): Construct g_string_concat_db
on the ggc-heap.
2016-07-29 Marek Polacek <polacek@redhat.com>
PR c/71926
* c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
parentheses warning.
PR c/71574
* c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
2016-07-28 Martin Liska <mliska@suse.cz>
PR gcov-profile/68025
* c-common.c (handle_no_profile_instrument_function_attribute):
2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
BITS_PER_UNIT_LOG.
2016-07-25 Jason Merrill <jason@redhat.com>
PR c++/65970
* c.opt (fconstexpr-loop-limit): New.
re PR c/65467 ([libgomp] sorry, unimplemented: '_Atomic' with OpenMP) PR c/65467 * gimplify.c (gimplify_adjust_omp_clauses_1): Diagnose implicit map and firstprivate clauses on target construct for _Atomic qualified decls. (gimplify_adjust_omp_clauses): Diagnose explicit firstprivate clauses on target construct for _Atomic qualified decls. * omp-low.c (use_pointer_for_field): Return true for _Atomic qualified decls. * omp-simd-clone.c (simd_clone_clauses_extract): Warn and give up for _Atomic qualified arguments not mentioned in uniform clause. c/ * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if flag_openmp. (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue instead of mark_exp_read on low_bound/length expression. (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize, c_parser_omp_clause_priority, c_parser_omp_clause_hint, c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause, c_parser_oacc_clause_tile, c_parser_omp_clause_schedule, c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned, c_parser_omp_clause_linear, c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen, c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue instead of mark_expr_read. (c_parser_omp_declare_reduction): Reject _Atomic qualified types. * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR, LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine. * c-tree.h (c_omp_clause_copy_ctor): New prototype. * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified array section bases outside of depend clause, for depend clause use convert_lvalue_to_rvalue on the base. (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction, linear, aligned, map, to and from clauses. (c_omp_clause_copy_ctor): New function. c-family/ * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions. (c_finish_omp_for): Reject _Atomic qualified iterators. testsuite/ * gcc.dg/gomp/_Atomic-1.c: New test. * gcc.dg/gomp/_Atomic-2.c: New test. * gcc.dg/gomp/_Atomic-3.c: New test. * gcc.dg/gomp/_Atomic-4.c: New test. * gcc.dg/gomp/_Atomic-5.c: New test. From-SVN: r239964
2016-09-02 20:38:07 +02:00
2016-07-22 Martin Sebor <msebor@redhat.com>
PR c++/71675
* c-common.c (resolve_overloaded_builtin): Avoid converting
__atomic_compare_exchange_n return type to that of what its
first argument points to.
2016-07-22 Uros Bizjak <ubizjak@gmail.com>
* c-common.c: Use HOST_WIDE_INT_M1U instead of
~(unsigned HOST_WIDE_INT) 0.
2016-07-22 Martin Liska <mliska@suse.cz>
PR gcov-profile/69028
PR gcov-profile/62047
* cilk.c (create_cilk_helper_decl): Set location of a new decl
to the current_function_decl.
2016-07-21 Jason Merrill <jason@redhat.com>
PR c++/65168
* c-common.c (c_common_truthvalue_conversion): Check
c_inhibit_evaluation_warnings for warning about address of
reference.
2016-07-20 David Malcolm <dmalcolm@redhat.com>
* c-common.h (lookup_name_fuzzy): Convert return type from tree to
const char *.
2016-07-15 Jason Merrill <jason@redhat.com>
* c-opts.c (c_common_post_options): Update -fabi-version default to 11.
2016-07-15 Jakub Jelinek <jakub@redhat.com>
PR c/71858
* c-common.h (enum lookup_name_fuzzy_kind): Add
FUZZY_LOOKUP_FUNCTION_NAME.
2016-07-08 Jason Merrill <jason@redhat.com>
P0145: Refining Expression Order for C++.
* c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
* c-opts.c: Adjust.
2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
PR c++/71214
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
* c-pragma.h (enum pragma_kind): Rename
PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
users.
2016-06-29 Richard Biener <rguenther@suse.de>
PR middle-end/71002
* c-common.c (c_common_get_alias_set): Remove union type punning case.
2016-06-24 Jason Merrill <jason@redhat.com>
P0145R2: Refining Expression Order for C++.
* c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
MODIFY_EXPR.
internal-fn.c (expand_arith_set_overflow): New function. * internal-fn.c (expand_arith_set_overflow): New function. (expand_addsub_overflow, expand_neg_overflow, expand_mul_overflow): Use it. (expand_arith_overflow_result_store): Likewise. Handle precision smaller than mode precision. * tree-vrp.c (extract_range_basic): For imag part, handle properly signed 1-bit precision result. * doc/extend.texi (__builtin_add_overflow): Document that last argument can't be pointer to enumerated or boolean type. (__builtin_add_overflow_p): Document that last argument can't have enumerated or boolean type. * c-common.c (check_builtin_function_arguments): Require last argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type. Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW if the last argument is pointer to enumerated or boolean type. * c-c++-common/builtin-arith-overflow-1.c (generic_wrong_type, f3, f4): Adjust expected diagnostics. * c-c++-common/torture/builtin-arith-overflow.h (TP): New macro. (T): If OVFP is defined, redefine to TP. * c-c++-common/torture/builtin-arith-overflow-12.c: Adjust comment. * c-c++-common/torture/builtin-arith-overflow-p-1.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-2.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-3.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-4.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-5.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-6.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-7.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-8.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-9.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-10.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-11.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-12.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-13.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-14.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-15.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-16.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-17.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-18.c: New test. * c-c++-common/torture/builtin-arith-overflow-p-19.c: New test. * g++.dg/ext/builtin-arith-overflow-1.C: Pass 0 instead of C as last argument to __builtin_add_overflow_p. From-SVN: r237754
2016-06-24 13:03:27 +02:00
2016-06-24 Jakub Jelinek <jakub@redhat.com>
* c-common.c (check_builtin_function_arguments): Require last
argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
if the last argument is pointer to enumerated or boolean type.
C FE: suggest corrections for misspelled identifiers and type names gcc/c-family/ChangeLog: PR c/70339 * c-common.h (enum lookup_name_fuzzy_kind): New enum. (lookup_name_fuzzy): New prototype. gcc/c/ChangeLog: PR c/70339 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h. (implicit_decl_warning): When issuing warnings for implicit declarations, attempt to provide a suggestion via lookup_name_fuzzy. (undeclared_variable): Likewise when issuing errors. (lookup_name_in_scope): Likewise. (struct edit_distance_traits<cpp_hashnode *>): New struct. (best_macro_match): New typedef. (find_closest_macro_cpp_cb): New function. (lookup_name_fuzzy): New function. * c-parser.c: Include gcc-rich-location.h. (c_token_starts_typename): Split out case CPP_KEYWORD into... (c_keyword_starts_typename): ...this new function. (c_parser_declaration_or_fndef): When issuing errors about missing "struct" etc, add a fixit. For other kinds of errors, attempt to provide a suggestion via lookup_name_fuzzy. (c_parser_parms_declarator): When looking ahead to detect typos in type names, also reject CPP_KEYWORD. (c_parser_parameter_declaration): When issuing errors about unknown type names, attempt to provide a suggestion via lookup_name_fuzzy. * c-tree.h (c_keyword_starts_typename): New prototype. gcc/ChangeLog: PR c/70339 * diagnostic-core.h (pedwarn_at_rich_loc): New prototype. * diagnostic.c (pedwarn_at_rich_loc): New function. * spellcheck.h (best_match::best_match): Add a "best_distance_so_far" optional parameter. (best_match::set_best_so_far): New method. (best_match::get_best_distance): New accessor. (best_match::get_best_candidate_length): New accessor. gcc/testsuite/ChangeLog: PR c/70339 * c-c++-common/attributes-1.c: Update dg-prune-output to include hint. * gcc.dg/diagnostic-token-ranges.c (undeclared_identifier): Update expected results due to builtin "nanl" now being suggested for "name". * gcc.dg/pr67580.c: Update expected messages. * gcc.dg/spellcheck-identifiers.c: New testcase. * gcc.dg/spellcheck-typenames.c: New testcase. From-SVN: r237714
2016-06-22 17:20:41 +02:00
2016-06-22 David Malcolm <dmalcolm@redhat.com>
PR c/70339
* c-common.h (enum lookup_name_fuzzy_kind): New enum.
(lookup_name_fuzzy): New prototype.
2016-06-21 John David Anglin <danglin@gcc.gnu.org>
* c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2016-06-14 Jason Merrill <jason@redhat.com>
P0145R2: Refining Expression Order for C++.
* c.opt (fargs-in-order): New.
* c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2016-06-13 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/71498
* c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
PR preprocessor/71183
* c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
to cb_get_source_date_epoch.
2016-06-10 Jakub Jelinek <jakub@redhat.com>
PR c/68657
* c.opt (Wpsabi): Add Warning flag.
PR c/71392 - SEGV calling integer overflow built-ins with a null pointer gcc/ChangeLog: 2016-06-10 Martin Sebor <msebor@redhat.com> PR c/71392 * builtin-attrs.def (ATTR_NOTHROW_NONNULL_LEAF_LIST): New macro. (ATTR_NOTHROW_NONNULL_TYPEGENERIC_LEAF): Same. * builtins.def (BUILT_IN_SADD_OVERFLOW, BUILT_IN_SADDL_OVERFLOW): Use them. (BUILT_IN_SADDLL_OVERFLOW, BUILT_IN_SSUB_OVERFLOW): Same. (BUILT_IN_SSUBL_OVERFLOW, BUILT_IN_SSUBLL_OVERFLOW): Same. (BUILT_IN_SMUL_OVERFLOW, BUILT_IN_SMULL_OVERFLOW): Same. (BUILT_IN_SMULLL_OVERFLOW, BUILT_IN_UADD_OVERFLOW): Same. (BUILT_IN_UADDL_OVERFLOW, BUILT_IN_UADDLL_OVERFLOW): Same. (BUILT_IN_USUB_OVERFLOW, BUILT_IN_USUBL_OVERFLOW): Same. (BUILT_IN_USUBLL_OVERFLOW, BUILT_IN_UMUL_OVERFLOW): Same. (BUILT_IN_UMULL_OVERFLOW, BUILT_IN_UMULLL_OVERFLOW): gcc/ada/ChangeLog: 2016-06-10 Martin Sebor <msebor@redhat.com> PR c/71392 * gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept the nonnull attribute in type-generic builtins. gcc/c-family/ChangeLog: 2016-06-10 Martin Sebor <msebor@redhat.com> PR c/71392 * gcc/c-family/c-common.c (handle_nonnull_attribute): Accept the nonnull attribute in type-generic builtins. gcc/lto/ChangeLog: 2016-06-10 Martin Sebor <msebor@redhat.com> PR c/71392 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull attribute in type-generic builtins. gcc/testsuite/ChangeLog: 2016-06-10 Martin Sebor <msebor@redhat.com> PR c/71392 * c-c++-common/builtin-arith-overflow-1.c: Add test cases. From-SVN: r237314
2016-06-10 19:38:19 +02:00
2016-06-10 Martin Sebor <msebor@redhat.com>
PR c/71392
* gcc/c-family/c-common.c (handle_nonnull_attribute): Accept
the nonnull attribute in type-generic builtins.
2016-06-09 Martin Sebor <msebor@redhat.com>
PR c/70883
* c-common.c (builtin_function_validate_nargs): Make text of error
message consistent with others like it.
2016-06-08 Martin Sebor <msebor@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/70507
PR c/68120
* c-common.c (check_builtin_function_arguments): Handle
BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2016-06-08 Richard Biener <rguenther@suse.de>
* c-common.c (parse_optimize_options): Improve diagnostic messages.
2016-06-07 Richard Biener <rguenther@suse.de>
PR c/61564
* c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
options and warn about others.
c-common.c (get_source_date_epoch): Rename to cb_get_source_date_epoch. gcc/c-family/ChangeLog: 2016-05-13 Eduard Sanou <dhole@openmailbox.org> * c-common.c (get_source_date_epoch): Rename to cb_get_source_date_epoch. * c-common.c (cb_get_source_date_epoch): Use a single generic erorr message when the parsing fails. Use error_at instead of fatal_error. * c-common.h (get_source_date_epoch): Rename to cb_get_source_date_epoch. * c-common.h (cb_get_source_date_epoch): Prototype. * c-common.h (MAX_SOURCE_DATE_EPOCH): Define. * c-common.h (c_omp_region_type): Remove trailing comma. * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback. * c-lex.c (c_lex_with_flags): Remove initialization of pfile->source_date_epoch. gcc/ChangeLog: 2016-05-13 Eduard Sanou <dhole@openmailbox.org> * doc/cppenv.texi: Note that the `%s` in `date` is a non-standard extension. * gcc.c (driver_handle_option): Call set_source_date_epoch_envvar. * gcc.c (set_source_date_epoch_envvar): New function, sets the SOURCE_DATE_EPOCH environment variable to the current time. gcc/testsuite/ChangeLog: 2016-05-13 Eduard Sanou <dhole@openmailbox.org> * gcc.dg/cpp/source_date_epoch-1.c: New file, test the proper behaviour of the macros __DATE__ and __TIME__ when SOURCE_DATE_EPOCH env var is set. * gcc.dg/cpp/source_date_epoch-2.c: New file, test the error output when parsing the SOURCE_DATE_EPOCH env var, and make sure it is only shown once. * lib/gcc-dg.exp (dg-set-compiler-env-var): New function, set env vars during compilation. * lib/gcc-dg.exp (restore-compiler-env-var): New function, restore env vars set by dg-set-compiler-env-var. libcpp/ChangeLog: 2016-05-13 Eduard Sanou <dhole@openmailbox.org> * include/cpplib.h (cpp_callbacks): Add get_source_date_epoch callback. * include/cpplib.h (cpp_init_source_date_epoch): Remove prototype. * init.c (cpp_init_source_date_epoch): Remove function. * init.c (cpp_create_reader): Initialize pfile->source_date_epoch. * internal.h (cpp_reader): Extend comment about source_date_epoch. * macro.c (_cpp_builtin_macro_text): Use get_source_date_epoch callback only once, read pfile->source_date_epoch on future passes. Check that get_source_date_epoch callback is not NULL. From-SVN: r237001
2016-06-01 18:42:41 +02:00
2016-06-01 Eduard Sanou <dhole@openmailbox.org>
* c-common.c (get_source_date_epoch): Rename to
cb_get_source_date_epoch.
* c-common.c (cb_get_source_date_epoch): Use a single generic erorr
message when the parsing fails. Use error_at instead of fatal_error.
* c-common.h (get_source_date_epoch): Rename to
cb_get_source_date_epoch.
* c-common.h (cb_get_source_date_epoch): Prototype.
* c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
* c-common.h (c_omp_region_type): Remove trailing comma.
* c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
* c-lex.c (c_lex_with_flags): Remove initialization of
pfile->source_date_epoch.
2016-05-30 Jakub Jelinek <jakub@redhat.com>
PR c++/71349
* c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
instead of C_OMP_CLAUSE_SPLIT_FOR.
2016-05-24 Richard Biener <rguenther@suse.de>
PR middle-end/70434
PR c/69504
* c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
(convert_vector_to_array_for_subscript): ... this.
* c-common.c (convert_vector_to_pointer_for_subscript): Use a
VIEW_CONVERT_EXPR to an array type. Rename to ...
(convert_vector_to_array_for_subscript): ... this.
re PR c/70756 (Wrong column number shown for "error: invalid use of flexible array member") PR c/70756 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of size_in_bytes and pass LOC to it. * c-decl.c (build_compound_literal): Pass LOC down to c_incomplete_type_error. * c-tree.h (require_complete_type): Adjust declaration. (c_incomplete_type_error): Likewise. * c-typeck.c (require_complete_type): Add location parameter, pass it down to c_incomplete_type_error. (c_incomplete_type_error): Add location parameter, pass it down to error_at. (build_component_ref): Pass location down to c_incomplete_type_error. (default_conversion): Pass location down to require_complete_type. (build_array_ref): Likewise. (build_function_call_vec): Likewise. (convert_arguments): Likewise. (build_unary_op): Likewise. (build_c_cast): Likewise. (build_modify_expr): Likewise. (convert_for_assignment): Likewise. (c_finish_omp_clauses): Likewise. * call.c (build_new_op_1): Pass LOC to cp_build_modify_expr. * cp-tree.h (cp_build_modify_expr): Update declaration. (cxx_incomplete_type_error, cxx_incomplete_type_diagnostic): New inline overloads. * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Pass INPUT_LOCATION to cp_build_modify_expr. * decl2.c (set_guard): Likewise. (handle_tls_init): Likewise. * init.c (perform_member_init): Likewise. (expand_virtual_init): Likewise. (build_new_1): Likewise. (build_vec_delete_1): Likewise. (get_temp_regvar): Likewise. (build_vec_init): Likewise. * method.c (do_build_copy_assign): Likewise. (assignable_expr): Likewise. * semantics.c (finish_omp_for): Likewise. * typeck.c (cp_build_binary_op): Pass LOCATION to pointer_diff and cp_pointer_int_sum. (cp_pointer_int_sum): Add location parameter. Pass it down to pointer_int_sum. (pointer_diff): Add location parameter. Use it. (build_modify_expr): Pass location down to cp_build_modify_expr. (cp_build_modify_expr): Add location parameter. Use it. (build_x_modify_expr): Pass location down to cp_build_modify_expr. * typeck2.c (cxx_incomplete_type_diagnostic, cxx_incomplete_type_error): Add location parameter. * langhooks-def.h (lhd_incomplete_type_error): Adjust declaration. * langhooks.c (lhd_incomplete_type_error): Add location parameter. * langhooks.h (incomplete_type_error): Likewise. * tree.c (size_in_bytes_loc): Renamed from size_in_bytes. Add location parameter, pass it down to incomplete_type_error. * tree.h (size_in_bytes): New inline overload. (size_in_bytes_loc): Renamed from size_in_bytes. * c-c++-common/pr70756-2.c: New test. * c-c++-common/pr70756.c: New test. From-SVN: r236180
2016-05-12 17:28:08 +02:00
2016-05-12 Marek Polacek <polacek@redhat.com>
PR c/70756
* c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
size_in_bytes and pass LOC to it.
2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
PR c/43651
* c.opt (Wduplicate-decl-specifier): New option.
2016-05-11 Marek Polacek <polacek@redhat.com>
PR c++/71024
* c-common.c (diagnose_mismatched_attributes): New function.
* c-common.h (diagnose_mismatched_attributes): Declare.
2016-05-04 Marek Polacek <polacek@redhat.com>
* c.opt (Wdangling-else): New option.
2016-05-03 Marek Polacek <polacek@redhat.com>
PR c/70859
* c-common.c (builtin_function_validate_nargs): Add location
parameter. Use it.
(check_builtin_function_arguments): Add location and arguments
parameters. Use them.
* c-common.h (check_builtin_function_arguments): Update declaration.
gimplify.h (get_initialized_tmp_var): Add allow_ssa parameter default true. 2016-05-03 Richard Biener <rguenther@suse.de> * gimplify.h (get_initialized_tmp_var): Add allow_ssa parameter default true. (gimplify_arg): Likewise. * gimplify.c (gimplify_expr): Add overload with allow_ssa parameter, re-writing the result to a decl if required. (internal_get_tmp_var): Add allow_ssa parameter and override into_ssa with it. (get_formal_tmp_var): Adjust. (get_initialized_tmp_var): Add allow_ssa parameter. (gimplify_arg): Add allow_ssa parameter and avoid generating SSA names for the result false. (gimplify_call_expr): If the call may return twice do not gimplify parameters into SSA. (prepare_gimple_addressable): Do not allow an SSA name as temporary. (gimplify_modify_expr): Adjust assert. For noreturn calls with a SSA name LHS adjust its def. (gimplify_save_expr): Do not allow an SSA name as save-expr result. (gimplify_one_sizepos): Do not allow an SSA name as a sizepos. (gimplify_body): Init GIMPLE SSA data structures and gimplify into-SSA. (gimplify_scan_omp_clauses): Make sure OMP_CLAUSE_SIZE is not an SSA name. Likewise for OMP_CLAUSE_REDUCTION operands. (gimplify_omp_for): Likewise for OMP_CLAUSE_DECL. Likewise for OMP_FOR_COND, OMP_FOR_INCR and OMP_CLAUSE_LINEAR_STEP. (optimize_target_teams): Do not allow SSA names for clause operands. (gimplify_expr): Likewise for where we mark the result addressable. * passes.def (pass_init_datastructures): Remove. * tree-into-ssa.c (mark_def_sites): Ignore existing SSA names. (rewrite_stmt): Likewise. * tree-inline.c (initialize_cfun): Properly transfer SSA state. (replace_locals_op): Replace SSA names. (copy_gimple_seq_and_replace_locals): Init src_cfun. * gimple-low.c (lower_builtin_setjmp): Deal with SSA. * cgraph.c (release_function_body): Free CFG annotations only when we have a CFG. Simplify. * gimple-fold.c (gimplify_and_update_call_from_tree): Use force_gimple_operand instead of get_initialized_tmp_var. * tree-pass.h (make_pass_init_datastructures): Remove. * tree-ssa.c (execute_init_datastructures): Remove. (pass_data_init_datastructures): Likewise. (class pass_init_datastructures): Likewise. (make_pass_init_datastructures): Likewise. * omp-low.c (create_omp_child_function): Init SSA data structures. (grid_expand_target_grid_body): Likewise. * tree-cfg.c (move_block_to_fn): Double-check the DEF is an SSA name before adding it to names_to_release. (remove_bb): Always release SSA defs. * tree-ssa-ccp.c (get_default_value): Check SSA_NAME_VAR before dereferencing it. * cgraphunit.c (init_lowered_empty_function): Always int SSA data structures. * tree-ssanames.c (release_defs): Remove assert that we are in SSA form. * trans-mem.c (diagnose_tm_1): Handle SSA name function. c-family/ * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not allow call args to gimplify to SSA names. * gcc.dg/pr30172-1.c: Adjust. * gcc.dg/pr63743.c: Likewise. * gcc.dg/tm/pr51696.c: Likewise. * c-c++-common/tm/safe-1.c: Likewise. * gcc.dg/tree-prof/val-prof-3.c: Likewise. * gcc.dg/plugin/self-assign-test-1.c: XFAIL case that needs CSE. * g++.dg/plugin/self-assign-test-1.C: Likewise. * g++.dg/plugin/self-assign-test-2.C: Likewise. From-SVN: r235817
2016-05-03 14:06:19 +02:00
2016-05-03 Richard Biener <rguenther@suse.de>
* cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
allow call args to gimplify to SSA names.
2016-05-03 Marek Polacek <polacek@redhat.com>
* c-common.h (enum c_omp_region_type): Remove stray comma.
c-common.h (enum c_omp_region_type): Define. gcc/c-family/ * c-common.h (enum c_omp_region_type): Define. gcc/c/ * c-parser.c (c_parser_oacc_all_clauses): Update call to c_finish_omp_clauses. (c_parser_omp_all_clauses): Likewise. (c_parser_oacc_cache): Likewise. (c_parser_oacc_loop): Likewise. (omp_split_clauses): Likewise. (c_parser_omp_declare_target): Likewise. (c_parser_cilk_all_clauses): Likewise. (c_parser_cilk_for): Likewise. * c-typeck.c (c_finish_omp_clauses): Replace bool arguments is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort. gcc/cp/ * cp-tree.h (finish_omp_clauses): Update prototype. * parser.c (cp_parser_oacc_all_clauses): Update call to finish_omp_clauses. (cp_parser_omp_all_clauses): Likewise. (cp_parser_omp_for_loop): Likewise. (cp_omp_split_clauses): Likewise. (cp_parser_oacc_cache): Likewise. (cp_parser_oacc_loop): Likewise. (cp_parser_omp_declare_target): (cp_parser_cilk_simd_all_clauses): Likewise. (cp_parser_cilk_for): Likewise. * pt.c (tsubst_omp_clauses): Replace allow_fields and declare_simd arguments with enum c_omp_region_type ort. (tsubst_omp_clauses): Update calls to finish_omp_clauses. (tsubst_omp_attribute): Update calls to tsubst_omp_clauses. (tsubst_omp_for_iterator): Update calls to finish_omp_clauses. (tsubst_expr): Update calls to tsubst_omp_clauses. * semantics.c (finish_omp_clauses): Replace bool arguments allow_fields, declare_simd, and is_cilk with bitmask ort. (finish_omp_for): Update call to finish_omp_clauses. From-SVN: r235780
2016-05-02 20:49:15 +02:00
2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
* c-common.h (enum c_omp_region_type): Define.
2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
* c-common.c (shorten_compare): Use wi::to_wide.
2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
PR middle-end/70626
* c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
* c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
reduction clauses in acc parallel loops.
2016-04-29 Marek Polacek <polacek@redhat.com>
PR c/70852
* c-common.c (warn_for_memset): Check domain before accessing it.
2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
PR/69089
* c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
"aligned" attribute.
2016-04-28 Jason Merrill <jason@redhat.com>
* c-lex.c (c_common_has_attribute): Handle nodiscard.
2016-04-28 Eduard Sanou <dhole@openmailbox.org>
Matthias Klose <doko@debian.org>
* c-common.c (get_source_date_epoch): New function, gets the environment
variable SOURCE_DATE_EPOCH and parses it as long long with error
handling.
* c-common.h (get_source_date_epoch): Prototype.
* c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
2015-04-27 Ryan Burn <contact@rnburn.com>
PR c++/69024
PR c++/68997
* cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
(cilk_recognize_spawn): Renamed from recognize_spawn and change to
external linkage.
(cilk_detect_and_unwrap): Corresponding changes.
(extract_free_variables): Don't extract free variables from
AGGR_INIT_EXPR slot.
* c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
(cilk_recognize_spawn): Likewise.
2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
* c.opt (Wmemset-elt-size): New option.
* c-common.c (warn_for_memset): New function.
* c-common.h (warn_for_memset): Declare.
2016-04-25 Jason Merrill <jason@redhat.com>
* c-common.c (handle_unused_attribute): Accept CONST_DECL.
No longer static.
* c-common.h: Declare it.
* c-lex.c (c_common_has_attribute): Add maybe_unused.
2016-04-22 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
PR c++/69363
* c-cilkplus.c (c_finish_cilk_clauses): Remove function.
* c-common.h (c_finish_cilk_clauses): Remove declaration.
tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount. * tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount. (SET_TYPE_ALIGN, SET_DECL_ALIGN): New. * tree-core.h (tree_type_common.align): Use bit-field. (tree_type_common.spare): New. (tree_decl_common.off_align): Make smaller. (tree_decl_common.align): Use bit-field. * expr.c (expand_expr_addr_expr_1): Use SET_TYPE_ALIGN. * omp-low.c (install_var_field): Use SET_DECL_ALIGN. (scan_sharing_clauses): Ditto. (finish_taskreg_scan): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. (omp_finish_file): Ditto. * stor-layout.c (do_type_align): Use SET_DECL_ALIGN. (layout_decl): Ditto. (relayout_decl): Ditto. (finalize_record_size): Use SET_TYPE_ALIGN. (finalize_type_size): Ditto. (finish_builtin_struct): Ditto. (layout_type): Ditto. (initialize_sizetypes): Ditto. * targhooks.c (std_gimplify_va_arg_expr): Use SET_TYPE_ALIGN. * tree-nested.c (insert_field_into_struct): Use SET_TYPE_ALIGN. (lookup_field_for_decl): Use SET_DECL_ALIGN. (get_chain_field): Ditto. (get_trampoline_type): Ditto. (get_nl_goto_field): Ditto. * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use SET_DECL_ALIGN. (unpack_ts_type_common_value_fields): Use SET_TYPE_ALIGN. * gimple-expr.c (copy_var_decl): Use SET_DECL_ALIGN. * tree.c (make_node_stat): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. (build_qualified_type): Use SET_TYPE_ALIGN. (build_aligned_type, build_range_type_1): Ditto. (build_atomic_base): Ditto. (build_common_tree_nodes): Ditto. * cfgexpand.c (align_local_variable): Use SET_DECL_ALIGN. (expand_one_stack_var_at): Ditto. * coverage.c (build_var): Use SET_DECL_ALIGN. * except.c (init_eh): Ditto. * function.c (assign_parm_setup_block): Ditto. * symtab.c (increase_alignment_1): Ditto. * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Ditto. * tree-vect-stmts.c (ensure_base_align): Ditto. * varasm.c (align_variable): Ditto. (assemble_variable): Ditto. (build_constant_desc): Ditto. (output_constant_def_contents): Ditto. * config/arm/arm.c (arm_relayout_function): Use SET_DECL_ALIGN. * config/avr/avr.c (avr_adjust_type_node): Use SET_TYPE_ALIGN. * config/mips/mips.c (mips_std_gimplify_va_arg_expr): Ditto. * config/msp430/msp430.c (msp430_gimplify_va_arg_expr): Ditto. * config/spu/spu.c (spu_build_builtin_va_list): Use SET_DECL_ALIGN. ada/ * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN. (gnat_to_gnu_field): Ditto. (components_to_record): Ditto. (create_variant_part_from): Ditto. (copy_and_substitute_in_size): Ditto. (substitute_in_type): Ditto. * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN. (make_packable_type): Ditto. (maybe_pad_type): Ditto. (finish_fat_pointer_type): Ditto. (finish_record_type): Ditto and use SET_DECL_ALIGN. (rest_of_record_type_compilation): Use SET_TYPE_ALIGN. (create_field_decl): Use SET_DECL_ALIGN. c-family/ * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN and SET_DECL_ALIGN. c/ * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN. cp/ * class.c (build_vtable): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. (layout_class_type): Ditto. (build_base_field): Use SET_DECL_ALIGN. (fixup_attribute_variants): Use SET_TYPE_ALIGN. * decl.c (duplicate_decls): Use SET_DECL_ALIGN. (record_unknown_type): Use SET_TYPE_ALIGN. (cxx_init_decl_processing): Ditto. (copy_type_enum): Ditto. (grokfndecl): Use SET_DECL_ALIGN. (copy_type_enum): Use SET_TYPE_ALIGN. * pt.c (instantiate_class_template_1): Use SET_TYPE_ALIGN. (tsubst): Ditto. * tree.c (cp_build_qualified_type_real): Use SET_TYPE_ALIGN. * lambda.c (maybe_add_lambda_conv_op): Use SET_DECL_ALIGN. * method.c (implicitly_declare_fn): Use SET_DECL_ALIGN. * rtti.c (emit_tinfo_decl): Ditto. fortran/ * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN. * trans-common.c (build_common_decl): Use SET_DECL_ALIGN. * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN. go/ * go-gcc.cc (Gcc_backend::implicit_variable): Use SET_DECL_ALIGN. java/ * class.c (add_method_1): Use SET_DECL_ALIGN. (make_class_data): Ditto. (emit_register_classes_in_jcr_section): Ditto. * typeck.c (build_java_array_type): Ditto. objc/ * objc-act.c (objc_build_struct): Use SET_DECL_ALIGN. libcc1/ * plugin.cc (plugin_finish_record_or_union): Use SET_TYPE_ALIGN. From-SVN: r235172
2016-04-18 22:36:27 +02:00
2016-04-18 Michael Matz <matz@suse.de>
* c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
and SET_DECL_ALIGN.
2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
(dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
to incomplete types.
(dump_nested_type): Remove redundant tests and tidy up.
(print_ada_declaration): Also set TREE_VISITED on the declaration of
a type which is the typedef of an original type.
2016-04-15 Marek Polacek <polacek@redhat.com>
PR c/70651
* c-common.c (build_va_arg): Change two asserts into errors and return
error_mark_node.
2016-04-13 Marek Polacek <polacek@redhat.com>
PR c++/70639
* c-indentation.c (should_warn_for_misleading_indentation): Bail out
for switch statements, too.
2016-03-28 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
2016-03-23 Marek Polacek <polacek@redhat.com>
PR c++/69884
* c.opt (Wignored-attributes): New option.
2016-03-22 David Malcolm <dmalcolm@redhat.com>
PR c/69993
* c-indentation.c (warn_for_misleading_indentation): Rewrite the
diagnostic text, reversing the order of the warning and note so
that they appear in source order.
2016-03-17 Marek Polacek <polacek@redhat.com>
PR c/69407
* c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
operations.
2016-03-14 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
* c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
2016-03-09 Richard Biener <rguenther@suse.de>
PR c/70143
* c-common.c (strict_aliasing_warning): Add back
alias_sets_conflict_p check.
2016-03-08 Jason Merrill <jason@redhat.com>
* c-opts.c (set_std_cxx1z): Don't enable concepts.
2016-03-04 David Malcolm <dmalcolm@redhat.com>
PR c/68187
* c-indentation.c (get_visual_column): Move code to determine next
tab stop to...
(next_tab_stop): ...this new function.
(line_contains_hash_if): Delete function.
(detect_preprocessor_logic): Delete function.
(get_first_nws_vis_column): New function.
(detect_intervening_unindent): New function.
(should_warn_for_misleading_indentation): Replace call to
detect_preprocessor_logic with a call to
detect_intervening_unindent.
2016-03-04 David Malcolm <dmalcolm@redhat.com>
PR c/68187
* c-indentation.c (should_warn_for_misleading_indentation): When
suppressing warnings about cases where the guard and body are on
the same column, only use the first non-whitespace column in place
of the guard token column when dealing with "else" clauses.
When rejecting aligned BODY and NEXT, loosen the requirement
from equality with the first non-whitespace of guard to simply
that they not be indented relative to it.
2016-03-04 Richard Biener <rguenther@suse.de>
PR c++/70054
* c-common.c (strict_aliasing_warning): Use alias_set_subset_of
instead of alias_sets_conflict_p.
2016-03-01 Marek Polacek <polacek@redhat.com>
PR c++/69795
* c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
any DECL.
2016-02-22 Martin Sebor <msebor@redhat.com>
PR middle-end/69780
* c-common.c (check_builtin_function_arguments): Validate and
reject invalid arguments to __builtin_alloca_with_align.
2016-02-20 Mark Wielaard <mjw@redhat.com>
PR c/28901
* c.opt (Wunused-const-variable): Turn into Alias for...
(Wunused-const-variable=): New option.
2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/69865
* c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
here...
(c_common_init_options): ...to here.
(set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
2016-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/69826
* c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
(init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
flag_preprocess_only.
2016-02-16 Jakub Jelinek <jakub@redhat.com>
PR c/69835
* c.opt (Wnonnull-compare): Enable for -Wall.
2016-02-15 Jakub Jelinek <jakub@redhat.com>
PR c++/69797
* c-common.c (sync_resolve_size): Diagnose too few arguments
even when params is non-NULL empty vector.
2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
PR target/60410
* c.opt (fshort-double): Remove.
2016-02-05 Martin Sebor <msebor@redhat.com>
PR c++/69662
* c.opt (Warning options): Update -Wplacement-new to take
an optional argument.
2016-02-01 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/69543
PR c/69558
* c-pragma.c (handle_pragma_diagnostic): Pass input_location
instead of loc to control_warning_option.
2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
* c.opt (fopenacc-dim=): New option.
2016-01-27 Ryan Burn <contact@rnburn.com>
PR cilkplus/69267
* cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
gimplify_arg. Removed superfluous post_p argument.
* c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
superfluous post_p argument.
* c-gimplify.c (c_gimplify_expr): Likewise.
PR other/69006: fix extra newlines after diagnostics gcc/c-family/ChangeLog: PR other/69006 * c-opts.c (c_diagnostic_finalizer): Replace invocation of pp_newline_and_flush with pp_flush. gcc/cp/ChangeLog: PR other/69006 * error.c (print_instantiation_partial_context_line): Add missing newlines from output for the t == NULL case. (print_instantiation_partial_context): Remove call to pp_newline. gcc/ChangeLog: PR other/69006 * diagnostic-show-locus.c (layout::print_source_line): Replace call to pp_newline with call to layout::print_newline. (layout::print_annotation_line): Likewise. (layout::move_to_column): Likewise. (layout::print_any_fixits): After printing any fixits, print a trailing newline, if necessary. (layout::print_newline): New method, resetting any colorization before a newline. (diagnostic_show_locus): Move the pp_newline to before the early bailout. Remove dummy block enclosing the layout instance. * diagnostic.c (default_diagnostic_finalizer): Replace invocation of pp_newline_and_flush with pp_flush. (diagnostic_append_note): Delete use of pp_newline. (diagnostic_append_note_at_rich_loc): Delete. * diagnostic.h (diagnostic_append_note_at_rich_loc): Delete. * pretty-print.h (output_buffer_append_r): Reset buff->line_length when newline characters are added to the buffer. gcc/fortran/ChangeLog: PR other/69006 * error.c (gfc_diagnostic_starter): Delete use of pp_newline. gcc/testsuite/ChangeLog: PR other/69006 * g++.dg/ext/timevar1.C: Add dg-allow-blank-lines-in-output directive. * gcc.dg/plugin/diagnostic-test-show-locus-color.c: Update expected multiline output to reflect the colorization being disabled before newlines. * gcc.dg/plugin/diagnostic_plugin_test_show_locus.c (custom_diagnostic_finalizer): Replace call to pp_newline_and_flush with call to pp_flush. * gcc.dg/unroll-2.c: Add dg-allow-blank-lines-in-output directive. * gfortran.dg/implicit_class_1.f90: Likewise. * lib/gcc-dg.exp (allow_blank_lines): New global. (dg-allow-blank-lines-in-output): New procedure. (gcc-dg-prune): Complain about blank lines in the output, unless dg-allow-blank-lines-in-output was called. * lib/multiline.exp (_build_multiline_regex): Only support arbitrary followup text for non-blank-lines, not for blank lines. From-SVN: r232837
2016-01-26 18:08:12 +01:00
2016-01-26 David Malcolm <dmalcolm@redhat.com>
PR other/69006
* c-opts.c (c_diagnostic_finalizer): Replace invocation of
pp_newline_and_flush with pp_flush.
2016-01-20 Martin Sebor <msebor@redhat.com>
PR c/69405
* c-common.c (sync_resolve_size): Avoid printing diagnostic about
an incompatible argument when the argument isn't a valid tree node.
2016-01-18 Jason Merrill <jason@redhat.com>
PR c++/68767
* c-common.c (check_function_arguments_recurse): Fold the whole
COND_EXPR, not just the condition.
2016-01-18 Tom de Vries <tom@codesourcery.com>
* c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
classify as loop clause.
2016-01-15 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/68271
* c-pragma.c (c_register_pragma_1): Adjust comment to note that
C++ FE no longer has limit on number of pragmas.
2015-01-14 Ryan Burn <contact@rnburn.com>
PR c++/69048
* cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
to add missing cleanup point.
2016-01-14 David Malcolm <dmalcolm@redhat.com>
PR c++/68819
* c-indentation.c (get_visual_column): Add location_t param.
Handle the column number being zero by effectively disabling the
warning, with an "inform".
(should_warn_for_misleading_indentation): Add location_t argument
for all uses of get_visual_column.
2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/69029
* c-indentation.c (should_warn_for_misleading_indentation):
Don't warn about do-while statements.
2016-01-07 Martin Sebor <msebor@redhat.com>
PR c/68966
* c-common.c (sync_resolve_size): Reject first argument when it's
a pointer to _Bool.
2016-01-05 David Malcolm <dmalcolm@redhat.com>
PR c/69122
* c-indentation.c (get_visual_column): Remove default argument.
(should_warn_for_misleading_indentation): For the multiline case,
update call to get_visual_column for next_stmt_exploc so that it
captures the location of the first non-whitespace character in the
relevant line. Don't issue warnings if there is non-whitespace
before the next statement.
2016-01-04 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2015-12-21 David Malcolm <dmalcolm@redhat.com>
* c-common.c (binary_op_error): Convert first param from
location_t to rich_location * and use it when emitting an error.
* c-common.h (binary_op_error): Convert first param from
location_t to rich_location *.
2015-12-16 David Malcolm <dmalcolm@redhat.com>
* c-common.h (conflict_marker_get_final_tok_kind): New prototype.
* c-lex.c (conflict_marker_get_final_tok_kind): New function.
c-common.c (c_common_attribute_table): Handle "omp declare target link" attribute. gcc/c-family/ * c-common.c (c_common_attribute_table): Handle "omp declare target link" attribute. gcc/ * cgraphunit.c (output_in_order): Do not assemble "omp declare target link" variables in ACCEL_COMPILER. * gimplify.c (gimplify_adjust_omp_clauses): Do not remove mapping of "omp declare target link" variables. * omp-low.c (scan_sharing_clauses): Do not remove mapping of "omp declare target link" variables. (add_decls_addresses_to_decl_constructor): For "omp declare target link" variables output address of the artificial pointer instead of address of the variable. Set most significant bit of the size to mark them. (pass_data_omp_target_link): New pass_data. (pass_omp_target_link): New class. (find_link_var_op): New static function. (make_pass_omp_target_link): New function. * passes.def: Add pass_omp_target_link. * tree-pass.h (make_pass_omp_target_link): Declare. * varpool.c (symbol_table::output_variables): Do not assemble "omp declare target link" variables in ACCEL_COMPILER. gcc/lto/ * lto.c: Include stringpool.h and fold-const.h. (offload_handle_link_vars): New static function. (lto_main): Call offload_handle_link_vars. libgomp/ * libgomp.h (REFCOUNT_LINK): Define. (struct splay_tree_key_s): Add link_key. * target.c (gomp_map_vars): Treat REFCOUNT_LINK objects as not mapped. Replace target address of the pointer with target address of newly mapped object in the splay tree. Set link pointer on target to the device address of the mapped object. (gomp_unmap_vars): Restore target address of the pointer in the splay tree for REFCOUNT_LINK objects after unmapping. (gomp_load_image_to_device): Set refcount to REFCOUNT_LINK for "omp declare target link" objects. (gomp_unload_image_from_device): Replace j with i. Force unmap of all "omp declare target link" objects, which were mapped for the image. (gomp_exit_data): Restore target address of the pointer in the splay tree for REFCOUNT_LINK objects after unmapping. * testsuite/libgomp.c/target-link-1.c: New file. From-SVN: r231655
2015-12-15 15:56:50 +01:00
2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
* c-common.c (c_common_attribute_table): Handle "omp declare target
link" attribute.
2015-12-14 Jakub Jelinek <jakub@redhat.com>
PR c/68833
* c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
2014-12-12 Tobias Burnus <burnus@net-b.de>
PR fortran/68815
* c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
specifiers (%d, %i,%u and %c).
2015-12-10 David Malcolm <dmalcolm@redhat.com>
* c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
2015-12-08 Jakub Jelinek <jakub@redhat.com>
PR c/48088
PR c/68657
* c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
* c-pragma.c (handle_pragma_diagnostic): Adjust
control_warning_option caller.
2015-12-07 David Malcolm <dmalcolm@redhat.com>
* c-common.c (c_cpp_error): Update for change to
rich_location::set_range.
2015-12-04 Paolo Bonzini <bonzini@gnu.org>
* c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
shifting 1 out of the sign bit.
2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
* c-common.c (c_common_attribute_table[]): Update max arguments
count for "simd" attribute.
(handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
2015-12-03 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/57580
* c-ppoutput.c (print): Change printed field to bool.
Move src_file last for smaller padding.
(init_pp_output): Set print.printed to false instead of 0.
(scan_translation_unit): Fix up formatting. Set print.printed
to true after printing something other than newline.
(scan_translation_unit_trad): Set print.printed to true instead of 1.
(maybe_print_line_1): Set print.printed to false instead of 0.
(print_line_1): Likewise.
(do_line_change): Set print.printed to true instead of 1.
(cb_define, dump_queued_macros, cb_include, cb_def_pragma,
dump_macro): Set print.printed to false after printing newline.
2015-12-02 Jason Merrill <jason@redhat.com>
* c-common.c (fold_for_warn): New.
(warn_logical_operator, warn_tautological_cmp)
(check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
* c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
(c_fully_fold_internal, decl_constant_value_for_optimization):
Move to c/c-fold.c.
* c-common.h: Don't declare decl_constant_value_for_optimization.
Fix TYPE_MAIN_VARIANT construction for arrays of qualified typedefs (PR c/68162). PR c/68162 reports a spurious warning about incompatible types involving arrays of const double, constructed in one place using a typedef for const double and in another place literally using const double. The problem is that the array of the typedef was incorrectly constructed without a TYPE_MAIN_VARIANT being an array of unqualified elements as it should be (though it seems some more recent change resulted in this producing incorrect diagnostics, likely the support for C++-style handling of arrays of qualified type). This patch fixes the logic in grokdeclarator to determine first_non_attr_kind, which is used to determine whether it is necessary to use the TYPE_MAIN_VARIANT of the type in the declaration specifiers. However, fixing that logic introduces a failure of gcc.dg/debug/dwarf2/pr47939-4.c, a test introduced along with first_non_attr_kind. Thus, it is necessary to track the original qualified typedef when qualifying an array type, to use it rather than a newly-constructed type, to avoid regressing regarding typedef names in debug info. This is done along lines I suggested in <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47939#c6>: track the original type and the number of levels of array indirection at which it appears, and, in possibly affected cases, pass extra arguments to c_build_qualified_type (with default arguments to avoid needing to pass those extra arguments explicitly everywhere). Given Richard's recent fix to dwarf2out.c, this allows the C bug to be fixed without causing debug information regressions. Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc/c: PR c/68162 * c-decl.c (grokdeclarator): Set first_non_attr_kind before following link from declarator to next declarator. Track original qualified type and pass it to c_build_qualified_type. * c-typeck.c (c_build_qualified_type): Add arguments orig_qual_type and orig_qual_indirect. gcc/c-family: PR c/68162 * c-common.h (c_build_qualified_type): Add extra default arguments. gcc/cp: PR c/68162 * tree.c (c_build_qualified_type): Add extra arguments. gcc/testsuite: PR c/68162 * gcc.dg/pr68162-1.c: New test. From-SVN: r231194
2015-12-02 19:24:23 +01:00
2015-12-02 Joseph Myers <joseph@codesourcery.com>
PR c/68162
* c-common.h (c_build_qualified_type): Add extra default
arguments.
OpenACC host_data support. gcc/ * gimple-pretty-print.c (dump_gimple_omp_target): Add host_data support. * gimple.h (gf_mask): Add GF_OMP_TARGET_KIND_OACC_HOST_DATA. (is_gimple_omp_oacc): Add support for above. * gimplify.c (omp_region_type): Add ORT_ACC_HOST_DATA. (omp_notice_variable): Diagnose undefined implicit uses of use_device variables in offloaded regions. (gimplify_scan_omp_clauses): Add host_data, use_device support. Diagnose undefined mapping of use_device variables in OpenACC clauses. (gimplify_omp_workshare): Add host_data support. (gimplify_expr): Likewise. * omp-builtins.def (BUILT_IN_GOACC_HOST_DATA): New. * omp-low.c (lookup_decl_in_outer_ctx) (maybe_lookup_decl_in_outer_ctx): Add optional argument to skip host_data regions. (scan_sharing_clauses): Support use_device. (check_omp_nesting_restrictions): Support host_data. (expand_omp_target): Support host_data. (lower_omp_target): Skip over outer host_data regions when looking up decls. Support use_device. (make_gimple_omp_edges): Support host_data. * tree-nested.c (convert_nonlocal_omp_clauses): Add use_device clause. gcc/c/ * c-parser.c (c_parser_omp_clause_name): Add use_device support. (c_parser_oacc_clause_use_device): New function. (c_parser_oacc_all_clauses): Add use_device support. (OACC_HOST_DATA_CLAUSE_MASK): New macro. (c_parser_oacc_host_data): New function. (c_parser_omp_construct): Add host_data support. * c-tree.h (c_finish_oacc_host_data): Add prototype. * c-typeck.c (c_finish_oacc_host_data): New function. (c_finish_omp_clauses): Add use_device support. gcc/cp/ * cp-tree.h (finish_oacc_host_data): Add prototype. * parser.c (cp_parser_omp_clause_name): Add use_device support. (cp_parser_oacc_all_clauses): Add use_device support. (OACC_HOST_DATA_CLAUSE_MASK): New macro. (cp_parser_oacc_host_data): New function. (cp_parser_omp_construct): Add host_data support. (cp_parser_pragma): Add host_data support. * semantics.c (finish_omp_clauses): Add use_device support. (finish_oacc_host_data): New function. gcc/c-family/ * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA. * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA. (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE. libgomp/ * oacc-parallel.c (GOACC_host_data): New function. * libgomp.map (GOACC_host_data): Add to GOACC_2.0.1. * testsuite/libgomp.oacc-c-c++-common/host_data-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/host_data-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/host_data-3.c: New test. * testsuite/libgomp.oacc-c-c++-common/host_data-4.c: New test. * testsuite/libgomp.oacc-c-c++-common/host_data-5.c: New test. * testsuite/libgomp.oacc-c-c++-common/host_data-6.c: New test. Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com> Co-Authored-By: James Norris <James_Norris@mentor.com> From-SVN: r231118
2015-12-01 16:52:23 +01:00
2015-12-01 Julian Brown <julian@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
James Norris <James_Norris@mentor.com>
* c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
* c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
(pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (print_ada_macros): Remove redundant blank line.
(decl_sloc_common): Delete and move bulk of processing to...
(decl_sloc): ...here.
(pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
(dump_ada_double_name): Remove S parameter and compute the suffix.
(dump_ada_array_type): Add PARENT parameter. Simplify computation of
element type and deal with an anonymous one.
(dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
(dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
and remove reference to QUAL_UNION_TYPE.
(dump_nested_types): Make 2 passes on the fields and move bulk to...
(dump_nested_type): ...here. New function extracted from above.
Generate a full declaration for anonymous element type of arrays.
(print_ada_declaration): Really skip anonymous declarations. Remove
references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
Clean up processing of declarations of array types and objects.
(print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
Remove obsolete code and tidy up.
2015-11-29 Jan Hubicka <hubicka@ucw.cz>
PR c/67581
* c-common.c (handle_transparent_union_attribute): Update
also type variants.
2015-11-27 Martin Liska <mliska@suse.cz>
PR c++/68312
* array-notation-common.c (cilkplus_extract_an_triplets):
Release vector of vectors.
* cilk.c (gimplify_cilk_spawn): Free allocated memory.
2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
PR c++/68527
* c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
(print_ada_struct_decl): Likewise.
2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
PR c++/68001
* c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
* cilk.c (recognize_spawn): Determine location in a more precise
way.
2015-11-19 Jason Merrill <jason@redhat.com>
* c-common.c (shorten_compare): But look through macros from
system headers.
2015-11-18 Jason Merrill <jason@redhat.com>
* c-common.c (shorten_compare): Don't -Wtype-limits if the
non-constant operand comes from a macro.
2015-11-17 Jason Merrill <jason@redhat.com>
PR bootstrap/68346
* c-common.c (warn_tautological_cmp): Fold before checking for
constants.
2015-11-16 Marek Polacek <polacek@redhat.com>
PR c++/68362
* c-common.c (check_case_bounds): Fold low and high cases.
2015-11-16 Marek Polacek <polacek@redhat.com>
* c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
* c-common.c (c_common_get_alias_set): Likewise.
(handle_visibility_attribute): Likewise.
2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
* c-common.c (handle_simd_attribute): New.
(struct attribute_spec): Add entry for "simd".
(handle_simd_attribute): New.
2015-11-13 Kai Tietz <ktietz70@googlemail.com>
* c-lex.c (interpret_float): Use fold_convert.
Source range tracking in libcpp and C FE, with bit-packing optimization This patch combines: [PATCH 05/10] Add ranges to libcpp tokens (via ad-hoc data, unoptimized) [PATCH 06/10] Track expression ranges in C frontend [PATCH 07/10] Add plugin to recursively dump the source-ranges in a tree (v2) [PATCH 08/10] Wire things up so that libcpp users get token underlines [PATCH 09/10] Delay some resolution of ad-hoc locations, preserving ranges [PATCH 10/10] Compress short ranges into source_location [PATCH] libcpp: add examples to source_location description along with fixes for the nits identified during review. gcc/ChangeLog: * Makefile.in (OBJS): Add gcc-rich-location.o. * diagnostic.c (diagnostic_append_note): Pass line_table to rich_location ctor. (emit_diagnostic): Likewise. (inform): Likewise. (inform_n): Likewise. (warning): Likewise. (warning_at): Likewise. (warning_n): Likewise. (pedwarn): Likewise. (permerror): Likewise. (error): Likewise. (error_n): Likewise. (error_at): Likewise. (sorry): Likewise. (fatal_error): Likewise. (internal_error): Likewise. (internal_error_no_backtrace): Likewise. (source_range::debug): Likewise. * gcc-rich-location.c: New file. * gcc-rich-location.h: New file. * genmatch.c (fatal_at): Pass line_table to rich_location ctor. (warning_at): Likewise. * gimple.h (gimple_set_block): Use set_block function. * input.c (dump_line_table_statistics): Dump stats on how many ranges were optimized vs how many needed ad-hoc table. (write_digit_row): Add "map" param; use its range_bits to calculate the per-character offset. (dump_location_info): Print the range and column bits for each ordinary map. Use the range bits to calculate the per-character offset. Pass the map as a new param to the various calls to write_digit_row. Eliminate uses of ORDINARY_MAP_NUMBER_OF_COLUMN_BITS. * print-tree.c (print_node): Print any source range information. * rtl-error.c (diagnostic_for_asm): Likewise. * toplev.c (general_init): Initialize line_table's default_range_bits. * tree-cfg.c (move_block_to_fn): Likewise. (move_block_to_fn): Likewise. * tree-inline.c (copy_phis_for_bb): Likewise. * tree.c (tree_set_block): Likewise. (get_pure_location): New function. (set_source_range): New functions. (set_block): New function. (set_source_range): New functions. * tree.h (CAN_HAVE_RANGE_P): New. (EXPR_LOCATION_RANGE): New. (EXPR_HAS_RANGE): New. (get_expr_source_range): New inline function. (DECL_LOCATION_RANGE): New. (set_source_range): New decls. (get_decl_source_range): New inline function. gcc/ada/ChangeLog: * gcc-interface/trans.c (Sloc_to_locus): Add line_table param when calling linemap_position_for_line_and_column. gcc/c-family/ChangeLog: * c-common.c (c_fully_fold_internal): Capture existing souce_range, and store it on the result. * c-opts.c (c_common_init_options): Set global_dc->colorize_source_p. gcc/c/ChangeLog: * c-decl.c (warn_defaults_to): Pass line_table to rich_location ctor. * c-errors.c (pedwarn_c99): Likewise. (pedwarn_c90): Likewise. * c-parser.c (set_c_expr_source_range): New functions. (c_token::get_range): New method. (c_token::get_finish): New method. (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret based on the range from the start of the LHS to the end of the RHS. (c_parser_conditional_expression): Likewise, based on the range from the start of the cond.value to the end of exp2.value. (c_parser_binary_expression): Call set_c_expr_source_range on the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR. (c_parser_cast_expression): Call set_c_expr_source_range on ret based on the cast_loc through to the end of the expr. (c_parser_unary_expression): Likewise, based on the op_loc through to the end of op. (c_parser_sizeof_expression) Likewise, based on the start of the sizeof token through to either the closing paren or the end of expr. (c_parser_postfix_expression): Likewise, using the token range, or from the open paren through to the close paren for parenthesized expressions. (c_parser_postfix_expression_after_primary): Likewise, for various kinds of expression. * c-tree.h (struct c_expr): Add field "src_range". (c_expr::get_start): New method. (c_expr::get_finish): New method. (set_c_expr_source_range): New decls. * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range on ret for prefix unary ops. (parser_build_binary_op): Likewise, running from the start of arg1.value through to the end of arg2.value. gcc/cp/ChangeLog: * error.c (pedwarn_cxx98): Pass line_table to rich_location ctor. gcc/fortran/ChangeLog: * error.c (gfc_warning): Pass line_table to rich_location ctor. (gfc_warning_now_at): Likewise. (gfc_warning_now): Likewise. (gfc_error_now): Likewise. (gfc_fatal_error): Likewise. (gfc_error): Likewise. (gfc_internal_error): Likewise. gcc/testsuite/ChangeLog: * gcc.dg/diagnostic-token-ranges.c: New file. * gcc.dg/diagnostic-tree-expr-ranges-2.c: New file. * gcc.dg/plugin/diagnostic-test-expressions-1.c: New file. * gcc.dg/plugin/diagnostic-test-show-trees-1.c: New file. * gcc.dg/plugin/diagnostic_plugin_show_trees.c: New file. * gcc.dg/plugin/diagnostic_plugin_test_show_locus.c (get_loc): Add line_table param when calling linemap_position_for_line_and_column. (test_show_locus): Pass line_table to rich_location ctors. (plugin_init): Remove setting of global_dc->colorize_source_p. * gcc.dg/plugin/diagnostic_plugin_test_tree_expression_range.c: New file. * gcc.dg/plugin/plugin.exp (plugin_test_list): Add diagnostic_plugin_test_tree_expression_range.c, diagnostic-test-expressions-1.c, diagnostic_plugin_show_trees.c, and diagnostic-test-show-trees-1.c. libcpp/ChangeLog: * errors.c (cpp_diagnostic): Pass pfile->line_table to rich_location ctor. (cpp_diagnostic_with_line): Likewise. * include/cpplib.h (struct cpp_token): Update comment for src_loc to indicate that the range of the token is "baked into" the source_location. * include/line-map.h (source_location): Update the descriptive comment to reflect the packing scheme for short ranges, adding worked examples of location encoding. (struct line_map_ordinary): Drop field "column_bits" in favor of field "m_column_and_range_bits"; add field "m_range_bits". (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Delete. (location_adhoc_data): Add source_range field. (struct line_maps): Add fields "default_range_bits", "num_optimized_ranges" and "num_unoptimized_ranges". (get_combined_adhoc_loc): Add source_range param. (get_range_from_loc): New declaration. (pure_location_p): New prototype. (COMBINE_LOCATION_DATA): Add source_range param. (SOURCE_LINE): Update for renaming of column_bits. (SOURCE_COLUMN): Likewise. Shift the column right by the map's range_bits. (LAST_SOURCE_LINE_LOCATION): Update for renaming of column_bits. (linemap_position_for_line_and_column): Add line_maps * params. (rich_location::rich_location): Likewise. * lex.c (_cpp_lex_direct): Capture the range of the token, baking it into token->src_loc via a call to COMBINE_LOCATION_DATA. * line-map.c (LINE_MAP_MAX_COLUMN_NUMBER): Reduce from 1U << 17 to 1U << 12. (location_adhoc_data_hash): Add the src_range into the hash value. (location_adhoc_data_eq): Require equality of the src_range values. (can_be_stored_compactly_p): New function. (get_combined_adhoc_loc): Add src_range param, and store it, via a bit-packing scheme for short ranges, otherwise within the lookaside table. Remove the requirement that data is non-NULL. (get_range_from_adhoc_loc): New function. (get_range_from_loc): New function. (pure_location_p): New function. (linemap_add): Ensure that start_location has zero for the range_bits, unless we're past LINE_MAP_MAX_LOCATION_WITH_COLS. Initialize range_bits to zero. Assert that the start_location is "pure". (linemap_line_start): Assert that the column_and_range_bits >= range_bits. Update determinination of whether we need to start a new map using the effective column bits, without the range bits. Use the set's default_range_bits in new maps, apart from those with column_bits == 0, which should also have 0 range_bits. Increase the column bits for new maps by the range bits. When adding lines to an existing map, use set->highest_line directly rather than offsetting highest by SOURCE_COLUMN. Add assertions to sanity-check the return value. (linemap_position_for_column): Offset to_column by range_bits. Update set->highest_location if necessary. (linemap_position_for_line_and_column): Add line_maps * param. Update the calculation to offset the column by range_bits, and conditionalize it on being <= LINE_MAP_MAX_LOCATION_WITH_COLS. Bound it by LINEMAPS_MACRO_LOWEST_LOCATION. Update set->highest_location if necessary. (linemap_position_for_loc_and_offset): Handle ad-hoc locations; pass "set" to linemap_position_for_line_and_column. (linemap_macro_map_loc_unwind_toward_spelling): Add line_maps param. Handle ad-hoc locations. (linemap_location_in_system_header_p): Pass on "set" to call to linemap_macro_map_loc_unwind_toward_spelling. (linemap_macro_loc_to_spelling_point): Retain ad-hoc locations. Pass on "set" to call to linemap_macro_map_loc_unwind_toward_spelling. (linemap_resolve_location): Retain ad-hoc locations. Pass on "set" to call to linemap_macro_map_loc_unwind_toward_spelling. (linemap_unwind_toward_expansion): Pass on "set" to call to linemap_macro_map_loc_unwind_toward_spelling. (linemap_expand_location): Extract the data pointer before extracting the location. (rich_location::rich_location): Add line_maps param; use it to extract the range from the source_location. * location-example.txt: Regenerate, showing new representation. From-SVN: r230331
2015-11-13 17:29:59 +01:00
2015-11-13 David Malcolm <dmalcolm@redhat.com>
* c-common.c (c_fully_fold_internal): Capture existing souce_range,
and store it on the result.
* c-opts.c (c_common_init_options): Set
global_dc->colorize_source_p.
c-pragma.c (oacc_pragmas): Add entry for declare directive. 2015-11-12 James Norris <jnorris@codesourcery.com> Joseph Myers <joseph@codesourcery.com> gcc/c-family/ * c-pragma.c (oacc_pragmas): Add entry for declare directive. * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE. (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and PRAGMA_OACC_CLAUSE_LINK. gcc/c/ * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE. (c_parser_omp_clause_name): Handle 'device_resident' clause. (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and PRAGMA_OMP_CLAUSE_LINK. (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and PRAGMA_OACC_CLAUSE_LINK. (OACC_DECLARE_CLAUSE_MASK): New definition. (c_parser_oacc_declare): New function. gcc/cp/ * parser.c (cp_parser_omp_clause_name): Handle 'device_resident' clause. (cp_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and PRAGMA_OMP_CLAUSE_LINK. (cp_paser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and PRAGMA_OMP_CLAUSE_LINK. (OACC_DECLARE_CLAUSE_MASK): New definition. (cp_parser_oacc_declare): New function. (cp_parser_pragma): Handle PRAGMA_OACC_DECLARE. * pt.c (tsubst_expr): Handle OACC_DECLARE. gcc/ * gimple-pretty-print.c (dump_gimple_omp_target): Handle GF_OMP_TARGET_KIND_OACC_DECLARE. * gimple.h (enum gf_mask): Add GF_OMP_TARGET_KIND_OACC_DECLARE. (is_gomple_omp_oacc): Handle GF_OMP_TARGET_KIND_OACC_DECLARE. * gimplify.c (oacc_declare_returns): New. (gimplify_bind_expr): Prepend 'exit' stmt to cleanup. (device_resident_p): New function. (oacc_default_clause): Handle device_resident clause. (gimplify_oacc_declare_1, gimplify_oacc_declare): New functions. (gimplify_expr): Handle OACC_DECLARE. * omp-builtins.def (BUILT_IN_GOACC_DECLARE): New builtin. * omp-low.c (expand_omp_target): Handle GF_OMP_TARGET_KIND_OACC_DECLARE and BUILTIN_GOACC_DECLARE. (build_omp_regions_1): Handlde GF_OMP_TARGET_KIND_OACC_DECLARE. (lower_omp_target): Handle GF_OMP_TARGET_KIND_OACC_DECLARE, GOMP_MAP_DEVICE_RESIDENT and GOMP_MAP_LINK. (make_gimple_omp_edges): Handle GF_OMP_TARGET_KIND_OACC_DECLARE. * tree-pretty-print.c (dump_omp_clause): Handle GOMP_MAP_LINK and GOMP_MAP_DEVICE_RESIDENT. gcc/testsuite * c-c++-common/goacc/declare-1.c: New test. * c-c++-common/goacc/declare-2.c: Likewise. include/ * gomp-constants.h (enum gomp_map_kind): Add GOMP_MAP_DEVICE_RESIDENT and GOMP_MAP_LINK. libgomp/ * libgomp.map (GOACC_2.0.1): Export GOACC_declare. * oacc-parallel.c (GOACC_declare): New function. * testsuite/libgomp.oacc-c-c++-common/declare-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/declare-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/declare-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/declare-5.c: Likewise. * testsuite/libgomp.oacc-c++/declare-1.C: Likewise. Co-Authored-By: Joseph Myers <joseph@codesourcery.com> From-SVN: r230275
2015-11-12 23:20:41 +01:00
2015-11-12 James Norris <jnorris@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* c-pragma.c (oacc_pragmas): Add entry for declare directive.
* c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
(enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
PRAGMA_OACC_CLAUSE_LINK.
2015-11-11 Marek Polacek <polacek@redhat.com>
PR c/68107
PR c++/68266
* c-common.c (valid_array_size_p): New function.
* c-common.h (valid_array_size_p): Declare.
2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
PR bootstrap/68271
* c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
decl.c: Remove unused header files. ada * gcc-interface/decl.c: Remove unused header files. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. c * c-array-notation.c: Remove unused header files. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * gccspec.c: Likewise. c-family * array-notation-common.c: Remove unused header files. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp * call.c: Remove unused header files. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-cilkplus.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * cxx-pretty-print.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * g++spec.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. * vtable-class-hierarchy.c: Likewise. Fortran * array.c: Remove unused header files. * convert.c: Likewise. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * frontend-passes.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * parse.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go * go-backend.c: Remove unused header files. * go-gcc.cc: Likewise. * go-lang.c: Likewise. * gospec.c: Likewise. Java * boehm.c: Remove unused header files. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. * verify-impl.c: Likewise. * zextract.c: Likewise. jit * dummy-frontend.c: Remove unused header files. * jit-builtins.c: Likewise. * jit-playback.c: Likewise. * jit-recording.c: Likewise. * jit-spec.c: Likewise. * libgccjit.c: Likewise. lto * lto-lang.c: Remove unused header files. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc * objc-act.c: Remove unused header files. * objc-encoding.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-lang.c: Likewise. * objc-map.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. objcp * objcp-decl.c: Remove unused header files. * objcp-lang.c: Likewise. From-SVN: r230166
2015-11-11 15:18:08 +01:00
2015-11-11 Andrew MacLeod <amacleod@redhat.com>
* array-notation-common.c: Remove unused header files.
* c-ada-spec.c: Likewise.
* c-cilkplus.c: Likewise.
* c-common.c: Likewise.
* c-cppbuiltin.c: Likewise.
* c-dump.c: Likewise.
* c-format.c: Likewise.
* c-gimplify.c: Likewise.
* c-indentation.c: Likewise.
* c-lex.c: Likewise.
* c-omp.c: Likewise.
* c-opts.c: Likewise.
* c-pch.c: Likewise.
* c-ppoutput.c: Likewise.
* c-pragma.c: Likewise.
* c-pretty-print.c: Likewise.
* c-semantics.c: Likewise.
* c-ubsan.c: Likewise.
* cilk.c: Likewise.
* stub-objc.c: Likewise.
2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
James Norris <jnorris@codesourcery.com>
Julian Brown <julian@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* c-pragma.c (oacc_pragmas): Add "routine".
* c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
* c-common.c (c_common_attributes): Add scalar_storage_order.
(handle_scalar_storage_order_attribute): New function.
* c-pragma.c (global_sso): New variable.
(maybe_apply_pragma_scalar_storage_order): New function.
(handle_pragma_scalar_storage_order): Likewise.
(init_pragma): Register scalar_storage_order.
* c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
* c.opt (Wscalar-storage-order): New warning.
(fsso-struct=): New option.
2015-11-08 Martin Sebor <msebor@redhat.com>
* c.opt (Wplacement-new): Add a period to the end of a sentence.
2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
* c-common.c: Don't undef DEF_BUILTIN.
Reimplement diagnostic_show_locus, introducing rich_location classes gcc/ChangeLog: * diagnostic-color.c (color_dict): Eliminate "caret"; add "range1" and "range2". (parse_gcc_colors): Update comment to describe default GCC_COLORS. * diagnostic-core.h (warning_at_rich_loc): New declaration. (error_at_rich_loc): New declaration. (permerror_at_rich_loc): New declaration. (inform_at_rich_loc): New declaration. * diagnostic-show-locus.c (adjust_line): Delete. (struct point_state): New struct. (class colorizer): New class. (class layout_point): New class. (class layout_range): New class. (struct line_bounds): New. (class layout): New class. (colorizer::colorizer): New ctor. (colorizer::~colorizer): New dtor. (layout::layout): New ctor. (layout::print_source_line): New method. (layout::print_annotation_line): New method. (layout::get_state_at_point): New method. (layout::get_x_bound_for_row): New method. (diagnostic_show_locus): Reimplement in terms of class layout. (diagnostic_print_caret_line): Delete. * diagnostic.c (diagnostic_initialize): Replace MAX_LOCATIONS_PER_MESSAGE with rich_location::MAX_RANGES. (diagnostic_set_info_translated): Convert param from location_t to rich_location *. Eliminate calls to set_location on the message in favor of storing the rich_location ptr there. (diagnostic_set_info): Convert param from location_t to rich_location *. (diagnostic_build_prefix): Break out array into... (diagnostic_kind_color): New variable. (diagnostic_get_color_for_kind): New function. (diagnostic_report_diagnostic): Colorize the option_text using the color for the severity. (diagnostic_append_note): Update for change in signature of diagnostic_set_info. (diagnostic_append_note_at_rich_loc): New function. (emit_diagnostic): Update for change in signature of diagnostic_set_info. (inform): Likewise. (inform_at_rich_loc): New function. (inform_n): Update for change in signature of diagnostic_set_info. (warning): Likewise. (warning_at): Likewise. (warning_at_rich_loc): New function. (warning_n): Update for change in signature of diagnostic_set_info. (pedwarn): Likewise. (permerror): Likewise. (permerror_at_rich_loc): New function. (error): Update for change in signature of diagnostic_set_info. (error_n): Likewise. (error_at): Likewise. (error_at_rich_loc): New function. (sorry): Update for change in signature of diagnostic_set_info. (fatal_error): Likewise. (internal_error): Likewise. (internal_error_no_backtrace): Likewise. (source_range::debug): New function. * diagnostic.h (struct diagnostic_info): Eliminate field "override_column". Add field "richloc". (struct diagnostic_context): Add field "colorize_source_p". (diagnostic_override_column): Delete. (diagnostic_set_info): Convert param from location_t to rich_location *. (diagnostic_set_info_translated): Likewise. (diagnostic_append_note_at_rich_loc): New function. (diagnostic_num_locations): New function. (diagnostic_expand_location): Get the location from the rich_location. (diagnostic_print_caret_line): Delete. (diagnostic_get_color_for_kind): New declaration. * genmatch.c (linemap_client_expand_location_to_spelling_point): New. (error_cb): Update for change in signature of "error" callback. (fatal_at): Likewise. (warning_at): Likewise. * input.c (linemap_client_expand_location_to_spelling_point): New. * pretty-print.c (text_info::set_range): New method. (text_info::get_location): New method. * pretty-print.h (MAX_LOCATIONS_PER_MESSAGE): Eliminate this macro. (struct text_info): Eliminate "locations" array in favor of "m_richloc", a rich_location *. (textinfo::set_location): Add a "caret_p" param, and reimplement in terms of a call to set_range. (textinfo::get_location): Eliminate inline implementation in favor of an out-of-line reimplementation. (textinfo::set_range): New method. * rtl-error.c (diagnostic_for_asm): Update for change in signature of diagnostic_set_info. * tree-diagnostic.c (default_tree_printer): Update for new "caret_p" param for textinfo::set_location. * tree-pretty-print.c (percent_K_format): Likewise. gcc/c-family/ChangeLog: * c-common.c (c_cpp_error): Convert parameter from location_t to rich_location *. Eliminate the "column_override" parameter and the call to diagnostic_override_column. Update the "done_lexing" clause to set range 0 on the rich_location, rather than overwriting a location_t. * c-common.h (c_cpp_error): Convert parameter from location_t to rich_location *. Eliminate the "column_override" parameter. gcc/c/ChangeLog: * c-decl.c (warn_defaults_to): Update for change in signature of diagnostic_set_info. * c-errors.c (pedwarn_c99): Likewise. (pedwarn_c90): Likewise. * c-objc-common.c (c_tree_printer): Update for new "caret_p" param for textinfo::set_location. gcc/cp/ChangeLog: * error.c (cp_printer): Update for new "caret_p" param for textinfo::set_location. (pedwarn_cxx98): Update for change in signature of diagnostic_set_info. gcc/fortran/ChangeLog: * cpp.c (cb_cpp_error): Convert parameter from location_t to rich_location *. Eliminate the "column_override" parameter. * error.c (gfc_warning): Update for change in signature of diagnostic_set_info. (gfc_format_decoder): Update handling of %C/%L for changes to struct text_info. (gfc_diagnostic_starter): Use richloc when determining whether to print one locus or two. When handling a location that will involve a call to diagnostic_show_locus, only attempt to print the locus for the primary location, and don't call into diagnostic_print_caret_line. (gfc_warning_now_at): Update for change in signature of diagnostic_set_info. (gfc_warning_now): Likewise. (gfc_error_now): Likewise. (gfc_fatal_error): Likewise. (gfc_error): Likewise. (gfc_internal_error): Likewise. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic-test-show-locus-bw.c: New file. * gcc.dg/plugin/diagnostic-test-show-locus-color.c: New file. * gcc.dg/plugin/diagnostic_plugin_test_show_locus.c: New file. * gcc.dg/plugin/plugin.exp (plugin_test_list): Add the above. * lib/gcc-dg.exp: Load multiline.exp. libcpp/ChangeLog: * errors.c (cpp_diagnostic): Update for change in signature of "error" callback. (cpp_diagnostic_with_line): Likewise, calling override_column on the rich_location. * include/cpplib.h (struct cpp_callbacks): Within "error" callback, convert param from source_location to rich_location *, and drop column_override param. * include/line-map.h (struct source_range): New struct. (struct location_range): New struct. (class rich_location): New class. (linemap_client_expand_location_to_spelling_point): New declaration. * line-map.c (rich_location::rich_location): New ctors. (rich_location::lazily_expand_location): New method. (rich_location::override_column): New method. (rich_location::add_range): New methods. (rich_location::set_range): New method. From-SVN: r229884
2015-11-06 20:50:50 +01:00
2015-11-06 David Malcolm <dmalcolm@redhat.com>
* c-common.c (c_cpp_error): Convert parameter from location_t to
rich_location *. Eliminate the "column_override" parameter and
the call to diagnostic_override_column.
Update the "done_lexing" clause to set range 0
on the rich_location, rather than overwriting a location_t.
* c-common.h (c_cpp_error): Convert parameter from location_t to
rich_location *. Eliminate the "column_override" parameter.
gimplify.c (gimplify_scan_omp_clauses): Add support for OMP_CLAUSE_TILE. gcc/ * gimplify.c (gimplify_scan_omp_clauses): Add support for OMP_CLAUSE_TILE. Update handling of OMP_CLAUSE_INDEPENDENT. (gimplify_adjust_omp_clauses): Likewise. * omp-low.c (scan_sharing_clauses): Add support for OMP_CLAUSE_TILE. * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_TILE. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_TILE. * tree.c (omp_clause_num_ops): Add an entry for OMP_CLAUSE_TILE. (omp_clause_code_name): Likewise. (walk_tree_1): Handle OMP_CLAUSE_TILE. * tree.h (OMP_TILE_LIST): New macro. gcc/c-family/ * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR, AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION clauses with parallel and kernels and loops. * c-pragma.h (enum pragma_omp_clause): Add entries for PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}. * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS, NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO, INDEPENDENT,SEQ}. (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}. gcc/c/ * c-parser.c (c_parser_omp_clause_name): Add support for PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE. (c_parser_omp_clause_default): Add is_oacc argument. Handle default(none) in OpenACC. (c_parser_oacc_shape_clause): Allow pointer variables as gang static arguments. (c_parser_oacc_clause_tile): New function. (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT, OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE. (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT, TILE}. (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT. (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE, FIRSTPRIVATE}. (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default. (c_parser_oacc_update): Update the error message for missing clauses. * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE and OMP_CLAUSE_INDEPENDENT. gcc/cp/ * parser.c (cp_parser_omp_clause_name): Add support for PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE. (cp_parser_oacc_shape_clause): Allow pointer variables as gang static arguments. (cp_parser_oacc_clause_tile): New function. (cp_parser_omp_clause_default): Add is_oacc argument. Handle default(none) in OpenACC. (cp_parser_oacc_all_clauses): Add support for (cp_parser_omp_all_clauses): Update call to cp_parser_omp_clause_default. PRAGMA_OACC_CLAUSE_{DEFAULT,INDEPENDENT,TILE,PRIVATE,FIRSTPRIVATE}. (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT, TILE}. (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT. (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE, FIRSTPRIVATE}. (cp_parser_oacc_update): Update the error message for missing clauses. * semantics.c (finish_omp_clauses): Add support for OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE. gcc/fortran/ * openmp.c (gfc_match_omp_clauses): Update support for the tile and default clauses in OpenACC. (gfc_match_oacc_update): Error when data clauses are supplied. (oacc_compatible_clauses): Delete. (resolve_omp_clauses): Give special care for OpenACC reductions. Also update error reporting for the tile clause. (resolve_oacc_loop_blocks): Update error reporting for the tile clause. * trans-openmp.c (gfc_trans_omp_clauses): Update OMP_CLAUSE_SEQ. Add OMP_CLAUSE_{AUTO,TILE} and add support the the gang static argument. (gfc_trans_oacc_combined_directive): Update the list of clauses which are split to acc loops. gcc/testsuite/ * c-c++-common/goacc/combined-directives.c: New test. * c-c++-common/goacc/loop-clauses.c: New test. * c-c++-common/goacc/tile.c: New test. * c-c++-common/goacc/loop-shape.c: Add test for pointer variable as gang static arguments. * c-c++-common/goacc/update-1.c: Adjust expected error message. * g++.dg/goacc/template.C: New test. * gfortran.dg/goacc/combined-directives.f90: New test. * gfortran.dg/goacc/default.f95: New test. * gfortran.dg/goacc/default_none.f95: New test. * gfortran.dg/goacc/firstprivate-1.f95: New test. * gfortran.dg/goacc/gang-static.f95: New test. * gfortran.dg/goacc/kernels-loop-inner.f95: New test. * gfortran.dg/goacc/kernels-loops-adjacent.f95: New test. * gfortran.dg/goacc/list.f95: Update test. * gfortran.dg/goacc/loop-2.f95: Likewise. * gfortran.dg/goacc/loop-4.f95: New test. * gfortran.dg/goacc/loop-5.f95: New test. * gfortran.dg/goacc/loop-6.f95: New test. * gfortran.dg/goacc/loop-tree-1.f90: Update test. * gfortran.dg/goacc/multi-clause.f90: New test. * gfortran.dg/goacc/parallel-tree.f95: Update test. * gfortran.dg/goacc/update.f95: New test. Co-Authored-By: James Norris <jnorris@codesourcery.com> Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com> Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com> Co-Authored-By: Tom de Vries <tom@codesourcery.com> From-SVN: r229832
2015-11-06 03:03:48 +01:00
2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
James Norris <jnorris@codesourcery.com>
* c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
clauses with parallel and kernels and loops.
* c-pragma.h (enum pragma_omp_clause): Add entries for
PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
* pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
INDEPENDENT,SEQ}.
(tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
2015-11-05 Martin Sebor <msebor@redhat.com>
PR c++/67942
* c.opt (-Wplacement-new): New option.
gcc/ 2015-11-05 Jakub Jelinek <jakub@redhat.com> Ilya Verbin <ilya.verbin@intel.com> * builtin-types.def (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR): Remove. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): New. * cgraph.h (enum cgraph_simd_clone_arg_type): Add SIMD_CLONE_ARG_TYPE_LINEAR_REF_VARIABLE_STEP, SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_VARIABLE_STEP and SIMD_CLONE_ARG_TYPE_LINEAR_VAL_VARIABLE_STEP. (struct cgraph_simd_clone_arg): Adjust comment. * omp-builtins.def (BUILT_IN_GOMP_TARGET): Rename GOMP_target_41 to GOMP_target_ext. Add num_teams and thread_limit arguments. (BUILT_IN_GOMP_TARGET_DATA): Rename GOMP_target_data_41 to GOMP_target_data_ext. (BUILT_IN_GOMP_TARGET_UPDATE): Rename GOMP_target_update_41 to GOMP_target_update_ext. (BUILT_IN_GOMP_LOOP_NONMONOTONIC_DYNAMIC_START, BUILT_IN_GOMP_LOOP_NONMONOTONIC_GUIDED_START, BUILT_IN_GOMP_LOOP_NONMONOTONIC_DYNAMIC_NEXT, BUILT_IN_GOMP_LOOP_NONMONOTONIC_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_DYNAMIC_START, BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_GUIDED_START, BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_DYNAMIC_NEXT, BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_GUIDED_NEXT, BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_DYNAMIC, BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_GUIDED): New built-ins. * tree-core.h (enum omp_clause_schedule_kind): Add OMP_CLAUSE_SCHEDULE_MASK, OMP_CLAUSE_SCHEDULE_MONOTONIC, OMP_CLAUSE_SCHEDULE_NONMONOTONIC and change OMP_CLAUSE_SCHEDULE_LAST value. * tree.def (OMP_SIMD, CILK_SIMD, CILK_FOR, OMP_DISTRIBUTE, OMP_TASKLOOP, OACC_LOOP): Add OMP_FOR_ORIG_DECLS argument. * tree.h (OMP_FOR_ORIG_DECLS): Use OMP_LOOP_CHECK instead of OMP_FOR_CHECK. Remove comment. * tree-pretty-print.c (dump_omp_clause): Handle GOMP_MAP_FIRSTPRIVATE_REFERENCE and GOMP_MAP_ALWAYS_POINTER. Simplify. Print schedule clause modifiers. * tree-vect-stmts.c (vectorizable_simd_clone_call): Add SIMD_CLONE_ARG_TYPE_LINEAR_{REF,VAL,UVAL}_VARIABLE_STEP cases. * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALWAYS_TO. (omp_default_clause): Tweak for private/firstprivate/is_device_ptr variables on target construct and use_device_ptr on target data. (omp_check_private): Likewise. (omp_notice_variable): For references check whether what it refers to has mappable type, rather than the reference itself. (omp_is_private): Diagnose linear iteration variables on non-simd constructs. (omp_no_lastprivate): Return true only for Fortran. (gimplify_scan_omp_clauses): Or in GOVD_MAP_ALWAYS_TO for GOMP_MAP_ALWAYS_TO or GOMP_MAP_ALWAYS_TOFROM kinds. Add support for GOMP_MAP_FIRSTPRIVATE_REFERENCE and GOMP_MAP_ALWAYS_POINTER, remove old handling of structure element based array sections. Use GOMP_MAP_ALWAYS_P. Fix up handling of lastprivate and linear when combined with distribute. Gimplify variable low-bound for array reduction. Look through POINTER_PLUS_EXPR when looking for ADDR_EXPR for array section reductions. (gimplify_adjust_omp_clauses_1): For implicit references to variables with reference type and when not ref to scalar or ref to pointer, map what they refer to using tofrom and use GOMP_MAP_FIRSTPRIVATE_REFERENCE for the reference. (gimplify_adjust_omp_clauses): Remove GOMP_MAP_ALWAYS_POINTER from target exit data. Handle GOMP_MAP_FIRSTPRIVATE_REFERENCE. Drop OMP_CLAUSE_MAP_PRIVATE support. Use GOMP_MAP_ALWAYS_P. Diagnose the same var on both firstprivate and lastprivate on distribute construct. (gimplify_omp_for): Fix up handling of predetermined lastprivate or linear iter vars when combined with distribute. (find_omp_teams, computable_teams_clause, optimize_target_teams): New functions. (gimplify_omp_workshare): Call optimize_target_teams. * omp-low.c (struct omp_region): Add sched_modifiers field. (struct omp_for_data): Likewise. (omp_any_child_fn_dumped): New variable. (extract_omp_for_data): Fill in sched_modifiers, and mask out OMP_CLAUSE_SCHEDULE_KIND bits outside of OMP_CLAUSE_SCHEDULE_MASK from sched_kind. (determine_parallel_type): Use only OMP_CLAUSE_SCHEDULE_MASK bits of OMP_CLAUSE_SCHED_KIND. (scan_sharing_clauses): Handle GOMP_MAP_FIRSTPRIVATE_REFERENCE, drop OMP_CLAUSE_MAP_PRIVATE support. Look through POINTER_PLUS_EXPR for array section reductions. (add_taskreg_looptemp_clauses): Add one extra _looptemp_ clause even for distribute parallel for, if there are lastprivate clauses on the for. (lower_rec_input_clauses): Handle non-zero low-bound on array section reductions. (lower_reduction_clauses): Likewise. (lower_send_clauses): Look through POINTER_PLUS_EXPR for array section reductions. (expand_parallel_call): Use nonmonotonic entrypoints for nonmonotonic: dynamic/guided. (expand_omp_taskreg): Call assign_assembler_name_if_neeeded on child_fn if current_function_decl has assembler name set, but child_fn does not. Dump the header and IL of the child function when not in SSA form. (expand_omp_target): Likewise. Pass num_teams and thread_limit arguments to BUILT_IN_GOMP_TARGET. (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Initialize the extra _looptemp_ clause to fd->loop.n2. (expand_omp_for): Use nonmonotonic entrypoints for nonmonotonic: dynamic/guided. Initialize region->sched_modifiers. (expand_omp): Clear omp_any_child_fn_dumped. Dump function header again if we have dumped any child functions. (lower_omp_for_lastprivate): Determine the right count variable for distribute simd, or distribute parallel for{, simd}. (lower_omp_target): Handle GOMP_MAP_FIRSTPRIVATE_REFERENCE and GOMP_MAP_ALWAYS_POINTER. Drop OMP_CLAUSE_MAP_PRIVATE support. (simd_clone_clauses_extract): Handle variable step for references and arguments passed by reference. (simd_clone_mangle): Mangle ref/uval/val variable steps. (simd_clone_adjust_argument_types): Handle SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_VARIABLE_STEP like SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_CONSTANT_STEP and SIMD_CLONE_ARG_TYPE_LINEAR_VAL_VARIABLE_STEP like SIMD_CLONE_ARG_TYPE_LINEAR_VAL_CONSTANT_STEP. (simd_clone_linear_addend): New function. (simd_clone_adjust): Handle variable step like similarly to constant step, use simd_clone_linear_addend to determine the actual step at runtime. gcc/c-family/ 2015-11-05 Jakub Jelinek <jakub@redhat.com> * c-common.h (c_finish_omp_atomic): Add TEST argument. (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes. * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call save_expr or create_tmp_var* if TEST is true. (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always. Don't call add_stmt here. (struct c_omp_check_loop_iv_data): New type. (c_omp_check_loop_iv_r, c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New functions. (c_omp_split_clauses): Adjust for lastprivate being allowed on distribute. (c_omp_declare_simd_clauses_to_numbers): Change OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers. (c_omp_declare_simd_clauses_to_decls): Similarly change those from numbers to PARM_DECLs. gcc/c/ 2015-11-05 Jakub Jelinek <jakub@redhat.com> Ilya Verbin <ilya.verbin@intel.com> * c-parser.c: Include context.h and gimple-expr.h. (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose monotonic together with nonmonotonic. (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here. (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause. (c_parser_omp_target_data, c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER. (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit expressions on combined target teams before the target. (c_parser_omp_declare_target): If decl has "omp declare target" or "omp declare target link" attribute, and cgraph or varpool node already exists, then set corresponding flags. Call c_finish_omp_clauses in the parenthesized extended-list syntax case. * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside declare target. * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound on OMP_CLAUSE_REDUCTION array sections. (handle_omp_array_sections): Encode low-bound into the MEM_REF, either into the constant offset, or for variable low-bound using POINTER_PLUS_EXPR. For structure element based array sections use GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER. (c_finish_omp_clauses): Drop generic_field_head, structure elements are now always mapped even as array section bases, diagnose same var in data sharing and mapping clauses. Diagnose if linear step on declare simd is neither a constant nor a uniform parameter. Look through POINTER_PLUS_EXPR for array section reductions. Diagnose the same var or function appearing multiple times on the same directive. Fix up wording for the to clause if t is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic modifier on kinds other than dynamic or guided or nonmonotonic modifier together with ordered clause. gcc/cp/ 2015-11-05 Jakub Jelinek <jakub@redhat.com> Ilya Verbin <ilya.verbin@intel.com> * cp-tree.h (finish_omp_for): Add ORIG_INITS argument. (omp_privatize_field): Add SHARED argument. * parser.c: Include context.h. (cp_parser_omp_clause_schedule): Parse schedule modifiers, diagnose monotonic together with nonmonotonic. (cp_parser_omp_clause_linear): Add DECLARE_SIMD argument. Parse parameter name as linear step as id-expression rather than expression. (cp_parser_omp_all_clauses): Adjust caller. (cp_parser_omp_for_loop_init): Add ORIG_INIT argument, initialize it. Adjust omp_privatize_field caller. (cp_parser_omp_for_loop): Compute orig_inits, pass it's address to finish_omp_for. (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause. (cp_parser_omp_target_data, cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER and GOMP_MAP_FIRSTPRIVATE_REFERENCE. (cp_parser_omp_target): Likewise. Evaluate num_teams and thread_limit expressions on combined target teams before the target. (cp_parser_omp_declare_target): If decl has "omp declare target" or "omp declare target link" attribute, and cgraph or varpool node already exists, then set corresponding flags. Call finish_omp_clauses in the parenthesized extended-list syntax case. Call cp_parser_require_pragma_eol instead of cp_parser_skip_to_pragma_eol. (cp_parser_omp_end_declare_target): Call cp_parser_require_pragma_eol instead of cp_parser_skip_to_pragma_eol. * decl2.c (cplus_decl_attributes): Don't diagnose block scope vars inside declare target. * pt.c (tsubst_omp_clauses): If OMP_CLAUSE_LINEAR_VARIABLE_STRIDE, use tsubst_omp_clause_decl instead of tsubst_expr on OMP_CLAUSE_LINEAR_STEP. Handle non-static data members in shared clauses. (tsubst_omp_for_iterator): Adjust omp_privatize_field caller. (tsubst_find_omp_teams): New function. (tsubst_expr): Evaluate num_teams and thread_limit expressions on combined target teams before the target. Use OMP_FOR_ORIG_DECLS for all OpenMP/OpenACC/Cilk+ looping constructs. Adjust finish_omp_for caller. * semantics.c (omp_privatize_field): Add SHARED argument, if true, always create artificial var and never put it into the hash table or vector. (handle_omp_array_sections_1): Adjust omp_privatize_field caller. Allow non-zero low-bound on OMP_CLAUSE_REDUCTION array sections. (handle_omp_array_sections): For structure element based array sections use GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER. Encode low-bound into the MEM_REF, either into the constant offset, or for variable low-bound using POINTER_PLUS_EXPR. (finish_omp_clauses): Adjust omp_privatize_field caller. Drop generic_field_head, structure elements are now always mapped even as array section bases, diagnose same var in data sharing and mapping clauses. For references map what they refer to using GOMP_MAP_ALWAYS_POINTER for structure elements and GOMP_MAP_FIRSTPRIVATE_REFERENCE otherwise. Diagnose if linear step on declare simd is neither a constant nor a uniform parameter. Allow non-static data members on shared clauses. Look through POINTER_PLUS_EXPR for array section reductions. Diagnose nonmonotonic modifier on kinds other than dynamic or guided or nonmonotonic modifier together with ordered clause. Diagnose the same var or function appearing multiple times on the same directive. Fix up wording for the to clause if t is neither a FUNCTION_DECL nor a VAR_DECL, use special wording for OVERLOADs and TEMPLATE_ID_EXPR. (handle_omp_for_class_iterator): Add ORIG_DECLS argument. Call c_omp_check_loop_iv_exprs on cond. (finish_omp_for): Add ORIG_INITS argument. Call c_omp_check_loop_iv_exprs on ORIG_INITS elements. Adjust handle_omp_for_class_iterator caller. Call c_omp_check_loop_iv. Call add_stmt. (finish_omp_atomic): Adjust c_finish_omp_atomic caller. gcc/fortran/ 2015-11-05 Jakub Jelinek <jakub@redhat.com> * types.def (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR): Remove. (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): New. gcc/testsuite/ 2015-11-05 Jakub Jelinek <jakub@redhat.com> * c-c++-common/gomp/clauses-2.c (foo): Adjust for diagnostics of variables in both data sharing and mapping clauses and for structure element based array sections being mapped rather than privatized. * c-c++-common/gomp/declare-target-2.c: Add various new tests. Adjust expected diagnostics wording in one case. * c-c++-common/gomp/distribute-1.c: New test. * c-c++-common/gomp/element-1.c: New test. * c-c++-common/gomp/pr61486-2.c: Add #pragma omp declare target and #pragma omp end declare target pair around the function. Change s from a parameter to a file scope variable. * c-c++-common/gomp/pr67521.c: Add dg-error directives. * c-c++-common/gomp/reduction-1.c (foo): Don't expect diagnostics on non-zero low-bound in reduction array sections. Add further tests. * c-c++-common/gomp/schedule-modifiers-1.c: New test. * c-c++-common/gomp/target-teams-1.c: New test. * gcc.dg/gomp/declare-simd-1.c: Add scan-assembler-times directives for expected mangling on x86_64/i?86. * gcc.dg/gomp/declare-simd-3.c: New test. * gcc.dg/gomp/declare-simd-4.c: New test. * gcc.dg/gomp/for-20.c: New test. * gcc.dg/gomp/for-21.c: New test. * gcc.dg/gomp/for-22.c: New test. * gcc.dg/gomp/for-23.c: New test. * gcc.dg/gomp/for-24.c: New test. * gcc.dg/gomp/linear-1.c: New test. * gcc.dg/gomp/loop-1.c: New test. * g++.dg/gomp/atomic-17.C: New test. * g++.dg/gomp/clause-1.C (T::test): Don't expect error on non-static data member in shared clause. Add single construct. * g++.dg/gomp/declare-simd-1.C: Add dg-options. Add scan-assembler-times directives for expected mangling on x86_64/i?86. * g++.dg/gomp/declare-simd-3.C: Likewise. * g++.dg/gomp/declare-simd-4.C: New test. * g++.dg/gomp/declare-simd-5.C: New test. * g++.dg/gomp/declare-target-1.C: New test. * g++.dg/gomp/linear-2.C: New test. * g++.dg/gomp/loop-1.C: New test. * g++.dg/gomp/loop-2.C: New test. * g++.dg/gomp/loop-3.C: New test. * g++.dg/gomp/member-2.C (B::m2, B::m4): Don't expect error on non-static data member in shared clause. * g++.dg/gomp/member-3.C: New test. * g++.dg/gomp/member-4.C: New test. * g++.dg/gomp/pr38639.C (foo): Adjust dg-error. (bar): Remove dg-message. * g++.dg/gomp/target-teams-1.C: New test. include/ 2015-11-05 Jakub Jelinek <jakub@redhat.com> Ilya Verbin <ilya.verbin@intel.com> * gomp-constants.h (GOMP_MAP_FLAG_SPECIAL_2): Define. (GOMP_MAP_FLAG_ALWAYS): Remove. (enum gomp_map_kind): Use GOMP_MAP_FLAG_SPECIAL_2 instead of GOMP_MAP_FLAG_ALWAYS for GOMP_MAP_ALWAYS_TO, GOMP_MAP_ALWAYS_FROM, GOMP_MAP_ALWAYS_TOFROM, GOMP_MAP_STRUCT, GOMP_MAP_RELEASE. Add GOMP_MAP_ALWAYS_POINTER and GOMP_MAP_FIRSTPRIVATE_REFERENCE. (GOMP_MAP_ALWAYS_P): Define. (GOMP_TARGET_FLAG_NOWAIT): Adjust comment. libgomp/ 2015-11-05 Jakub Jelinek <jakub@redhat.com> Ilya Verbin <ilya.verbin@intel.com> * libgomp_g.h (GOMP_loop_nonmonotonic_dynamic_next, GOMP_loop_nonmonotonic_dynamic_start, GOMP_loop_nonmonotonic_guided_next, GOMP_loop_nonmonotonic_guided_start, GOMP_loop_ull_nonmonotonic_dynamic_next, GOMP_loop_ull_nonmonotonic_dynamic_start, GOMP_loop_ull_nonmonotonic_guided_next, GOMP_loop_ull_nonmonotonic_guided_start, GOMP_parallel_loop_nonmonotonic_dynamic, GOMP_parallel_loop_nonmonotonic_guided): New prototypes. (GOMP_target_41): Renamed to ... (GOMP_target_ext): ... this. Add num_teams and thread_limit arguments. (GOMP_target_data_41): Renamed to ... (GOMP_target_data_ext): ... this. (GOMP_target_update_41): Renamed to ... (GOMP_target_update_ext): ... this. * libgomp.map (GOMP_4.5): Export GOMP_target_ext, GOMP_target_data_ext and GOMP_target_update_ext instead of GOMP_target_41, GOMP_target_data_41 and GOMP_target_update_41. Export GOMP_loop_nonmonotonic_dynamic_next, GOMP_loop_nonmonotonic_dynamic_start, GOMP_loop_nonmonotonic_guided_next, GOMP_loop_nonmonotonic_guided_start, GOMP_loop_ull_nonmonotonic_dynamic_next, GOMP_loop_ull_nonmonotonic_dynamic_start, GOMP_loop_ull_nonmonotonic_guided_next, GOMP_loop_ull_nonmonotonic_guided_start, GOMP_parallel_loop_nonmonotonic_dynamic and GOMP_parallel_loop_nonmonotonic_guided. * loop.c (GOMP_parallel_loop_nonmonotonic_dynamic, GOMP_parallel_loop_nonmonotonic_guided, GOMP_loop_nonmonotonic_dynamic_start, GOMP_loop_nonmonotonic_guided_start, GOMP_loop_nonmonotonic_dynamic_next, GOMP_loop_nonmonotonic_guided_next): New aliases or functions. * loop_ull.c (GOMP_loop_ull_nonmonotonic_dynamic_start, GOMP_loop_ull_nonmonotonic_guided_start, GOMP_loop_ull_nonmonotonic_dynamic_next, GOMP_loop_ull_nonmonotonic_guided_next): Likewise. * target.c (gomp_map_0len_lookup, gomp_map_val): New inline functions. (gomp_map_vars): Handle GOMP_MAP_ALWAYS_POINTER. For GOMP_MAP_ZERO_LEN_ARRAY_SECTION use gomp_map_0len_lookup. Use gomp_map_val function. (gomp_target_fallback_firstprivate): New static function. (GOMP_target_41): Renamed to ... (GOMP_target_ext): ... this. Add num_teams and thread_limit arguments. Move firstprivate fallback handling into a new function. (GOMP_target_data_41): Renamed to ... (GOMP_target_data_ext): ... this. (GOMP_target_update_41): Renamed to ... (GOMP_target_update_ext): ... this. (gomp_exit_data): For GOMP_MAP_*ZERO_LEN* use gomp_map_0len_lookup instead of gomp_map_lookup. (omp_target_is_present): Use gomp_map_0len_lookup instead of gomp_map_lookup. * testsuite/libgomp.c/target-28.c: Likewise. * testsuite/libgomp.c/monotonic-1.c: New test. * testsuite/libgomp.c/monotonic-2.c: New test. * testsuite/libgomp.c/nonmonotonic-1.c: New test. * testsuite/libgomp.c/nonmonotonic-2.c: New test. * testsuite/libgomp.c/pr66199-5.c: New test. * testsuite/libgomp.c/pr66199-6.c: New test. * testsuite/libgomp.c/pr66199-7.c: New test. * testsuite/libgomp.c/pr66199-8.c: New test. * testsuite/libgomp.c/pr66199-9.c: New test. * testsuite/libgomp.c/reduction-11.c: New test. * testsuite/libgomp.c/reduction-12.c: New test. * testsuite/libgomp.c/reduction-13.c: New test. * testsuite/libgomp.c/reduction-14.c: New test. * testsuite/libgomp.c/reduction-15.c: New test. * testsuite/libgomp.c/target-12.c (main): Adjust for omp_target_is_present change for one-past-last element. * testsuite/libgomp.c/target-17.c (foo): Drop tests where the same var is both mapped and privatized. * testsuite/libgomp.c/target-19.c (foo): Adjust for different handling of zero-length array sections. * testsuite/libgomp.c/target-28.c: New test. * testsuite/libgomp.c/target-29.c: New test. * testsuite/libgomp.c/target-30.c: New test. * testsuite/libgomp.c/target-teams-1.c: New test. * testsuite/libgomp.c++/member-6.C: New test. * testsuite/libgomp.c++/member-7.C: New test. * testsuite/libgomp.c++/monotonic-1.C: New test. * testsuite/libgomp.c++/monotonic-2.C: New test. * testsuite/libgomp.c++/nonmonotonic-1.C: New test. * testsuite/libgomp.c++/nonmonotonic-2.C: New test. * testsuite/libgomp.c++/pr66199-3.C: New test. * testsuite/libgomp.c++/pr66199-4.C: New test. * testsuite/libgomp.c++/pr66199-5.C: New test. * testsuite/libgomp.c++/pr66199-6.C: New test. * testsuite/libgomp.c++/pr66199-7.C: New test. * testsuite/libgomp.c++/pr66199-8.C: New test. * testsuite/libgomp.c++/pr66199-9.C: New test. * testsuite/libgomp.c++/reduction-11.C: New test. * testsuite/libgomp.c++/reduction-12.C: New test. * testsuite/libgomp.c++/target-13.C: New test. * testsuite/libgomp.c++/target-14.C: New test. * testsuite/libgomp.c++/target-15.C: New test. * testsuite/libgomp.c++/target-16.C: New test. * testsuite/libgomp.c++/target-17.C: New test. * testsuite/libgomp.c++/target-18.C: New test. * testsuite/libgomp.c++/target-19.C: New test. Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com> From-SVN: r229814
2015-11-05 16:08:08 +01:00
2015-11-05 Jakub Jelinek <jakub@redhat.com>
* c-common.h (c_finish_omp_atomic): Add TEST argument.
(c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
* c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
save_expr or create_tmp_var* if TEST is true.
(c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
Don't call add_stmt here.
(struct c_omp_check_loop_iv_data): New type.
(c_omp_check_loop_iv_r, c_omp_check_loop_iv,
c_omp_check_loop_iv_exprs): New functions.
(c_omp_split_clauses): Adjust for lastprivate being allowed on
distribute.
(c_omp_declare_simd_clauses_to_numbers): Change
OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
(c_omp_declare_simd_clauses_to_decls): Similarly change those
from numbers to PARM_DECLs.
2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
* c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
flag_checking.
2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
PR c++-common/67882
* c-common.h (fold_offsetof_1): Add argument.
* c-common.c (fold_offsetof_1): Diagnose more invalid
offsetof expressions that reference elements past the end of
an array.
OpenACC atomic directive gcc/c-family/ * c-pragma.c (oacc_pragmas): Add "atomic". * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC. gcc/c/ * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC. gcc/cp/ * parser.c (cp_parser_omp_construct, cp_parser_pragma): Handle PRAGMA_OACC_ATOMIC. gcc/fortran/ * gfortran.h (gfc_statement): Add ST_OACC_ATOMIC, ST_OACC_END_ATOMIC. (gfc_exec_op): Add EXEC_OACC_ATOMIC. * match.h (gfc_match_oacc_atomic): New prototype. * openmp.c (gfc_match_omp_atomic, gfc_match_oacc_atomic): New wrapper functions around... (gfc_match_omp_oacc_atomic): ... this new function. (oacc_code_to_statement, gfc_resolve_oacc_directive): Handle EXEC_OACC_ATOMIC. * parse.c (decode_oacc_directive): Handle "atomic", "end atomic". (case_exec_markers): Add ST_OACC_ATOMIC. (gfc_ascii_statement): Handle ST_OACC_ATOMIC, ST_OACC_END_ATOMIC. (parse_omp_atomic): Rename to... (parse_omp_oacc_atomic): ... this new function. Add omp_p formal parameter. Adjust all users. (parse_executable): Handle ST_OACC_ATOMIC. (is_oacc): Handle EXEC_OACC_ATOMIC. * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle EXEC_OACC_ATOMIC. * st.c (gfc_free_statement): Handle EXEC_OACC_ATOMIC. * trans-openmp.c (gfc_trans_oacc_directive): Handle EXEC_OACC_ATOMIC. * trans.c (trans_code): Handle EXEC_OACC_ATOMIC. gcc/ * builtins.def (DEF_GOMP_BUILTIN): Enable for flag_openacc. * omp-low.c (check_omp_nesting_restrictions): Allow GIMPLE_OMP_ATOMIC_LOAD, GIMPLE_OMP_ATOMIC_STORE inside OpenACC contexts. gcc/testsuite/ * c-c++-common/goacc-gomp/nesting-fail-1.c: Move "atomic" tests from here to... * c-c++-common/goacc-gomp/nesting-1.c: ... here, and expect them to succeed. libgomp/ * testsuite/libgomp.oacc-c-c++-common/atomic_capture-1.c: New file. * testsuite/libgomp.oacc-c-c++-common/atomic_capture-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/atomic_rw-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/atomic_update-1.c: Likewise. * testsuite/libgomp.oacc-fortran/atomic_capture-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/atomic_rw-1.f90: New file. * testsuite/libgomp.oacc-fortran/atomic_update-1.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: New file. * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/worker-single-1a.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/worker-single-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/worker-single-6.c: Likewise. From-SVN: r229703
2015-11-03 12:28:22 +01:00
2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
* c-pragma.c (oacc_pragmas): Add "atomic".
* c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
* c-common.c (handle_target_clones_attribute): New.
(c_common_attribute_table): Add handle_target_clones_attribute.
(handle_always_inline_attribute): Add check on target_clones attribute.
(handle_target_attribute): Ditto.
decl.c: Reorder #include's and remove duplicates. ada 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/decl.c: Reorder #include's and remove duplicates. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. c 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c: Reorder #include's and remove duplicates. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. c-family 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c: Reorder #include's and remove duplicates. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * call.c: Reorder #include's and remove duplicates. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-cilkplus.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * cxx-pretty-print.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. * vtable-class-hierarchy.c: Likewise. fortran 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * array.c: Reorder #include's and remove duplicates. * convert.c: Likewise. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * frontend-passes.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * parse.c: Likewise. * resolve.c: Likewise. * simplify.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * go-backend.c: Reorder #include's and remove duplicates. * go-lang.c: Likewise. java 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Reorder #include's and remove duplicates. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. * verify-impl.c: Likewise. jit 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Reorder #include's and remove duplicates. * jit-builtins.c: Likewise. * jit-playback.c: Likewise. * jit-recording.c: Likewise. * libgccjit.c: Likewise. lto 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Reorder #include's and remove duplicates. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * objc-lang.c: Reorder #include's and remove duplicates. * objc-map.c: Likewise. objcp 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c: Reorder #include's and remove duplicates. * objcp-lang.c: Likewise. From-SVN: r229533
2015-10-29 16:27:20 +01:00
2015-10-29 Andrew MacLeod <amacleod@redhat.com>
* array-notation-common.c: Reorder #include's and remove duplicates.
* c-ada-spec.c: Likewise.
* c-cilkplus.c: Likewise.
* c-common.c: Likewise.
* c-cppbuiltin.c: Likewise.
* c-dump.c: Likewise.
* c-format.c: Likewise.
* c-gimplify.c: Likewise.
* c-indentation.c: Likewise.
* c-lex.c: Likewise.
* c-omp.c: Likewise.
* c-opts.c: Likewise.
* c-pch.c: Likewise.
* c-ppoutput.c: Likewise.
* c-pragma.c: Likewise.
* c-pretty-print.c: Likewise.
* c-semantics.c: Likewise.
* c-ubsan.c: Likewise.
* cilk.c: Likewise.
* stub-objc.c: Likewise.
2015-10-28 Jason Merrill <jason@redhat.com>
* c-common.c (pointer_int_sum): Fold the MULT_EXPR.
[PR c/64765, c/64880] Support OpenACC Combined Directives in C, C++ gcc/c-family/ PR c/64765 PR c/64880 * c-common.h (c_oacc_split_loop_clauses): Declare function. * c-omp.c (c_oacc_split_loop_clauses): New function. gcc/c/ PR c/64765 PR c/64880 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal parameters, and handle these. Adjust all users. (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions into... (c_parser_oacc_kernels_parallel): ... this new function. Adjust all users. * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't declare functions. (c_finish_omp_construct): Declare function. * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels): Merge functions into... (c_finish_omp_construct): ... this new function. gcc/cp/ PR c/64765 PR c/64880 * cp-tree.h (finish_oacc_kernels, finish_oacc_parallel): Don't declare functions. (finish_omp_construct): Declare function. * parser.c (cp_parser_oacc_loop): Add p_name, mask, cclauses formal parameters, and handle these. Adjust all users. (cp_parser_oacc_kernels, cp_parser_oacc_parallel): Merge functions into... (cp_parser_oacc_kernels_parallel): ... this new function. Adjust all users. * semantics.c (finish_oacc_kernels, finish_oacc_parallel): Merge functions into... (finish_omp_construct): ... this new function. gcc/ * tree.h (OACC_PARALLEL_BODY, OACC_PARALLEL_CLAUSES) (OACC_KERNELS_BODY, OACC_KERNELS_CLAUSES, OACC_KERNELS_COMBINED) (OACC_PARALLEL_COMBINED): Don't define macros. Adjust all users. gcc/testsuite/ PR c/64765 PR c/64880 * c-c++-common/goacc/loop-1.c: Don't skip for C++. Don't prune sorry message. (PR64765): New function. * gfortran.dg/goacc/coarray_2.f90: XFAIL. * gfortran.dg/goacc/combined_loop.f90: Extend. Don't prune sorry message. * gfortran.dg/goacc/cray.f95: Refine prune directive. * gfortran.dg/goacc/parameter.f95: Likewise. libgomp/ * testsuite/libgomp.oacc-c-c++-common/combdir-1.c: New file. * testsuite/libgomp.oacc-fortran/combdir-1.f90: Likewise. From-SVN: r229404
2015-10-27 09:39:15 +01:00
2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
James Norris <jnorris@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
PR c/64765
PR c/64880
* c-common.h (c_oacc_split_loop_clauses): Declare function.
* c-omp.c (c_oacc_split_loop_clauses): New function.
2015-10-21 Martin Sebor <msebor@redhat.com>
PR driver/68043
* c.opt: End each sentence that describes an option with a period.
2015-10-20 Marek Polacek <polacek@redhat.com>
* array-notation-common.c (is_cilkplus_vector_p): Define.
* c-common.h (is_cilkplus_vector_p): Declare.
2015-10-20 Marek Polacek <polacek@redhat.com>
* c.opt (std=gnu++11): Do not describe as experimental.
(std=gnu++14): Likewise.
2015-10-19 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_nontype_template_args.
2015-10-19 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_enumerator_attributes, __cpp_fold_expressions,
__cpp_unicode_characters.
builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. gcc/ 2015-10-13 Jakub Jelinek <jakub@redhat.com> Aldy Hernandez <aldyh@redhat.com> Ilya Verbin <ilya.verbin@intel.com> * builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, BT_FN_BOOL_UINT_ULLPTR_ULLPTR_ULLPTR, BT_FN_BOOL_UINT_LONGPTR_LONG_LONGPTR_LONGPTR, BT_FN_BOOL_UINT_ULLPTR_ULL_ULLPTR_ULLPTR, BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_UINT_PTR, BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_ULL_ULL_ULL, BT_FN_VOID_LONG_VAR, BT_FN_VOID_ULL_VAR): New. (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): Remove. * cgraph.h (enum cgraph_simd_clone_arg_type): Add SIMD_CLONE_ARG_TYPE_LINEAR_REF_CONSTANT_STEP, SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_CONSTANT_STEP and SIMD_CLONE_ARG_TYPE_LINEAR_VAL_CONSTANT_STEP. (struct cgraph_simd_clone_arg): Adjust comment. * coretypes.h (struct gomp_ordered): New forward decl. * gimple.c (gimple_build_omp_critical): Add CLAUSES argument, set critical clauses to it. (gimple_build_omp_ordered): Return gomp_ordered * instead of gimple *. Add CLAUSES argument, set ordered clauses to it. (gimple_copy): Unshare clauses on GIMPLE_OMP_CRITICAL and GIMPLE_OMP_ORDERED. * gimple.def (GIMPLE_OMP_ORDERED): Change from GSS_OMP to GSS_OMP_SINGLE_LAYOUT, move it after GIMPLE_OMP_TEAMS. * gimple.h (enum gf_mask): Add GF_OMP_TASK_TASKLOOP. Add another bit to GF_OMP_FOR_KIND_MASK mask. Add GF_OMP_FOR_KIND_TASKLOOP, renumber GF_OMP_FOR_KIND_CILKFOR and GF_OMP_FOR_KIND_OACC_LOOP. Adjust GF_OMP_FOR_SIMD, GF_OMP_FOR_COMBINED and GF_OMP_FOR_COMBINED_INTO. Add another bit to GF_OMP_TARGET_KIND_MASK mask. Add GF_OMP_TARGET_KIND_ENTER_DATA and GF_OMP_TARGET_KIND_EXIT_DATA, renumber GF_OMP_TARGET_KIND_OACC_{PARALLEL,KERNELS,DATA,UPDATE,ENTER_EXIT_DATA}. (gomp_critical): Add clauses field. (gomp_ordered): New struct. (is_a_helper <gomp_ordered *>::test): New inline. (gimple_build_omp_critical): Add CLAUSES argument. (gimple_build_omp_ordered): Likewise. Return gomp_ordered * instead of gimple *. (gimple_omp_critical_clauses, gimple_omp_critical_clauses_ptr, gimple_omp_critical_set_clauses, gimple_omp_ordered_clauses, gimple_omp_ordered_clauses_ptr, gimple_omp_ordered_set_clauses, gimple_omp_task_taskloop_p, gimple_omp_task_set_taskloop_p): New inline functions. * gimple-pretty-print.c (dump_gimple_omp_for): Handle taskloop. (dump_gimple_omp_target): Handle enter data and exit data. (dump_gimple_omp_block): Don't handle GIMPLE_OMP_ORDERED here. (dump_gimple_omp_critical): Print clauses. (dump_gimple_omp_ordered): New function. (dump_gimple_omp_task): Handle taskloop. (pp_gimple_stmt_1): Use dump_gimple_omp_ordered for GIMPLE_OMP_ORDERED. * gimple-walk.c (walk_gimple_op): Walk clauses on GIMPLE_OMP_CRITICAL and GIMPLE_OMP_ORDERED. * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_0LEN_ARRAY. (enum omp_region_type): Add ORT_COMBINED_TARGET and ORT_NONE. (struct gimplify_omp_ctx): Add loop_iter_var, target_map_scalars_firstprivate, target_map_pointers_as_0len_arrays and target_firstprivatize_array_bases fields. (delete_omp_context): Release loop_iter_var. (gimplify_bind_expr): Handle ORT_NONE. (maybe_fold_stmt): Adjust check for ORT_TARGET for the addition of ORT_COMBINED_TARGET. (is_gimple_stmt): Return true for OMP_TASKLOOP, OMP_TEAMS and OMP_TARGET{,_DATA,_UPDATE,_ENTER_DATA,_EXIT_DATA}. (omp_firstprivatize_variable): Handle ORT_NONE. Adjust check for ORT_TARGET for the addition of ORT_COMBINED_TARGET. Handle ctx->target_map_scalars_firstprivate. (omp_add_variable): Handle ORT_NONE. Allow map clause together with data sharing clauses. For data sharing clause with VLA decl on omp target/target data don't add firstprivate for the pointer. Call omp_notice_variable on TYPE_SIZE_UNIT only if it is a DECL_P. (omp_notice_threadprivate_variable): Adjust check for ORT_TARGET for the addition of ORT_COMBINED_TARGET. (omp_notice_variable): Handle ORT_NONE. Adjust check for ORT_TARGET for the addition of ORT_COMBINED_TARGET. Handle implicit mapping of pointers as zero length array sections and ctx->target_map_scalars_firstprivate mapping of scalars as firstprivate data sharing. (omp_check_private): Handle omp_member_access_dummy_var vars. (find_decl_expr): New function. (gimplify_scan_omp_clauses): Add CODE argument. For OMP_CLAUSE_IF complain if OMP_CLAUSE_IF_MODIFIER is present and does not match code. Handle OMP_CLAUSE_GANG separately. Handle OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,NOGROUP,THREADS,SIMD,SIMDLEN} clauses. Diagnose linear clause on combined distribute {, parallel for} simd construct, unless it is the loop iterator. Handle struct element GOMP_MAP_FIRSTPRIVATE_POINTER. Handle map clauses with COMPONENT_REF. Initialize ctx->target_map_scalars_firstprivate, ctx->target_firstprivatize_array_bases and ctx->target_map_pointers_as_0len_arrays. Add firstprivate for linear clause even to target region if combined. Remove map clauses with GOMP_MAP_FIRSTPRIVATE_POINTER kind from OMP_TARGET_{,ENTER_,EXIT_}DATA. For GOMP_MAP_FIRSTPRIVATE_POINTER map kind with non-INTEGER_CST OMP_CLAUSE_SIZE firstprivatize the bias. Handle OMP_CLAUSE_DEPEND_{SINK,SOURCE}. Handle OMP_CLAUSE_{{USE,IS}_DEVICE_PTR,DEFAULTMAP,HINT}. For linear clause on worksharing loop combined with parallel add shared clause on the parallel. Handle OMP_CLAUSE_REDUCTION with MEM_REF OMP_CLAUSE_DECL. Set DECL_NAME on omp_member_access_dummy_var vars. Add lastprivate clause to outer taskloop if needed. (gimplify_adjust_omp_clauses_1): Handle GOVD_MAP_0LEN_ARRAY. If gimplify_omp_ctxp->target_firstprivatize_array_bases, use GOMP_MAP_FIRSTPRIVATE_POINTER map kind instead of GOMP_MAP_POINTER. (gimplify_adjust_omp_clauses): Add CODE argument. Handle removal of GOMP_MAP_FIRSTPRIVATE_POINTER struct elements for struct not seen in target body. Handle removal of struct mapping if struct is not seen in target body. Remove GOMP_MAP_STRUCT map clause on OMP_TARGET_EXIT_DATA. Adjust check for ORT_TARGET for the addition of ORT_COMBINED_TARGET. Use GOMP_MAP_FIRSTPRIVATE_POINTER instead of GOMP_MAP_POINTER if ctx->target_firstprivatize_array_bases for VLAs. Set OMP_CLAUSE_MAP_PRIVATE if both data sharing and map clause appear together. Handle OMP_CLAUSE_{{USE,IS}_DEVICE_PTR,DEFAULTMAP,HINT}. Don't remove map clause if it has map-type-modifier always. Handle OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,NOGROUP,THREADS,SIMD,SIMDLEN} clauses. (gimplify_oacc_cache, gimplify_omp_parallel, gimplify_omp_task): Adjust gimplify_scan_omp_clauses and gimplify_adjust_omp_clauses callers. (gimplify_omp_for): Likewise. Handle OMP_TASKLOOP. Initialize loop_iter_var. Use OMP_FOR_ORIG_DECLS. Fix handling of lastprivate iterators in doacross loops. (gimplify_omp_workshare): Adjust gimplify_scan_omp_clauses and gimplify_adjust_omp_clauses callers. Use ORT_COMBINED_TARGET for OMP_TARGET_COMBINED. Adjust check for ORT_TARGET for the addition of ORT_COMBINED_TARGET. (gimplify_omp_target_update): Adjust gimplify_scan_omp_clauses and gimplify_adjust_omp_clauses callers. Handle OMP_TARGET_ENTER_DATA and OMP_TARGET_EXIT_DATA. (gimplify_omp_ordered): New function. (gimplify_expr): Handle OMP_TASKLOOP, OMP_TARGET_ENTER_DATA and OMP_TARGET_EXIT_DATA. Use gimplify_omp_ordered for OMP_ORDERED. Gimplify clauses on OMP_CRITICAL. * internal-fn.c (expand_GOMP_SIMD_ORDERED_START, expand_GOMP_SIMD_ORDERED_END): New functions. * internal-fn.def (GOMP_SIMD_ORDERED_START, GOMP_SIMD_ORDERED_END): New internal functions. * omp-builtins.def (BUILT_IN_GOMP_LOOP_DOACROSS_STATIC_START, BUILT_IN_GOMP_LOOP_DOACROSS_DYNAMIC_START, BUILT_IN_GOMP_LOOP_DOACROSS_GUIDED_START, BUILT_IN_GOMP_LOOP_DOACROSS_RUNTIME_START, BUILT_IN_GOMP_LOOP_ULL_DOACROSS_STATIC_START, BUILT_IN_GOMP_LOOP_ULL_DOACROSS_DYNAMIC_START, BUILT_IN_GOMP_LOOP_ULL_DOACROSS_GUIDED_START, BUILT_IN_GOMP_LOOP_ULL_DOACROSS_RUNTIME_START, BUILT_IN_GOMP_DOACROSS_POST, BUILT_IN_GOMP_DOACROSS_WAIT, BUILT_IN_GOMP_DOACROSS_ULL_POST, BUILT_IN_GOMP_DOACROSS_ULL_WAIT, BUILT_IN_GOMP_TARGET_ENTER_EXIT_DATA, BUILT_IN_GOMP_TASKLOOP, BUILT_IN_GOMP_TASKLOOP_ULL): New built-ins. (BUILT_IN_GOMP_TASK): Add INT argument to the end. (BUILT_IN_GOMP_TARGET): Rename from GOMP_target to GOMP_target_41, adjust type. (BUILT_IN_GOMP_TARGET_DATA): Rename from GOMP_target_data to GOMP_target_data_41, adjust type. (BUILT_IN_GOMP_TARGET_UPDATE): Rename from GOMP_target_update to GOMP_target_update_41, adjust type. * omp-low.c (struct omp_region): Adjust comments, add ord_stmt field. (struct omp_for_data): Add ordered and simd_schedule fields. (omp_member_access_dummy_var, unshare_and_remap_1, unshare_and_remap, is_taskloop_ctx): New functions. (is_taskreg_ctx): Use is_parallel_ctx and is_task_ctx. (extract_omp_for_data): Handle taskloops and doacross loops and simd schedule modifier. (omp_adjust_chunk_size): New function. (get_ws_args_for): Use it. (lookup_sfield): Change first argument to splay_tree_key, add overload with first argument tree. (maybe_lookup_field): Likewise. (use_pointer_for_field): Handle omp_member_access_dummy_var. (omp_copy_decl_2): If var is TREE_ADDRESSABLE listed in task_shared_vars, clear TREE_ADDRESSABLE on the copy. (build_outer_var_ref): Add LASTPRIVATE argument, handle taskloops and omp_member_access_dummy_var vars. (build_sender_ref): Change first argument to splay_tree_key, add overload with first argument tree. (install_var_field): For mask & 8 use &DECL_UID as key instead of the tree itself. (fixup_child_record_type): Const qualify *.omp_data_i. (scan_sharing_clauses): Handle OMP_CLAUSE_SHARED_FIRSTPRIVATE, C/C++ array reductions, OMP_CLAUSE_{IS,USE}_DEVICE_PTR clauses, OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,SIMDLEN,THREADS,SIMD} and OMP_CLAUSE_{NOGROUP,DEFAULTMAP} clauses, OMP_CLAUSE__LOOPTEMP_ clause on taskloop, GOMP_MAP_FIRSTPRIVATE_POINTER, OMP_CLAUSE_MAP_PRIVATE. (create_omp_child_function): Set TREE_READONLY on .omp_data_i. (find_combined_for): Allow searching for different GIMPLE_OMP_FOR kinds. (add_taskreg_looptemp_clauses): New function. (scan_omp_parallel): Use it. (scan_omp_task): Likewise. (finish_taskreg_scan): Handle OMP_CLAUSE_SHARED_FIRSTPRIVATE. For taskloop, move fields for the first two _LOOPTEMP_ clauses first. (check_omp_nesting_restrictions): Handle GF_OMP_TARGET_KIND_ENTER_DATA and GF_OMP_TARGET_KIND_EXIT_DATA. Formatting fixes. Allow the sandwiched taskloop constructs. Type check OMP_CLAUSE_DEPEND_{KIND,SOURCE}. Allow ordered simd inside of simd region. Diagnose depend(source) or depend(sink:...) on target constructs or task/taskloop. (handle_simd_reference): Use get_name. (lower_rec_input_clauses): Likewise. Ignore all OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE clauses on taskloop construct. Allow _LOOPTEMP_ clause on GOMP_TASK. Unshare new_var before passing it to omp_clause_{default,copy}_ctor. Handle OMP_CLAUSE_REDUCTION with MEM_REF OMP_CLAUSE_DECL. Set lastprivate_firstprivate flag for linear that needs copyin and copyout. Use BUILT_IN_ALLOCA_WITH_ALIGN instead of BUILT_IN_ALLOCA. (lower_lastprivate_clauses): For OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE on taskloop lookup decl in outer context. Pass true to build_outer_var_ref lastprivate argument. Handle OMP_CLAUSE_LASTPRIVATE_TASKLOOP_IV lastprivate if the decl is global outside of outer taskloop for. (lower_reduction_clauses): Handle OMP_CLAUSE_REDUCTION with MEM_REF OMP_CLAUSE_DECL. (lower_send_clauses): Ignore first two _LOOPTEMP_ clauses in taskloop GOMP_TASK. Handle OMP_CLAUSE_SHARED_FIRSTPRIVATE. Handle omp_member_access_dummy_var vars. Handle OMP_CLAUSE_REDUCTION with MEM_REF OMP_CLAUSE_DECL. Use new lookup_sfield overload. (lower_send_shared_vars): Ignore fields with NULL or FIELD_DECL abstract origin. Handle omp_member_access_dummy_var vars. (expand_parallel_call): Use expand_omp_build_assign. (expand_task_call): Handle taskloop construct expansion. Add REGION argument. Use GOMP_TASK_* defines instead of hardcoded integers. Add priority argument to GOMP_task* calls. Or in GOMP_TASK_FLAG_PRIORITY into flags if priority is present for GOMP_task call. (expand_omp_build_assign): Add prototype. Add AFTER argument, if true emit statements after *GSI_P and continue linking. (expand_omp_taskreg): Adjust expand_task_call caller. (expand_omp_for_init_counts): Rename zero_iter_bb argument to zero_iter1_bb and first_zero_iter to first_zero_iter1, add zero_iter2_bb and first_zero_iter2 arguments, handle computation of counts even for ordered loops. (expand_omp_for_init_vars): Handle GOMP_TASK inner_stmt. (expand_omp_ordered_source, expand_omp_ordered_sink, expand_omp_ordered_source_sink, expand_omp_for_ordered_loops): New functions. (expand_omp_for_generic): Use omp_adjust_chunk_size. Handle linear clauses on worksharing loop. Handle DOACROSS loop expansion. (expand_omp_for_static_nochunk): Handle linear clauses on worksharing loop. Adjust expand_omp_for_init_counts callers. (expand_omp_for_static_chunk): Likewise. Use omp_adjust_chunk_size. (expand_omp_simd): Handle addressable fd->loop.v. Adjust expand_omp_for_init_counts callers. (expand_omp_taskloop_for_outer, expand_omp_taskloop_for_inner): New functions. (expand_omp_for): Call expand_omp_taskloop_for_* for taskloop. Handle doacross loops. (expand_omp_target): Handle GF_OMP_TARGET_KIND_ENTER_DATA and GF_OMP_TARGET_KIND_EXIT_DATA. Pass flags and depend arguments to GOMP_target_{41,update_41,enter_exit_data} libcalls. (expand_omp): Don't expand ordered depend constructs here, record ord_stmt instead for later expand_omp_for_generic. (build_omp_regions_1): Handle GF_OMP_TARGET_KIND_ENTER_DATA and GF_OMP_TARGET_KIND_EXIT_DATA. Treat GIMPLE_OMP_ORDERED with depend clause as stand-alone directive. (lower_omp_ordered_clauses): New function. (lower_omp_ordered): Handle OMP_CLAUSE_SIMD, for OMP_CLAUSE_DEPEND don't lower anything. (lower_omp_for_lastprivate): Use last _looptemp_ clause on taskloop for comparison. (lower_omp_for): Handle taskloop constructs. Adjust OMP_CLAUSE_DECL and OMP_CLAUSE_LINEAR_STEP so that expand_omp_for_* can use it during expansion for linear adjustments. (create_task_copyfn): Handle OMP_CLAUSE_SHARED_FIRSTPRIVATE. (lower_depend_clauses): Assert not seeing sink/source depend kinds. Set TREE_ADDRESSABLE on array. Change first argument from gimple * to tree * pointing to the stmt's clauses. (lower_omp_taskreg): Adjust lower_depend_clauses caller. (lower_omp_target): Handle GF_OMP_TARGET_KIND_ENTER_DATA and GF_OMP_TARGET_KIND_EXIT_DATA, depend clauses, GOMP_MAP_{RELEASE,ALWAYS_{TO,FROM,TOFROM},FIRSTPRIVATE_POINTER,STRUCT} map kinds, OMP_CLAUSE_{FIRSTPRIVATE,PRIVATE,{IS,USE}_DEVICE_PTR clauses. Always use short kind and 8-bit align shift. (lower_omp_regimplify_p): Use IS_TYPE_OR_DECL_P macro. (struct lower_omp_regimplify_operands_data): New type. (lower_omp_regimplify_operands_p, lower_omp_regimplify_operands): New functions. (lower_omp_1): Use lower_omp_regimplify_operands instead of gimple_regimplify_operands. (make_gimple_omp_edges): Handle GF_OMP_TARGET_KIND_ENTER_DATA and GF_OMP_TARGET_KIND_EXIT_DATA. Treat GIMPLE_OMP_ORDERED with depend clause as stand-alone directive. (simd_clone_clauses_extract): Honor OMP_CLAUSE_LINEAR_KIND. (simd_clone_mangle): Mangle the various linear kinds per the new ABI. (simd_clone_adjust_argument_types): Handle SIMD_CLONE_ARG_TYPE_LINEAR_*_CONSTANT_STEP. (simd_clone_init_simd_arrays): Don't do anything for uval. (simd_clone_adjust): Handle SIMD_CLONE_ARG_TYPE_LINEAR_REF_CONSTANT_STEP like SIMD_CLONE_ARG_TYPE_LINEAR_CONSTANT_STEP. Handle SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_CONSTANT_STEP. * omp-low.h (omp_member_access_dummy_var): New prototype. * passes.def (pass_simduid_cleanup): Schedule another copy of the pass after all optimizations. * tree.c (omp_clause_code_name): Add entries for OMP_CLAUSE_{TO_DECLARE,LINK,{USE,IS}_DEVICE_PTR,DEFAULTMAP,HINT} and OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,NOGROUP,THREADS,SIMD}. (omp_clause_num_ops): Likewise. Bump number of OMP_CLAUSE_REDUCTION arguments to 5 and for OMP_CLAUSE_ORDERED to 1. (walk_tree_1): Adjust for OMP_CLAUSE_ORDERED having 1 argument and OMP_CLAUSE_REDUCTION 5 arguments. Handle OMP_CLAUSE_{TO_DECLARE,LINK,{USE,IS}_DEVICE_PTR,DEFAULTMAP,HINT} and OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,NOGROUP,THREADS,SIMD} clauses. * tree-core.h (enum omp_clause_linear_kind): New. (struct tree_omp_clause): Change type of map_kind from unsigned char to unsigned int. Add subcode.if_modifier and subcode.linear_kind fields. (enum omp_clause_code): Add OMP_CLAUSE_{TO_DECLARE,LINK,{USE,IS}_DEVICE_PTR,DEFAULTMAP,HINT} and OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,NOGROUP,THREADS,SIMD}. (OMP_CLAUSE_REDUCTION): Document OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER. (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_{SOURCE,SINK}. * tree.def (OMP_FOR): Add OMP_FOR_ORIG_DECLS operand. (OMP_CRITICAL): Move before OMP_SINGLE. Add OMP_CRITICAL_CLAUSES operand. (OMP_ORDERED): Move before OMP_SINGLE. Add OMP_ORDERED_CLAUSES operand. (OMP_TASKLOOP, OMP_TARGET_ENTER_DATA, OMP_TARGET_EXIT_DATA): New tree codes. * tree.h (OMP_BODY): Replace OMP_CRITICAL with OMP_TASKGROUP. (OMP_CLAUSE_SET_MAP_KIND): Cast to unsigned int rather than unsigned char. (OMP_CRITICAL_NAME): Adjust to be 3rd operand instead of 2nd. (OMP_CLAUSE_NUM_TASKS_EXPR): Formatting fix. (OMP_STANDALONE_CLAUSES): Adjust to cover OMP_TARGET_{ENTER,EXIT}_DATA. (OMP_CLAUSE_DEPEND_SINK_NEGATIVE, OMP_TARGET_COMBINED, OMP_CLAUSE_MAP_PRIVATE, OMP_FOR_ORIG_DECLS, OMP_CLAUSE_IF_MODIFIER, OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION, OMP_CRITICAL_CLAUSES, OMP_CLAUSE_PRIVATE_TASKLOOP_IV, OMP_CLAUSE_LASTPRIVATE_TASKLOOP_IV, OMP_CLAUSE_HINT_EXPR, OMP_CLAUSE_SCHEDULE_SIMD, OMP_CLAUSE_LINEAR_KIND, OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER, OMP_CLAUSE_SHARED_FIRSTPRIVATE, OMP_ORDERED_CLAUSES, OMP_TARGET_ENTER_DATA_CLAUSES, OMP_TARGET_EXIT_DATA_CLAUSES, OMP_CLAUSE_NUM_TASKS_EXPR, OMP_CLAUSE_GRAINSIZE_EXPR, OMP_CLAUSE_PRIORITY_EXPR, OMP_CLAUSE_ORDERED_EXPR): Define. * tree-inline.c (remap_gimple_stmt): Handle clauses on GIMPLE_OMP_ORDERED and GIMPLE_OMP_CRITICAL. For IFN_GOMP_SIMD_ORDERED_{START,END} set has_simduid_loops. * tree-nested.c (convert_nonlocal_omp_clauses): Handle OMP_CLAUSE_{TO_DECLARE,LINK,{USE,IS}_DEVICE_PTR,SIMDLEN,PRIORITY,SIMD} and OMP_CLAUSE_{GRAINSIZE,NUM_TASKS,HINT,NOGROUP,THREADS,DEFAULTMAP} clauses. Handle OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER. (convert_local_omp_clauses): Likewise. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_{TO_DECLARE,LINK,{USE,IS}_DEVICE_PTR,SIMDLEN,PRIORITY,SIMD} and OMP_CLAUSE_{GRAINSIZE,NUM_TASKS,HINT,NOGROUP,THREADS,DEFAULTMAP} clauses. Handle OMP_CLAUSE_IF_MODIFIER, OMP_CLAUSE_ORDERED_EXPR, OMP_CLAUSE_SCHEDULE_SIMD, OMP_CLAUSE_LINEAR_KIND, OMP_CLAUSE_DEPEND_{SOURCE,SINK}. Use "delete" for GOMP_MAP_FORCE_DEALLOC. Handle GOMP_MAP_{ALWAYS_{TO,FROM,TOFROM},RELEASE,FIRSTPRIVATE_POINTER,STRUCT}. (dump_generic_node): Handle OMP_TASKLOOP, OMP_TARGET_{ENTER,EXIT}_DATA and clauses on OMP_ORDERED and OMP_CRITICAL. * tree-vectorizer.c (adjust_simduid_builtins): Adjust comment. Remove IFN_GOMP_SIMD_ORDERED_{START,END}. (vectorize_loops): Adjust comments. (pass_simduid_cleanup::execute): Likewise. * tree-vect-stmts.c (vectorizable_simd_clone_call): Handle SIMD_CLONE_ARG_TYPE_LINEAR_{REF,VAL,UVAL}_CONSTANT_STEP. * wide-int.h (wi::gcd): New. gcc/c-family/ 2015-10-13 Jakub Jelinek <jakub@redhat.com> Aldy Hernandez <aldyh@redhat.com> * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11. (c_define_builtins): Likewise. * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_TASKLOOP. (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument. (c_finish_omp_for): Add ORIG_DECLV argument. * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as 201511 instead of 201307. * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set OMP_CRITICAL_CLAUSES to it. (c_finish_omp_ordered): Add CLAUSES argument, set OMP_ORDERED_CLAUSES to it. (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS to it if OMP_FOR. Clear DECL_INITIAL on the IVs. (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite constructs and new OpenMP 4.5 clauses. Clear OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add verification code. * c-pragma.c (omp_pragmas_simd): Add taskloop. * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP. (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR} and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}. gcc/c/ 2015-10-13 Jakub Jelinek <jakub@redhat.com> Aldy Hernandez <aldyh@redhat.com> * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here. (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses. (c_parser_omp_variable_list): Handle structure elements for map, to and from clauses. Handle array sections in reduction clause. Formatting fixes. (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of if clause modifiers. (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize, c_parser_omp_clause_priority, c_parser_omp_clause_hint, c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr, c_parser_omp_clause_is_device_ptr): New functions. (c_parser_omp_clause_ordered): Parse optional parameter. (c_parser_omp_clause_reduction): Handle array reductions. (c_parser_omp_clause_schedule): Parse optional simd modifier. (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New functions. (c_parser_omp_clause_linear): Parse linear clause modifiers. (c_parser_omp_clause_depend_sink): New function. (c_parser_omp_clause_depend): Parse source/sink depend kinds. (c_parser_omp_clause_map): Parse release/delete map kinds and optional always modifier. (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if and c_finish_omp_clauses callers. (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses. Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive. (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller. (OMP_CRITICAL_CLAUSE_MASK): Define. (c_parser_omp_critical): Parse critical clauses. (c_parser_omp_for_loop): Handle doacross loops, adjust c_finish_omp_for and c_finish_omp_clauses callers. (OMP_SIMD_CLAUSE_MASK): Add simdlen clause. (c_parser_omp_simd): Allow ordered clause if it has no parameter. (OMP_FOR_CLAUSE_MASK): Add linear clause. (c_parser_omp_for): Disallow ordered clause when combined with distribute. Disallow linear clause when combined with distribute and not combined with simd. (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define. (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument, parse clauses and if depend clause is found, don't parse a body. (c_parser_omp_parallel): Disallow copyin clause on target parallel. Allow target parallel without for after it. (OMP_TASK_CLAUSE_MASK): Add priority clause. (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause. (c_parser_omp_target_data): Diagnose no map clauses or clauses with invalid kinds. (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses. (OMP_TARGET_ENTER_DATA_CLAUSE_MASK, OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define. (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New functions. (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate, defaultmap and is_device_ptr clauses. (c_parser_omp_target): Parse target parallel and target simd. Set OMP_TARGET_COMBINED on combined constructs. Parse target enter data and target exit data. Diagnose invalid map kinds. (OMP_DECLARE_TARGET_CLAUSE_MASK): Define. (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this construct. (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for &omp_priv. (OMP_TASKLOOP_CLAUSE_MASK): Define. (c_parser_omp_taskloop): New function. (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here, handle PRAGMA_OMP_TASKLOOP. (c_parser_cilk_for): Adjust c_finish_omp_clauses callers. * c-tree.h (c_finish_omp_clauses): Add two new arguments. * c-typeck.c (handle_omp_array_sections_1): Fix comment typo. Add IS_OMP argument, handle structure element bases, diagnose bitfields, pass IS_OMP recursively, diagnose known zero length array sections in depend clauses, handle array sections in reduction clause, diagnose negative length even for pointers. (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for types, pass IS_OMP down to handle_omp_array_sections_1, handle array sections in reduction clause, set OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP. (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments. Handle new OpenMP 4.5 clauses and new restrictions for the old ones. gcc/cp/ 2015-10-13 Jakub Jelinek <jakub@redhat.com> Aldy Hernandez <aldyh@redhat.com> * class.c (finish_struct_1): Call finish_omp_declare_simd_methods. * cp-gimplify.c (cp_gimplify_expr): Handle OMP_TASKLOOP. (cp_genericize_r): Likewise. (cxx_omp_finish_clause): Don't diagnose references. (cxx_omp_disregard_value_expr): New function. * cp-objcp-common.h (LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR): Redefine. * cp-tree.h (OMP_FOR_GIMPLIFYING_P): Document for OMP_TASKLOOP. (DECL_OMP_PRIVATIZED_MEMBER): Define. (finish_omp_declare_simd_methods, push_omp_privatization_clauses, pop_omp_privatization_clauses, save_omp_privatization_clauses, restore_omp_privatization_clauses, omp_privatize_field, cxx_omp_disregard_value_expr): New prototypes. (finish_omp_clauses): Add two new arguments. (finish_omp_for): Add ORIG_DECLV argument. * parser.c (cp_parser_lambda_body): Call save_omp_privatization_clauses and restore_omp_privatization_clauses. (cp_parser_omp_clause_name): Handle OpenMP 4.5 clauses. (cp_parser_omp_var_list_no_open): Handle structure elements for map, to and from clauses. Handle array sections in reduction clause. Parse this keyword. Formatting fixes. (cp_parser_omp_clause_if): Add IS_OMP argument, handle parsing of if clause modifiers. (cp_parser_omp_clause_num_tasks, cp_parser_omp_clause_grainsize, cp_parser_omp_clause_priority, cp_parser_omp_clause_hint, cp_parser_omp_clause_defaultmap): New functions. (cp_parser_omp_clause_ordered): Parse optional parameter. (cp_parser_omp_clause_reduction): Handle array reductions. (cp_parser_omp_clause_schedule): Parse optional simd modifier. (cp_parser_omp_clause_nogroup, cp_parser_omp_clause_orderedkind): New functions. (cp_parser_omp_clause_linear): Parse linear clause modifiers. (cp_parser_omp_clause_depend_sink): New function. (cp_parser_omp_clause_depend): Parse source/sink depend kinds. (cp_parser_omp_clause_map): Parse release/delete map kinds and optional always modifier. (cp_parser_oacc_all_clauses): Adjust cp_parser_omp_clause_if and finish_omp_clauses callers. (cp_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses. Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive. (OMP_CRITICAL_CLAUSE_MASK): Define. (cp_parser_omp_critical): Parse critical clauses. (cp_parser_omp_for_incr): Use cp_tree_equal if processing_template_decl. (cp_parser_omp_for_loop_init): Return tree instead of bool. Handle non-static data member iterators. (cp_parser_omp_for_loop): Handle doacross loops, adjust finish_omp_for and finish_omp_clauses callers. (cp_omp_split_clauses): Adjust finish_omp_clauses caller. (OMP_SIMD_CLAUSE_MASK): Add simdlen clause. (cp_parser_omp_simd): Allow ordered clause if it has no parameter. (OMP_FOR_CLAUSE_MASK): Add linear clause. (cp_parser_omp_for): Disallow ordered clause when combined with distribute. Disallow linear clause when combined with distribute and not combined with simd. (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define. (cp_parser_omp_ordered): Add CONTEXT argument, return bool instead of tree, parse clauses and if depend clause is found, don't parse a body. (cp_parser_omp_parallel): Disallow copyin clause on target parallel. Allow target parallel without for after it. (OMP_TASK_CLAUSE_MASK): Add priority clause. (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause. (cp_parser_omp_target_data): Diagnose no map clauses or clauses with invalid kinds. (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses. (OMP_TARGET_ENTER_DATA_CLAUSE_MASK, OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define. (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data): New functions. (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate, defaultmap and is_device_ptr clauses. (cp_parser_omp_target): Parse target parallel and target simd. Set OMP_TARGET_COMBINED on combined constructs. Parse target enter data and target exit data. Diagnose invalid map kinds. (cp_parser_oacc_cache): Adjust finish_omp_clauses caller. (OMP_DECLARE_TARGET_CLAUSE_MASK): Define. (cp_parser_omp_declare_target): Parse OpenMP 4.5 forms of this construct. (OMP_TASKLOOP_CLAUSE_MASK): Define. (cp_parser_omp_taskloop): New function. (cp_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here, handle PRAGMA_OMP_TASKLOOP. (cp_parser_pragma): Handle PRAGMA_OMP_ORDERED here directly, handle PRAGMA_OMP_TASKLOOP, call push_omp_privatization_clauses and pop_omp_privatization_clauses around parsing calls. (cp_parser_cilk_for): Adjust finish_omp_clauses caller. * pt.c (apply_late_template_attributes): Adjust tsubst_omp_clauses and finish_omp_clauses callers. (tsubst_omp_clause_decl): Return NULL if decl is NULL. For TREE_LIST, copy over OMP_CLAUSE_DEPEND_SINK_NEGATIVE bit. Use tsubst_expr instead of tsubst_copy, undo convert_from_reference effects. (tsubst_omp_clauses): Add ALLOW_FIELDS argument. Handle new OpenMP 4.5 clauses. Use tsubst_omp_clause_decl for more clauses. If ALLOW_FIELDS, handle non-static data members in the clauses. Clear OMP_CLAUSE_LINEAR_STEP if it has been cleared before. (omp_parallel_combined_clauses): New variable. (tsubst_omp_for_iterator): Add ORIG_DECLV argument, recur on OMP_FOR_ORIG_DECLS, handle non-static data member iterators. Improve handling of clauses on combined constructs. (tsubst_expr): Call push_omp_privatization_clauses and pop_omp_privatization_clauses around instantiation of certain OpenMP constructs, improve handling of clauses on combined constructs, handle OMP_TASKLOOP, adjust tsubst_omp_for_iterator, tsubst_omp_clauses and finish_omp_for callers, handle clauses on critical and ordered, handle OMP_TARGET_{ENTER,EXIT}_DATA. (instantiate_decl): Call save_omp_privatization_clauses and restore_omp_privatization_clauses around instantiation. (dependent_omp_for_p): Fix up comment typo. Handle SCOPE_REF. * semantics.c (omp_private_member_map, omp_private_member_vec, omp_private_member_ignore_next): New variables. (finish_non_static_data_member): Return dummy decl for privatized non-static data members. (omp_clause_decl_field, omp_clause_printable_decl, omp_note_field_privatization, omp_privatize_field): New functions. (handle_omp_array_sections_1): Fix comment typo. Add IS_OMP argument, handle structure element bases, diagnose bitfields, pass IS_OMP recursively, diagnose known zero length array sections in depend clauses, handle array sections in reduction clause, diagnose negative length even for pointers. (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for types, pass IS_OMP down to handle_omp_array_sections_1, handle array sections in reduction clause, set OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP. (finish_omp_reduction_clause): Handle array sections and arrays. Use omp_clause_printable_decl. (finish_omp_declare_simd_methods, cp_finish_omp_clause_depend_sink): New functions. (finish_omp_clauses): Add ALLOW_FIELDS and DECLARE_SIMD arguments. Handle new OpenMP 4.5 clauses and new restrictions for the old ones, handle non-static data members, reject this keyword when not allowed. (push_omp_privatization_clauses, pop_omp_privatization_clauses, save_omp_privatization_clauses, restore_omp_privatization_clauses): New functions. (handle_omp_for_class_iterator): Handle OMP_TASKLOOP class iterators. Add collapse and ordered arguments. Fix handling of lastprivate iterators in doacross loops. (finish_omp_for): Add ORIG_DECLV argument, handle doacross loops, adjust c_finish_omp_for, handle_omp_for_class_iterator and finish_omp_clauses callers. Fill in OMP_CLAUSE_LINEAR_STEP on simd loops with non-static data member iterators. gcc/fortran/ 2015-10-13 Jakub Jelinek <jakub@redhat.com> Ilya Verbin <ilya.verbin@intel.com> * f95-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10, DEF_FUNCTION_TYPE_11, DEF_FUNCTION_TYPE_VAR_1): Define. * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_IF_MODIFIER to ERROR_MARK, OMP_CLAUSE_ORDERED_EXPR to NULL. (gfc_trans_omp_critical): Adjust for addition of clauses. (gfc_trans_omp_ordered): Likewise. * types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, BT_FN_BOOL_UINT_ULLPTR_ULLPTR_ULLPTR, BT_FN_BOOL_UINT_LONGPTR_LONG_LONGPTR_LONGPTR, BT_FN_BOOL_UINT_ULLPTR_ULL_ULLPTR_ULLPTR, BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_UINT_PTR, BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_ULL_ULL_ULL, BT_FN_VOID_LONG_VAR, BT_FN_VOID_ULL_VAR): New. (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): Remove. gcc/lto/ 2015-10-13 Jakub Jelinek <jakub@redhat.com> * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10, DEF_FUNCTION_TYPE_11): Define. gcc/jit/ 2015-10-13 Jakub Jelinek <jakub@redhat.com> * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10, DEF_FUNCTION_TYPE_11): Define. * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10, DEF_FUNCTION_TYPE_11): Define. gcc/ada/ 2015-10-13 Jakub Jelinek <jakub@redhat.com> * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10, DEF_FUNCTION_TYPE_11): Define. gcc/testsuite/ 2015-10-13 Jakub Jelinek <jakub@redhat.com> Aldy Hernandez <aldyh@redhat.com> * c-c++-common/gomp/cancel-1.c (f2): Add map clause to target data. * c-c++-common/gomp/clauses-1.c: New test. * c-c++-common/gomp/clauses-2.c: New test. * c-c++-common/gomp/clauses-3.c: New test. * c-c++-common/gomp/clauses-4.c: New test. * c-c++-common/gomp/declare-target-1.c: New test. * c-c++-common/gomp/declare-target-2.c: New test. * c-c++-common/gomp/depend-3.c: New test. * c-c++-common/gomp/depend-4.c: New test. * c-c++-common/gomp/doacross-1.c: New test. * c-c++-common/gomp/if-1.c: New test. * c-c++-common/gomp/if-2.c: New test. * c-c++-common/gomp/linear-1.c: New test. * c-c++-common/gomp/map-2.c: New test. * c-c++-common/gomp/map-3.c: New test. * c-c++-common/gomp/nesting-1.c (f_omp_parallel, f_omp_target_data): Add map clause to target data. * c-c++-common/gomp/nesting-warn-1.c (f_omp_target): Likewise. * c-c++-common/gomp/ordered-1.c: New test. * c-c++-common/gomp/ordered-2.c: New test. * c-c++-common/gomp/ordered-3.c: New test. * c-c++-common/gomp/pr61486-1.c (foo): Remove linear clause on non-iterator. * c-c++-common/gomp/pr61486-2.c (test, test2): Remove ordered clause and ordered construct where no longer allowed. * c-c++-common/gomp/priority-1.c: New test. * c-c++-common/gomp/reduction-1.c: New test. * c-c++-common/gomp/schedule-simd-1.c: New test. * c-c++-common/gomp/sink-1.c: New test. * c-c++-common/gomp/sink-2.c: New test. * c-c++-common/gomp/sink-3.c: New test. * c-c++-common/gomp/sink-4.c: New test. * c-c++-common/gomp/udr-1.c: New test. * c-c++-common/taskloop-1.c: New test. * c-c++-common/cpp/openmp-define-3.c: Adjust for the new value of _OPENMP macro. * c-c++-common/cilk-plus/PS/body.c (foo): Adjust expected diagnostics. * c-c++-common/goacc-gomp/nesting-fail-1.c (f_acc_parallel, f_acc_kernels, f_acc_data, f_acc_loop): Add map clause to target data. * gcc.dg/gomp/clause-1.c: * gcc.dg/gomp/reduction-1.c: New test. * gcc.dg/gomp/sink-fold-1.c: New test. * gcc.dg/gomp/sink-fold-2.c: New test. * gcc.dg/gomp/sink-fold-3.c: New test. * gcc.dg/vect/vect-simd-clone-15.c: New test. * g++.dg/gomp/clause-1.C (T::test): Remove dg-error on privatization of non-static data members. * g++.dg/gomp/clause-3.C (foo): Remove one dg-error directive. Add some linear clause tests. * g++.dg/gomp/declare-simd-3.C: New test. * g++.dg/gomp/linear-1.C: New test. * g++.dg/gomp/member-1.C: New test. * g++.dg/gomp/member-2.C: New test. * g++.dg/gomp/pr66571-2.C: New test. * g++.dg/gomp/pr67504.C (foo): Add test for ordered clause with dependent argument. * g++.dg/gomp/pr67522.C (foo): Add test for invalid array section in reduction clause. * g++.dg/gomp/reference-1.C: New test. * g++.dg/gomp/sink-1.C: New test. * g++.dg/gomp/sink-2.C: New test. * g++.dg/gomp/sink-3.C: New test. * g++.dg/gomp/task-1.C: Remove both dg-error directives. * g++.dg/gomp/this-1.C: New test. * g++.dg/gomp/this-2.C: New test. * g++.dg/vect/simd-clone-2.cc: New test. * g++.dg/vect/simd-clone-2.h: New test. * g++.dg/vect/simd-clone-3.cc: New test. * g++.dg/vect/simd-clone-4.cc: New test. * g++.dg/vect/simd-clone-4.h: New test. * g++.dg/vect/simd-clone-5.cc: New test. include/ 2015-10-13 Jakub Jelinek <jakub@redhat.com> Ilya Verbin <ilya.verbin@intel.com> * gomp-constants.h (GOMP_MAP_FLAG_ALWAYS): Define. (enum gomp_map_kind): Add GOMP_MAP_FIRSTPRIVATE, GOMP_MAP_FIRSTPRIVATE_INT, GOMP_MAP_USE_DEVICE_PTR, GOMP_MAP_ZERO_LEN_ARRAY_SECTION, GOMP_MAP_ALWAYS_TO, GOMP_MAP_ALWAYS_FROM, GOMP_MAP_ALWAYS_TOFROM, GOMP_MAP_STRUCT, GOMP_MAP_DELETE_ZERO_LEN_ARRAY_SECTION, GOMP_MAP_DELETE, GOMP_MAP_RELEASE, GOMP_MAP_FIRSTPRIVATE_POINTER. (GOMP_MAP_ALWAYS_TO_P, GOMP_MAP_ALWAYS_FROM_P): Define. (GOMP_TASK_FLAG_UNTIED, GOMP_TASK_FLAG_FINAL, GOMP_TASK_FLAG_MERGEABLE, GOMP_TASK_FLAG_DEPEND, GOMP_TASK_FLAG_PRIORITY, GOMP_TASK_FLAG_UP, GOMP_TASK_FLAG_GRAINSIZE, GOMP_TASK_FLAG_IF, GOMP_TASK_FLAG_NOGROUP, GOMP_TARGET_FLAG_NOWAIT, GOMP_TARGET_FLAG_EXIT_DATA, GOMP_TARGET_FLAG_UPDATE): Define. libgomp/ 2015-10-13 Jakub Jelinek <jakub@redhat.com> Aldy Hernandez <aldyh@redhat.com> Ilya Verbin <ilya.verbin@intel.com> * config/linux/affinity.c (omp_get_place_num_procs, omp_get_place_proc_ids, gomp_get_place_proc_ids_8): New functions. * config/linux/doacross.h: New file. * config/posix/affinity.c (omp_get_place_num_procs, omp_get_place_proc_ids, gomp_get_place_proc_ids_8): New functions. * config/posix/doacross.h: New file. * env.c: Include gomp-constants.h. (struct gomp_task_icv): Rename run_sched_modifier to run_sched_chunk_size. (gomp_max_task_priority_var): New variable. (parse_schedule): Rename run_sched_modifier to run_sched_chunk_size. (handle_omp_display_env): Change _OPENMP value from 201307 to 201511. Print OMP_MAX_TASK_PRIORITY. (initialize_env): Parse OMP_MAX_TASK_PRIORITY. (omp_set_schedule, omp_get_schedule): Rename modifier argument to chunk_size and run_sched_modifier to run_sched_chunk_size. (omp_get_max_task_priority, omp_get_initial_device, omp_get_num_places, omp_get_place_num, omp_get_partition_num_places, omp_get_partition_place_nums): New functions. * fortran.c (omp_set_schedule_, omp_set_schedule_8_, omp_get_schedule_, omp_get_schedule_8_): Rename modifier argument to chunk_size. (omp_get_num_places_, omp_get_place_num_procs_, omp_get_place_num_procs_8_, omp_get_place_proc_ids_, omp_get_place_proc_ids_8_, omp_get_place_num_, omp_get_partition_num_places_, omp_get_partition_place_nums_, omp_get_partition_place_nums_8_, omp_get_initial_device_, omp_get_max_task_priority_): New functions. * libgomp_g.h (GOMP_loop_doacross_static_start, GOMP_loop_doacross_dynamic_start, GOMP_loop_doacross_guided_start, GOMP_loop_doacross_runtime_start, GOMP_loop_ull_doacross_static_start, GOMP_loop_ull_doacross_dynamic_start, GOMP_loop_ull_doacross_guided_start, GOMP_loop_ull_doacross_runtime_start, GOMP_doacross_post, GOMP_doacross_wait, GOMP_doacross_ull_post, GOMP_doacross_wait, GOMP_taskloop, GOMP_taskloop_ull, GOMP_target_41, GOMP_target_data_41, GOMP_target_update_41, GOMP_target_enter_exit_data): New prototypes. (GOMP_task): Add prototype argument. * libgomp.h (_LIBGOMP_CHECKING_): Define to 0 if not yet defined. (struct gomp_doacross_work_share): New type. (struct gomp_work_share): Add doacross field. (struct gomp_task_icv): Rename run_sched_modifier to run_sched_chunk_size. (enum gomp_task_kind): Rename GOMP_TASK_IFFALSE to GOMP_TASK_UNDEFERRED. Add comments. (struct gomp_task_depend_entry): Add comments. (struct gomp_task): Likewise. (struct gomp_taskgroup): Likewise. (struct gomp_target_task): New type. (struct gomp_team): Add comment. (gomp_get_place_proc_ids_8, gomp_doacross_init, gomp_doacross_ull_init, gomp_task_maybe_wait_for_dependencies, gomp_create_target_task, gomp_target_task_fn): New prototypes. (struct target_var_desc): New type. (struct target_mem_desc): Adjust comment. Use struct target_var_desc instead of splay_tree_key for list. (REFCOUNT_INFINITY): Define. (struct splay_tree_key_s): Remove copy_from field. (struct gomp_device_descr): Add dev2dev_func field. (enum gomp_map_vars_kind): New enum. (gomp_map_vars): Add one argument. * libgomp.map (OMP_4.5): Export omp_get_max_task_priority, omp_get_max_task_priority_, omp_get_num_places, omp_get_num_places_, omp_get_place_num_procs, omp_get_place_num_procs_, omp_get_place_num_procs_8_, omp_get_place_proc_ids, omp_get_place_proc_ids_, omp_get_place_proc_ids_8_, omp_get_place_num, omp_get_place_num_, omp_get_partition_num_places, omp_get_partition_num_places_, omp_get_partition_place_nums, omp_get_partition_place_nums_, omp_get_partition_place_nums_8_, omp_get_initial_device, omp_get_initial_device_, omp_target_alloc, omp_target_free, omp_target_is_present, omp_target_memcpy, omp_target_memcpy_rect, omp_target_associate_ptr and omp_target_disassociate_ptr. (GOMP_4.0.2): Renamed to ... (GOMP_4.5): ... this. Export GOMP_target_41, GOMP_target_data_41, GOMP_target_update_41, GOMP_target_enter_exit_data, GOMP_taskloop, GOMP_taskloop_ull, GOMP_loop_doacross_dynamic_start, GOMP_loop_doacross_guided_start, GOMP_loop_doacross_runtime_start, GOMP_loop_doacross_static_start, GOMP_doacross_post, GOMP_doacross_wait, GOMP_loop_ull_doacross_dynamic_start, GOMP_loop_ull_doacross_guided_start, GOMP_loop_ull_doacross_runtime_start, GOMP_loop_ull_doacross_static_start, GOMP_doacross_ull_post and GOMP_doacross_ull_wait. * libgomp.texi: Document omp_get_max_task_priority. Rename modifier argument to chunk_size for omp_set_schedule and omp_get_schedule. Document OMP_MAX_TASK_PRIORITY env var. * loop.c (GOMP_loop_runtime_start): Adjust for run_sched_modifier to run_sched_chunk_size renaming. (GOMP_loop_ordered_runtime_start): Likewise. (gomp_loop_doacross_static_start, gomp_loop_doacross_dynamic_start, gomp_loop_doacross_guided_start, GOMP_loop_doacross_runtime_start, GOMP_parallel_loop_runtime_start): New functions. (GOMP_parallel_loop_runtime): Adjust for run_sched_modifier to run_sched_chunk_size renaming. (GOMP_loop_doacross_static_start, GOMP_loop_doacross_dynamic_start, GOMP_loop_doacross_guided_start): New functions or aliases. * loop_ull.c (GOMP_loop_ull_runtime_start): Adjust for run_sched_modifier to run_sched_chunk_size renaming. (GOMP_loop_ull_ordered_runtime_start): Likewise. (gomp_loop_ull_doacross_static_start, gomp_loop_ull_doacross_dynamic_start, gomp_loop_ull_doacross_guided_start, GOMP_loop_ull_doacross_runtime_start): New functions. (GOMP_loop_ull_doacross_static_start, GOMP_loop_ull_doacross_dynamic_start, GOMP_loop_ull_doacross_guided_start): New functions or aliases. * oacc-mem.c (acc_map_data, present_create_copy, gomp_acc_insert_pointer): Pass GOMP_MAP_VARS_OPENACC instead of false to gomp_map_vars. (gomp_acc_remove_pointer): Use copy_from from target_var_desc. * oacc-parallel.c (GOACC_data_start): Pass GOMP_MAP_VARS_OPENACC instead of false to gomp_map_vars. (GOACC_parallel_keyed): Likewise. Use copy_from from target_var_desc. * omp.h.in (omp_lock_hint_t): New type. (omp_init_lock_with_hint, omp_init_nest_lock_with_hint, omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids, omp_get_place_num, omp_get_partition_num_places, omp_get_partition_place_nums, omp_get_initial_device, omp_get_max_task_priority, omp_target_alloc, omp_target_free, omp_target_is_present, omp_target_memcpy, omp_target_memcpy_rect, omp_target_associate_ptr, omp_target_disassociate_ptr): New prototypes. * omp_lib.f90.in (omp_lock_hint_kind): New parameter. (omp_lock_hint_none, omp_lock_hint_uncontended, omp_lock_hint_contended, omp_lock_hint_nonspeculative, omp_lock_hint_speculative): New parameters. (omp_init_lock_with_hint, omp_init_nest_lock_with_hint, omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids, omp_get_place_num, omp_get_partition_num_places, omp_get_partition_place_nums, omp_get_initial_device, omp_get_max_task_priority): New interfaces. (omp_set_schedule, omp_get_schedule): Rename modifier argument to chunk_size. * omp_lib.h.in (omp_lock_hint_kind): New parameter. (omp_lock_hint_none, omp_lock_hint_uncontended, omp_lock_hint_contended, omp_lock_hint_nonspeculative, omp_lock_hint_speculative): New parameters. (omp_init_lock_with_hint, omp_init_nest_lock_with_hint, omp_get_num_places, omp_get_place_num_procs, omp_get_place_proc_ids, omp_get_place_num, omp_get_partition_num_places, omp_get_partition_place_nums, omp_get_initial_device, omp_get_max_task_priority): New functions and subroutines. * ordered.c: Include stdarg.h and string.h. (MAX_COLLAPSED_BITS): Define. (gomp_doacross_init, GOMP_doacross_post, GOMP_doacross_wait, gomp_doacross_ull_init, GOMP_doacross_ull_post, GOMP_doacross_ull_wait): New functions. * target.c: Include errno.h. (resolve_device): If device is not initialized, call gomp_init_device on it. (gomp_map_lookup): New function. (gomp_map_vars_existing): Add tgt_var argument, fill it in. Don't bump refcount if REFCOUNT_INFINITY. Handle GOMP_MAP_ALWAYS_TO_P. (get_kind): Rename is_openacc argument to short_mapkind. (gomp_map_pointer): Use gomp_map_lookup. (gomp_map_fields_existing): New function. (gomp_map_vars): Rename is_openacc argument to short_mapkind and is_target to pragma_kind. Handle GOMP_MAP_VARS_ENTER_DATA, handle GOMP_MAP_FIRSTPRIVATE_INT, GOMP_MAP_STRUCT, GOMP_MAP_USE_DEVICE_PTR, GOMP_MAP_ZERO_LEN_ARRAY_SECTION. Adjust for tgt->list changed type and copy_from living in there. (gomp_copy_from_async): Adjust for tgt->list changed type and copy_from living in there. (gomp_unmap_vars): Likewise. (gomp_update): Likewise. Rename is_openacc argument to short_mapkind. Don't fail if object is not mapped. (gomp_load_image_to_device): Initialize refcount to REFCOUNT_INFINITY. (gomp_target_fallback): New function. (gomp_get_target_fn_addr): Likewise. (GOMP_target): Adjust gomp_map_vars caller, use gomp_get_target_fn_addr and gomp_target_fallback. (GOMP_target_41): New function. (gomp_target_data_fallback): New function. (GOMP_target_data): Use it, adjust gomp_map_vars caller. (GOMP_target_data_41): New function. (GOMP_target_update): Adjust gomp_update caller. (GOMP_target_update_41): New function. (gomp_exit_data, GOMP_target_enter_exit_data, gomp_target_task_fn, omp_target_alloc, omp_target_free, omp_target_is_present, omp_target_memcpy, omp_target_memcpy_rect_worker, omp_target_memcpy_rect, omp_target_associate_ptr, omp_target_disassociate_ptr, gomp_load_plugin_for_device): New functions. * task.c: Include gomp-constants.h. Include taskloop.c twice to get GOMP_taskloop and GOMP_taskloop_ull definitions. (gomp_task_handle_depend): New function. (GOMP_task): Use it. Add priority argument. Use gomp-constant.h constants instead of hardcoded numbers. Rename GOMP_TASK_IFFALSE to GOMP_TASK_UNDEFERRED. (gomp_create_target_task): New function. (verify_children_queue, verify_taskgroup_queue, verify_task_queue): New functions. (gomp_task_run_pre): Call verify_*_queue functions. If an upcoming tied task is about to leave the sibling or taskgroup queues in an invalid state, adjust appropriately. Remove taskgroup argument. Add comments. (gomp_task_run_post_handle_dependers): Add comments. (gomp_task_run_post_remove_parent): Likewise. (gomp_barrier_handle_tasks): Adjust gomp_task_run_pre caller. (GOMP_taskwait): Likewise. Add comments. (gomp_task_maybe_wait_for_dependencies): Fix scheduling problem such that the first non parent_depends_on task does not end up at the end of the children queue. (GOMP_taskgroup_start): Rename GOMP_TASK_IFFALSE to GOMP_TASK_UNDEFERRED. (GOMP_taskgroup_end): Adjust gomp_task_run_pre caller. * taskloop.c: New file. * testsuite/lib/libgomp.exp (check_effective_target_offload_device_nonshared_as): New proc. * testsuite/libgomp.c/affinity-2.c: New test. * testsuite/libgomp.c/doacross-1.c: New test. * testsuite/libgomp.c/doacross-2.c: New test. * testsuite/libgomp.c/examples-4/declare_target-1.c (fib_wrapper): Add map clause to target. * testsuite/libgomp.c/examples-4/declare_target-4.c (accum): Likewise. * testsuite/libgomp.c/examples-4/declare_target-5.c (accum): Likewise. * testsuite/libgomp.c/examples-4/device-1.c (main): Likewise. * testsuite/libgomp.c/examples-4/device-3.c (main): Likewise. * testsuite/libgomp.c/examples-4/target_data-3.c (gramSchmidt): Likewise. * testsuite/libgomp.c/examples-4/teams-2.c (dotprod): Likewise. * testsuite/libgomp.c/examples-4/teams-3.c (dotprod): Likewise. * testsuite/libgomp.c/examples-4/teams-4.c (dotprod): Likewise. * testsuite/libgomp.c/for-2.h (OMPTGT, OMPTO, OMPFROM): Define if not defined. Use those where needed. * testsuite/libgomp.c/for-4.c: New test. * testsuite/libgomp.c/for-5.c: New test. * testsuite/libgomp.c/for-6.c: New test. * testsuite/libgomp.c/linear-1.c: New test. * testsuite/libgomp.c/ordered-4.c: New test. * testsuite/libgomp.c/pr66199-2.c (f2): Adjust for linear clause only allowed on the loop iterator. * testsuite/libgomp.c/pr66199-3.c: New test. * testsuite/libgomp.c/pr66199-4.c: New test. * testsuite/libgomp.c/reduction-7.c: New test. * testsuite/libgomp.c/reduction-8.c: New test. * testsuite/libgomp.c/reduction-9.c: New test. * testsuite/libgomp.c/reduction-10.c: New test. * testsuite/libgomp.c/target-1.c (fn2, fn3, fn4): Add map(tofrom:s). * testsuite/libgomp.c/target-2.c (fn2, fn3, fn4): Likewise. * testsuite/libgomp.c/target-7.c (foo): Add map(h) where needed. * testsuite/libgomp.c/target-11.c: New test. * testsuite/libgomp.c/target-12.c: New test. * testsuite/libgomp.c/target-13.c: New test. * testsuite/libgomp.c/target-14.c: New test. * testsuite/libgomp.c/target-15.c: New test. * testsuite/libgomp.c/target-16.c: New test. * testsuite/libgomp.c/target-17.c: New test. * testsuite/libgomp.c/target-18.c: New test. * testsuite/libgomp.c/target-19.c: New test. * testsuite/libgomp.c/target-20.c: New test. * testsuite/libgomp.c/target-21.c: New test. * testsuite/libgomp.c/target-22.c: New test. * testsuite/libgomp.c/target-23.c: New test. * testsuite/libgomp.c/target-24.c: New test. * testsuite/libgomp.c/target-25.c: New test. * testsuite/libgomp.c/target-26.c: New test. * testsuite/libgomp.c/target-27.c: New test. * testsuite/libgomp.c/taskloop-1.c: New test. * testsuite/libgomp.c/taskloop-2.c: New test. * testsuite/libgomp.c/taskloop-3.c: New test. * testsuite/libgomp.c/taskloop-4.c: New test. * testsuite/libgomp.c++/ctor-13.C: New test. * testsuite/libgomp.c++/doacross-1.C: New test. * testsuite/libgomp.c++/examples-4/declare_target-2.C: Replace offload_device with offload_device_nonshared_as. * testsuite/libgomp.c++/for-12.C: New test. * testsuite/libgomp.c++/for-13.C: New test. * testsuite/libgomp.c++/for-14.C: New test. * testsuite/libgomp.c++/linear-1.C: New test. * testsuite/libgomp.c++/member-1.C: New test. * testsuite/libgomp.c++/member-2.C: New test. * testsuite/libgomp.c++/member-3.C: New test. * testsuite/libgomp.c++/member-4.C: New test. * testsuite/libgomp.c++/member-5.C: New test. * testsuite/libgomp.c++/ordered-1.C: New test. * testsuite/libgomp.c++/reduction-5.C: New test. * testsuite/libgomp.c++/reduction-6.C: New test. * testsuite/libgomp.c++/reduction-7.C: New test. * testsuite/libgomp.c++/reduction-8.C: New test. * testsuite/libgomp.c++/reduction-9.C: New test. * testsuite/libgomp.c++/reduction-10.C: New test. * testsuite/libgomp.c++/reference-1.C: New test. * testsuite/libgomp.c++/simd14.C: New test. * testsuite/libgomp.c++/target-2.C (fn2): Add map(tofrom: s) clause. * testsuite/libgomp.c++/target-5.C: New test. * testsuite/libgomp.c++/target-6.C: New test. * testsuite/libgomp.c++/target-7.C: New test. * testsuite/libgomp.c++/target-8.C: New test. * testsuite/libgomp.c++/target-9.C: New test. * testsuite/libgomp.c++/target-10.C: New test. * testsuite/libgomp.c++/target-11.C: New test. * testsuite/libgomp.c++/target-12.C: New test. * testsuite/libgomp.c++/taskloop-1.C: New test. * testsuite/libgomp.c++/taskloop-2.C: New test. * testsuite/libgomp.c++/taskloop-3.C: New test. * testsuite/libgomp.c++/taskloop-4.C: New test. * testsuite/libgomp.c++/taskloop-5.C: New test. * testsuite/libgomp.c++/taskloop-6.C: New test. * testsuite/libgomp.c++/taskloop-7.C: New test. * testsuite/libgomp.c++/taskloop-8.C: New test. * testsuite/libgomp.c++/taskloop-9.C: New test. * testsuite/libgomp.fortran/affinity1.f90: New test. * testsuite/libgomp.fortran/affinity2.f90: New test. liboffloadmic/ 2015-10-13 Ilya Verbin <ilya.verbin@intel.com> * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_dev2dev): New function. * plugin/offload_target_main.cpp (__offload_target_tgt2tgt): New static function, register it in liboffloadmic. From-SVN: r228777
2015-10-13 21:06:23 +02:00
2015-10-13 Jakub Jelinek <jakub@redhat.com>
Aldy Hernandez <aldyh@redhat.com>
* c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
(c_define_builtins): Likewise.
* c-common.h (enum c_omp_clause_split): Add
C_OMP_CLAUSE_SPLIT_TASKLOOP.
(c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
(c_finish_omp_for): Add ORIG_DECLV argument.
* c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
201511 instead of 201307.
* c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
OMP_CRITICAL_CLAUSES to it.
(c_finish_omp_ordered): Add CLAUSES argument, set
OMP_ORDERED_CLAUSES to it.
(c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
(c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
constructs and new OpenMP 4.5 clauses. Clear
OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
verification code.
* c-pragma.c (omp_pragmas_simd): Add taskloop.
* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
(enum pragma_omp_clause): Add
PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
Replace REAL_VALUES_EQUAL with real_equal Richard B suggested we should replace dconsthalf etc. with dconst<1, 2> (). When I tried that, the extra comma caused problems with some lingering uses of the old target macros for handling reals (e.g. REAL_ARITHMETIC instead of real_arithmetic), since the constant was then treated as two macro parameters. It would have been possible to add an extra level of brackets to avoid this, but I thought I might as well take the opportunity to remove the macros instead. (Note that I'm only removing macros that caused a problem directly, or are closely related to ones that did.) This first patch replaces REAL_VALUES_EQUAL with a real_equal function. The prototype is the same as for real_identical, which has already undergone a half-transition in this direction. Bootstrapped & regression-tested on x86_64-linux-gnu. Also tested by building one target per CPU directory and checking that there were no new warnings and no changes in testsuite output at -O2. gcc/c-family/ * c-lex.c (interpret_float): Use real_equal instead of REAL_VALUES_EQUAL. gcc/c/ * c-typeck.c (c_tree_equal): Use real_equal instead of REAL_VALUES_EQUAL. gcc/cp/ * tree.c (cp_tree_equal): Use real_equal instead of REAL_VALUES_EQUAL. gcc/ * real.h (real_equal): Declare. (REAL_VALUES_EQUAL): Delete. * real.c (real_equal): New function. (real_compare): Use it. * doc/tm.texi.in (REAL_VALUES_EQUAL): Delete. * doc/tm.texi: Regenerate. * builtins.c (fold_builtin_pow, fold_builtin_load_exponent): Use real_equal instead of REAL_VALUES_EQUAL. * config/aarch64/aarch64.c (aarch64_float_const_zero_rtx_p): Likewise. * config/arm/arm.c (arm_const_double_rtx, neon_valid_immediate) (fp_const_from_val): Likewise. * config/fr30/fr30.c (fr30_const_double_is_zero): Likewise. * config/m68k/m68k.c (standard_68881_constant_p): Likewise. (floating_exact_log2): Likewise. * config/sh/sh.c (fp_zero_operand, fp_one_operand): Likewise. * config/vax/vax.c (vax_float_literal): Likewise. * config/xtensa/predicates.md (const_float_1_operand): Likewise. * cprop.c (implicit_set_cond_p): Likewise. * expmed.c (expand_mult): Likewise. * fold-const.c (const_binop): Likewise. * simplify-rtx.c (simplify_binary_operation_1): Likewise. (simplify_const_binary_operation): Likewise. (simplify_const_relational_operation): Likewise. * tree-call-cdce.c (check_pow): Likewise. (gen_conditions_for_pow_cst_base): Likewise. * tree-inline.c (estimate_num_insns): Likewise. * tree-ssa-dom.c (record_equality): Likewise. * tree-ssa-math-opts.c (representable_as_half_series_p): Likewise. (gimple_expand_builtin_pow): Likewise. (pass_optimize_widening_mul::execute): Likewise. * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise. * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise. * tree.c (real_zerop, real_onep, real_minus_onep): Likewise. --- gcc/builtins.c | 14 +++++++------- gcc/c-family/c-lex.c | 6 +++--- gcc/c/c-typeck.c | 2 +- gcc/config/aarch64/aarch64.c | 2 +- gcc/config/arm/arm.c | 6 +++--- gcc/config/fr30/fr30.c | 2 +- gcc/config/m68k/m68k.c | 6 +++--- gcc/config/sh/sh.c | 4 ++-- gcc/config/vax/vax.c | 4 ++-- gcc/config/xtensa/predicates.md | 2 +- gcc/cp/tree.c | 2 +- gcc/cprop.c | 2 +- gcc/doc/tm.texi | 7 ------- gcc/doc/tm.texi.in | 7 ------- gcc/expmed.c | 2 +- gcc/fold-const.c | 2 +- gcc/real.c | 10 +++++++++- gcc/real.h | 4 ++-- gcc/simplify-rtx.c | 16 ++++++++-------- gcc/tree-call-cdce.c | 4 ++-- gcc/tree-inline.c | 5 +++-- gcc/tree-ssa-dom.c | 2 +- gcc/tree-ssa-math-opts.c | 16 ++++++++-------- gcc/tree-ssa-uncprop.c | 2 +- gcc/tree-vect-patterns.c | 4 ++-- gcc/tree.c | 6 +++--- 26 files changed, 67 insertions(+), 72 deletions(-) From-SVN: r228473
2015-10-05 13:29:35 +02:00
2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
* c-lex.c (interpret_float): Use real_equal instead of
REAL_VALUES_EQUAL.
Implement N4514, C++ Extensions for Transactional Memory. gcc/ * builtins.def (BUILT_IN_ABORT): Add transaction_pure attribute. gcc/c-family/ * c-common.c (c_common_reswords): Add C++ TM TS keywords. (c_common_attribute_table): Add transaction_safe_dynamic. transaction_safe now affects type identity. (handle_tm_attribute): Handle transaction_safe_dynamic. * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT, RID_ATOMIC_CANCEL, RID_SYNCHRONIZED. (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED. (D_TRANSMEM): New. * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory. * c-pretty-print.c (pp_c_attributes_display): Don't print transaction_safe in C++. gcc/c/ * c-parser.c (c_lex_one_token): Handle @synchronized. * c-decl.c (match_builtin_function_types): A declaration of a built-in can change whether the function is transaction_safe. gcc/cp/ * cp-tree.h (struct cp_declarator): Add tx_qualifier field. (BCS_NORMAL, BCS_TRANSACTION): New enumerators. * lex.c (init_reswords): Limit TM kewords to -fgnu-tm. * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized. (make_call_declarator): Take tx_qualifier. (cp_parser_tx_qualifier_opt): New. (cp_parser_lambda_declarator_opt): Use it. (cp_parser_direct_declarator): Likewise. (cp_parser_statement): Handle atomic_noexcept, atomic_cancel. (cp_parser_compound_statement): Change in_try parameter to bcs_flags. (cp_parser_std_attribute): Map optimize_for_synchronized to transaction_callable. (cp_parser_transaction): Take the token. Handle atomic_noexcept. * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety. * call.c (enum conversion_kind): Add ck_tsafe. (standard_conversion): Handle transaction-safety conversion. (convert_like_real, resolve_address_of_overloaded_function): Likewise. (check_methods): Diagnose transaction_safe_dynamic on non-virtual function. (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic. * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant) (can_convert_tx_safety): New. * typeck.c (composite_pointer_type): Handle transaction-safety. * name-lookup.h (enum scope_kind): Add sk_transaction. * name-lookup.c (begin_scope): Handle it. * semantics.c (begin_compound_stmt): Pass it. * decl.c (check_previous_goto_1): Check it. (struct named_label_entry): Add in_transaction_scope. (poplevel_named_label_1): Set it. (check_goto): Check it. (duplicate_decls): A specialization can be transaction_safe independently of its template. (grokdeclarator): Handle tx-qualifier. * rtti.c (ptr_initializer): Handle transaction-safe. * search.c (check_final_overrider): Check transaction_safe_dynamic. Don't check transaction_safe. * mangle.c (write_function_type): Mangle transaction_safe here. (write_CV_qualifiers_for_type): Not here. (write_type): Preserve transaction_safe when stripping attributes. * error.c (dump_type_suffix): Print transaction_safe. libiberty/ * cp-demangle.c (d_cv_qualifiers): Dx means transaction_safe. (cplus_demangle_type): Let d_cv_qualifiers handle it. (d_dump, d_make_comp, has_return_type, d_encoding) (d_count_templates_scopes, d_print_comp_inner) (d_print_mod_list, d_print_mod, d_print_function_type) (is_ctor_or_dtor): Handle DEMANGLE_COMPONENT_TRANSACTION_SAFE. From-SVN: r228462
2015-10-04 21:17:19 +02:00
2015-10-04 Jason Merrill <jason@redhat.com>
Implement N4514, C++ Extensions for Transactional Memory.
* c-common.c (c_common_reswords): Add C++ TM TS keywords.
(c_common_attribute_table): Add transaction_safe_dynamic.
transaction_safe now affects type identity.
(handle_tm_attribute): Handle transaction_safe_dynamic.
* c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
(OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
(D_TRANSMEM): New.
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
* c-pretty-print.c (pp_c_attributes_display): Don't print
transaction_safe in C++.
2015-10-02 Marek Polacek <polacek@redhat.com>
* c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
2015-10-02 Marek Polacek <polacek@redhat.com>
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.
2015-10-01 Joseph Myers <joseph@codesourcery.com>
* c.opt (std=c11): Do not describe as experimental.
(std=gnu11): Likewise.
(std=iso9899:2011): Likewise.
gomp-constants.h (GOMP_VERSION_NVIDIA_PTX): Increment. inlude/ * gomp-constants.h (GOMP_VERSION_NVIDIA_PTX): Increment. (GOMP_DIM_GANG, GOMP_DIM_WORKER, GOMP_DIM_VECTOR, GOMP_DIM_MAX, GOMP_DIM_MASK): New. (GOMP_LAUNCH_DIM, GOMP_LAUNCH_ASYNC, GOMP_LAUNCH_WAIT): New. (GOMP_LAUNCH_CODE_SHIFT, GOMP_LAUNCH_DEVICE_SHIFT, GOMP_LAUNCH_OP_SHIFT): New. (GOMP_LAUNCH_PACK, GOMP_LAUNCH_CODE, GOMP_LAUNCH_DEVICE, GOMP_LAUNCH_OP): New. (GOMP_LAUNCH_OP_MAX): New. libgomp/ * libgomp.h (acc_dispatch_t): Replace separate geometry args with array. * libgomp.map (GOACC_parallel_keyed): New. * oacc-parallel.c (goacc_wait): Take pointer to va_list. Adjust all callers. (GOACC_parallel_keyed): New interface. Lose geometry arguments and take keyed varargs list. Adjust call to exec_func. (GOACC_parallel): Force host fallback. * libgomp_g.h (GOACC_parallel): Remove. (GOACC_parallel_keyed): Declare. * plugin/plugin-nvptx.c (struct targ_fn_launch): New struct. (stuct targ_gn_descriptor): Replace name field with launch field. (nvptx_exec): Lose separate geometry args, take array. Process dynamic dimensions and adjust. (struct nvptx_tdata): Replace fn_names field with fn_descs. (GOMP_OFFLOAD_load_image): Adjust for change in function table data. (GOMP_OFFLOAD_openacc_parallel): Adjust for change in dimension passing. * oacc-host.c (host_openacc_exec): Adjust for change in dimension passing. gcc/ * config/nvptx/nvptx.c: Include omp-low.h and gomp-constants.h. (nvptx_record_offload_symbol): Record function execution geometry. * config/nvptx/mkoffload.c (process): Include launch geometry in function data. * omp-low.c (oacc_launch_pack): New. (replace_oacc_fn_attrib): New. (set_oacc_fn_attrib): New. (get_oacc_fn_attrib): New. (expand_omp_target): Create keyed varargs for GOACC_parallel call generation. * omp-low.h (get_oacc_fn_attrib): Declare. * builtin-types.def (DEF_FUNCTION_TyPE_VAR_6): New. (DEF_FUNCTION_TYPE_VAR_11): Delete. * tree.h (OMP_CLAUSE_EXPR): New. * omp-builtins.def (BUILT_IN_GOACC_PARALLEL): Change target fn name. gcc/lto/ * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New. (DEF_FUNCTION_TYPE_VAR_11): Delete. gcc/c-family/ * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New. (DEF_FUNCTION_TYPE_VAR_11): Delete. gcc/fortran/ * f95-lang.c (DEF_FUNCTION_TYPE_VAR_6): New. (DEF_FUNCTION_TYPE_VAR_11): Delete. * types.def (DEF_FUNCTION_TYPE_VAR_6): New. (DEF_FUNCTION_TYPE_VAR_11): Delete. gcc/ada/ * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define From-SVN: r228220
2015-09-28 21:37:33 +02:00
2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
* c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
(DEF_FUNCTION_TYPE_VAR_11): Delete.
2015-09-25 Marek Polacek <polacek@redhat.com>
* c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
(ubsan_instrument_shift): Likewise.
2015-09-25 Marek Polacek <polacek@redhat.com>
PR sanitizer/64906
* c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
* c-indentation.c (should_warn_for_misleading_indentation):
Compare next_stmt_vis_column with guard_line_first_nws instead
of with guard_line_vis_column.
2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/49654
PR c/49655
* c-pragma.c (handle_pragma_diagnostic): Detect non-warning
options and options not valid for the current language.
2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
* c-indentation.c (should_warn_for_misleading_indentation):
Float out and consolidate the calls to get_visual_column that
are passed guard_exploc as an argument. Compare
next_stmt_vis_column with guard_line_first_nws instead of with
body_line_first_nws.
2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
* c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
Wnamespaces): New C++ warnings.
2015-09-22 Jason Merrill <jason@redhat.com>
* c-common.h (abi_compat_version_crosses): New.
(warn_abi_version): Declare.
* c-common.c: Define it.
* c-opts.c (c_common_post_options): Handle it.
flag_abi_compat_version defaults to 8.
2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
Complete the implementation of N4230, Nested namespace definition.
* c-cppbuiltin.c: Add __cpp_namespace_attributes and
__cpp_nested_namespace_definitions.
2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-pragma.c (handle_pragma_diagnostic): Use explicit location
when warning.
* c-pragma.h (pragma_lex): Add optional loc argument.
Share memory blocks between pool allocators gcc/ * Makefile.in: Add memory-block.cc (pool_allocator::initialize): Use fixed block size. (pool_allocator::release): Use memory_block_pool. (pool_allocator::allocate): Likewise. * asan.c (asan_mem_ref_pool): Adjust to use common block size in all object pools. * cfg.c (initialize_original_copy_tables): Likewise. * cselib.c (elt_list_pool, elt_loc_list_pool, cselib_val_pool): Likewise. * df-problems.c (df_chain_alloc): Likewise. * df-scan.c (df_scan_alloc): Likewise. * dse.c (cse_store_info_pool, rtx_store_info_pool, read_info_type_pool, insn_info_type_pool, bb_info_pool, group_info_pool, deferred_change_pool): Likewise. * et-forest.c (et_nodes, et_occurrences): Likewise. * ipa-cp.c (ipcp_cst_values_pool, ipcp_sources_pool, ipcp_agg_lattice_pool): Likewise. * ipa-inline-analysis.c (edge_predicate_pool): Likewise. * ipa-profile.c (histogram_pool): Likewise. * ipa-prop.c (ipa_refdesc_pool): Likewise. * ira-build.c (live_range_pool, allocno_pool, object_pool, initiate_cost_vectors, pref_pool, copy_pool): Likewise. * ira-color.c (update_cost_record_pool): Likewise. * lra-lives.c (lra_live_range_pool): Likewise. * lra.c (lra_insn_reg_pool, lra_copy_pool): Likewise. * memory-block.cc: New file. * memory-block.h: New file. * regcprop.c (queued_debug_insn_change_pool): Use common block size. * sched-deps.c (sched_deps_init): Likewise. * sel-sched-ir.c (sched_lists_pool): Likewise. * stmt.c (expand_case, expand_sjlj_dispatch_table): Likewise. * tree-sra.c (access_pool): Likewise. * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise. * tree-ssa-pre.c (pre_expr_pool, bitmap_set_pool): Likewise. * tree-ssa-reassoc.c (operand_entry_pool): Likewise. * tree-ssa-sccvn.c (allocate_vn_table): Likewise. * tree-ssa-strlen.c (strinfo_pool): Likewise. * tree-ssa-structalias.c (variable_info_pool): Likewise. * var-tracking.c (attrs_def_pool, var_pool, valvar_pool, location_chain_pool, shared_hash_pool, loc_exp_dep_pool): Likewise. gcc/c-family/ * c-format.c (check_format_arg): Adjust to use common block size in all object pools. From-SVN: r227817
2015-09-16 02:56:54 +02:00
2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
* c-format.c (check_format_arg): Adjust to use common block size in all
object pools.
2015-09-15 David Malcolm <dmalcolm@redhat.com>
* c-format.c (location_from_offset): Update for change in
signature of location_get_source_line.
* c-indentation.c (get_visual_column): Likewise.
(line_contains_hash_if): Likewise.
2015-09-14 Marek Polacek <polacek@redhat.com>
* c-opts.c (c_common_post_options): Set C++ standard earlier, before
setting various warnings.
2015-09-14 Marek Polacek <polacek@redhat.com>
* c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
a negative value.
PR28901 -Wunused-variable ignores unused const initialised variables in C 12 years ago it was decided that -Wunused-variable shouldn't warn about static const variables because some code used const static char rcsid[] strings which were never used but wanted in the code anyway. But as the bug points out this hides some real bugs. These days the usage of rcsids is not very popular anymore. So this patch changes the default to warn about unused static const variables in C with -Wunused-variable. And it adds a new option -Wno-unused-const-variable to turn this warning off. For C++ this new warning is off by default, since const variables can be used as #defines in C++. New testcases for the new defaults in C and C++ are included testing the new warning and suppressing it with an unused attribute or using -Wno-unused-const-variable. gcc/ChangeLog PR c/28901 * toplev.c (check_global_declaration): Check and use warn_unused_const_variable. * doc/invoke.texi (Warning Options): Add -Wunused-const-variable. (-Wunused-variable): Remove non-constant. For C implies -Wunused-const-variable. (-Wunused-const-variable): New. gcc/c-family/ChangeLog PR c/28901 * c.opt (Wunused-variable): Option from common.opt. (Wunused-const-variable): New option. gcc/cp/ChangeLog PR c/28901 * cp-objcp-common.c (cxx_warn_unused_global_decl): Remove hard-coded VAR_P TREE_READONLY override. gcc/testsuite/ChangeLog PR c/28901 * g++.dg/warn/unused-variable-1.C: New test. * g++.dg/warn/unused-variable-2.C: Likewise. * gcc.dg/unused-4.c: Adjust warning for static const. * gcc.dg/unused-variable-1.c: New test. * gcc.dg/unused-variable-2.c: Likewise. From-SVN: r227742
2015-09-14 11:49:47 +02:00
2015-09-11 Mark Wielaard <mjw@redhat.com>
PR c/28901
* c.opt (Wunused-variable): Option from common.opt.
(Wunused-const-variable): New option.
2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53184
* c.opt ([Wsubobject-linkage]): Add.
2015-09-03 Martin Sebor <msebor@redhat.com>
PR c/66516
* c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
functions.
* c-common.c (reject_gcc_builtin): Define.
2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
PR middle-end/60586
* c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
prototype.
* c-gimplify.c (c_gimplify_expr): Added a call to the function
cilk_gimplify_call_params_in_spawned_fn.
* cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
(gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
unwrapping.
2015-08-25 Marek Polacek <polacek@redhat.com>
PR middle-end/67330
* c-common.c (handle_weak_attribute): Don't check whether the
visibility can be changed here.
2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-lex.c (c_lex_with_flags): Use explicit locations.
remove more useless typedefs gcc/c-family/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h, c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless typedefs. gcc/c/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs. gcc/cp/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c, method.c, name-lookup.h, parser.c, parser.h, rtti.c, semantics.c, typeck2.c: Remove useless typedefs. gcc/fortran/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * dependency.c, dependency.h, gfortran.h, io.c, module.c, parse.h, resolve.c, trans-types.h, trans.h: remove useless typedefs. gcc/lto/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * lto.h: Remove useless typedefs. gcc/objc/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * objc-act.h, objc-next-runtime-abi-02.c, objc-runtime-hooks.h: Remove useless typedefs. gcc/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * bb-reorder.c, cfgloop.h, collect2.c, combine.c, dse.c, dwarf2cfi.c, gcse-common.h, genopinit.c, ggc-page.c, machmode.h, mcf.c, modulo-sched.c, omp-low.c, read-rtl.c, sched-rgn.c, signop.h, tree-call-cdce.c, tree-dfa.c, tree-diagnostic.c, tree-inline.h, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-loop-niter.c, tree-ssa-loop.h, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sccvn.h, tree-ssa-structalias.c, tree-ssa-uninit.c, tree-ssa.h, tree-vect-loop-manip.c, tree-vectorizer.h, tree-vrp.c, var-tracking.c: Remove useless typedefs. From-SVN: r227001
2015-08-19 04:48:48 +02:00
2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
* c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR middle-end/36757
* c-common.c (check_builtin_function_arguments): Add check
for BUILT_IN_SIGNBIT argument.
2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/67160
* c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
in c++1z mode.
2015-08-17 Marek Polacek <polacek@redhat.com>
* c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
with whitespaces before qualifier names.
2015-08-12 Marek Polacek <polacek@redhat.com>
PR c++/55095
* c-common.c (maybe_warn_shift_overflow): Properly handle
left-shifting 1 into the sign bit.
2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
Add C++ Concepts TS support. gcc/c-family/ * c-common.c (c_common_reswords): Add __is_same_as, concept, requires. * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES. (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New. * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts. * c-opts.c (set_std_cxx1z): Set flag_concepts. * c.opt (fconcepts): New. gcc/cp/ * constraint.cc, logic.cc: New files. * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o. (c++.tags): Also process .cc files. * call.c (enum rejection_reason_code): Add rr_constraint_failure. (print_z_candidate): Handle it. (constraint_failure): New. (add_function_candidate): Check constraints. (build_new_function_call): Handle evaluating concepts. (joust): Check more_constrained. * class.c (add_method): Check equivalently_constrained. (build_clone): Copy constraints. (currently_open_class): Return tree. (resolve_address_of_overloaded_function): Check constraints. * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR. (potential_constant_expression_1): Likewise. * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO. (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR. * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR, SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR, EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR, EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR. * cp-tree.h (struct tree_constraint_info, check_nonnull) (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS) (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS) (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS) (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P) (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR) (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE) (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN) (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS) (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT) (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE) (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated) (struct local_specialization_stack, enum auto_deduction_context) (variable_concept_p, concept_template_p) (struct deferring_access_check_sentinel): New. (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO. (union lang_tree_node): Add constraint_info field. (struct lang_decl_base): Add concept_p flag. (enum cp_decl_spec): Add ds_concept. (struct cp_declarator): Add requires_clause. * cxx-pretty-print.c (cxx_pretty_printer::primary_expression) (cxx_pretty_printer::expression): Handle REQUIRES_EXPR, TRAIT_EXPR, *_CONSTR. (pp_cxx_parameter_declaration_clause): Accept a chain of PARM_DECLs. (cxx_pretty_printer::declarator): Print requires-clause. (pp_cxx_template_declaration): Likewise. (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS. (pp_cxx_requires_clause, pp_cxx_requirement) (pp_cxx_requirement_list, pp_cxx_requirement_body) (pp_cxx_requires_expr, pp_cxx_simple_requirement) (pp_cxx_type_requirement, pp_cxx_compound_requirement) (pp_cxx_nested_requirement, pp_cxx_predicate_constraint) (pp_cxx_expression_constraint, pp_cxx_type_constraint) (pp_cxx_implicit_conversion_constraint) (pp_cxx_argument_deduction_constraint) (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint) (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New. * cxx-pretty-print.h: Declare them. * decl.c (decls_match): Compare constraints. (duplicate_decls): Likewise. Remove constraints before freeing. (cxx_init_decl_processing): Call init_constraint_processing. (cp_finish_decl): Diagnose concept without initializer. (grokfndecl, grokvardecl): Handle concepts and constraints. (grokdeclarator): Handle concept, requires-clause. (grokparms): No longer static. (xref_tag_1): Check constraints. (finish_function): Call check_function_concept. (cp_tree_node_structure): Handle CONSTRAINT_INFO. (check_concept_refinement, is_concept_var, check_concept_fn): New. * decl2.c (check_classfn): Compare constraints. (mark_used): Don't instantiate concepts. * error.c (dump_template_decl): Print constraints. (dump_function_decl): Likewise. (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR. * lex.c (init_reswords): Set D_CXX_CONCEPTS. * method.c (implicitly_declare_fn): Copy constraints from inherited ctor. * parser.h (struct cp_parser): Add in_result_type_constraint_p and prevent_constrained_type_specifiers fields. * parser.c (make_call_declarator): Add requires_clause parm. (cp_parser_new): Clear prevent_constrained_type_specifiers. (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES. (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers. (cp_parser_trait_expr): Handle RID_IS_SAME_AS. (cp_parser_declaration): Handle concept introduction. (cp_parser_member_declaration): Likewise. (cp_parser_template_parameter): Handle constrained parameter. (cp_parser_type_parameter): Handle constraints. (cp_parser_decl_specifier_seq): Handle RID_CONCEPT. (cp_parser_template_id): Handle partial concept id. (cp_parser_type_name): Add overload that takes typename_keyword_p. Handle constrained parameter. (cp_parser_nonclass_name): Handle concept names. (cp_parser_alias_declaration): Handle constraints. (cp_parser_late_return_type_opt): Also handle requires-clause. (cp_parser_type_id_1): Handle deduction constraint. (cp_parser_parameter_declaration): Handle constrained parameters. (cp_parser_class_specifier_1): Handle constraints. (cp_parser_template_declaration_after_parameters): Split out from cp_parser_template_declaration_after_export. (cp_parser_single_declaration): Handle constraints. (synthesize_implicit_template_parm): Handle constraints. (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id) (cp_parser_introduction_list, get_id_declarator) (get_unqualified_id, is_constrained_parameter) (cp_parser_check_constrained_type_parm) (cp_parser_constrained_type_template_parm) (cp_parser_constrained_template_template_parm) (constrained_non_type_template_parm, finish_constrained_parameter) (declares_constrained_type_template_parameter) (declares_constrained_template_template_parameter) (check_type_concept, cp_parser_maybe_constrained_type_specifier) (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id) (cp_parser_requires_clause, cp_parser_requires_clause_opt) (cp_parser_requires_expression) (cp_parser_requirement_parameter_list, cp_parser_requirement_body) (cp_parser_requirement_list, cp_parser_requirement) (cp_parser_simple_requirement, cp_parser_type_requirement) (cp_parser_compound_requirement, cp_parser_nested_requirement) (cp_parser_template_introduction) (cp_parser_explicit_template_declaration) (get_concept_from_constraint): New. * pt.c (local_specialization_stack): Implement. (maybe_new_partial_specialization): New. (maybe_process_partial_specialization): Use it. (retrieve_local_specialization, register_local_specialization) (template_parm_to_arg, build_template_decl, extract_fnparm_pack) (tsubst_expr): No longer static. (spec_hasher::equal): Compare constraints. (determine_specialization): Handle constraints. (check_explicit_specialization): Handle concepts. (process_template_parm): Handle constraints. (end_template_parm_list): Add overload taking no arguments. (process_partial_specialization): Handle concepts and constraints. Register partial specializations of variable templates. (redeclare_class_template): Handle constraints. (convert_template_argument): Handle WILDCARD_DECL. Check is_compatible_template_arg. (coerce_template_parameter_pack): Handle wildcard packs. (coerce_template_parms): DR 1430 also applies to concepts. Add overloads taking fewer parameters. (lookup_template_class_1): Handle constraints. (lookup_template_variable): Concepts are always bool. (finish_template_variable): Handle concepts and constraints. (tsubst_friend_class): Handle constraints. (gen_elem_of_pack_expansion_instantiation): Handle constraints. (tsubst_pack_expansion): Handle local parameters. (tsubst_decl) [FUNCTION_DECL]: Handle constraints. (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints. (tsubst_copy_and_build): Handle REQUIRES_EXPR. (more_specialized_fn, more_specialized_partial_spec): Check constraints. (more_specialized_inst): Split out from most_specialized_instantiation. (most_specialized_partial_spec): Check constraints. (instantiate_decl): Never instantiate a concept. (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ, variable concepts. (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR. (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts. (do_auto_deduction): Add overload taking tsubst flags and context enum. Handle constraints. (get_template_for_ordering, most_constrained_function) (is_compatible_template_arg, convert_wildcard_argument) (struct constr_entry, struct constr_hasher, decl_constraints) (valid_constraints_p, get_constraints, set_constraints) (remove_constraints, init_constraint_processing): New. * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO. * search.c (lookup_member): Do lookup in the open partial instantiation. * semantics.c (finish_template_template_parm): Handle constraints. (fixup_template_type): New. (finish_template_type): Call it. (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS. * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO. (cp_walk_subtrees): Handle REQUIRES_EXPR. * typeck.c (cp_build_function_call_vec): Check constraints. Co-Authored-By: Braden Obrzut <admin@maniacsvault.net> Co-Authored-By: Jason Merrill <jason@redhat.com> From-SVN: r226713
2015-08-07 07:44:49 +02:00
2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
Braden Obrzut <admin@maniacsvault.net>
Jason Merrill <jason@redhat.com>
Add C++ Concepts TS support.
* c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
* c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
(D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
* c-opts.c (set_std_cxx1z): Set flag_concepts.
* c.opt (fconcepts): New.
2015-08-02 Martin Sebor <msebor@redhat.com>
* c.opt (-Wframe-address): New warning option.
2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
* c-indentation.c (should_warn_for_misleading_indentation):
Improve heuristics.
2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
* c-indentation.c (get_visual_column): Add parameter first_nws,
use it. Update comment documenting the function.
(is_first_nonwhitespace_on_line): Remove.
(should_warn_for_misleading_indentation): Replace usage of
of is_first_nonwhitespace_on_line with get_visual_column.
Refactor entry point to -Wmisleading-indentation gcc/c-family/ChangeLog: * c-indentation.h (struct token_indent_info): Define. (get_token_indent_info): Define. (warn_for_misleading_information): Declare. * c-common.h (warn_for_misleading_information): Remove. * c-identation.c (warn_for_misleading_indentation): Change declaration to take three token_indent_infos. Adjust accordingly. * c-identation.c (should_warn_for_misleading_indentation): Likewise. Bail out early if the body is a compound statement. (guard_tinfo_to_string): Define. gcc/c/ChangeLog: * c-parser.c (c_parser_if_body): Take token_indent_info argument. Call warn_for_misleading_indentation even when the body is a semicolon. Extract token_indent_infos corresponding to the guard, body and next tokens. Adjust call to warn_for_misleading_indentation accordingly. (c_parser_else_body): Likewise. (c_parser_if_statement): Likewise. (c_parser_while_statement): Likewise. (c_parser_for_statement): Likewise. gcc/cp/ChangeLog: * parser.c (cp_parser_selection_statement): Move handling of semicolon body to ... (cp_parser_implicitly_scoped_statement): .. here. Call warn_for_misleading_indentation even when the body is a semicolon. Extract token_indent_infos corresponding to the guard, body and next tokens. Adjust call to warn_for_misleading_indentation accordingly. Take token_indent_info argument. (cp_parser_already_scoped_statement): Likewise. (cp_parser_selection_statement, cp_parser_iteration_statement): Extract a token_indent_info corresponding to the guard token. From-SVN: r226477
2015-08-02 19:31:55 +02:00
2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
* c-indentation.h (struct token_indent_info): Define.
(get_token_indent_info): Define.
(warn_for_misleading_information): Declare.
* c-common.h (warn_for_misleading_information): Remove.
* c-identation.c (warn_for_misleading_indentation):
Change declaration to take three token_indent_infos. Adjust
accordingly.
* c-identation.c (should_warn_for_misleading_indentation):
Likewise. Bail out early if the body is a compound statement.
(guard_tinfo_to_string): Define.
2015-07-30 Jason Merrill <jason@redhat.com>
* c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
'*' for reference decay.
2015-07-30 Marek Polacek <polacek@redhat.com>
* c-common.c (warn_tautological_cmp): Bail for float types.
2015-07-27 Marek Polacek <polacek@redhat.com>
PR bootstrap/67030
* c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
2015-07-27 Marek Polacek <polacek@redhat.com>
PR c++/66555
PR c/54979
* c-common.c (find_array_ref_with_const_idx_r): New function.
(warn_tautological_cmp): New function.
* c-common.h (warn_tautological_cmp): Declare.
* c.opt (Wtautological-compare): New option.
2015-07-23 Marek Polacek <polacek@redhat.com>
* c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
(ubsan_instrument_shift): Likewise.
2015-07-23 Marek Polacek <polacek@redhat.com>
PR sanitizer/66908
* c-ubsan.c: Include gimplify.h.
(ubsan_instrument_division): Unshare OP0 and OP1.
(ubsan_instrument_shift): Likewise.
2015-07-20 Marek Polacek <polacek@redhat.com>
Richard Sandiford <richard.sandiford@arm.com>
PR c++/55095
* c-common.c (c_fully_fold_internal): Warn about left shift overflows.
Use EXPR_LOC_OR_LOC.
(maybe_warn_shift_overflow): New function.
* c-common.h (maybe_warn_shift_overflow): Declare.
* c-opts.c (c_common_post_options): Set warn_shift_overflow.
* c.opt (Wshift-overflow): New option.
Add new object_allocator and clean-up allocator usage. * c-format.c (static void check_format_info_main): Use object_allocator instead of pool_allocator. (check_format_arg): Likewise. (check_format_info_main): Likewise. * alloc-pool.h (object_allocator): Add new class. (pool_allocator::initialize): Use the underlying class. (pool_allocator::allocate): Likewise. (pool_allocator::remove): Likewise. (operator new): A new generic allocator. * asan.c (struct asan_mem_ref): Remove unused members. (asan_mem_ref_new): Replace new operator with object_allocator::allocate. (free_mem_ref_resources): Change deallocation. * cfg.c (initialize_original_copy_tables): Replace pool_allocator with object_allocator. * config/sh/sh.c (add_constant): Replace new operator with object_allocator::allocate. (sh_reorg): Change call to a release method. * cselib.c (struct elt_list): Remove unused members. (new_elt_list): Replace new operator with object_allocator::allocate. (new_elt_loc_list): Likewise. (new_cselib_val): Likewise. (unchain_one_elt_list): Change delete operator with remove method. (unchain_one_elt_loc_list): Likewise. (unchain_one_value): Likewise. (cselib_finish): Release newly added static allocators. * cselib.h (struct cselib_val): Remove unused members. (struct elt_loc_list): Likewise. * df-problems.c (df_chain_alloc): Replace pool_allocator with object_allocator. * df-scan.c (struct df_scan_problem_data): Likewise. (df_scan_alloc): Likewise. * df.h (struct dataflow): Likewise. * dse.c (struct read_info_type): Likewise. (struct insn_info_type): Likewise. (struct dse_bb_info_type): Likewise. (struct group_info): Likewise. (struct deferred_change): Likewise. (get_group_info): Likewise. (delete_dead_store_insn): Likewise. (free_read_records): Likewise. (replace_read): Likewise. (check_mem_read_rtx): Likewise. (scan_insn): Likewise. (dse_step1): Likewise. (dse_step7): Likewise. * et-forest.c (struct et_occ): Remove unused members. (et_new_occ): Use allocate instead of new operator. (et_new_tree): Likewise. (et_free_tree): Call release method explicitly. (et_free_tree_force): Likewise. (et_free_pools): Likewise. (et_split): Use remove instead of delete operator. * et-forest.h (struct et_node): Remove unused members. * ipa-cp.c: Change pool_allocator to object_allocator. * ipa-inline-analysis.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-prop.h: Likewise. * ira-build.c (initiate_cost_vectors): Cast return value. (ira_allocate_cost_vector): Likewise. * ira-color.c (struct update_cost_record): Remove unused members. * lra-int.h (struct lra_live_range): Likewise. (struct lra_copy): Likewise. (struct lra_insn_reg): Likewise. * lra-lives.c (lra_live_ranges_finish): Release new static allocator. * lra.c (new_insn_reg): Replace new operator with allocate method. (free_insn_regs): Same for operator delete. (finish_insn_regs): Release new static allocator. (finish_insn_recog_data): Likewise. (lra_free_copies): Replace delete operator with remove method. (lra_create_copy): Replace operator new with allocate method. (invalidate_insn_data_regno_info): Same for remove method. * regcprop.c (struct queued_debug_insn_change): Remove unused members. (free_debug_insn_changes): Replace delete operator with remove method. (replace_oldest_value_reg): Replace operator new with allocate method. (pass_cprop_hardreg::execute): Release new static variable. * sched-deps.c (sched_deps_init): Change pool_allocator to object_allocator. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * stmt.c (expand_case): Likewise. (expand_sjlj_dispatch_table): Likewise. * tree-sra.c (struct access): Remove unused members. (struct assign_link): Likewise. (sra_deinitialize): Release newly added static pools. (create_access_1):Replace operator new with allocate method. (build_accesses_from_assign): Likewise. (create_artificial_child_access): Likewise. * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Change pool_allocator to object_allocator. * tree-ssa-pre.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c (allocate_vn_table): Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * var-tracking.c (onepart_pool_allocate): New function. (unshare_variable): Use the newly added function. (variable_merge_over_cur): Likewise. (variable_from_dropped): Likewise. (variable_was_changed): Likewise. (set_slot_part): Likewise. (emit_notes_for_differences_1): Likewise. (vt_finalize): Release newly added static pools. From-SVN: r225869
2015-07-16 13:26:05 +02:00
2015-07-16 Martin Liska <mliska@suse.cz>
* c-format.c (static void check_format_info_main): Use
object_allocator instead of pool_allocator.
(check_format_arg): Likewise.
(check_format_info_main): Likewise.
2015-07-15 Andrew MacLeod <amacleod@redhat.com>
* c-opts.c: Remove multiline #include comment.
2015-07-12 Aldy Hernandez <aldyh@redhat.com>
* c-common.c: Fix double word typos.
2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.h (cpp_operation): Revert latest change.
* c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
constructors and destructors.
2015-07-09 Andrew MacLeod <amacleod@redhat.com>
* c-common.h: Adjust includes for flags.h changes.
* stub-objc.c: Likewise.
2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
* c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
2015-07-08 Jakub Jelinek <jakub@redhat.com>
* c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
are to be removed, return NULL rather than original clauses list.
tree-core.h: Include symtab.h. 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * tree-core.h: Include symtab.h. * rtl.h: Include hard-reg-set.h but not flags.h. (HARD_CONST): Remove condition compilation involving HARD_CONST since hard-reg-set.h is always included. * regs.h: Don't include hard-reg-set.h or rtl.h. * cfg.h: Include dominance.h. * gimple.h: Include tree-ssa-alias.h and gimple-expr.h. * backend.h: New. Aggregate commonly used backend header files. * gimple-ssa.h: Don't include tree-hasher.h. * ssa.h: New. Aggregate commonly used SSA header files. * regset.h: Remove bitmap.h and hard-reg-set.h #includes. * sel-sched-ir.h: Flatten includes. * lra-int.h: Flatten completely. * sel-sched-dump.h: Flatten includes. * ira-int.h: Flatten includes. * gimple-streamer.h: Remove all includes. * cfgloop.h: Remove all #includes except cfgloopmanip.h. * resource.h: Flatten hard-reg-set.h and df.h. * sched-int.h: Flatten insn-arrt.h and df.h. * valtrack.h: flatten bitmap.h, df.h, and rtl.h * df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h. * genattrtab.c (write_header): Adjust generated includes. * genautomata.c (main): Likewise. * genconditions.c (write-header): Likewise. * genemit.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * alias.c: Adjust includes. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse-common.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * valtrack.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/aarch64/cortex-a57-fma-steering.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/aarch-common.c: Likewise. * config/arm/arm-builtins.c: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-c.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386-c.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze-c.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430-c.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78-c.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390-c.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh-c.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sol2-c.c: Likewise. * config/sol2-cxx.c: Likewise. * config/sol2-stubs.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc-c.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu-c.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/mul-tables.c: Likewise. * config/tilegx/tilegx-c.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/mul-tables.c: Likewise. * config/tilepro/tilepro-c.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/vms/vms-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. ada 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c: Adjust includes. * gcc-interface/decl.c: Likewise. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. c 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c: Adjust includes. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. c-family 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c: Adjust includes. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * call.c: Adjust includes. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. fortran 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * convert.c: Adjust includes. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * go-backend.c: Adjust includes. * go-gcc.cc: Likewise. * go-lang.c: Likewise. java 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Adjust includes. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. jit 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Adjust includes. * jit-common.h: Likewise. * jit-playback.c: Likewise. lto 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Adjust includes. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objc-act.c: Adjust includes. * objc-encoding.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-lang.c: Likewise. * objc-map.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. objcp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c: Adjust includes. * objcp-lang.c: Likewise. From-SVN: r225531
2015-07-08 02:53:03 +02:00
2015-07-07 Andrew MacLeod <amacleod@redhat.com>
* array-notation-common.c: Adjust includes.
* c-ada-spec.c: Likewise.
* c-cilkplus.c: Likewise.
* c-common.h: Likewise.
* c-cppbuiltin.c: Likewise.
* c-dump.c: Likewise.
* c-format.c: Likewise.
* c-gimplify.c: Likewise.
* c-indentation.c: Likewise.
* c-lex.c: Likewise.
* c-omp.c: Likewise.
* c-opts.c: Likewise.
* c-pch.c: Likewise.
* c-ppoutput.c: Likewise.
* c-pragma.c: Likewise.
* c-pretty-print.c: Likewise.
* c-semantics.c: Likewise.
* c-ubsan.c: Likewise.
* cilk.c: Likewise.
* stub-objc.c: Likewise.
2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
* c-ada-spec.c (print_ada_declaration): Skip move constructors.
2015-07-01 Jason Merrill <jason@redhat.com>
* c-common.h (D_CXX11): Rename from D_CXX0X.
(RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
* c-common.c: Adjust.
* c-opts.c (c_common_post_options): Default to C++14.
* c-opts.c (c_common_post_options): Highest ABI level is now 10.
Implement N4197 - Adding u8 character literals libcpp: 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net> Implement N4197 - Adding u8 character literals * include/cpplib.h (UTF8CHAR, UTF8CHAR_USERDEF): New cpp tokens; (struct cpp_options): Add utf8_char_literals. * init.c (struct lang_flags): Add utf8_char_literals; (struct lang_flags lang_defaults): Add column for utf8_char_literals. * macro.c (stringify_arg()): Treat CPP_UTF8CHAR token; * expr.c (cpp_userdef_char_remove_type(), cpp_userdef_char_add_type()): Treat CPP_UTF8CHAR_USERDEF, CPP_UTF8CHAR tokens; (cpp_userdef_char_p()): Treat CPP_UTF8CHAR_USERDEF token; (eval_token(), _cpp_parse_expr()): Treat CPP_UTF8CHAR token. * lex.c (lex_string(), _cpp_lex_direct()): Include CPP_UTF8CHAR tokens. * charset.c (converter_for_type(), cpp_interpret_charconst()): Treat CPP_UTF8CHAR token. gcc/c-family: 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net> Implement N4197 - Adding u8 character literals * c-family/c-ada-spec.c (print_ada_macros()): Treat CPP_UTF8CHAR like CPP_CHAR. * c-family/c-common.c (c_parse_error()): print CPP_UTF8CHAR and CPP_UTF8CHAR_USERDEF tokens. * c-family/c-lex.c (c_lex_with_flags()): Treat CPP_UTF8CHAR_USERDEF and CPP_UTF8CHAR tokens; (lex_charconst()): Treat CPP_UTF8CHAR token. gcc/cp: 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net> Implement N4197 - Adding u8 character literals * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR and CPP_UTF8CHAR_USERDEF tokens; (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token. gcc/testsuite: 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net> Implement N4197 - Adding u8 character literals * g++.dg/cpp1z/utf8.C: New. * g++.dg/cpp1z/utf8-neg.C: New. * g++.dg/cpp1z/udlit-utf8char.C: New. From-SVN: r225185
2015-06-30 14:58:48 +02:00
2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
Implement N4197 - Adding u8 character literals
* c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
2015-07-01 09:39:55 +02:00
CPP_CHAR.
* c-common.c (c_parse_error): Print CPP_UTF8CHAR and
2015-07-01 09:39:55 +02:00
CPP_UTF8CHAR_USERDEF tokens.
* c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
2015-07-01 09:39:55 +02:00
and CPP_UTF8CHAR tokens.
(lex_charconst): Treat CPP_UTF8CHAR token.
Implement N4197 - Adding u8 character literals libcpp: 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net> Implement N4197 - Adding u8 character literals * include/cpplib.h (UTF8CHAR, UTF8CHAR_USERDEF): New cpp tokens; (struct cpp_options): Add utf8_char_literals. * init.c (struct lang_flags): Add utf8_char_literals; (struct lang_flags lang_defaults): Add column for utf8_char_literals. * macro.c (stringify_arg()): Treat CPP_UTF8CHAR token; * expr.c (cpp_userdef_char_remove_type(), cpp_userdef_char_add_type()): Treat CPP_UTF8CHAR_USERDEF, CPP_UTF8CHAR tokens; (cpp_userdef_char_p()): Treat CPP_UTF8CHAR_USERDEF token; (eval_token(), _cpp_parse_expr()): Treat CPP_UTF8CHAR token. * lex.c (lex_string(), _cpp_lex_direct()): Include CPP_UTF8CHAR tokens. * charset.c (converter_for_type(), cpp_interpret_charconst()): Treat CPP_UTF8CHAR token. gcc/c-family: 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net> Implement N4197 - Adding u8 character literals * c-family/c-ada-spec.c (print_ada_macros()): Treat CPP_UTF8CHAR like CPP_CHAR. * c-family/c-common.c (c_parse_error()): print CPP_UTF8CHAR and CPP_UTF8CHAR_USERDEF tokens. * c-family/c-lex.c (c_lex_with_flags()): Treat CPP_UTF8CHAR_USERDEF and CPP_UTF8CHAR tokens; (lex_charconst()): Treat CPP_UTF8CHAR token. gcc/cp: 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net> Implement N4197 - Adding u8 character literals * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR and CPP_UTF8CHAR_USERDEF tokens; (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token. gcc/testsuite: 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net> Implement N4197 - Adding u8 character literals * g++.dg/cpp1z/utf8.C: New. * g++.dg/cpp1z/utf8-neg.C: New. * g++.dg/cpp1z/udlit-utf8char.C: New. From-SVN: r225185
2015-06-30 14:58:48 +02:00
Wunused-parameter warnings are given from cgraph::finalize_function, which is the middle-end. This is an oddity compared to other -Wunused-* warnings. Moreover, Fortran has its own definition of -Wunused-parameter that conflicts with the middle-end definition. This patch moves the middle-end part of Wunused-parameter to the C/C++ FEs. I'm not sure if other FEs expected this warning to work. If so, they do not seem to test for it. Ada, for example, explicitly disables it. gcc/ChangeLog: 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/66605 * cgraphunit.c (cgraph_node::finalize_function): Do not call do_warn_unused_parameter. * function.c (do_warn_unused_parameter): Move from here. * function.h (do_warn_unused_parameter): Do not declare. gcc/c-family/ChangeLog: 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/66605 * c-common.c (do_warn_unused_parameter): Move here. * c-common.h (do_warn_unused_parameter): Declare. gcc/ada/ChangeLog: 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/66605 * gcc-interface/misc.c (gnat_post_options): No need to disable warn_unused_parameter anymore. gcc/cp/ChangeLog: 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/66605 * decl.c (finish_function): Call do_warn_unused_parameter. gcc/testsuite/ChangeLog: 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/66605 * gfortran.dg/wunused-parameter.f90: New test. gcc/c/ChangeLog: 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/66605 * c-decl.c (finish_function): Call do_warn_unused_parameter. From-SVN: r225135
2015-06-29 18:25:26 +02:00
2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/66605
* c-common.c (do_warn_unused_parameter): Move here.
* c-common.h (do_warn_unused_parameter): Declare.
2015-06-29 Marek Polacek <polacek@redhat.com>
PR c/66322
* c-common.c (check_case_bounds): Add bool * parameter. Set
OUTSIDE_RANGE_P.
(c_add_case_label): Add bool * parameter. Pass it down to
check_case_bounds.
(c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
warning here.
* c-common.h (c_add_case_label, c_do_switch_warnings): Update
declarations.
2015-06-27 Marek Polacek <polacek@redhat.com>
* c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
or VECTOR_INTEGER_TYPE_P throughout.
* c-gimplify.c: Likewise.
2015-06-26 Marek Polacek <polacek@redhat.com>
* array-notation-common.c (find_rank): Use INDIRECT_REF_P.
* c-common.c (c_fully_fold_internal): Likewise.
(c_alignof_expr): Likewise.
* c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
* c-ubsan.c (ubsan_instrument_bounds): Likewise.
* cilk.c (create_parm_list): Likewise.
2015-06-26 Marek Polacek <polacek@redhat.com>
* c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
function.h (ipa_opt_pass, [...]): Move forward declarations. 2015-06-25 Andrew MacLeod <amacleod@redhat.com> * function.h (ipa_opt_pass, ipa_opt_pass_d): Move forward declarations. * cgraph.h: Include ipa-ref.h and plugin-api.h. (ipa_opt_pass, ipa_opt_pass_d)): Relocate forward declarations here. (symtab_node::address_can_be_compared_p): Move function. * cgraph.c (symtab_node::address_can_be_compared_p): Relocate function definition here. * asan.c: Remove ipa-ref.h and plugin-api.h from include list. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * builtins.c: Likewise. * calls.c: Likewise. * cfgexpand.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * coverage.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fold-const.c: Likewise. * ggc-page.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple.c: Likewise. * gimplify.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * omp-low.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * ree.c: Likewise. * sanopt.c: Likewise. * stor-layout.c: Likewise. * symtab.c: Likewise. * toplev.c: Likewise. * trans-mem.c: Likewise. * tree-cfg.c: Likewise. * tree-chkp.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-inline.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * config/arm/arm.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/tilegx/mul-tables.c: Likewise. ada 2015-06-25 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include list. * gcc-interface/utils.c: Likewise. c 2015-06-25 Andrew MacLeod <amacleod@redhat.com> * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list. * c-parser.c: Likewise. c-family 2015-06-25 Andrew MacLeod <amacleod@redhat.com> * c-common.c: Remove ipa-ref.h and plugin-api.h from include list. * c-gimplify.c: Likewise. * c-pragma.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. cp 2015-06-25 Andrew MacLeod <amacleod@redhat.com> * call.c: Remove ipa-ref.h and plugin-api.h from include list. * class.c: Likewise. * cp-ubsan.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * lambda.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * vtable-class-hierarchy.c: Likewise. fortran 2015-06-25 Andrew MacLeod <amacleod@redhat.com> * f95-lang.c: Remove ipa-ref.h and plugin-api.h from include list. * trans-decl.c: Likewise. go 2015-06-25 Andrew MacLeod <amacleod@redhat.com> * go-gcc.cc: Remove ipa-ref.h and plugin-api.h from include list. java 2015-06-25 Andrew MacLeod <amacleod@redhat.com> * class.c: Remove ipa-ref.h and plugin-api.h from include list. * decl.c: Likewise. * jcf-parse.c: Likewise. * resource.c: Likewise. jit 2015-06-25 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list. * jit-playback.c: Likewise. lto 2015-06-25 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto-tree.h: Likewise. * lto.c: Likewise. objc 2015-06-25 Andrew MacLeod <amacleod@redhat.com> * objc-act.c: Remove ipa-ref.h and plugin-api.h from include list. From-SVN: r224986
2015-06-25 20:32:38 +02:00
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
* c-gimplify.c: Likewise.
* c-pragma.c: Likewise.
* c-ubsan.c: Likewise.
* cilk.c: Likewise.
hash-traits.h (ggc_hasher): Rename to... gcc/ * hash-traits.h (ggc_hasher): Rename to... (ggc_remover): ...this and remove typedefs. (ggc_cache_hasher): Update accordingly. Add typedefs. (ggc_ptr_hash): New class. * hash-table.h: Update comment. * cfgloop.h (loop_exit_hasher): Inherit from ggc_ptr_hash rather than ggc_hasher. * cgraph.h (section_name_hasher, cgraph_edge_hasher): Likewise. (tree_descriptor_hasher): Likewise. * cgraph.c (function_version_hasher): Likewise. * dwarf2out.c (indirect_string_hasher, dwarf_file_hasher): Likewise. (decl_die_hasher, block_die_hasher, decl_loc_hasher): Likewise. (dw_loc_list_hasher, addr_hasher): Likewise. * function.h (used_type_hasher): Likewise. * function.c (temp_address_hasher): Likewise. * gimple-ssa.h (tm_restart_hasher, ssa_name_hasher): Likewise. * libfuncs.h (libfunc_hasher): Likewise. * lto-streamer.h (decl_state_hasher): Likewise. * optabs.c (libfunc_decl_hasher): Likewise. * tree-scalar-evolution.c (scev_info_hasher): Likewise. * varasm.c (section_hasher, object_block_hasher): Likewise. (const_rtx_desc_hasher): Likewise. * config/darwin.c (indirection_hasher, cfstring_hasher): Likewise. * config/rs6000/rs6000.c (toc_hasher, builtin_hasher): Likewise. gcc/c-family/ * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than ggc_hasher. gcc/cp/ * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash rather than ggc_hasher. (constexpr_call_hasher): Likewise. * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise. * decl.c (typename_hasher): Likewise. * mangle.c (conv_type_hasher): Likewise. * pt.c (spec_hasher): Likewise. * tree.c (cplus_array_hasher, list_hasher): Likewise. * typeck2.c (abstract_type_hasher): Likewise. gcc/fortran/ * trans-decl.c (module_hasher): Likewise. * trans.h (module_decl_hasher): Likewise. gcc/java/ * java-tree.h (treetreehasher): Inherit from ggc_ptr_hash rather than ggc_hasher. (ict_hasher, type_assertion_hasher): Likewise. gcc/objc/ * objc-act.c (objc_string_hasher): Inherit from ggc_ptr_hash rather than ggc_hasher. From-SVN: r224959
2015-06-25 19:06:36 +02:00
2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
* c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
ggc_hasher.
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* cilk.c: Move calls.h after tm.h in the include chain.
2015-06-25 Marek Polacek <polacek@redhat.com>
* array-notation-common.c: Use VAR_P throughout.
* c-ada-spec.c: Likewise.
* c-common.c: Likewise.
* c-format.c: Likewise.
* c-gimplify.c: Likewise.
* c-omp.c: Likewise.
* c-pragma.c: Likewise.
* c-pretty-print.c: Likewise.
* cilk.c: Likewise.
2015-06-25 Marek Polacek <polacek@redhat.com>
* cilk.c (extract_free_variables): Use is_global_var.
2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
* c-common.c: Don't include target-def.h.
2015-06-23 Marek Polacek <polacek@redhat.com>
* c-common.c (warn_logical_operator): Use tree_int_cst_equal
when comparing INTEGER_CSTs.
2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
* c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
* c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
(dump_ada_template): Skip partially specialized types.
Use std::swap instead of manual swaps. gcc/ * auto-inc-dec.c (reverse_mem, reverse_inc): Remove. (parse_add_or_inc): Use std::swap instead of reverse_{mem,inc}. (find_inc): Likewise. * combine.c (combine_simplify_rtx): Use std::swap instead of manually swapping. * df-core.c (df_worklist_dataflow_doublequeue): Likewise. * df-scan.c (df_swap_refs): Remove. (df_sort_and_compress_refs): Use std::swap instead of df_swap_refs. * dominance.c (link_roots): Use std::swap instead of manually swapping. * expr.c (expand_expr_real_2, do_store_flag): Likewise. * fold-const.c (fold_relational_const): Likewise. * genattrtab.c (simplify_test_exp): Likewise. * gimple-match-head.c (gimple_resimplify2, gimple_resimplify3, gimple_simplify): Likewise. * ifcvt.c (noce_try_abs, find_if_header): Likewise. * internal-fn.c (expand_addsub_overflow, expand_mul_overflow): Likewise. * ipa-devirt.c (add_type_duplicate): Likewise. * loop-iv.c (get_biv_step_1, iv_number_of_iterations): Likewise. * lra-lives.c (lra_setup_reload_pseudo_preferenced_hard_reg): Likewise. * lra.c (lra_create_copy): Likewise. * lto-streamer-out.c (DFS::DFS): Likewise. * modulo-sched.c (get_sched_window): Likewise. * omega.c (omega_pretty_print_problem): Likewise. * optabs.c (prepare_float_lib_cmp, expand_mult_highpart): Likewise. * reload1.c (reloads_unique_chain_p): Likewise. * sel-sched-ir.c (exchange_lv_sets, exchange_av_sets): Remove. (exchange_data_sets): Move logic from exchange_{av,lv}_sets here and use std::swap. * simplify-rtx.c (simplify_unary_operation_1): Use std::swap instead of manually swapping. * tree-if-conv.c (is_cond_scalar_reduction, predicate_scalar_phi, predicate_mem_writes): Likewise. * tree-loop-distribution.c (pg_add_dependence_edges): Likewise. * tree-predcom.c (combine_chains): Likewise. * tree-ssa-alias.c (nonoverlapping_component_refs_p, refs_may_alias_p_1): Likewise. * tree-ssa-ifcombine.c (recognize_if_then_else): Likewise. * tree-ssa-loop-ivopts.c (extract_cond_operands): Likewise. * tree-ssa-loop-niter.c (refine_bounds_using_guard, number_of_iterations_cond): Likewise. * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Likewise. * tree-ssa-sccvn.c (vn_nary_op_compute_hash): Likewise. * tree-vect-slp.c (vect_build_slp_tree): Likewise. * tree-vect-stmts.c (supportable_widening_operation): Likewise. * tree-vrp.c (extract_range_from_binary_expr_1, extract_range_from_unary_expr_1): Likewise. gcc/cp/ * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of manually swapping. * semantics.c (finish_omp_atomic): Likewise. * typeck.c (cp_build_array_ref): Likewise. gcc/c-family/ * c-common.c (scalar_to_vector): Use std::swap instead of manually swapping. From-SVN: r224718
2015-06-22 04:54:11 +02:00
2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
* c-common.c (scalar_to_vector): Use std::swap instead of manually
swapping.
coretypes.h: Include input.h and as-a.h. 2015-06-17 Andrew MacLeod <amacleod@redhat.com> * coretypes.h: Include input.h and as-a.h. * rtl.h: Include input.h and as-a.h for generator files. * hwint.c: Include input.h. * vec.c: Include input.h. * alias.c: Do not include input.h, line-map.h or is-a.h. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic-core.h: Likewise. * diagnostic.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dumpfile.h: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-streamer.h: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * init-regs.c: Likewise. * input.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * opts.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * statistics.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * streamer-hooks.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * valtrack.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/aarch-common.c: Likewise. * config/arm/arm-builtins.c: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-c.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/default-c.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/glibc-c.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386-c.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze-c.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430-c.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78-c.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390-c.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh-c.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sol2-c.c: Likewise. * config/sol2-cxx.c: Likewise. * config/sol2-stubs.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc-c.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu-c.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/mul-tables.c: Likewise. * config/tilegx/tilegx-c.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/mul-tables.c: Likewise. * config/tilepro/tilepro-c.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/vms/vms-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/winnt-c.c: Likewise. * config/xtensa/xtensa.c: Likewise. ada * ada/gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h. * ada/gcc-interface/decl.c: Likewise. * ada/gcc-interface/misc.c: Likewise. * ada/gcc-interface/targtyps.c: Likewise. * ada/gcc-interface/trans.c: Likewise. * ada/gcc-interface/utils.c: Likewise. * ada/gcc-interface/utils2.c: Likewise. c * c/c-array-notation.c: Do not include input.h, line-map.h or is-a.h. * c/c-aux-info.c: Likewise. * c/c-convert.c: Likewise. * c/c-decl.c: Likewise. * c/c-errors.c: Likewise. * c/c-lang.c: Likewise. * c/c-objc-common.c: Likewise. * c/c-parser.c: Likewise. * c/c-typeck.c: Likewise. c-family * c-family/array-notation-common.c: Do not include input.h, line-map.h or is-a.h. * c-family/c-ada-spec.c: Likewise. * c-family/c-cilkplus.c: Likewise. * c-family/c-common.c: Likewise. * c-family/c-common.h: Likewise. * c-family/c-cppbuiltin.c: Likewise. * c-family/c-dump.c: Likewise. * c-family/c-format.c: Likewise. * c-family/c-gimplify.c: Likewise. * c-family/c-indentation.c: Likewise. * c-family/c-lex.c: Likewise. * c-family/c-omp.c: Likewise. * c-family/c-opts.c: Likewise. * c-family/c-pch.c: Likewise. * c-family/c-ppoutput.c: Likewise. * c-family/c-pragma.c: Likewise. * c-family/c-pretty-print.c: Likewise. * c-family/c-semantics.c: Likewise. * c-family/c-ubsan.c: Likewise. * c-family/cilk.c: Likewise. * c-family/stub-objc.c: Likewise. common * common/common-target.h: Do not include input.h, line-map.h or is-a.h. * common/common-targhooks.c: Likewise. cp * cp/call.c: Do not include input.h, line-map.h or is-a.h. * cp/class.c: Likewise. * cp/constexpr.c: Likewise. * cp/cp-array-notation.c: Likewise. * cp/cp-gimplify.c: Likewise. * cp/cp-lang.c: Likewise. * cp/cp-objcp-common.c: Likewise. * cp/cp-tree.h: Likewise. * cp/cp-ubsan.c: Likewise. * cp/cvt.c: Likewise. * cp/decl.c: Likewise. * cp/decl2.c: Likewise. * cp/dump.c: Likewise. * cp/error.c: Likewise. * cp/except.c: Likewise. * cp/expr.c: Likewise. * cp/friend.c: Likewise. * cp/init.c: Likewise. * cp/lambda.c: Likewise. * cp/lex.c: Likewise. * cp/mangle.c: Likewise. * cp/method.c: Likewise. * cp/name-lookup.c: Likewise. * cp/optimize.c: Likewise. * cp/parser.c: Likewise. * cp/pt.c: Likewise. * cp/ptree.c: Likewise. * cp/repo.c: Likewise. * cp/rtti.c: Likewise. * cp/search.c: Likewise. * cp/semantics.c: Likewise. * cp/tree.c: Likewise. * cp/typeck.c: Likewise. * cp/typeck2.c: Likewise. * cp/vtable-class-hierarchy.c: Likewise. fortran * fortran/convert.c: Do not include input.h, line-map.h or is-a.h. * fortran/cpp.c: Likewise. * fortran/decl.c: Likewise. * fortran/f95-lang.c: Likewise. * fortran/gfortran.h: Likewise. * fortran/iresolve.c: Likewise. * fortran/match.c: Likewise. * fortran/module.c: Likewise. * fortran/options.c: Likewise. * fortran/target-memory.c: Likewise. * fortran/trans-array.c: Likewise. * fortran/trans-common.c: Likewise. * fortran/trans-const.c: Likewise. * fortran/trans-decl.c: Likewise. * fortran/trans-expr.c: Likewise. * fortran/trans-intrinsic.c: Likewise. * fortran/trans-io.c: Likewise. * fortran/trans-openmp.c: Likewise. * fortran/trans-stmt.c: Likewise. * fortran/trans-types.c: Likewise. * fortran/trans.c: Likewise. go * go/go-backend.c: Do not include input.h, line-map.h or is-a.h. * go/go-gcc.cc: Likewise. * go/go-lang.c: Likewise. * go/go-system.h: Likewise. java * java/boehm.c: Do not include input.h, line-map.h or is-a.h. * java/builtins.c: Likewise. * java/class.c: Likewise. * java/constants.c: Likewise. * java/decl.c: Likewise. * java/except.c: Likewise. * java/expr.c: Likewise. * java/java-gimplify.c: Likewise. * java/jcf-dump.c: Likewise. * java/jcf-io.c: Likewise. * java/jcf-parse.c: Likewise. * java/jvgenmain.c: Likewise. * java/lang.c: Likewise. * java/mangle.c: Likewise. * java/mangle_name.c: Likewise. * java/resource.c: Likewise. * java/typeck.c: Likewise. * java/verify-glue.c: Likewise. * java/verify-impl.c: Likewise. jit * jit/dummy-frontend.c: Do not include input.h, line-map.h or is-a.h. * jit/jit-common.h: Likewise. * jit/jit-playback.c: Likewise. lto * lto/lto-lang.c: Do not include input.h, line-map.h or is-a.h. * lto/lto-object.c: Likewise. * lto/lto-partition.c: Likewise. * lto/lto-symtab.c: Likewise. * lto/lto.c: Likewise. objc * objc/objc-act.c: Do not include input.h, line-map.h or is-a.h. * objc/objc-encoding.c: Likewise. * objc/objc-gnu-runtime-abi-01.c: Likewise. * objc/objc-lang.c: Likewise. * objc/objc-map.c: Likewise. * objc/objc-next-runtime-abi-01.c: Likewise. * objc/objc-next-runtime-abi-02.c: Likewise. * objc/objc-runtime-shared-support.c: Likewise. objcp * objcp/objcp-decl.c: Do not include input.h, line-map.h or is-a.h. * objcp/objcp-lang.c: Likewise. From-SVN: r224562
2015-06-17 16:58:44 +02:00
2015-06-17 Andrew MacLeod <amacleod@redhat.com>
* array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
* c-ada-spec.c: Likewise.
* c-cilkplus.c: Likewise.
* c-common.c: Likewise.
* c-common.h: Likewise.
* c-cppbuiltin.c: Likewise.
* c-dump.c: Likewise.
* c-format.c: Likewise.
* c-gimplify.c: Likewise.
* c-indentation.c: Likewise.
* c-lex.c: Likewise.
* c-omp.c: Likewise.
* c-opts.c: Likewise.
* c-pch.c: Likewise.
* c-ppoutput.c: Likewise.
* c-pragma.c: Likewise.
* c-pretty-print.c: Likewise.
* c-semantics.c: Likewise.
* c-ubsan.c: Likewise.
* cilk.c: Likewise.
* stub-objc.c: Likewise.
2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/65168
* c-common.c (c_common_truthvalue_conversion): Warn when
converting an address of a reference to a truth value.
coretypes.h: Include hash-table.h and hash-set.h for host files. 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * coretypes.h: Include hash-table.h and hash-set.h for host files. * ggc.h: Don't include statistics.h> * hash-map.h: Remove all includes. * hash-set.h: Likewise. * hash-table.h: Add statistics.h, inchash.h and hash-map-traits.h to the include list. Remove <new>. * inchash.h: Remove all includes. * mem-stats.h: Likewise. * vec.h: No special processing for generators or ggc. * alias.c : Adjust include files. * alloc-pool.c : Likewise. * alloc-pool.h : Likewise. * asan.c : Likewise. * attribs.c : Likewise. * auto-inc-dec.c : Likewise. * auto-profile.c : Likewise. * bb-reorder.c : Likewise. * bitmap.c : Likewise. * bitmap.h : Likewise. * bt-load.c : Likewise. * builtins.c : Likewise. * caller-save.c : Likewise. * calls.c : Likewise. * ccmp.c : Likewise. * cfg.c : Likewise. * cfganal.c : Likewise. * cfgbuild.c : Likewise. * cfgcleanup.c : Likewise. * cfgexpand.c : Likewise. * cfghooks.c : Likewise. * cfgloop.c : Likewise. * cfgloop.h : Likewise. * cfgloopanal.c : Likewise. * cfgloopmanip.c : Likewise. * cfgrtl.c : Likewise. * cgraph.c : Likewise. * cgraphbuild.c : Likewise. * cgraphclones.c : Likewise. * cgraphunit.c : Likewise. * cilk-common.c : Likewise. * combine-stack-adj.c : Likewise. * combine.c : Likewise. * compare-elim.c : Likewise. * context.c : Likewise. * convert.c : Likewise. * coverage.c : Likewise. * cppbuiltin.c : Likewise. * cprop.c : Likewise. * cse.c : Likewise. * cselib.c : Likewise. * data-streamer-in.c : Likewise. * data-streamer-out.c : Likewise. * data-streamer.c : Likewise. * data-streamer.h : Likewise. * dbxout.c : Likewise. * dce.c : Likewise. * ddg.c : Likewise. * debug.c : Likewise. * df-core.c : Likewise. * df-problems.c : Likewise. * df-scan.c : Likewise. * df.h : Likewise. * dfp.c : Likewise. * dojump.c : Likewise. * dominance.c : Likewise. * domwalk.c : Likewise. * double-int.c : Likewise. * dse.c : Likewise. * dumpfile.c : Likewise. * dwarf2asm.c : Likewise. * dwarf2cfi.c : Likewise. * dwarf2out.c : Likewise. * emit-rtl.c : Likewise. * et-forest.c : Likewise. * except.c : Likewise. * except.h : Likewise. * explow.c : Likewise. * expmed.c : Likewise. * expr.c : Likewise. * final.c : Likewise. * fixed-value.c : Likewise. * fold-const.c : Likewise. * function.c : Likewise. * fwprop.c : Likewise. * gcc-plugin.h : Likewise. * gcc.c : Likewise. * gcse-common.c : Likewise. * gcse.c : Likewise. * genattrtab.c : Likewise. * genautomata.c : Likewise. * genconditions.c : Likewise. * genemit.c : Likewise. * generic-match-head.c : Likewise. * genextract.c : Likewise. * gengtype-state.c : Likewise. * gengtype.c : Likewise. * genhooks.c : Likewise. * genmatch.c : Likewise. * genmodes.c : Likewise. * genrecog.c : Likewise. * gensupport.c : Likewise. * ggc-common.c : Likewise. * ggc-internal.h : Likewise. * ggc-none.c : Likewise. * ggc-page.c : Likewise. * gimple-builder.c : Likewise. * gimple-expr.c : Likewise. * gimple-fold.c : Likewise. * gimple-iterator.c : Likewise. * gimple-low.c : Likewise. * gimple-match-head.c : Likewise. * gimple-pretty-print.c : Likewise. * gimple-ssa-isolate-paths.c : Likewise. * gimple-ssa-strength-reduction.c : Likewise. * gimple-ssa.h : Likewise. * gimple-streamer-in.c : Likewise. * gimple-streamer-out.c : Likewise. * gimple-streamer.h : Likewise. * gimple-walk.c : Likewise. * gimple.c : Likewise. * gimplify-me.c : Likewise. * gimplify.c : Likewise. * godump.c : Likewise. * graph.c : Likewise. * graphds.c : Likewise. * graphite-blocking.c : Likewise. * graphite-dependences.c : Likewise. * graphite-interchange.c : Likewise. * graphite-isl-ast-to-gimple.c : Likewise. * graphite-optimize-isl.c : Likewise. * graphite-poly.c : Likewise. * graphite-scop-detection.c : Likewise. * graphite-sese-to-poly.c : Likewise. * graphite.c : Likewise. * haifa-sched.c : Likewise. * hard-reg-set.h : Likewise. * hw-doloop.c : Likewise. * ifcvt.c : Likewise. * inchash.c : Likewise. * incpath.c : Likewise. * init-regs.c : Likewise. * input.c : Likewise. * internal-fn.c : Likewise. * ipa-chkp.c : Likewise. * ipa-comdats.c : Likewise. * ipa-cp.c : Likewise. * ipa-devirt.c : Likewise. * ipa-icf-gimple.c : Likewise. * ipa-icf.c : Likewise. * ipa-inline-analysis.c : Likewise. * ipa-inline-transform.c : Likewise. * ipa-inline.c : Likewise. * ipa-polymorphic-call.c : Likewise. * ipa-profile.c : Likewise. * ipa-prop.c : Likewise. * ipa-pure-const.c : Likewise. * ipa-ref.c : Likewise. * ipa-reference.c : Likewise. * ipa-split.c : Likewise. * ipa-utils.c : Likewise. * ipa-visibility.c : Likewise. * ipa.c : Likewise. * ira-build.c : Likewise. * ira-color.c : Likewise. * ira-conflicts.c : Likewise. * ira-costs.c : Likewise. * ira-emit.c : Likewise. * ira-lives.c : Likewise. * ira.c : Likewise. * jump.c : Likewise. * langhooks.c : Likewise. * lcm.c : Likewise. * libfuncs.h : Likewise. * lists.c : Likewise. * loop-doloop.c : Likewise. * loop-init.c : Likewise. * loop-invariant.c : Likewise. * loop-iv.c : Likewise. * loop-unroll.c : Likewise. * lower-subreg.c : Likewise. * lra-assigns.c : Likewise. * lra-coalesce.c : Likewise. * lra-constraints.c : Likewise. * lra-eliminations.c : Likewise. * lra-lives.c : Likewise. * lra-remat.c : Likewise. * lra-spills.c : Likewise. * lra.c : Likewise. * lto-cgraph.c : Likewise. * lto-compress.c : Likewise. * lto-opts.c : Likewise. * lto-section-in.c : Likewise. * lto-section-out.c : Likewise. * lto-streamer-in.c : Likewise. * lto-streamer-out.c : Likewise. * lto-streamer.c : Likewise. * lto-streamer.h : Likewise. * mcf.c : Likewise. * mode-switching.c : Likewise. * modulo-sched.c : Likewise. * omega.c : Likewise. * omp-low.c : Likewise. * optabs.c : Likewise. * opts-global.c : Likewise. * opts.h : Likewise. * passes.c : Likewise. * plugin.c : Likewise. * postreload-gcse.c : Likewise. * postreload.c : Likewise. * predict.c : Likewise. * print-rtl.c : Likewise. * print-tree.c : Likewise. * profile.c : Likewise. * read-md.c : Likewise. * read-md.h : Likewise. * read-rtl.c : Likewise. * real.c : Likewise. * realmpfr.c : Likewise. * recog.c : Likewise. * ree.c : Likewise. * reg-stack.c : Likewise. * regcprop.c : Likewise. * reginfo.c : Likewise. * regrename.c : Likewise. * regstat.c : Likewise. * reload.c : Likewise. * reload1.c : Likewise. * reorg.c : Likewise. * resource.c : Likewise. * rtl-chkp.c : Likewise. * rtl.c : Likewise. * rtl.h : Likewise. * rtlanal.c : Likewise. * rtlhash.c : Likewise. * rtlhash.h : Likewise. * rtlhooks.c : Likewise. * sanopt.c : Likewise. * sched-deps.c : Likewise. * sched-ebb.c : Likewise. * sched-rgn.c : Likewise. * sched-vis.c : Likewise. * sdbout.c : Likewise. * sel-sched-dump.c : Likewise. * sel-sched-ir.c : Likewise. * sel-sched-ir.h : Likewise. * sel-sched.c : Likewise. * sese.c : Likewise. * shrink-wrap.c : Likewise. * shrink-wrap.h : Likewise. * simplify-rtx.c : Likewise. * stack-ptr-mod.c : Likewise. * statistics.c : Likewise. * stmt.c : Likewise. * stor-layout.c : Likewise. * store-motion.c : Likewise. * stringpool.c : Likewise. * symtab.c : Likewise. * target-globals.c : Likewise. * targhooks.c : Likewise. * tlink.c : Likewise. * toplev.c : Likewise. * tracer.c : Likewise. * trans-mem.c : Likewise. * tree-affine.c : Likewise. * tree-affine.h : Likewise. * tree-browser.c : Likewise. * tree-call-cdce.c : Likewise. * tree-cfg.c : Likewise. * tree-cfgcleanup.c : Likewise. * tree-chkp-opt.c : Likewise. * tree-chkp.c : Likewise. * tree-chrec.c : Likewise. * tree-complex.c : Likewise. * tree-data-ref.c : Likewise. * tree-dfa.c : Likewise. * tree-diagnostic.c : Likewise. * tree-dump.c : Likewise. * tree-eh.c : Likewise. * tree-eh.h : Likewise. * tree-emutls.c : Likewise. * tree-hasher.h : Likewise. * tree-if-conv.c : Likewise. * tree-inline.c : Likewise. * tree-inline.h : Likewise. * tree-into-ssa.c : Likewise. * tree-iterator.c : Likewise. * tree-loop-distribution.c : Likewise. * tree-nested.c : Likewise. * tree-nrv.c : Likewise. * tree-object-size.c : Likewise. * tree-outof-ssa.c : Likewise. * tree-parloops.c : Likewise. * tree-phinodes.c : Likewise. * tree-predcom.c : Likewise. * tree-pretty-print.c : Likewise. * tree-profile.c : Likewise. * tree-scalar-evolution.c : Likewise. * tree-sra.c : Likewise. * tree-ssa-address.c : Likewise. * tree-ssa-alias.c : Likewise. * tree-ssa-ccp.c : Likewise. * tree-ssa-coalesce.c : Likewise. * tree-ssa-copy.c : Likewise. * tree-ssa-copyrename.c : Likewise. * tree-ssa-dce.c : Likewise. * tree-ssa-dom.c : Likewise. * tree-ssa-dse.c : Likewise. * tree-ssa-forwprop.c : Likewise. * tree-ssa-ifcombine.c : Likewise. * tree-ssa-live.c : Likewise. * tree-ssa-loop-ch.c : Likewise. * tree-ssa-loop-im.c : Likewise. * tree-ssa-loop-ivcanon.c : Likewise. * tree-ssa-loop-ivopts.c : Likewise. * tree-ssa-loop-manip.c : Likewise. * tree-ssa-loop-niter.c : Likewise. * tree-ssa-loop-prefetch.c : Likewise. * tree-ssa-loop-unswitch.c : Likewise. * tree-ssa-loop.c : Likewise. * tree-ssa-math-opts.c : Likewise. * tree-ssa-operands.c : Likewise. * tree-ssa-phiopt.c : Likewise. * tree-ssa-phiprop.c : Likewise. * tree-ssa-pre.c : Likewise. * tree-ssa-propagate.c : Likewise. * tree-ssa-reassoc.c : Likewise. * tree-ssa-sccvn.c : Likewise. * tree-ssa-scopedtables.c : Likewise. * tree-ssa-sink.c : Likewise. * tree-ssa-strlen.c : Likewise. * tree-ssa-structalias.c : Likewise. * tree-ssa-tail-merge.c : Likewise. * tree-ssa-ter.c : Likewise. * tree-ssa-threadedge.c : Likewise. * tree-ssa-threadupdate.c : Likewise. * tree-ssa-uncprop.c : Likewise. * tree-ssa-uninit.c : Likewise. * tree-ssa.c : Likewise. * tree-ssanames.c : Likewise. * tree-stdarg.c : Likewise. * tree-streamer-in.c : Likewise. * tree-streamer-out.c : Likewise. * tree-streamer.c : Likewise. * tree-streamer.h : Likewise. * tree-switch-conversion.c : Likewise. * tree-tailcall.c : Likewise. * tree-vect-data-refs.c : Likewise. * tree-vect-generic.c : Likewise. * tree-vect-loop-manip.c : Likewise. * tree-vect-loop.c : Likewise. * tree-vect-patterns.c : Likewise. * tree-vect-slp.c : Likewise. * tree-vect-stmts.c : Likewise. * tree-vectorizer.c : Likewise. * tree-vectorizer.h : Likewise. * tree-vrp.c : Likewise. * tree.c : Likewise. * tsan.c : Likewise. * ubsan.c : Likewise. * valtrack.c : Likewise. * valtrack.h : Likewise. * value-prof.c : Likewise. * var-tracking.c : Likewise. * varasm.c : Likewise. * varpool.c : Likewise. * vec.c: Likewise. * vmsdbgout.c : Likewise. * vtable-verify.c : Likewise. * vtable-verify.h : Likewise. * web.c : Likewise. * wide-int.cc : Likewise. * xcoffout.c : Likewise. * config/aarch64/aarch64-builtins.c : Likewise. * config/aarch64/aarch64.c : Likewise. * config/aarch64/cortex-a57-fma-steering.c : Likewise. * config/alpha/alpha.c : Likewise. * config/arc/arc.c : Likewise. * config/arm/aarch-common.c : Likewise. * config/arm/arm-builtins.c : Likewise. * config/arm/arm-c.c : Likewise. * config/arm/arm.c : Likewise. * config/avr/avr-c.c : Likewise. * config/avr/avr-log.c : Likewise. * config/avr/avr.c : Likewise. * config/bfin/bfin.c : Likewise. * config/c6x/c6x.c : Likewise. * config/cr16/cr16.c : Likewise. * config/cris/cris.c : Likewise. * config/darwin-c.c : Likewise. * config/darwin.c : Likewise. * config/default-c.c : Likewise. * config/epiphany/epiphany.c : Likewise. * config/epiphany/mode-switch-use.c : Likewise. * config/epiphany/resolve-sw-modes.c : Likewise. * config/fr30/fr30.c : Likewise. * config/frv/frv.c : Likewise. * config/ft32/ft32.c : Likewise. * config/glibc-c.c : Likewise. * config/h8300/h8300.c : Likewise. * config/i386/i386-c.c : Likewise. * config/i386/i386.c : Likewise. * config/i386/msformat-c.c : Likewise. * config/i386/winnt-cxx.c : Likewise. * config/i386/winnt-stubs.c : Likewise. * config/i386/winnt.c : Likewise. * config/ia64/ia64-c.c : Likewise. * config/ia64/ia64.c : Likewise. * config/iq2000/iq2000.c : Likewise. * config/lm32/lm32.c : Likewise. * config/m32c/m32c-pragma.c : Likewise. * config/m32c/m32c.c : Likewise. * config/m32r/m32r.c : Likewise. * config/m68k/m68k.c : Likewise. * config/mcore/mcore.c : Likewise. * config/mep/mep-pragma.c : Likewise. * config/mep/mep.c : Likewise. * config/microblaze/microblaze-c.c : Likewise. * config/microblaze/microblaze.c : Likewise. * config/mips/mips.c : Likewise. * config/mmix/mmix.c : Likewise. * config/mn10300/mn10300.c : Likewise. * config/moxie/moxie.c : Likewise. * config/msp430/msp430-c.c : Likewise. * config/msp430/msp430.c : Likewise. * config/nds32/nds32-cost.c : Likewise. * config/nds32/nds32-fp-as-gp.c : Likewise. * config/nds32/nds32-intrinsic.c : Likewise. * config/nds32/nds32-isr.c : Likewise. * config/nds32/nds32-md-auxiliary.c : Likewise. * config/nds32/nds32-memory-manipulation.c : Likewise. * config/nds32/nds32-pipelines-auxiliary.c : Likewise. * config/nds32/nds32-predicates.c : Likewise. * config/nds32/nds32.c : Likewise. * config/nios2/nios2.c : Likewise. * config/nvptx/nvptx.c : Likewise. * config/pa/pa.c : Likewise. * config/pdp11/pdp11.c : Likewise. * config/rl78/rl78-c.c : Likewise. * config/rl78/rl78.c : Likewise. * config/rs6000/rs6000-c.c : Likewise. * config/rs6000/rs6000.c : Likewise. * config/rx/rx.c : Likewise. * config/s390/s390-c.c : Likewise. * config/s390/s390.c : Likewise. * config/sh/sh-c.c : Likewise. * config/sh/sh-mem.cc : Likewise. * config/sh/sh.c : Likewise. * config/sh/sh_optimize_sett_clrt.cc : Likewise. * config/sh/sh_treg_combine.cc : Likewise. * config/sol2-c.c : Likewise. * config/sol2-cxx.c : Likewise. * config/sol2-stubs.c : Likewise. * config/sol2.c : Likewise. * config/sparc/sparc-c.c : Likewise. * config/sparc/sparc.c : Likewise. * config/spu/spu-c.c : Likewise. * config/spu/spu.c : Likewise. * config/stormy16/stormy16.c : Likewise. * config/tilegx/mul-tables.c : Likewise. * config/tilegx/tilegx-c.c : Likewise. * config/tilegx/tilegx.c : Likewise. * config/tilepro/mul-tables.c : Likewise. * config/tilepro/tilepro-c.c : Likewise. * config/tilepro/tilepro.c : Likewise. * config/v850/v850-c.c : Likewise. * config/v850/v850.c : Likewise. * config/vax/vax.c : Likewise. * config/visium/visium.c : Likewise. * config/vms/vms-c.c : Likewise. * config/vms/vms.c : Likewise. * config/vxworks.c : Likewise. * config/winnt-c.c : Likewise. * config/xtensa/xtensa.c : Likewise. ada 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c : Adjust include files. * gcc-interface/decl.c : Likewise. * gcc-interface/misc.c : Likewise. * gcc-interface/targtyps.c : Likewise. * gcc-interface/trans.c : Likewise. * gcc-interface/utils.c : Likewise. * gcc-interface/utils2.c : Likewise. c 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c : Adjust include files. * c-aux-info.c : Likewise. * c-convert.c : Likewise. * c-decl.c : Likewise. * c-errors.c : Likewise. * c-lang.c : Likewise. * c-lang.h : Likewise. * c-objc-common.c : Likewise. * c-parser.c : Likewise. * c-typeck.c : Likewise. cfamily 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c : Adjust include files. * c-ada-spec.c : Likewise. * c-cilkplus.c : Likewise. * c-common.c : Likewise. * c-common.h : Likewise. * c-cppbuiltin.c : Likewise. * c-dump.c : Likewise. * c-format.c : Likewise. * c-gimplify.c : Likewise. * c-indentation.c : Likewise. * c-lex.c : Likewise. * c-omp.c : Likewise. * c-opts.c : Likewise. * c-pch.c : Likewise. * c-ppoutput.c : Likewise. * c-pragma.c : Likewise. * c-pretty-print.c : Likewise. * c-semantics.c : Likewise. * c-ubsan.c : Likewise. * cilk.c : Likewise. * stub-objc.c : Likewise. cp 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * call.c : Adjust include files. * class.c : Likewise. * constexpr.c : Likewise. * cp-array-notation.c : Likewise. * cp-cilkplus.c : Likewise. * cp-gimplify.c : Likewise. * cp-lang.c : Likewise. * cp-objcp-common.c : Likewise. * cp-tree.h : Likewise. * cp-ubsan.c : Likewise. * cvt.c : Likewise. * decl.c : Likewise. * decl2.c : Likewise. * dump.c : Likewise. * error.c : Likewise. * except.c : Likewise. * expr.c : Likewise. * friend.c : Likewise. * init.c : Likewise. * lambda.c : Likewise. * lex.c : Likewise. * mangle.c : Likewise. * method.c : Likewise. * name-lookup.c : Likewise. * optimize.c : Likewise. * parser.c : Likewise. * pt.c : Likewise. * ptree.c : Likewise. * repo.c : Likewise. * rtti.c : Likewise. * search.c : Likewise. * semantics.c : Likewise. * tree.c : Likewise. * typeck.c : Likewise. * typeck2.c : Likewise. * vtable-class-hierarchy.c : Likewise. fortran 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * convert.c : Adjust include files. * cpp.c : Likewise. * decl.c : Likewise. * f95-lang.c : Likewise. * gfortran.h : Likewise. * iresolve.c : Likewise. * match.c : Likewise. * module.c : Likewise. * openmp.c : Likewise. * options.c : Likewise. * target-memory.c : Likewise. * trans-array.c : Likewise. * trans-common.c : Likewise. * trans-const.c : Likewise. * trans-decl.c : Likewise. * trans-expr.c : Likewise. * trans-intrinsic.c : Likewise. * trans-io.c : Likewise. * trans-openmp.c : Likewise. * trans-stmt.c : Likewise. * trans-types.c : Likewise. * trans.c : Likewise. go 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * go-backend.c : Adjust include files. * go-gcc.cc : Likewise. * go-lang.c : Likewise. java 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * boehm.c : Adjust include files. * builtins.c : Likewise. * class.c : Likewise. * constants.c : Likewise. * decl.c : Likewise. * except.c : Likewise. * expr.c : Likewise. * java-gimplify.c : Likewise. * java-tree.h : Likewise. * jcf-dump.c : Likewise. * jcf-io.c : Likewise. * jcf-parse.c : Likewise. * jcf-reader.c : Likewise. * jvgenmain.c : Likewise. * lang.c : Likewise. * mangle.c : Likewise. * mangle_name.c : Likewise. * resource.c : Likewise. * typeck.c : Likewise. * verify-glue.c : Likewise. * verify-impl.c : Likewise. jit 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c : Adjust include files. * jit-common.h : Likewise. * jit-playback.c : Likewise. lto 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c : Adjust include files. * lto-object.c : Likewise. * lto-partition.c : Likewise. * lto-partition.h : Likewise. * lto-symtab.c : Likewise. * lto.c : Likewise. * lto.h : Likewise. objc 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * objc-act.c : Adjust include files. * objc-encoding.c : Likewise. * objc-gnu-runtime-abi-01.c : Likewise. * objc-lang.c : Likewise. * objc-map.c : Likewise. * objc-next-runtime-abi-01.c : Likewise. * objc-next-runtime-abi-02.c : Likewise. * objc-runtime-shared-support.c : Likewise. objcp 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c : Adjust include files. * objcp-lang.c : Likewise. From-SVN: r224250
2015-06-08 23:06:50 +02:00
2015-06-08 Andrew MacLeod <amacleod@redhat.com>
* array-notation-common.c : Adjust include files.
* c-ada-spec.c : Likewise.
* c-cilkplus.c : Likewise.
* c-common.c : Likewise.
* c-common.h : Likewise.
* c-cppbuiltin.c : Likewise.
* c-dump.c : Likewise.
* c-format.c : Likewise.
* c-gimplify.c : Likewise.
* c-indentation.c : Likewise.
* c-lex.c : Likewise.
* c-omp.c : Likewise.
* c-opts.c : Likewise.
* c-pch.c : Likewise.
* c-ppoutput.c : Likewise.
* c-pragma.c : Likewise.
* c-pretty-print.c : Likewise.
* c-semantics.c : Likewise.
* c-ubsan.c : Likewise.
* cilk.c : Likewise.
* stub-objc.c : Likewise.
2015-06-08 Marek Polacek <polacek@redhat.com>
PR c/66415
* c-format.c (location_from_offset): Return LOC if LINE is null.
Merge debug-early branch into mainline. * dwarf2out.c: Remove deferred_locations*. (dwarf2_debug_hooks): Add early_finish hook. Remove global_decl hook. Add early_global_decl and late_global_decl hook. New global early_dwarf. New structure set_early_dwarf. (output_die): Indicate whether a DIE was generated early when generating assembly with -dA. (struct limbo_die_struct): Document created_for field. Remove file_table_last_lookup. (remove_AT): Return TRUE if successful. (remove_child_TAG): Clear die_parent. (reparent_child): New function abstracted from... (splice_child_die): ...here. (new_die): ICE if a DIE ends up in limbo too late. (check_die): New. (defer_location): Remove. (add_subscript_info): Reuse DW_TAG_subrange_type if available. (fill_variable_array_bounds): New. (decl_start_label): Call fill_variable_array_bounds. (gen_formal_parameter_die): Rewrite to reuse previously generated DIEs. (gen_subprogram_die): Same. (gen_variable_die): Same. (gen_const_die): Same. (gen_label_die): Same. (gen_lexical_block_die): Same. (decl_will_get_specification_p): New. (local_function_static): New. (gen_struct_or_union_type_die): Fill in variable-length fields. (gen_typedef_die): Fill in variable-length typedefs. (gen_tagged_type_die): Gracefully return on error_mark_node. Handle re-entrancy. (gen_type_die_with_usage): Handle variable-length types. Remove duplicate code for ARRAY_TYPE case. (process_scope_var): Only process imported modules during early dwarf. (dwarf2out_early_global_decl): New. (dwarf2out_late_global_decl): Rename from dwarf2out_global_decl. (dwarf2out_type_decl): Set early_dwarf while calling dwarf2out_decl. (dwarf2out_decl): Verify that we did not recreate a previously generated DIE. Do not return on DECL_EXTERNALs in VAR_DECLs. Abstract some code to local_function_static. (lookup_filename): Remove use of file_table_last_lookup. Gracefully exit on missing file_name. (dwarf2out_finish): Verify limbo list. Remove deferred_locations_list use. Move deferred_asm_name and limbo flushing to... (dwarf2out_early_finish): ...here. New. (dwarf2out_c_finalize): Remove set of deferred_location_list, deferred_asm_name, and file_table_last_lookup. * cgraph.h (referred_to_p): Add default argument. * cgraphunit.c (referred_to_p): Add and handle include_self argument. (analyze_functions): Add first_time argument. Call check_global_declaration for all symbols. Call late_global_decl for nodes for moribund nodes. (finalize_compilation_unit): Add new argument to analyze_functions. Call early_global_decl for functions. Call early_finish debug hook. * dbxout.c (dbxout_early_global_decl): New. (dbxout_late_global_decl): New. Adapted from dbxout_global_decl. (dbx_debug_hooks): Add new hooks. (xcoff_debug_hooks): Same. * debug.c (do_nothing_debug_hooks): Add early_finish field. Add early and late debug hooks. Remove global_decl hook. * debug.h (struct gcc_debug_hooks): Add early_finish, early_global_decl, and late_global_decl fields. Remove global_decl field. Document gcc_debug_hooks. * gengtype.c (output_typename): Remove. * godump.c (go_early_global_decl): New. (go_late_global_decl): New. (go_global_decl): Remove. (dump_go_spec_init): Remove global_decl. Add {early,late}_global_decl. * langhooks-def.h (LANG_HOOKS_WRITE_GLOBALS): Remove. (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New. * langhooks.c (lhd_warn_unused_global_decl): Adjust comment. (write_global_declarations): Remove. (global_decl_processing): New. * langhooks.h (struct lang_hooks_for_decls): Remove final_write_globals field. Add post_compilation_parsing_cleanups field. * passes.c (rest_of_decl_compilation): Call early_global_decl. * sdbout.c: Add early and late_global_decl hooks. Remove sdbout_global_decl hook. Add early_finish field for sdb_debug_hooks. (sdbout_global_decl): Remove. (sdbout_early_global_decl): New. (sdbout_late_global_decl): New. * timevar.def (TV_PHASE_LATE_PARSING_CLEANUPS): New. * toplev.c (check_global_declaration): Rename from check_global_declaration_1. Adapt to use symtab infrastructure. (check_global_declarations): Remove. (emit_debug_global_declarations): Remove. (compile_file): Remove call to final_write_globals langhook. Run the actual compilation process. Perform any post compilation parser cleanups. Generate late debug info. * toplev.h (check_global_declaration): New. (check_global_declaration_1): Remove. (check_global_declarations): Remove. (write_global_declarations): Remove. (emit_debug_global_declarations): Remove. (global_decl_processing): New. * tree-core.h (struct tree_block): Add DIE field. * tree.h (BLOCK_DIE): New. * vmsdbgout.c (vmsdbgout_global_decl): Remove function and its use throughout. (vmsdbgout_early_global_decl): New. (vmsdbgout_late_global_decl): New. Add early_finish debug hook field to vmsdbg_debug_hooks. Remove vmsdbgout_decl to vmsdbgout_function_decl. Add early and late_global_decl debug hooks. From-SVN: r224161
2015-06-05 20:44:53 +02:00
2015-06-05 Aldy Hernandez <aldyh@redhat.com>
* c-common.h (c_parse_final_cleanups): New prototype.
* c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
2015-06-04 Sriraman Tallam <tmsriram@google.com>
* c-common.c (noplt): New attribute.
(handle_noplt_attribute): New handler.
coretypes.h: Include machmode.h... 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * coretypes.h: Include machmode.h, signop.h, wide-int.h, double-int.h, real.h, and fixed-value.h when included in host source files. * double-int.h: Remove redundant #includes listed above. * fixed-value.h: Likewise. * real.h: Likewise. * wide-int.h: Likewise. * inchash.h: Likewise. * rtl.h: Add some include files When included from a generator file. * target.h: Remove wide-int.h and insn-modes.h from the include list. * internal-fn.h: Don't include coretypes.h. * alias.c: Adjust includes for restructured coretypes.h. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * dwarf2out.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-streamer.h: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * hooks.h: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * realmpfr.h: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * shrink-wrap.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * statistics.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-pretty-print.h: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-loop.h: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * valtrack.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int-print.cc: Likewise. * wide-int-print.h: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/aarch64/cortex-a57-fma-steering.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/aarch-common.c: Likewise. * config/arm/arm-builtins.c: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-c.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/default-c.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/glibc-c.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386-c.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze-c.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430-c.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78-c.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390-c.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh-c.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sol2-c.c: Likewise. * config/sol2-cxx.c: Likewise. * config/sol2-stubs.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc-c.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu-c.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/mul-tables.c: Likewise. * config/tilegx/tilegx-c.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/mul-tables.c: Likewise. * config/tilepro/tilepro-c.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/vms/vms-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/winnt-c.c: Likewise. * config/xtensa/xtensa.c: Likewise. * common/config/bfin/bfin-common.c: Likewise. ada 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h. * gcc-interface/decl.c: Likewise. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. c 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c: Adjust includes for restructured coretypes.h. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. c-family 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c: Adjust includes for restructured coretypes.h. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * call.c: Adjust includes for restructured coretypes.h. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-tree.h: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. * vtable-class-hierarchy.c: Likewise. fortran 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * convert.c: Adjust includes for restructured coretypes.h. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * go-backend.c: Adjust includes for restructured coretypes.h. * go-c.h: Likewise. * go-gcc.cc: Likewise. * go-lang.c: Likewise. java 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Adjust includes for restructured coretypes.h. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. * verify-impl.c: Likewise. jit 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Adjust includes for restructured coretypes.h. * jit-common.h: Likewise. * jit-playback.c: Likewise. lto 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Adjust includes for restructured coretypes.h. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * objc-act.c: Adjust includes for restructured coretypes.h. * objc-encoding.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-lang.c: Likewise. * objc-map.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. objcp 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c: Adjust includes for restructured coretypes.h. * objcp-lang.c: Likewise. From-SVN: r224136
2015-06-04 19:49:54 +02:00
2015-06-04 Andrew MacLeod <amacleod@redhat.com>
* array-notation-common.c: Adjust includes for restructured coretypes.h.
* c-ada-spec.c: Likewise.
* c-cilkplus.c: Likewise.
* c-common.c: Likewise.
* c-common.h: Likewise.
* c-cppbuiltin.c: Likewise.
* c-dump.c: Likewise.
* c-format.c: Likewise.
* c-gimplify.c: Likewise.
* c-indentation.c: Likewise.
* c-lex.c: Likewise.
* c-omp.c: Likewise.
* c-opts.c: Likewise.
* c-pch.c: Likewise.
* c-ppoutput.c: Likewise.
* c-pragma.c: Likewise.
* c-pretty-print.c: Likewise.
* c-semantics.c: Likewise.
* c-ubsan.c: Likewise.
* cilk.c: Likewise.
* stub-objc.c: Likewise.
2015-06-02 David Malcolm <dmalcolm@redhat.com>
PR c/66220:
* c-indentation.c (should_warn_for_misleading_indentation): Use
expand_location rather than expand_location_to_spelling_point.
Don't warn if the guarding statement is more indented than the
next/body stmts.
2015-06-02 David Malcolm <dmalcolm@redhat.com>
* c-indentation.c (warn_for_misleading_indentation): Bail out
immediately if -Wmisleading-indentation isn't enabled.
2015-06-01 Martin Liska <mliska@suse.cz>
* c-format.c (check_format_arg):Use new type-based pool allocator.
(check_format_info_main) Likewise.
2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
(has_nontrivial_methods): Likewise.
2015-05-25 Marek Polacek <polacek@redhat.com>
* c-ubsan.c (ubsan_instrument_shift): Use type0.
2015-05-22 Marek Polacek <polacek@redhat.com>
PR c/47043
* c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
STACK_GROWS_DOWNWARD.
2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* c-cppbuiltin.c (c_cpp_builtins): Check the value of
STACK_GROWS_DOWNWARD rather than if it is defined.
2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/52952
* c-format.c (location_column_from_byte_offset): New.
(location_from_offset): New.
(struct format_wanted_type): Add offset_loc field.
(check_format_info): Move handling of location for extra arguments
closer to the point of warning.
(check_format_info_main): Pass the result of location_from_offset
to warning_at.
(format_type_warning): Pass the result of location_from_offset
to warning_at.
2015-05-20 Marek Polacek <polacek@redhat.com>
* c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
2015-05-20 Marek Polacek <polacek@redhat.com>
* c-ada-spec.c (dump_sloc): Use DECL_P.
2015-05-20 Marek Polacek <polacek@redhat.com>
* c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
* c-common.c: Likewise.
Replace line_map union with C++ class hierarchy gcc/ChangeLog: * diagnostic.c (diagnostic_report_current_module): Strengthen local "new_map" from const line_map * to const line_map_ordinary *. * genmatch.c (error_cb): Likewise for local "map". (output_line_directive): Likewise for local "map". * input.c (expand_location_1): Likewise for local "map". Pass NULL rather than &map to linemap_unwind_to_first_non_reserved_loc, since the value is never read from there, and the value written back not read from here. (is_location_from_builtin_token): Strengthen local "map" from const line_map * to const line_map_ordinary *. (dump_location_info): Strengthen locals "map" from line_map *, one to const line_map_ordinary *, the other to const line_map_macro *. * tree-diagnostic.c (loc_map_pair): Strengthen field "map" from const line_map * to const line_map_macro *. (maybe_unwind_expanded_macro_loc): Add a call to linemap_check_macro when writing to the "map" field of the loc_map_pair. Introduce local const line_map_ordinary * "ord_map", using it in place of "map" in the part of the function where we know we have an ordinary map. Strengthen local "m" from const line_map * to const line_map_ordinary *. gcc/ada/ChangeLog: * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map" from line_map * to line_map_ordinary *. gcc/c-family/ChangeLog: * c-common.h (fe_file_change): Strengthen param from const line_map * to const line_map_ordinary *. (pp_file_change): Likewise. * c-lex.c (fe_file_change): Likewise. (cb_define): Use linemap_check_ordinary when invoking SOURCE_LINE. (cb_undef): Likewise. * c-opts.c (c_finish_options): Use linemap_check_ordinary when invoking cb_file_change. (c_finish_options): Likewise. (push_command_line_include): Likewise. (cb_file_change): Strengthen param "new_map" from const line_map * to const line_map_ordinary *. * c-ppoutput.c (cb_define): Likewise for local "map". (pp_file_change): Likewise for param "map" and local "from". gcc/fortran/ChangeLog: * cpp.c (maybe_print_line): Strengthen local "map" from const line_map * to const line_map_ordinary *. (cb_file_change): Likewise for param "map" and local "from". (cb_line_change): Likewise for local "map". libcpp/ChangeLog: * directives.c (do_line): Strengthen local "map" from const line_map * to const line_map_ordinary *. (do_linemarker): Likewise. (_cpp_do_file_change): Assert that we're not dealing with a macro map. Introduce local "ord_map" via a call to linemap_check_ordinary, guarded within the check for non-NULL. Use it for typesafety. * files.c (cpp_make_system_header): Strengthen local "map" from const line_map * to const line_map_ordinary *. * include/cpplib.h (struct cpp_callbacks): Likewise for second parameter of "file_change" callback. * include/line-map.h (struct line_map): Convert from a struct containing a union to a base class. (struct line_map_ordinary): Convert to a subclass of line_map. (struct line_map_macro): Likewise. (linemap_check_ordinary): Strengthen return type from line_map * to line_map_ordinary *, and add a const-variant. (linemap_check_macro): New pair of functions. (ORDINARY_MAP_STARTING_LINE_NUMBER): Strengthen param from const line_map * to const line_map_ordinary *, eliminating call to linemap_check_ordinary. Likewise for the non-const variant. (ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise. (ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise. (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Likewise. (ORDINARY_MAP_FILE_NAME): Likewise. (MACRO_MAP_MACRO): Strengthen param from const line_map * to const line_map_macro *. Likewise for the non-const variant. (MACRO_MAP_NUM_MACRO_TOKENS): Likewise. (MACRO_MAP_LOCATIONS): Likewise. (MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise. (struct maps_info): Replace with... (struct maps_info_ordinary):...this and... (struct maps_info_macro): ...this. (struct line_maps): Convert fields "info_ordinary" and "info_macro" to the above new structs. (LINEMAPS_MAP_INFO): Delete both functions. (LINEMAPS_MAPS): Likewise. (LINEMAPS_ALLOCATED): Rewrite both variants to avoid using LINEMAPS_MAP_INFO. (LINEMAPS_USED): Likewise. (LINEMAPS_CACHE): Likewise. (LINEMAPS_MAP_AT): Likewise. (LINEMAPS_ORDINARY_MAPS): Strengthen return type from line_map * to line_map_ordinary *. (LINEMAPS_ORDINARY_MAP_AT): Likewise. (LINEMAPS_LAST_ORDINARY_MAP): Likewise. (LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Likewise. (LINEMAPS_MACRO_MAPS): Strengthen return type from line_map * to line_map_macro *. (LINEMAPS_MACRO_MAP_AT): Likewise. (LINEMAPS_LAST_MACRO_MAP): Likewise. (LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Likewise. (linemap_map_get_macro_name): Strengthen param from const line_map * to const line_map_macro *. (SOURCE_LINE): Strengthen first param from const line_map * to const line_map_ordinary *, removing call to linemap_check_ordinary. (SOURCE_COLUMN): Likewise. (LAST_SOURCE_LINE_LOCATION): Likewise. (LAST_SOURCE_LINE): Strengthen first param from const line_map * to const line_map_ordinary *. (LAST_SOURCE_COLUMN): Likewise. (INCLUDED_FROM): Strengthen return type from line_map * to line_map_ordinary *., and second param from const line_map * to const line_map_ordinary *, removing call to linemap_check_ordinary. (MAIN_FILE_P): Strengthen param from const line_map * to const line_map_ordinary *, removing call to linemap_check_ordinary. (linemap_position_for_line_and_column): Strengthen param from const line_map * to const line_map_ordinary *. (LINEMAP_FILE): Strengthen param from const line_map * to const line_map_ordinary *, removing call to linemap_check_ordinary. (LINEMAP_LINE): Likewise. (LINEMAP_SYSP): Likewise. (linemap_resolve_location): Strengthen final param from const line_map ** to const line_map_ordinary **. * internal.h (CPP_INCREMENT_LINE): Likewise for local "map". (linemap_enter_macro): Strengthen return type from const line_map * to const line_map_macro *. (linemap_add_macro_token): Likewise for first param. * line-map.c (linemap_check_files_exited): Strengthen local "map" from const line_map * to const line_map_ordinary *. (new_linemap): Introduce local "map_size" and use it when calculating how large the buffer should be. Rewrite based on change of info_macro and info_ordinary into distinct types. (linemap_add): Strengthen locals "map" and "from" from line_map * to line_map_ordinary *. (linemap_enter_macro): Strengthen return type from const line_map * to const line_map_macro *, and local "map" from line_map * to line_map_macro *. (linemap_add_macro_token): Strengthen param "map" from const line_map * to const line_map_macro *. (linemap_line_start): Strengthen local "map" from line_map * to line_map_ordinary *. (linemap_position_for_column): Likewise. (linemap_position_for_line_and_column): Strengthen first param from const line_map * to const line_map_ordinary *. (linemap_position_for_loc_and_offset): Strengthen local "map" from const line_map * to const line_map_ordinary *. (linemap_ordinary_map_lookup): Likewise for return type and locals "cached" and "result". (linemap_macro_map_lookup): Strengthen return type and locals "cached" and "result" from const line_map * to const line_map_macro *. (linemap_macro_map_loc_to_exp_point): Likewise for param "map". (linemap_macro_map_loc_to_def_point): Likewise. (linemap_macro_map_loc_unwind_toward_spelling): Likewise. (linemap_get_expansion_line): Strengthen local "map" from const line_map * to const line_map_ordinary *. (linemap_get_expansion_filename): Likewise. (linemap_map_get_macro_name): Strengthen param from const line_map * to const line_map_macro *. (linemap_location_in_system_header_p): Add call to linemap_check_ordinary in region guarded by !linemap_macro_expansion_map_p. Introduce local "macro_map" via linemap_check_macro in other region, using it in place of "map" for typesafety. (first_map_in_common_1): Add calls to linemap_check_macro. (trace_include): Strengthen param "map" from const line_map * to const line_map_ordinary *. (linemap_macro_loc_to_spelling_point): Strengthen final param from const line_map ** to const line_map_ordinary **. Replace a C-style cast with a const_cast, and add calls to linemap_check_macro and linemap_check_ordinary. (linemap_macro_loc_to_def_point): Likewise. (linemap_macro_loc_to_exp_point): Likewise. (linemap_resolve_location): Strengthen final param from const line_map ** to const line_map_ordinary **. (linemap_unwind_toward_expansion): Introduce local "macro_map" via a checked cast and use it in place of *map. (linemap_unwind_to_first_non_reserved_loc): Strengthen local "map1" from const line_map * to const line_map_ordinary *. (linemap_expand_location): Introduce local "ord_map" via a checked cast and use it in place of map. (linemap_dump): Make local "map" const. Strengthen local "includer_map" from line_map * to const line_map_ordinary *. Introduce locals "ord_map" and "macro_map" via checked casts and use them in place of "map" for typesafety. (linemap_dump_location): Strengthen local "map" from const line_map * to const line_map_ordinary *. (linemap_get_file_highest_location): Update for elimination of union. (linemap_get_statistics): Strengthen local "cur_map" from line_map * to const line_map_macro *. Update uses of sizeof to use the appropriate line_map subclasses. * macro.c (_cpp_warn_if_unused_macro): Add call to linemap_check_ordinary. (builtin_macro): Strengthen local "map" from const line_map * to const line_map_macro *. (enter_macro_context): Likewise. (replace_args): Likewise. (tokens_buff_put_token_to): Likewise for param "map". (tokens_buff_add_token): Likewise. From-SVN: r223365
2015-05-19 15:18:01 +02:00
2015-05-19 David Malcolm <dmalcolm@redhat.com>
* c-common.h (fe_file_change): Strengthen param from
const line_map * to const line_map_ordinary *.
(pp_file_change): Likewise.
* c-lex.c (fe_file_change): Likewise.
(cb_define): Use linemap_check_ordinary when invoking
SOURCE_LINE.
(cb_undef): Likewise.
* c-opts.c (c_finish_options): Use linemap_check_ordinary when
invoking cb_file_change.
(c_finish_options): Likewise.
(push_command_line_include): Likewise.
(cb_file_change): Strengthen param "new_map" from
const line_map * to const line_map_ordinary *.
* c-ppoutput.c (cb_define): Likewise for local "map".
(pp_file_change): Likewise for param "map" and local "from".
Use std::swap instead of explicit swaps gcc/ * bb-reorder.c (fix_up_fall_thru_edges): Use std::swap instead of explicit swaps. * dojump.c (do_compare_rtx_and_jump): Likewise. * expmed.c (emit_store_flag_1): Likewise. * fibonacci_heap.h (fibonacci_heap::union_with): Likewise. * final.c (sprint_ul): Use std::reverse for reversing a string. * fold-const.c (extract_muldiv_1): Use std::swap. * genmodes.c (emit_mode_int_n): Likewise. * ifcvt.c (dead_or_predicable): Likewise. * ira-build.c (ira_merge_live_ranges): Likewise. (swap_allocno_copy_ends_if_necessary): Likewise. * ira.c (ira_setup_alts): Likewise. * loop-iv.c (iv_analyze_expr): Likewise. (implies_p): Likewise. (canon_condition): Likewise. * lra-constraints.c (swap_operands): Likewise. * lra-lives.c (lra_merge_live_ranges): Likewise. * omega.c (swap): Remove. (bswap): Remove. (omega_unprotect_1): Use std::swap. (omega_solve_geq): Likewise. * optabs.c (expand_binop_directly): Likewise. (expand_binop): Likewise. (emit_conditional_move): Likewise. (emit_conditional_add): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * reg-stack.c (emit_swap_insn): Likewise. (swap_to_top): Likewise. (compare_for_stack_reg): Likewise. (subst_asm_stack_regs): Likewise. * reload.c (find_reloads): Likewise. * reload1.c (gen_reload_chain_without_interm_reg_p): Likewise. * sel-sched.c (invoke_reorder_hooks): Likewise. (create_block_for_bookkeeping): Likewise. * tree-data-ref.c (lambda_matrix_row_exchange): Remove. (lambda_matrix_right_hermite): Use std::swap. * tree-ssa-coalesce.c (sort_coalesce_list): Likewise. * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise. * tree-ssa-loop-ivopts.c (iv_ca_delta_reverse): Likewise. * tree-ssa-math-opts.c (is_widening_mult_p): Likewise. * tree-ssa-phiopt.c (hoist_adjacent_loads): Likewise. * tree-ssa-reassoc.c (linearize_expr_tree): Likewise. * tree-ssa-threadedge.c (simplify_control_stmt_condition): Likewise. * tree-vrp.c (compare_ranges): Likewise. * var-tracking.c (add_with_sets): Likewise. (vt_find_locations): Likewise. gcc/c/ * c-typeck.c (build_array_ref): Use std::swap instead of explicit swaps gcc/cp/ * typeck.c (composite_pointer_type): Use std::swap instead of explicit swaps. gcc/c-family/ * c-common.c (shorten_compare): Use std::swap instead of explicit swaps. gcc/fortran/ * interface.c (compare_actual_formal): Use std::swap instead of explicit swaps. * trans-array.c (gfc_trans_scalarized_loop_end): Likewise. * trans-intrinsic.c (walk_inline_intrinsic_transpose): Likewise. From-SVN: r223332
2015-05-19 06:24:31 +02:00
2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
* c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
2015-05-18 Tom de Vries <tom@codesourcery.com>
* c-common.c (build_va_arg_1): New function.
(build_va_arg): Add address operator to va_list operand if necessary.
2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
PR c/48956
* c-common.c (int_safely_convertible_to_real_p): Define.
(unsafe_conversion_p): Check conversions involving complex types.
(conversion_warning): Add new warning message for conversions which
discard imaginary component.
* c-common.h: (enum conversion_safety): Add new enumerator for such
conversions.
2015-05-14 Marek Polacek <polacek@redhat.com>
PR c/66066
PR c/66127
* c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
(c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
use it. If FOR_INT_CONST, require that all evaluated operands be
INTEGER_CSTs.
Implement -Wmisleading-indentation gcc/ChangeLog: * doc/invoke.texi (Warning Options): Add -Wmisleading-indentation. (-Wmisleading-indentation): New option. * Makefile.in (C_COMMON_OBJS): Add c-family/c-indentation.o. gcc/c-family/ChangeLog: * c-common.h (warn_for_misleading_indentation): New prototype. * c-indentation.c: New file. * c.opt (Wmisleading-indentation): New option. gcc/c/ChangeLog: * c-parser.c (c_parser_if_body): Add param "if_loc", use it to add a call to warn_for_misleading_indentation. (c_parser_else_body): Likewise, adding param "else_loc". (c_parser_if_statement): Check for misleading indentation. (c_parser_while_statement): Likewise. (c_parser_for_statement): Likewise. gcc/cp/ChangeLog: * parser.c (cp_parser_selection_statement): Add location and guard_kind arguments to calls to cp_parser_implicitly_scoped_statement. (cp_parser_iteration_statement): Likewise for calls to cp_parser_already_scoped_statement. (cp_parser_implicitly_scoped_statement): Add "guard_loc" and "guard_kind" params; use them to warn for misleading indentation. (cp_parser_already_scoped_statement): Likewise. gcc/testsuite/ChangeLog: * c-c++-common/Wmisleading-indentation.c: New testcase. * c-c++-common/Wmisleading-indentation-2.c: New testcase. * c-c++-common/Wmisleading-indentation-2.md: New file. libcpp/ChangeLog: * directives.c (do_line): Set seen_line_directive on line_table. (do_linemarker): Likewise. * include/line-map.h (struct line_maps): Add new field "seen_line_directive". From-SVN: r223098
2015-05-12 22:57:38 +02:00
2015-05-12 David Malcolm <dmalcolm@redhat.com>
* c-common.h (warn_for_misleading_indentation): New prototype.
* c-indentation.c: New file.
* c.opt (Wmisleading-indentation): New option.
2015-05-12 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/66010
* c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
2015-05-09 Jason Merrill <jason@redhat.com>
* c-opts.c (c_common_post_options): Also clear
cpp_opts->cpp_warn_cxx11_compat.
* c-common.h (enum cxx_dialect): Add cxx_unset.
* c-common.c (cxx_dialect): Initialize to cxx_unset.
* c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
* c.opt (std=c++14): Remove Undocumented flag and experimental warning.
(std=gnu++0x): Mark as Undocumented.
(std=gnu++1y): Add deprecated message.
2015-05-08 Jason Merrill <jason@redhat.com>
* c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
* c-opts.c: Adjust.
* c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
2015-05-08 Marek Polacek <polacek@redhat.com>
PR c/64918
* c.opt (Woverride-init-side-effects): New option.
2015-05-07 Marek Polacek <polacek@redhat.com>
PR c/65179
* c-common.c (c_fully_fold_internal): Warn when left shifting a
negative value.
* c.opt (Wshift-negative-value): New option.
* c-opts.c (c_common_post_options): Set warn_shift_negative_value
when -Wextra and C99/C++11 mode.
2015-05-07 Marek Polacek <polacek@redhat.com>
Martin Uecker <uecker@eecs.berkeley.edu>
* c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
flexible member array-like members if SANITIZE_BOUNDS_STRICT.
2015-05-05 Jason Merrill <jason@redhat.com>
* c.opt (Wterminate): New.
2015-04-30 Marek Polacek <polacek@redhat.com>
* c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
require that the non-constant be of a boolean type.
2015-04-29 Josh Triplett <josh@joshtriplett.org>
* c-common.c (handle_section_attribute): Refactor to reduce
nesting and distinguish between error cases.
2015-04-29 Marek Polacek <polacek@redhat.com>
PR c/64610
* c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
with 0/1.
2015-04-29 Jakub Jelinek <jakub@redhat.com>
* c-common.h (omp_clause_mask): Unconditionally define as a class.
Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
HOST_BITS_PER_WIDE_INT.
2015-04-28 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/65887
* c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
Pierre-Marie de Rodat <derodat@adacore.com>
* c-ada-spec.c (in_function): Delete.
(dump_generic_ada_node): Do not change in_function and remove the
redundant code dealing with it.
(print_ada_declaration): Do not change in_function. Use INDENT_INCR.
(print_ada_methods): Output the static member functions in a nested
package after the regular methods as well as associated renamings.
2015-04-24 Marek Polacek <polacek@redhat.com>
PR c/65830
* c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
and OPT_Wshift_count_overflow.
PR c/63357
* c-common.c (warn_logical_operator): Warn if the operands have the
same expressions.
2015-04-24 Marek Polacek <polacek@redhat.com>
PR c/61534
* c-common.c (warn_logical_operator): Bail if either operand comes
from a macro expansion.
2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
PR target/55143
* c-common.c (c_default_pointer_mode): Add definition.
* c-common.h (c_default_pointer_mode): Add declaration.
2015-03-11 Jakub Jelinek <jakub@redhat.com>
* c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
on record_builtin_type argument.
2015-03-10 Jakub Jelinek <jakub@redhat.com>
PR c/65120
* c-common.c (warn_logical_not_parentheses): Don't warn for
!x == 0 or !x != 0.
2015-03-07 Marek Polacek <polacek@redhat.com>
PR sanitizer/65280
* c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
before trying to figure out whether we have a flexible array member.
2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
Jonathan Wakely <jwakely.gcc@gmail.com>
* c-ada-spec.c (dump_ada_double_name): Fix pasto.
2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
PR ada/65319
* c-ada-spec.c (print_destructor): Remove obsolete code.
2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
(dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
DECL_TEMPLATE_RESULT emulations.
(dump_ada_template)): Add guard for TYPE_METHODS.
2015-02-27 Marek Polacek <polacek@redhat.com>
PR c/65040
* c.opt (Wformat-signedness): Don't enable by -Wformat=2.
2015-02-27 Kai Tietz <ktietz@redhat.com>
PR c/35330
* c-pragma.c (handle_pragma_weak): Do not try to create
weak/alias of declarations not being function, or variable
declarations.
[PR libgomp/64625] Remove __OFFLOAD_TABLE__ variable/formal parameter. Fixup for r219836: adjust builtin function prototypes. PR libgomp/64625 gcc/ * omp-builtins.def (BUILT_IN_GOACC_DATA_START): Specify as BT_FN_VOID_INT_SIZE_PTR_PTR_PTR, not BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR. (BUILT_IN_GOACC_ENTER_EXIT_DATA, BUILT_IN_GOACC_UPDATE): Specify as BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR, not BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR. (BUILT_IN_GOACC_PARALLEL): Specify as BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR, not BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR. * builtin-types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR) (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR): Remove function types. (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR) (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR) (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR): New function types. gcc/ada/ * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8) (DEF_FUNCTION_TYPE_VAR_12): Remove macros. (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros. gcc/c-family/ * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Remove macros. (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros. gcc/fortran/ * f95-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Remove macros. (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros. * types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR) (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR): Remove function types. (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR) (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR) (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR): New function types. gcc/jit/ * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8) (DEF_FUNCTION_TYPE_VAR_12): Remove macros. (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros. * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8) (DEF_FUNCTION_TYPE_VAR_12): Remove macros. (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros. gcc/lto/ * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Remove macros. (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros. From-SVN: r220944
2015-02-24 18:00:36 +01:00
2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
PR libgomp/64625
* c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
Remove macros.
(DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2015-02-16 Marek Polacek <polacek@redhat.com>
PR c/65066
* c-format.c (check_format_types): Handle null param.
2015-02-13 Marek Polacek <polacek@redhat.com>
PR c/65040
* c-format.c (check_format_types): Don't warn about different
signedness if the original value is in the range of WANTED_TYPE.
2015-02-12 Jason Merrill <jason@redhat.com>
PR c++/64956
* c-opts.c (c_common_post_options): Change flag_abi_version from 0
to the current highest version.
* c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
2015-02-04 Jakub Jelinek <jakub@redhat.com>
PR c/64824
PR c/64868
* c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
instead of RDIV_EXPR. Use build_binary_op instead of
build2_loc.
Always pass explicit location to fatal_error. The patch <https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00698.html> adding an overload for fatal_error that passes an explicit location broke gcc.pot regeneration because xgettext cannot handle function overloads with the diagnostic string argument in different positions. As the desired direction is for all diagnostics to have explicit locations, this patch addresses the regression by removing the version of fatal_error that does not pass a location, passing explicit input_location everywhere (in the hope that those will incrementally be changed to other locations, much as with the addition of a location argument to pedwarn some time ago - a lot of cases aren't meaningfully associated with a source file so UNKNOWN_LOCATION may be better). Note that this patch does not attempt to fix any existing issues with these diagnostics (such as wrongly starting with capital letters or ending with '.' or '\n'); it just adds the input_location argument. Bootstrapped with no regressions for x86_64-unknown-linux-gnu (Go excluded). gcc: * diagnostic.c (fatal_error (const char *, ...)): Remove function. * diagnostic-core.h (fatal_error (const char *, ...)): Remove prototype. * toplev.h (init_asm_output): Update comment on use of UNKNOWN_LOCATION with fatal_error. * cgraph.c, collect-utils.c, collect2.c, config/arc/arc.c, config/arc/arc.md, config/avr/avr.c, config/c6x/c6x.h, config/darwin.c, config/host-darwin.c, config/i386/host-cygwin.c, config/i386/intelmic-mkoffload.c, config/nios2/nios2.c, config/nvptx/mkoffload.c, config/nvptx/nvptx.h, config/rs6000/host-darwin.c, config/rs6000/rs6000.c, config/s390/s390.c, gcc.c, gcov-io.h, gcov-tool.c, ggc-common.c, ggc-page.c, graph.c, ipa-inline-analysis.c, ipa-reference.c, lto-cgraph.c, lto-section-in.c, lto-streamer-in.c, lto-streamer.c, lto-wrapper.c, objc/objc-act.c, opts.c, passes.c, plugin.c, tlink.c, toplev.c, tree-streamer-in.c, varpool.c: All callers of fatal_error changed to pass input_location as first argument. gcc/c-family: * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed to pass input_location as first argument. gcc/cp: * class.c, except.c, parser.c, pt.c: All callers of fatal_error changed to pass input_location as first argument. gcc/fortran: * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All callers of fatal_error changed to pass input_location as first argument. gcc/java: * class.c, expr.c, jcf-parse.c, jvspec.c: All callers of fatal_error changed to pass input_location as first argument. gcc/lto: * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error changed to pass input_location as first argument. libcc1: * plugin.cc: All callers of fatal_error changed to pass input_location as first argument. From-SVN: r220293
2015-01-30 17:15:00 +01:00
2015-01-30 Joseph Myers <joseph@codesourcery.com>
* c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
to pass input_location as first argument.
2015-01-23 Tom de Vries <tom@codesourcery.com>
PR libgomp/64672
* c.opt (fopenacc): Mark as LTO option.
2015-01-23 Tom de Vries <tom@codesourcery.com>
PR libgomp/64707
* c.opt (fopenmp): Mark as LTO option.
2015-01-21 Jakub Jelinek <jakub@redhat.com>
PR c/63307
* cilk.c (fill_decls_vec): Only put decls into vector v.
(compare_decls): Fix up formatting.
2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
PR c/63307
* cilk.c: Include vec.h.
(struct cilk_decls): New structure.
(wrapper_parm_cb): Split this function to...
(fill_decls_vec): ...this...
(create_parm_list): ...and this.
(compare_decls): New function.
(for_local_cb): Remove.
(wrapper_local_cb): Ditto.
(build_wrapper_type): For now first traverse and fill vector of
declarations then sort it and then deal with sorted vector.
(cilk_outline): Ditto.
(declare_one_free_variable): Ditto.
2015-01-21 Jason Merrill <jason@redhat.com>
PR c++/64629
* c-format.c (check_format_arg): Call decl_constant_value.
2015-01-19 Martin Liska <mliska@suse.cz>
* c-common.c (handle_noicf_attribute): New function.
Merge current set of OpenACC changes from gomp-4_0-branch. contrib/ * gcc_update (files_and_dependencies): Update rules for new libgomp/plugin/Makefrag.am and libgomp/plugin/configfrag.ac files. gcc/ * builtin-types.def (BT_FN_VOID_INT_INT_VAR) (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR) (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR): New function types. * builtins.c: Include "gomp-constants.h". (expand_builtin_acc_on_device): New function. (expand_builtin, is_inexpensive_builtin): Handle BUILT_IN_ACC_ON_DEVICE. * builtins.def (DEF_GOACC_BUILTIN, DEF_GOACC_BUILTIN_COMPILER): New macros. * cgraph.c (cgraph_node::create): Consider flag_openacc next to flag_openmp. * config.gcc <nvptx-*> (tm_file): Add nvptx/offload.h. <*-intelmic-* | *-intelmicemul-*> (tm_file): Add i386/intelmic-offload.h. * gcc.c (LINK_COMMAND_SPEC, GOMP_SELF_SPECS): For -fopenacc, link to libgomp and its dependencies. * config/arc/arc.h (LINK_COMMAND_SPEC): Likewise. * config/darwin.h (LINK_COMMAND_SPEC_A): Likewise. * config/i386/mingw32.h (GOMP_SELF_SPECS): Likewise. * config/ia64/hpux.h (LIB_SPEC): Likewise. * config/pa/pa-hpux11.h (LIB_SPEC): Likewise. * config/pa/pa64-hpux.h (LIB_SPEC): Likewise. * doc/generic.texi: Update for OpenACC changes. * doc/gimple.texi: Likewise. * doc/invoke.texi: Likewise. * doc/sourcebuild.texi: Likewise. * gimple-pretty-print.c (dump_gimple_omp_for): Handle GF_OMP_FOR_KIND_OACC_LOOP. (dump_gimple_omp_target): Handle GF_OMP_TARGET_KIND_OACC_KERNELS, GF_OMP_TARGET_KIND_OACC_PARALLEL, GF_OMP_TARGET_KIND_OACC_DATA, GF_OMP_TARGET_KIND_OACC_UPDATE, GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA. Dump more data. * gimple.c: Update comments for OpenACC changes. * gimple.def: Likewise. * gimple.h: Likewise. (enum gf_mask): Add GF_OMP_FOR_KIND_OACC_LOOP, GF_OMP_TARGET_KIND_OACC_PARALLEL, GF_OMP_TARGET_KIND_OACC_KERNELS, GF_OMP_TARGET_KIND_OACC_DATA, GF_OMP_TARGET_KIND_OACC_UPDATE, GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA. (gimple_omp_for_cond, gimple_omp_for_set_cond): Sort in the appropriate place. (is_gimple_omp_oacc, is_gimple_omp_offloaded): New functions. * gimplify.c: Include "gomp-constants.h". Update comments for OpenACC changes. (is_gimple_stmt): Handle OACC_PARALLEL, OACC_KERNELS, OACC_DATA, OACC_HOST_DATA, OACC_DECLARE, OACC_UPDATE, OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_CACHE, OACC_LOOP. (gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses): Handle OMP_CLAUSE__CACHE_, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, OMP_CLAUSE_DEVICE_RESIDENT, OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ. (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND. (gimplify_oacc_cache): New function. (gimplify_omp_for): Handle OACC_LOOP. (gimplify_omp_workshare): Handle OACC_KERNELS, OACC_PARALLEL, OACC_DATA. (gimplify_omp_target_update): Handle OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_UPDATE. (gimplify_expr): Handle OACC_LOOP, OACC_CACHE, OACC_HOST_DATA, OACC_DECLARE, OACC_KERNELS, OACC_PARALLEL, OACC_DATA, OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_UPDATE. (gimplify_body): Consider flag_openacc next to flag_openmp. * lto-streamer-out.c: Include "gomp-constants.h". * omp-builtins.def (BUILT_IN_ACC_GET_DEVICE_TYPE) (BUILT_IN_GOACC_DATA_START, BUILT_IN_GOACC_DATA_END) (BUILT_IN_GOACC_ENTER_EXIT_DATA, BUILT_IN_GOACC_PARALLEL) (BUILT_IN_GOACC_UPDATE, BUILT_IN_GOACC_WAIT) (BUILT_IN_GOACC_GET_THREAD_NUM, BUILT_IN_GOACC_GET_NUM_THREADS) (BUILT_IN_ACC_ON_DEVICE): New builtins. * omp-low.c: Include "gomp-constants.h". Update comments for OpenACC changes. (struct omp_context): Add reduction_map, gwv_below, gwv_this members. (extract_omp_for_data, use_pointer_for_field, install_var_field) (new_omp_context, delete_omp_context, scan_sharing_clauses) (create_omp_child_function, scan_omp_for, scan_omp_target) (check_omp_nesting_restrictions, lower_reduction_clauses) (build_omp_regions_1, diagnose_sb_0, make_gimple_omp_edges): Update for OpenACC changes. (scan_sharing_clauses): Handle OMP_CLAUSE_NUM_GANGS: OMP_CLAUSE_NUM_WORKERS: OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, OMP_CLAUSE_DEVICE_RESIDENT, OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE__CACHE_, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle GF_OMP_FOR_KIND_OACC_LOOP. (expand_omp_target, lower_omp_target): Handle GF_OMP_TARGET_KIND_OACC_PARALLEL, GF_OMP_TARGET_KIND_OACC_KERNELS, GF_OMP_TARGET_KIND_OACC_UPDATE, GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA, GF_OMP_TARGET_KIND_OACC_DATA. (pass_expand_omp::execute, execute_lower_omp) (pass_diagnose_omp_blocks::gate): Consider flag_openacc next to flag_openmp. (offload_symbol_decl): New variable. (oacc_get_reduction_array_id, oacc_max_threads) (get_offload_symbol_decl, get_base_type, lookup_oacc_reduction) (maybe_lookup_oacc_reduction, enclosing_target_ctx) (oacc_loop_or_target_p, oacc_lower_reduction_var_helper) (oacc_gimple_assign, oacc_initialize_reduction_data) (oacc_finalize_reduction_data, oacc_process_reduction_data): New functions. (is_targetreg_ctx): Remove function. * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__CACHE_, OMP_CLAUSE_DEVICE_RESIDENT, OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_GANG, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT, OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_VECTOR_LENGTH. * tree.c (omp_clause_code_name, walk_tree_1): Update accordingly. * tree.h (OMP_CLAUSE_GANG_EXPR, OMP_CLAUSE_GANG_STATIC_EXPR) (OMP_CLAUSE_ASYNC_EXPR, OMP_CLAUSE_WAIT_EXPR) (OMP_CLAUSE_VECTOR_EXPR, OMP_CLAUSE_WORKER_EXPR) (OMP_CLAUSE_NUM_GANGS_EXPR, OMP_CLAUSE_NUM_WORKERS_EXPR) (OMP_CLAUSE_VECTOR_LENGTH_EXPR): New macros. * tree-core.h: Update comments for OpenACC changes. (enum omp_clause_map_kind): Remove. (struct tree_omp_clause): Change type of map_kind member from enum omp_clause_map_kind to unsigned char. * tree-inline.c: Update comments for OpenACC changes. * tree-nested.c: Likewise. Include "gomp-constants.h". (convert_nonlocal_reference_stmt, convert_local_reference_stmt) (convert_tramp_reference_stmt, convert_gimple_call): Update for OpenACC changes. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND. * tree-pretty-print.c: Include "gomp-constants.h". (dump_omp_clause): Handle OMP_CLAUSE_DEVICE_RESIDENT, OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE__CACHE_, OMP_CLAUSE_GANG, OMP_CLAUSE_ASYNC, OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_WAIT, OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_INDEPENDENT. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. (dump_generic_node): Handle OACC_PARALLEL, OACC_KERNELS, OACC_DATA, OACC_HOST_DATA, OACC_DECLARE, OACC_UPDATE, OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_CACHE, OACC_LOOP. * tree-streamer-in.c: Include "gomp-constants.h". (unpack_ts_omp_clause_value_fields) Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND. * tree-streamer-out.c: Include "gomp-constants.h". (pack_ts_omp_clause_value_fields): Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. * tree.def (OACC_PARALLEL, OACC_KERNELS, OACC_DATA) (OACC_HOST_DATA, OACC_LOOP, OACC_CACHE, OACC_DECLARE) (OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_UPDATE): New tree codes. * tree.c (omp_clause_num_ops): Update accordingly. * tree.h (OMP_BODY, OMP_CLAUSES, OMP_LOOP_CHECK, OMP_CLAUSE_SIZE): Likewise. (OACC_PARALLEL_BODY, OACC_PARALLEL_CLAUSES, OACC_KERNELS_BODY) (OACC_KERNELS_CLAUSES, OACC_DATA_BODY, OACC_DATA_CLAUSES) (OACC_HOST_DATA_BODY, OACC_HOST_DATA_CLAUSES, OACC_CACHE_CLAUSES) (OACC_DECLARE_CLAUSES, OACC_ENTER_DATA_CLAUSES) (OACC_EXIT_DATA_CLAUSES, OACC_UPDATE_CLAUSES) (OACC_KERNELS_COMBINED, OACC_PARALLEL_COMBINED): New macros. * tree.h (OMP_CLAUSE_MAP_KIND): Cast it to enum gomp_map_kind. (OMP_CLAUSE_SET_MAP_KIND): New macro. * varpool.c (varpool_node::get_create): Consider flag_openacc next to flag_openmp. * config/i386/intelmic-offload.h: New file. * config/nvptx/offload.h: Likewise. gcc/ada/ * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8) (DEF_FUNCTION_TYPE_VAR_12): New macros. gcc/c-family/ * c.opt (fopenacc): New option. * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC. * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): New macros. * c-common.h (c_finish_oacc_wait): New prototype. * c-omp.c: Include "omp-low.h" and "gomp-constants.h". (c_finish_oacc_wait): New function. * c-pragma.c (oacc_pragmas): New variable. (c_pp_lookup_pragma, init_pragma): Handle it. * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT. (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC, PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE, PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN, PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE, PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE, PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE, PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST, PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS, PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT, PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY, PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN, PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT, PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE, PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF, PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR, PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT, PRAGMA_OACC_CLAUSE_WORKER. gcc/c/ * c-parser.c: Include "gomp-constants.h". (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND. (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE. (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT. (c_parser_omp_clause_name): Handle "auto", "async", "copy", "copyout", "create", "delete", "deviceptr", "gang", "host", "num_gangs", "num_workers", "present", "present_or_copy", "pcopy", "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout", "present_or_create", "pcreate", "seq", "self", "vector", "vector_length", "wait", "worker". (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK) (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK) (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK) (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros. (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_. (c_parser_oacc_wait_list, c_parser_oacc_data_clause) (c_parser_oacc_data_clause_deviceptr) (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers) (c_parser_oacc_clause_async, c_parser_oacc_clause_wait) (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses) (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels) (c_parser_oacc_enter_exit_data, c_parser_oacc_loop) (c_parser_oacc_parallel, c_parser_oacc_update) (c_parser_oacc_wait): New functions. * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels) (c_finish_oacc_data): New prototypes. * c-typeck.c: Include "gomp-constants.h". (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND. (c_finish_oacc_parallel, c_finish_oacc_kernels) (c_finish_oacc_data): New functions. (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT, OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's GOMP_MAP_FORCE_DEVICEPTR. gcc/cp/ * parser.c: Include "gomp-constants.h". (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND. (cp_parser_omp_construct, cp_parser_pragma): Handle PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL, PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT. (cp_parser_omp_clause_name): Handle "async", "copy", "copyout", "create", "delete", "deviceptr", "host", "num_gangs", "num_workers", "present", "present_or_copy", "pcopy", "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout", "present_or_create", "pcreate", "vector_length", "wait". (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK) (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK) (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK) (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros. (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_. (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr) (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list) (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs) (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async) (cp_parser_oacc_all_clauses, cp_parser_oacc_cache) (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data) (cp_parser_oacc_kernels, cp_parser_oacc_loop) (cp_parser_oacc_parallel, cp_parser_oacc_update) (cp_parser_oacc_wait): New functions. * cp-tree.h (finish_oacc_data, finish_oacc_kernels) (finish_oacc_parallel): New prototypes. * semantics.c: Include "gomp-constants.h". (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND. (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC, OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New functions. gcc/fortran/ * lang.opt (fopenacc): New option. * cpp.c (cpp_define_builtins): Conditionally define _OPENACC. * dump-parse-tree.c (show_omp_node): Split part of it into... (show_omp_clauses): ... this new function. (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA. (show_namespace): Update for OpenACC. * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8) (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN) (DEF_GOACC_BUILTIN_COMPILER): New macros. * types.def (BT_FN_VOID_INT_INT_VAR) (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR) (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR): New function types. * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP, ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL, ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA, ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP, ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA, ST_OACC_ROUTINE. (struct gfc_expr_list): New data type. (gfc_get_expr_list): New macro. (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR. (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE) (OMP_LIST_CACHE): New enumerators. (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr, vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr, wait_list, tile_list, async, gang, worker, vector, seq, independent, wait, par_auto, gang_static, and loc members. (struct gfc_namespace): Add oacc_declare_clauses member. (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS, EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA. (gfc_free_expr_list, gfc_resolve_oacc_directive) (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks) (gfc_resolve_oacc_blocks): New prototypes. * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and EXEC_OACC_PARALLEL_LOOP. * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait) (gfc_match_oacc_update, gfc_match_oacc_declare) (gfc_match_oacc_loop, gfc_match_oacc_host_data) (gfc_match_oacc_data, gfc_match_oacc_kernels) (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel) (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data) (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New prototypes. * openmp.c: Include "diagnostic.h" and "gomp-constants.h". (gfc_free_omp_clauses): Update for members added to struct gfc_omp_clauses. (gfc_match_omp_clauses): Change mask paramter to uint64_t. Add openacc parameter. (resolve_omp_clauses): Add openacc parameter. Update for OpenACC. (struct fortran_omp_context): Add is_openmp member. (gfc_resolve_omp_parallel_blocks): Initialize it. (gfc_resolve_do_iterator): Update for OpenACC. (gfc_resolve_omp_directive): Call resolve_omp_directive_inside_oacc_region. (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE) (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE) (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION) (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE) (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE) (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE) (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH) (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND) (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM) (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO) (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT) (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t. (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS) (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT) (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT) (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN) (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE) (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER) (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT) (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT) (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT) (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros. (gfc_match_omp_clauses): Handle those. (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES) (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES) (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES) (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES) (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES) (OACC_WAIT_CLAUSES): New macros. (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang) (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop) (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop) (gfc_match_oacc_kernels, gfc_match_oacc_data) (gfc_match_oacc_host_data, gfc_match_oacc_loop) (gfc_match_oacc_declare, gfc_match_oacc_update) (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data) (gfc_match_oacc_wait, gfc_match_oacc_cache) (gfc_match_oacc_routine, oacc_is_loop) (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr) (check_symbol_not_pointer, check_array_not_assumed) (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause) (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels) (omp_code_to_statement, oacc_code_to_statement) (resolve_oacc_directive_inside_omp_region) (resolve_omp_directive_inside_oacc_region) (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel) (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks) (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare) (gfc_resolve_oacc_directive): New functions. * parse.c (next_free): Update for OpenACC. Move some code into... (verify_token_free): ... this new function. (next_fixed): Update for OpenACC. Move some code into... (verify_token_fixed): ... this new function. (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA. (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP, ST_OACC_KERNELS_LOOP. (case_decl): Add ST_OACC_ROUTINE. (push_state, parse_critical_block, parse_progunit): Update for OpenACC. (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP, ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL, ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP, ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA, ST_OACC_ROUTINE. (verify_st_order, parse_spec): Handle ST_OACC_DECLARE. (parse_executable): Handle ST_OACC_PARALLEL_LOOP, ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL, ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA. (decode_oacc_directive, parse_oacc_structured_block) (parse_oacc_loop, is_oacc): New functions. * parse.h (struct gfc_state_data): Add oacc_declare_clauses member. (is_oacc): New prototype. * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA. (resolve_codes): Call gfc_resolve_oacc_declare. * scanner.c (openacc_flag, openacc_locus): New variables. (skip_free_comments): Update for OpenACC. Move some code into... (skip_omp_attribute): ... this new function. (skip_oacc_attribute): New function. (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC. * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA. * trans-decl.c (gfc_generate_function_code): Update for OpenACC. * trans-openmp.c: Include "gomp-constants.h". (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND. (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq, independent, wait_list, num_gangs_expr, num_workers_expr, vector_length_expr, vector, vector_expr, worker, worker_expr, gang, gang_expr members. (gfc_trans_omp_do): Handle EXEC_OACC_LOOP. (gfc_convert_expr_to_tree, gfc_trans_oacc_construct) (gfc_trans_oacc_executable_directive) (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive) (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions. * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC. * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare): New prototypes. * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT, EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA, EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA. * gfortran.texi: Update for OpenACC. * intrinsic.texi: Likewise. * invoke.texi: Likewise. gcc/lto/ * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): New macros. * lto.c: Include "gomp-constants.h". gcc/testsuite/ * lib/target-supports.exp (check_effective_target_fopenacc): New procedure. * g++.dg/goacc-gomp/goacc-gomp.exp: New file. * g++.dg/goacc/goacc.exp: Likewise. * gcc.dg/goacc-gomp/goacc-gomp.exp: Likewise. * gcc.dg/goacc/goacc.exp: Likewise. * gfortran.dg/goacc/goacc.exp: Likewise. * c-c++-common/cpp/openacc-define-1.c: New file. * c-c++-common/cpp/openacc-define-2.c: Likewise. * c-c++-common/cpp/openacc-define-3.c: Likewise. * c-c++-common/goacc-gomp/nesting-1.c: Likewise. * c-c++-common/goacc-gomp/nesting-fail-1.c: Likewise. * c-c++-common/goacc/acc_on_device-2-off.c: Likewise. * c-c++-common/goacc/acc_on_device-2.c: Likewise. * c-c++-common/goacc/asyncwait-1.c: Likewise. * c-c++-common/goacc/cache-1.c: Likewise. * c-c++-common/goacc/clauses-fail.c: Likewise. * c-c++-common/goacc/collapse-1.c: Likewise. * c-c++-common/goacc/data-1.c: Likewise. * c-c++-common/goacc/data-2.c: Likewise. * c-c++-common/goacc/data-clause-duplicate-1.c: Likewise. * c-c++-common/goacc/deviceptr-1.c: Likewise. * c-c++-common/goacc/deviceptr-2.c: Likewise. * c-c++-common/goacc/deviceptr-3.c: Likewise. * c-c++-common/goacc/if-clause-1.c: Likewise. * c-c++-common/goacc/if-clause-2.c: Likewise. * c-c++-common/goacc/kernels-1.c: Likewise. * c-c++-common/goacc/loop-1.c: Likewise. * c-c++-common/goacc/loop-private-1.c: Likewise. * c-c++-common/goacc/nesting-1.c: Likewise. * c-c++-common/goacc/nesting-data-1.c: Likewise. * c-c++-common/goacc/nesting-fail-1.c: Likewise. * c-c++-common/goacc/parallel-1.c: Likewise. * c-c++-common/goacc/pcopy.c: Likewise. * c-c++-common/goacc/pcopyin.c: Likewise. * c-c++-common/goacc/pcopyout.c: Likewise. * c-c++-common/goacc/pcreate.c: Likewise. * c-c++-common/goacc/pragma_context.c: Likewise. * c-c++-common/goacc/present-1.c: Likewise. * c-c++-common/goacc/reduction-1.c: Likewise. * c-c++-common/goacc/reduction-2.c: Likewise. * c-c++-common/goacc/reduction-3.c: Likewise. * c-c++-common/goacc/reduction-4.c: Likewise. * c-c++-common/goacc/sb-1.c: Likewise. * c-c++-common/goacc/sb-2.c: Likewise. * c-c++-common/goacc/sb-3.c: Likewise. * c-c++-common/goacc/update-1.c: Likewise. * gcc.dg/goacc/acc_on_device-1.c: Likewise. * gfortran.dg/goacc/acc_on_device-1.f95: Likewise. * gfortran.dg/goacc/acc_on_device-2-off.f95: Likewise. * gfortran.dg/goacc/acc_on_device-2.f95: Likewise. * gfortran.dg/goacc/assumed.f95: Likewise. * gfortran.dg/goacc/asyncwait-1.f95: Likewise. * gfortran.dg/goacc/asyncwait-2.f95: Likewise. * gfortran.dg/goacc/asyncwait-3.f95: Likewise. * gfortran.dg/goacc/asyncwait-4.f95: Likewise. * gfortran.dg/goacc/branch.f95: Likewise. * gfortran.dg/goacc/cache-1.f95: Likewise. * gfortran.dg/goacc/coarray.f95: Likewise. * gfortran.dg/goacc/continuation-free-form.f95: Likewise. * gfortran.dg/goacc/cray.f95: Likewise. * gfortran.dg/goacc/critical.f95: Likewise. * gfortran.dg/goacc/data-clauses.f95: Likewise. * gfortran.dg/goacc/data-tree.f95: Likewise. * gfortran.dg/goacc/declare-1.f95: Likewise. * gfortran.dg/goacc/enter-exit-data.f95: Likewise. * gfortran.dg/goacc/fixed-1.f: Likewise. * gfortran.dg/goacc/fixed-2.f: Likewise. * gfortran.dg/goacc/fixed-3.f: Likewise. * gfortran.dg/goacc/fixed-4.f: Likewise. * gfortran.dg/goacc/host_data-tree.f95: Likewise. * gfortran.dg/goacc/if.f95: Likewise. * gfortran.dg/goacc/kernels-tree.f95: Likewise. * gfortran.dg/goacc/list.f95: Likewise. * gfortran.dg/goacc/literal.f95: Likewise. * gfortran.dg/goacc/loop-1.f95: Likewise. * gfortran.dg/goacc/loop-2.f95: Likewise. * gfortran.dg/goacc/loop-3.f95: Likewise. * gfortran.dg/goacc/loop-tree-1.f90: Likewise. * gfortran.dg/goacc/omp.f95: Likewise. * gfortran.dg/goacc/parallel-kernels-clauses.f95: Likewise. * gfortran.dg/goacc/parallel-kernels-regions.f95: Likewise. * gfortran.dg/goacc/parallel-tree.f95: Likewise. * gfortran.dg/goacc/parameter.f95: Likewise. * gfortran.dg/goacc/private-1.f95: Likewise. * gfortran.dg/goacc/private-2.f95: Likewise. * gfortran.dg/goacc/private-3.f95: Likewise. * gfortran.dg/goacc/pure-elemental-procedures.f95: Likewise. * gfortran.dg/goacc/reduction-2.f95: Likewise. * gfortran.dg/goacc/reduction.f95: Likewise. * gfortran.dg/goacc/routine-1.f90: Likewise. * gfortran.dg/goacc/routine-2.f90: Likewise. * gfortran.dg/goacc/sentinel-free-form.f95: Likewise. * gfortran.dg/goacc/several-directives.f95: Likewise. * gfortran.dg/goacc/sie.f95: Likewise. * gfortran.dg/goacc/subarrays.f95: Likewise. * gfortran.dg/gomp/map-1.f90: Likewise. * gfortran.dg/openacc-define-1.f90: Likewise. * gfortran.dg/openacc-define-2.f90: Likewise. * gfortran.dg/openacc-define-3.f90: Likewise. * g++.dg/gomp/block-1.C: Update for changed compiler output. * g++.dg/gomp/block-2.C: Likewise. * g++.dg/gomp/block-3.C: Likewise. * g++.dg/gomp/block-5.C: Likewise. * g++.dg/gomp/target-1.C: Likewise. * g++.dg/gomp/target-2.C: Likewise. * g++.dg/gomp/taskgroup-1.C: Likewise. * g++.dg/gomp/teams-1.C: Likewise. * gcc.dg/cilk-plus/jump-openmp.c: Likewise. * gcc.dg/cilk-plus/jump.c: Likewise. * gcc.dg/gomp/block-1.c: Likewise. * gcc.dg/gomp/block-10.c: Likewise. * gcc.dg/gomp/block-2.c: Likewise. * gcc.dg/gomp/block-3.c: Likewise. * gcc.dg/gomp/block-4.c: Likewise. * gcc.dg/gomp/block-5.c: Likewise. * gcc.dg/gomp/block-6.c: Likewise. * gcc.dg/gomp/block-7.c: Likewise. * gcc.dg/gomp/block-8.c: Likewise. * gcc.dg/gomp/block-9.c: Likewise. * gcc.dg/gomp/target-1.c: Likewise. * gcc.dg/gomp/target-2.c: Likewise. * gcc.dg/gomp/taskgroup-1.c: Likewise. * gcc.dg/gomp/teams-1.c: Likewise. include/ * gomp-constants.h: New file. libgomp/ * Makefile.am (search_path): Add $(top_srcdir)/../include. (libgomp_la_SOURCES): Add splay-tree.c, libgomp-plugin.c, oacc-parallel.c, oacc-host.c, oacc-init.c, oacc-mem.c, oacc-async.c, oacc-plugin.c, oacc-cuda.c. [USE_FORTRAN] (libgomp_la_SOURCES): Add openacc.f90. Include $(top_srcdir)/plugin/Makefrag.am. (nodist_libsubinclude_HEADERS): Add openacc.h. [USE_FORTRAN] (nodist_finclude_HEADERS): Add openacc_lib.h, openacc.f90, openacc.mod, openacc_kinds.mod. (omp_lib.mod): Generalize into... (%.mod): ... this new rule. (openacc_kinds.mod, openacc.mod): New rules. * plugin/configfrag.ac: New file. * configure.ac: Move plugin/offloading support into it. Include it. Instantiate testsuite/libgomp-test-support.pt.exp. * plugin/Makefrag.am: New file. * testsuite/Makefile.am (OFFLOAD_TARGETS) (OFFLOAD_ADDITIONAL_OPTIONS, OFFLOAD_ADDITIONAL_LIB_PATHS): Don't export. (libgomp-test-support.exp): New rule. (all-local): Depend on it. * Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * config.h.in: Likewise. * configure: Likewise. * configure.tgt: Harden shell syntax. * env.c: Include "oacc-int.h". (parse_acc_device_type): New function. (gomp_debug_var, goacc_device_type, goacc_device_num): New variables. (initialize_env): Initialize those. Call goacc_runtime_initialize. * error.c (gomp_vdebug, gomp_debug, gomp_vfatal): New functions. (gomp_fatal): Call gomp_vfatal. * libgomp.h: Include "libgomp-plugin.h" and <stdarg.h>. (gomp_debug_var, goacc_device_type, goacc_device_num, gomp_vdebug) (gomp_debug, gomp_verror, gomp_vfatal, gomp_init_targets_once) (splay_tree_node, splay_tree, splay_tree_key) (struct target_mem_desc, struct splay_tree_key_s) (struct gomp_memory_mapping, struct acc_dispatch_t) (struct gomp_device_descr, gomp_acc_insert_pointer) (gomp_acc_remove_pointer, target_mem_desc, gomp_copy_from_async) (gomp_unmap_vars, gomp_init_device, gomp_init_tables) (gomp_free_memmap, gomp_fini_device): New declarations. (gomp_vdebug, gomp_debug): New macros. Include "splay-tree.h". * libgomp.map (OACC_2.0): New symbol version. Use for acc_get_num_devices, acc_get_num_devices_h_, acc_set_device_type, acc_set_device_type_h_, acc_get_device_type, acc_get_device_type_h_, acc_set_device_num, acc_set_device_num_h_, acc_get_device_num, acc_get_device_num_h_, acc_async_test, acc_async_test_h_, acc_async_test_all, acc_async_test_all_h_, acc_wait, acc_wait_h_, acc_wait_async, acc_wait_async_h_, acc_wait_all, acc_wait_all_h_, acc_wait_all_async, acc_wait_all_async_h_, acc_init, acc_init_h_, acc_shutdown, acc_shutdown_h_, acc_on_device, acc_on_device_h_, acc_malloc, acc_free, acc_copyin, acc_copyin_32_h_, acc_copyin_64_h_, acc_copyin_array_h_, acc_present_or_copyin, acc_present_or_copyin_32_h_, acc_present_or_copyin_64_h_, acc_present_or_copyin_array_h_, acc_create, acc_create_32_h_, acc_create_64_h_, acc_create_array_h_, acc_present_or_create, acc_present_or_create_32_h_, acc_present_or_create_64_h_, acc_present_or_create_array_h_, acc_copyout, acc_copyout_32_h_, acc_copyout_64_h_, acc_copyout_array_h_, acc_delete, acc_delete_32_h_, acc_delete_64_h_, acc_delete_array_h_, acc_update_device, acc_update_device_32_h_, acc_update_device_64_h_, acc_update_device_array_h_, acc_update_self, acc_update_self_32_h_, acc_update_self_64_h_, acc_update_self_array_h_, acc_map_data, acc_unmap_data, acc_deviceptr, acc_hostptr, acc_is_present, acc_is_present_32_h_, acc_is_present_64_h_, acc_is_present_array_h_, acc_memcpy_to_device, acc_memcpy_from_device, acc_get_current_cuda_device, acc_get_current_cuda_context, acc_get_cuda_stream, acc_set_cuda_stream. (GOACC_2.0): New symbol version. Use for GOACC_data_end, GOACC_data_start, GOACC_enter_exit_data, GOACC_parallel, GOACC_update, GOACC_wait, GOACC_get_thread_num, GOACC_get_num_threads. (GOMP_PLUGIN_1.0): New symbol version. Use for GOMP_PLUGIN_malloc, GOMP_PLUGIN_malloc_cleared, GOMP_PLUGIN_realloc, GOMP_PLUGIN_debug, GOMP_PLUGIN_error, GOMP_PLUGIN_fatal, GOMP_PLUGIN_async_unmap_vars, GOMP_PLUGIN_acc_thread. * libgomp.texi: Update for OpenACC changes, and GOMP_DEBUG environment variable. * libgomp_g.h (GOACC_data_start, GOACC_data_end) (GOACC_enter_exit_data, GOACC_parallel, GOACC_update, GOACC_wait) (GOACC_get_num_threads, GOACC_get_thread_num): New declarations. * splay-tree.h (splay_tree_lookup, splay_tree_insert) (splay_tree_remove): New declarations. (rotate_left, rotate_right, splay_tree_splay, splay_tree_insert) (splay_tree_remove, splay_tree_lookup): Move into... * splay-tree.c: ... this new file. * target.c: Include "oacc-plugin.h", "oacc-int.h", <assert.h>. (splay_tree_node, splay_tree, splay_tree_key) (struct target_mem_desc, struct splay_tree_key_s) (struct gomp_device_descr): Don't declare. (num_devices_openmp): New variable. (gomp_get_num_devices ): Use it. (gomp_init_targets_once): New function. (gomp_get_num_devices ): Use it. (get_kind, gomp_copy_from_async, gomp_free_memmap) (gomp_fini_device, gomp_register_image_for_device): New functions. (gomp_map_vars): Add devaddrs parameter. (gomp_update): Add mm parameter. (gomp_init_device): Move most of it into... (gomp_init_tables): ... this new function. (gomp_register_images_for_device): Remove function. (splay_compare, gomp_map_vars, gomp_unmap_vars, gomp_init_device): Make them hidden instead of static. (gomp_map_vars_existing, gomp_map_vars, gomp_unmap_vars) (gomp_update, gomp_init_device, GOMP_target, GOMP_target_data) (GOMP_target_end_data, GOMP_target_update) (gomp_load_plugin_for_device, gomp_target_init): Update for OpenACC changes. * oacc-async.c: New file. * oacc-cuda.c: Likewise. * oacc-host.c: Likewise. * oacc-init.c: Likewise. * oacc-int.h: Likewise. * oacc-mem.c: Likewise. * oacc-parallel.c: Likewise. * oacc-plugin.c: Likewise. * oacc-plugin.h: Likewise. * oacc-ptx.h: Likewise. * openacc.f90: Likewise. * openacc.h: Likewise. * openacc_lib.h: Likewise. * plugin/plugin-host.c: Likewise. * plugin/plugin-nvptx.c: Likewise. * libgomp-plugin.c: Likewise. * libgomp-plugin.h: Likewise. * libgomp_target.h: Remove file after merging content into the former file. Update all users. * testsuite/lib/libgomp.exp: Load libgomp-test-support.exp. (offload_targets_s, offload_targets_s_openacc): New variables. (check_effective_target_openacc_nvidia_accel_present) (check_effective_target_openacc_nvidia_accel_selected): New procedures. (libgomp_init): Update for OpenACC changes. * testsuite/libgomp-test-support.exp.in: New file. * testsuite/libgomp.oacc-c++/c++.exp: Likewise. * testsuite/libgomp.oacc-c/c.exp: Likewise. * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise. * testsuite/libgomp.oacc-c-c++-common/abort-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/abort-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/abort-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/cache-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/collapse-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/context-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/context-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/context-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/context-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/data-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/if-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-empty.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-12.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-19.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-31.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-32.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-33.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-37.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-38.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-41.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-45.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-46.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-49.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-5.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-50.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-51.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-55.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-56.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-59.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-6.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-60.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-61.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-66.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-69.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-7.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-72.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-74.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-84.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-86.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-87.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-88.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-89.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-90.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-91.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-92.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/nested-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/nested-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/offset-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/parallel-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/parallel-empty.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/pointer-align-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/present-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/subr.h: Likewise. * testsuite/libgomp.oacc-c-c++-common/subr.ptx: Likewise. * testsuite/libgomp.oacc-c-c++-common/timer.h: Likewise. * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/update-1.c: Likewise. * testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/abort-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise. * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise. * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise. * testsuite/libgomp.oacc-fortran/collapse-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/collapse-3.f90: Likewise. * testsuite/libgomp.oacc-fortran/collapse-4.f90: Likewise. * testsuite/libgomp.oacc-fortran/collapse-5.f90: Likewise. * testsuite/libgomp.oacc-fortran/collapse-6.f90: Likewise. * testsuite/libgomp.oacc-fortran/collapse-7.f90: Likewise. * testsuite/libgomp.oacc-fortran/collapse-8.f90: Likewise. * testsuite/libgomp.oacc-fortran/data-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/data-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/data-3.f90: Likewise. * testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/data-4.f90: Likewise. * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise. * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise. * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise. * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise. * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise. * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise. * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise. * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise. * testsuite/libgomp.oacc-fortran/lib-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/lib-10.f90: Likewise. * testsuite/libgomp.oacc-fortran/lib-2.f: Likewise. * testsuite/libgomp.oacc-fortran/lib-3.f: Likewise. * testsuite/libgomp.oacc-fortran/lib-4.f90: Likewise. * testsuite/libgomp.oacc-fortran/lib-5.f90: Likewise. * testsuite/libgomp.oacc-fortran/lib-6.f90: Likewise. * testsuite/libgomp.oacc-fortran/lib-7.f90: Likewise. * testsuite/libgomp.oacc-fortran/lib-8.f90: Likewise. * testsuite/libgomp.oacc-fortran/map-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Likewise. * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/pointer-align-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/pset-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise. * testsuite/libgomp.oacc-fortran/routine-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/routine-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/routine-3.f90: Likewise. * testsuite/libgomp.oacc-fortran/routine-4.f90: Likewise. * testsuite/libgomp.oacc-fortran/subarrays-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/subarrays-2.f90: Likewise. liboffloadmic/ * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_get_name) (GOMP_OFFLOAD_get_caps, GOMP_OFFLOAD_fini_device): New functions. Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com> Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com> Co-Authored-By: Dmitry Bocharnikov <dmitry.b@samsung.com> Co-Authored-By: Evgeny Gavrin <e.gavrin@samsung.com> Co-Authored-By: Ilmir Usmanov <i.usmanov@samsung.com> Co-Authored-By: Jakub Jelinek <jakub@redhat.com> Co-Authored-By: James Norris <jnorris@codesourcery.com> Co-Authored-By: Julian Brown <julian@codesourcery.com> Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com> Co-Authored-By: Tobias Burnus <burnus@net-b.de> Co-Authored-By: Tom de Vries <tom@codesourcery.com> From-SVN: r219682
2015-01-15 21:11:12 +01:00
2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
Bernd Schmidt <bernds@codesourcery.com>
James Norris <jnorris@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
Ilmir Usmanov <i.usmanov@samsung.com>
Jakub Jelinek <jakub@redhat.com>
* c.opt (fopenacc): New option.
* c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
* c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
New macros.
* c-common.h (c_finish_oacc_wait): New prototype.
* c-omp.c: Include "omp-low.h" and "gomp-constants.h".
(c_finish_oacc_wait): New function.
* c-pragma.c (oacc_pragmas): New variable.
(c_pp_lookup_pragma, init_pragma): Handle it.
* c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
(enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
PRAGMA_OACC_CLAUSE_WORKER.
2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
* c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
for the new option fstack-protector_explicit.
* c-common.c (c_common_attribute_table): Add stack_protect attribute.
(handle_stack_protect_attribute): New function.
2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
* c.opt: New option -Warray-bounds=.
2015-01-09 Michael Collison <michael.collison@linaro.org>
* array-notation-common.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
* c-ada-spec.c: Ditto.
* c-cilkplus.c: Ditto.
* c-common.c: Include input.h due to flattening of tree.h.
Define macro GCC_C_COMMON_C.
* c-common.h: Flatten tree.h header files into c-common.h.
Remove include of tree-core.h.
* c-cppbuiltin.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-dump.c: Ditto.
* c-format.c: Flatten tree.h header files into c-common.h.
* c-cppbuiltin.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-dump.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-format.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, inchash.h and real.h due to
flattening of tree.h.
* c-gimplify.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* cilk.c: Ditto.
* c-lex.c: Ditto.
* c-omp.c: Ditto.
* c-opts.c: Ditto.
* c-pch.c: Ditto.
* c-ppoutput.c: Ditto.
* c-pragma.c: Ditto.
* c-pretty-print.c: Ditto.
* c-semantics.c: Ditto.
* c-ubsan.c: Ditto.
* stub-objc.c: Ditto.
2015-01-08 Jason Merrill <jason@redhat.com>
* c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
do_ubsan_in_current_function.
(ubsan_maybe_instrument_reference_or_call): Likewise.
* c-ubsan.h: Declare it.
2015-01-08 Mike Stump <mikestump@comcast.net>
* c-common.c (c_common_attribute_table): Add no_sanitize_thread.
2015-01-07 Marek Polacek <polacek@redhat.com>
PR c/64440
* c-common.c (c_fully_fold_internal): Warn for division and modulo
if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
PR c++/31397
* c.opt (Wsuggest-override): New option.
2015-01-05 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2015-01-05 Marek Polacek <polacek@redhat.com>
PR c/64423
* c-common.c (warn_array_subscript_with_type_char): Add location_t
parameter. Use it.
* c-common.h (warn_array_subscript_with_type_char): Update
declaration.
2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
* c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
Control macro with flag_sized_deallocation.
2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
* c.opt (Wdiscarded-array-qualifiers): New option.
re PR preprocessor/63831 (r217292 causes segfaults with -MM) PR preprocessor/63831 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute and __has_cpp_attribute here. * c-ppoutput.c (init_pp_output): Set cb->has_attribute to c_common_has_attribute. * c-common.h (c_common_has_attribute): New prototype. * c-lex.c (init_c_lex): Set cb->has_attribute to c_common_has_attribute instead of cb_has_attribute. (get_token_no_padding): New function. (cb_has_attribute): Renamed to ... (c_common_has_attribute): ... this. No longer static. Use get_token_no_padding, require ()s, don't build TREE_LIST unnecessarily, fix up formatting, adjust diagnostics, call init_attributes. * directives.c (lex_macro_node): Remove __has_attribute__ handling. * internal.h (struct spec_node): Remove n__has_attribute__ field. (struct lexer_state): Remove in__has_attribute__ field. * macro.c (_cpp_builtin_macro_text): Handle BT_HAS_ATTRIBUTE. * identifiers.c (_cpp_init_hashtable): Remove __has_attribute__ handling. * init.c (builtin_array): Add __has_attribute and __has_cpp_attribute. (cpp_init_special_builtins): Don't initialize __has_attribute or __has_cpp_attribute if CLK_ASM or pfile->cb.has_attribute is NULL. * traditional.c (enum ls): Remove ls_has_attribute, ls_has_attribute_close. (_cpp_scan_out_logical_line): Remove __has_attribute__ handling. * include/cpplib.h (enum cpp_builtin_type): Add BT_HAS_ATTRIBUTE. * pch.c (cpp_read_state): Remove __has_attribute__ handling. * expr.c (eval_token): Likewise. (parse_has_attribute): Removed. * c-c++-common/cpp/pr63831-1.c: New test. * c-c++-common/cpp/pr63831-2.c: New test. From-SVN: r218948
2014-12-19 13:20:58 +01:00
2014-12-19 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/63831
* c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
and __has_cpp_attribute here.
* c-ppoutput.c (init_pp_output): Set cb->has_attribute to
c_common_has_attribute.
* c-common.h (c_common_has_attribute): New prototype.
* c-lex.c (init_c_lex): Set cb->has_attribute to
c_common_has_attribute instead of cb_has_attribute.
(get_token_no_padding): New function.
(cb_has_attribute): Renamed to ...
(c_common_has_attribute): ... this. No longer static. Use
get_token_no_padding, require ()s, don't build TREE_LIST
unnecessarily, fix up formatting, adjust diagnostics, call
init_attributes.
2014-12-15 Jason Merrill <jason@redhat.com>
* c.opt (-fsized-deallocation, -Wc++14-compat): New.
(-Wsized-deallocation): New.
* c-opts.c (c_common_post_options): -fsized-deallocation defaults
to on in C++14 and up.
2014-12-11 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
we aren't complaining about VLAs.
2014-12-06 Marek Polacek <polacek@redhat.com>
PR tree-optimization/64183
* c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
shift-expression if it is integer_type_node. Use types_compatible_p.
gimple-expr.h (create_tmp_var_raw, [...]): Add default NULL value to last argument. * gimple-expr.h (create_tmp_var_raw, create_tmp_var, create_tmp_reg): Add default NULL value to last argument. * tree-ssanames.h (make_ssa_name, copy_ssa_name): Likewise. * gimple-low.c (lower_builtin_posix_memalign): Remove NULL last argument from create_tmp_var_raw, create_tmp_var, create_tmp_reg, make_ssa_name and copy_ssa_name calls. * tree-ssa-strlen.c (get_string_length): Likewise. * tree-emutls.c (gen_emutls_addr, lower_emutls_1): Likewise. * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise. * tree-vect-slp.c (vect_get_constant_vectors): Likewise. * ipa-prop.c (ipa_modify_call_arguments): Likewise. * tree-ssa-forwprop.c (simplify_rotate): Likewise. * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Likewise. * asan.c (build_shadow_mem_access, maybe_create_ssa_name, maybe_cast_to_ptrmode, asan_expand_check_ifn): Likewise. * tsan.c (instrument_expr, instrument_builtin_call, instrument_func_entry): Likewise. * varpool.c (add_new_static_var): Likewise. * tree-loop-distribution.c (generate_memset_builtin): Likewise. * gimplify.c (internal_get_tmp_var, gimplify_return_expr, gimplify_modify_expr_to_memcpy, gimplify_modify_expr_to_memset, gimplify_init_ctor_eval_range, gimplify_init_constructor, gimplify_omp_atomic, gimplify_expr): Likewise. * gimple-builder.c (build_assign, build_type_cast): Likewise. * tree-vect-loop-manip.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge, vect_loop_versioning): Likewise. * tree-if-conv.c (version_loop_for_if_conversion): Likewise. * gimple-match-head.c (maybe_push_res_to_seq): Likewise. * tree-vect-patterns.c (vect_handle_widen_op_by_const, vect_recog_widen_mult_pattern, vect_operation_fits_smaller_type, vect_recog_over_widening_pattern): Likewise. * tree-sra.c (build_ref_for_offset, create_access_replacement): Likewise. * tree-cfg.c (make_blocks): Likewise. * tree-eh.c (lower_eh_constructs_2, lower_resx, lower_eh_dispatch): Likewise. * tree-ssa-propagate.c (update_call_from_tree): Likewise. * tree-complex.c (get_component_ssa_name, expand_complex_div_wide): Likewise. * tree-ssa-math-opts.c (build_and_insert_cast): Likewise. * tree-tailcall.c (update_accumulator_with_ops): Likewise. * tree-predcom.c (initialize_root_vars, initialize_root_vars_lm, execute_load_motion, reassociate_to_the_same_stmt): Likewise. * tree-ssa-reassoc.c (build_and_add_sum, optimize_range_tests_to_bit_test, update_ops, maybe_optimize_range_tests, rewrite_expr_tree, linearize_expr, negate_value, repropagate_negates): Likewise. * tree-vect-loop.c (vect_is_simple_reduction_1, vect_create_epilog_for_reduction): Likewise. * ipa-split.c (split_function): Likewise. * tree-inline.c (remap_ssa_name, setup_one_parameter, declare_return_variable, tree_function_versioning): Likewise. * tree-cfgcleanup.c (fixup_noreturn_call): Likewise. * cfgexpand.c (update_alias_info_with_stack_vars, expand_used_vars): Likewise. * tree-ssa-phiopt.c (conditional_replacement, abs_replacement, neg_replacement): Likewise. * gimplify-me.c (force_gimple_operand_1, gimple_regimplify_operands): Likewise. * tree-vrp.c (simplify_truth_ops_using_ranges, simplify_float_conversion_using_ranges, simplify_internal_call_using_ranges): Likewise. * tree-switch-conversion.c (emit_case_bit_tests, build_one_array, build_arrays, gen_def_assigns): Likewise. * gimple-fold.c (gimple_fold_builtin_memory_op, gimple_fold_builtin_strcat, gimple_fold_call, gimple_build): Likewise. * tree-vect-generic.c (expand_vector_divmod, optimize_vector_constructor): Likewise. * ubsan.c (ubsan_encode_value, ubsan_expand_null_ifn, ubsan_expand_objsize_ifn, instrument_si_overflow, instrument_bool_enum_load, instrument_nonnull_arg): Likewise. * tree-outof-ssa.c (insert_backedge_copies): Likewise. * tree-ssa-loop-manip.c (create_iv, tree_transform_and_unroll_loop): Likewise. * omp-low.c (scan_omp_parallel, lower_rec_simd_input_clauses, lower_rec_input_clauses, lower_lastprivate_clauses, expand_parallel_call, expand_omp_for_static_chunk, expand_omp_atomic_pipeline, expand_omp_target, maybe_add_implicit_barrier_cancel, lower_omp_single_simple, lower_omp_critical, lower_omp_for, task_copyfn_copy_decl, lower_depend_clauses, lower_omp_target, lower_omp_1, ipa_simd_modify_stmt_ops, simd_clone_adjust): Likewise. * tree-parloops.c (take_address_of, create_phi_for_local_result, create_call_for_reduction_1, separate_decls_in_region, create_parallel_loop): Likewise. * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence, handle_scalar_deps_crossing_scop_limits): Likewise. * trans-mem.c (lower_transaction, build_tm_load, build_tm_store, expand_assign_tm, expand_call_tm, expand_transaction, ipa_tm_insert_gettmclone_call): Likewise. * tree-vect-data-refs.c (bump_vector_ptr, vect_setup_realignment): Likewise. * tree-vect-stmts.c (vect_init_vector, vectorizable_mask_load_store, vectorizable_call, vectorizable_simd_clone_call, vectorizable_conversion, vectorizable_store, permute_vec_elements, vectorizable_load): Likewise. c/ * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign, c_finish_stmt_expr): Remove NULL last argument from create_tmp_var_raw and create_tmp_var calls. * c-array-notation.c (fix_builtin_array_notation_fn, build_array_notation_expr, fix_conditional_array_notations_1, fix_array_notation_expr, fix_array_notation_call_expr): Likewise. cp/ * cp-gimplify.c (cxx_omp_clause_apply_fn): Remove NULL last argument from create_tmp_var calls. c-family/ * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL last argument from create_tmp_var_raw and create_tmp_var calls. * cilk.c (gimplify_cilk_spawn): Likewise. * c-omp.c (c_finish_omp_atomic): Likewise. fortran/ * trans-openmp.c (gfc_omp_finish_clause, gfc_trans_omp_array_reduction_or_udr, gfc_trans_omp_atomic): Remove NULL last argument from create_tmp_var_raw and create_tmp_var calls. From-SVN: r218181
2014-11-29 12:35:30 +01:00
2014-11-29 Jakub Jelinek <jakub@redhat.com>
* c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
last argument from create_tmp_var_raw and create_tmp_var calls.
* cilk.c (gimplify_cilk_spawn): Likewise.
* c-omp.c (c_finish_omp_atomic): Likewise.
2014-11-28 Marek Polacek <polacek@redhat.com>
* c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
instead of unsigned_type_node.
2014-11-28 Marek Polacek <polacek@redhat.com>
PR c/63862
* c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
to op1_utype.
* c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
expression to unsigned_type_node.
PR debug/38757 gcc does not emit DW_LANG_C99. For C and C++ add the language standard version in use to lang_hooks.name. Change users of lang_hook.name to check with new functions lang_GNU_C or lang_GNU_CXX. In dwarf2out.c output the DW_LANG_C version from the lang_hooks.name and merge any LTO TRANSLATION_UNIT_LANGUAGE found. Adds two testcases to dwarf2.exp to check the right DWARF DW_AT_language is set on the compile_unit depending on the -std=c89 or -std=c99 setting. gcc/c-family/ChangeLog PR debug/38757 * c-opts.c (set_std_c89): Set lang_hooks.name. (set_std_c99): Likewise. (set_std_c11): Likewise. (set_std_cxx98): Likewise. (set_std_cxx11): Likewise. (set_std_cxx14): Likewise. (set_std_cxx1z): Likewise. gcc/ChangeLog PR debug/38757 * config/avr/avr-c.c (avr_cpu_cpp_builtins): Use lang_GNU_C. * config/darwin.c (darwin_file_end): Use lang_GNU_CXX. (darwin_override_options): Likewise. * config/ia64/ia64.c (ia64_struct_retval_addr_is_first_parm_p): Likewise. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Likewise. * dbxout.c (get_lang_number): Likewise. (dbxout_type): Likewise. (dbxout_symbol_location): Likewise. * dwarf2out.c (add_prototyped_attribute): Add DW_AT_prototype also for DW_LANG_{C,C99,ObjC}. (highest_c_language): New function. (gen_compile_unit_die): Call highest_c_language to merge LTO TRANSLATION_UNIT_LANGUAGE. Use strncmp language_string to determine if DW_LANG_C99 or DW_LANG_C89 should be returned. * fold-const.c (fold_cond_expr_with_comparison): Use lang_GNU_CXX. * langhooks.h (struct lang_hooks): Add version comment to name. (lang_GNU_C): New function declaration. (lang_GNU_CXX): Likewise. * langhooks.c (lang_GNU_C): New function. (lang_GNU_CXX): Likewise. * vmsdbgout.c (vmsdbgout_init): Use lang_GNU_C and lang_GNU_CXX. gcc/testsuite/ChangeLog PR debug/38757 * gcc.dg/debug/dwarf2/lang-c89.c: New test. * gcc.dg/debug/dwarf2/lang-c99.c: Likewise. From-SVN: r217934
2014-11-21 17:00:06 +01:00
2014-11-20 Mark Wielaard <mjw@redhat.com>
PR debug/38757
* c-opts.c (set_std_c89): Set lang_hooks.name.
(set_std_c99): Likewise.
(set_std_c11): Likewise.
(set_std_cxx98): Likewise.
(set_std_cxx11): Likewise.
(set_std_cxx14): Likewise.
(set_std_cxx1z): Likewise.
2014-11-21 Jakub Jelinek <jakub@redhat.com>
PR target/63764
* c-common.h (convert_vector_to_pointer_for_subscript): Change
return type to bool.
* c-common.c: Include gimple-expr.h.
(convert_vector_to_pointer_for_subscript): Change return type to
bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
and copy it into a TARGET_EXPR and use that instead of *vecp
directly.
Merger of git branch "gimple-classes-v2-option-3" gcc/ChangeLog: Merger of git branch "gimple-classes-v2-option-3". * ChangeLog.gimple-classes: New. * coretypes.h (struct gcond): Add forward decl. (struct gdebug): Likewise. (struct ggoto): Likewise. (struct glabel): Likewise. (struct gswitch): Likewise. (struct gassign): Likewise. (struct gasm): Likewise. (struct gcall): Likewise. (struct gtransaction): Likewise. (struct greturn): Likewise. (struct gbind): Likewise. (struct gcatch): Likewise. (struct geh_filter): Likewise. (struct geh_mnt): Likewise. (struct geh_else): Likewise. (struct gresx): Likewise. (struct geh_dispatch): Likewise. (struct gphi): Likewise. (struct gtry): Likewise. (struct gomp_atomic_load): Likewise. (struct gomp_atomic_store): Likewise. (struct gomp_continue): Likewise. (struct gomp_critical): Likewise. (struct gomp_for): Likewise. (struct gomp_parallel): Likewise. (struct gomp_task): Likewise. (struct gomp_sections): Likewise. (struct gomp_single): Likewise. (struct gomp_target): Likewise. (struct gomp_teams): Likewise. * doc/gimple.texi (Class hierarchy of GIMPLE statements): Update for renaming of gimple subclasses. * gdbhooks.py: Update. * gimple-iterator.c (gsi_for_phi): New. (gsi_start_phis): Strengthen return type from gimple_stmt_iterator to gphi_iterator. * gimple-iterator.h (struct gphi_iterator): New subclass of gimple_stmt_iterator. (gsi_for_phi): New prototype. (gsi_start_phis): Strengthen return type from gimple_stmt_iterator to gphi_iterator. (gsi_next_nonvirtual_phi): Strengthen param from gimple_stmt_iterator * to gphi_iterator *, and local "phi" from gimple to gphi *. * gsstruct.def: Update for renamings of classes. * gimple.c (gimple_build_return): Strengthen return type from gimple to greturn *. (gimple_call_reset_alias_info): Strengthen param to gcall *. (gimple_build_call_1): Strengthen return type from gimple to gcall *. (gimple_build_call_vec): Likewise. (gimple_build_call): Likewise. (gimple_build_call_valist): Likewise. (gimple_build_call_internal_1): Likewise. (gimple_build_call_internal): Likewise. (gimple_build_call_internal_vec): Likewise. (gimple_build_call_from_tree): Likewise. (gimple_build_assign_stat): Strengthen return type from gimple to gassign *. (gimple_build_assign_with_ops): Likewise. (gimple_build_assign_with_ops): Likewise. (gimple_build_cond): Strengthen return type from gimple to gcond *. (gimple_build_cond_from_tree): Likewise. (gimple_cond_set_condition_from_tree): Require a gcond *. (gimple_build_label): Strengthen return type from gimple to glabel *. (gimple_build_goto): Strengthen return type from gimple to ggoto *. (gimple_build_bind): Strengthen return type from gimple to gbind *. (gimple_build_asm_1): Strengthen return type from gimple to gasm *. (gimple_build_asm_vec): Likewise. (gimple_build_catch): Strengthen return type from gimple to gcatch *. (gimple_build_eh_filter): Strengthen return type from gimple to geh_filter *. (gimple_build_eh_must_not_throw): Strengthen return type from gimple to geh_mnt *. (gimple_build_eh_else): Strengthen return type from gimple to geh_else *. (gimple_build_try): Update for renaming of gimple_statement_try to gtry. (gimple_build_resx): Strengthen return type from gimple to gresx *. (gimple_build_switch_nlabels): Strengthen return type from gimple to gswitch *. (gimple_build_switch): Likewise. (gimple_build_eh_dispatch): Strengthen return type from gimple to geh_dispatch *. (gimple_build_debug_bind_stat): Strengthen return type from gimple to gdebug *. (gimple_build_debug_source_bind_stat): Strengthen return type from gimple to gdebug *. (gimple_build_omp_critical): Strengthen return type from gimple to gomp_critical *. (gimple_build_omp_for): Strengthen return type from gimple to gomp_for *. (gimple_build_omp_parallel): Strengthen return type from gimple to gomp_parallel *. (gimple_build_omp_task): Strengthen return type from gimple to gomp_task *. (gimple_build_omp_continue): Strengthen return type from gimple to gomp_continue *. (gimple_build_omp_sections): Strengthen return type from gimple to gomp_sections *. (gimple_build_omp_single): Strengthen return type from gimple to gomp_single *. (gimple_build_omp_target): Strengthen return type from gimple to gomp_target *. (gimple_build_omp_teams): Strengthen return type from gimple to gomp_teams *. (gimple_build_omp_atomic_load): Strengthen return type from gimple to gomp_atomic_load *. (gimple_build_omp_atomic_store): Strengthen return type from gimple to gomp_atomic_store *. (gimple_build_transaction): Strengthen return type from gimple to gtransaction *. (empty_stmt_p): Replace check for GIMPLE_BIND with a dyn_cast. (gimple_call_fnspec): Require a const gcall *. (gimple_call_arg_flags): Likewise. (gimple_call_return_flags): Likewise. (gimple_set_bb): Add a checked cast. (gimple_copy): Within the cases, add locals of the appropriate subclass and use in place of "stmt" and "copy" for typesafety. (gimple_has_side_effects): Add a checked cast. (gimple_could_trap_p_1): Likewise. (gimple_call_copy_skip_args): Require a gcall *, and return one. (gimple_asm_clobbers_memory_p): Require a const gasm *. (infer_nonnull_range): Replace a check for GIMPLE_RETURN with a dyn_cast, introducing local "return_stmt" and using ti in place of "stmt". * gimple.h (gimple_vec): Eliminate this typedef. (struct gimple_statement_call): Rename to... (struct gcall): ...this. (struct gimple_statement_bind): Rename to... (struct gbind): ...this. (struct gimple_statement_catch): Rename to... (struct gcatch): ...this. (struct gimple_statement_eh_filter): Rename to... (struct geh_filter): ...this. (struct gimple_statement_eh_else): Rename to... (struct geh_else): ...this. (struct gimple_statement_eh_mnt): Rename to... (struct geh_mnt): ...this. (struct gimple_statement_phi): Rename to... (struct gphi): ...this. (struct gimple_statement_resx): Rename to... (struct gresx): ...this. (struct gimple_statement_eh_dispatch): Rename to... (struct geh_dispatch): ...this. (struct gimple_statement_try): Rename to... (struct gtry): ...this. (struct gimple_statement_asm): Rename to... (struct gasm): ...this. (struct gimple_statement_omp_critical): Rename to... (struct gomp_critical): ...this. (struct gimple_statement_omp_for): Rename to... (struct gomp_for): ...this. (struct gimple_statement_omp_parallel): Rename to... (struct gomp_parallel): ...this. (struct gimple_statement_omp_target): Rename to... (struct gomp_target): ...this. (struct gimple_statement_omp_task): Rename to... (struct gomp_task): ...this. (struct gimple_statement_omp_sections): Rename to... (struct gomp_sections): ...this. (struct gimple_statement_omp_continue): Rename to... (struct gomp_continue): ...this. (struct gimple_statement_omp_single): Rename to... (struct gomp_single): ...this. (struct gimple_statement_omp_teams): Rename to... (struct gomp_teams): ...this. (struct gimple_statement_omp_atomic_load): Rename to... (struct gomp_atomic_load): ...this. (struct gimple_statement_omp_atomic_store :): Rename to... (struct gomp_atomic_store :): ...this. (struct gimple_statement_transaction): Rename to... (struct gtransaction): ...this. (struct gcond): New subclass. (struct gdebug): New subclass. (struct ggoto): New subclass. (struct glabel): New subclass. (struct gswitch): New subclass. (struct gassign): New subclass. (struct greturn): New subclass. (is_a_helper <gimple_statement_asm *>::test): Rename to... (is_a_helper <gasm *>::test): ...this. (is_a_helper <gimple_statement_bind *>::test): Rename to... (is_a_helper <gbind *>::test): ...this. (is_a_helper <gassign *>::test): New. (is_a_helper <gimple_statement_call *>::test): Rename to... (is_a_helper <gcall *>::test): ...this. (is_a_helper <gimple_statement_catch *>::test): Rename to... (is_a_helper <gcatch *>::test): ...this. (is_a_helper <gimple_statement_resx *>::test): Rename to... (is_a_helper <gresx *>::test): ...this. (is_a_helper <gcond *>::test): New. (is_a_helper <gdebug *>::test): New. (is_a_helper <ggoto *>::test): New. (is_a_helper <glabel *>::test): New. (is_a_helper <gimple_statement_eh_dispatch *>::test): Rename to... (is_a_helper <geh_dispatch *>::test): ...this. (is_a_helper <gimple_statement_eh_else *>::test): Rename to... (is_a_helper <geh_else *>::test): ...this. (is_a_helper <gimple_statement_eh_filter *>::test): Rename to... (is_a_helper <geh_filter *>::test): ...this. (is_a_helper <gimple_statement_eh_mnt *>::test): Rename to... (is_a_helper <geh_mnt *>::test): ...this. (is_a_helper <gimple_statement_omp_atomic_load *>::test): Rename to... (is_a_helper <gomp_atomic_load *>::test): ...this. (is_a_helper <gimple_statement_omp_atomic_store *>::test): Rename to... (is_a_helper <gomp_atomic_store *>::test): ...this. (is_a_helper <gimple_statement_omp_continue *>::test): Rename to... (is_a_helper <gomp_continue *>::test): ...this. (is_a_helper <gimple_statement_omp_critical *>::test): Rename to... (is_a_helper <gomp_critical *>::test): ...this. (is_a_helper <gimple_statement_omp_for *>::test): Rename to... (is_a_helper <gomp_for *>::test): ...this. (is_a_helper <gimple_statement_omp_parallel *>::test): Rename to... (is_a_helper <gomp_parallel *>::test): ...this. (is_a_helper <gimple_statement_omp_target *>::test): Rename to... (is_a_helper <gomp_target *>::test): ...this. (is_a_helper <gimple_statement_omp_sections *>::test): Rename to... (is_a_helper <gomp_sections *>::test): ...this. (is_a_helper <gimple_statement_omp_single *>::test): Rename to... (is_a_helper <gomp_single *>::test): ...this. (is_a_helper <gimple_statement_omp_teams *>::test): Rename to... (is_a_helper <gomp_teams *>::test): ...this. (is_a_helper <gimple_statement_omp_task *>::test): Rename to... (is_a_helper <gomp_task *>::test): ...this. (is_a_helper <gimple_statement_phi *>::test): Rename to... (is_a_helper <gphi *>::test): ...this. (is_a_helper <gimple_statement_transaction *>::test): Rename to... (is_a_helper <gtransaction *>::test): ...this. (is_a_helper <greturn *>::test): New. (is_a_helper <gswitch *>::test): New. (is_a_helper <gimple_statement_try *>::test): Rename to... (is_a_helper <gtry *>::test): ...this. (is_a_helper <const gimple_statement_asm *>::test): Rename to... (is_a_helper <const gasm *>::test): ...this. (is_a_helper <const gimple_statement_bind *>::test): Rename to... (is_a_helper <const gbind *>::test): ...this. (is_a_helper <const gimple_statement_call *>::test): Rename to... (is_a_helper <const gcall *>::test): ...this. (is_a_helper <const gimple_statement_catch *>::test): Rename to... (is_a_helper <const gcatch *>::test): ...this. (is_a_helper <const gimple_statement_resx *>::test): Rename to... (is_a_helper <const gresx *>::test): ...this. (is_a_helper <const gimple_statement_eh_dispatch *>::test): Rename to... (is_a_helper <const geh_dispatch *>::test): ...this. (is_a_helper <const gimple_statement_eh_filter *>::test): Rename to... (is_a_helper <const geh_filter *>::test): ...this. (is_a_helper <const gimple_statement_omp_atomic_load *>::test): Rename to... (is_a_helper <const gomp_atomic_load *>::test): ...this. (is_a_helper <const gimple_statement_omp_atomic_store *>::test): Rename to... (is_a_helper <const gomp_atomic_store *>::test): ...this. (is_a_helper <const gimple_statement_omp_continue *>::test): Rename to... (is_a_helper <const gomp_continue *>::test): ...this. (is_a_helper <const gimple_statement_omp_critical *>::test): Rename to... (is_a_helper <const gomp_critical *>::test): ...this. (is_a_helper <const gimple_statement_omp_for *>::test): Rename to... (is_a_helper <const gomp_for *>::test): ...this. (is_a_helper <const gimple_statement_omp_parallel *>::test): Rename to... (is_a_helper <const gomp_parallel *>::test): ...this. (is_a_helper <const gimple_statement_omp_target *>::test): Rename to... (is_a_helper <const gomp_target *>::test): ...this. (is_a_helper <const gimple_statement_omp_sections *>::test): Rename to... (is_a_helper <const gomp_sections *>::test): ...this. (is_a_helper <const gimple_statement_omp_single *>::test): Rename to... (is_a_helper <const gomp_single *>::test): ...this. (is_a_helper <const gimple_statement_omp_teams *>::test): Rename to... (is_a_helper <const gomp_teams *>::test): ...this. (is_a_helper <const gimple_statement_omp_task *>::test): Rename to... (is_a_helper <const gomp_task *>::test): ...this. (is_a_helper <const gimple_statement_phi *>::test): Rename to... (is_a_helper <const gphi *>::test): ...this. (is_a_helper <const gimple_statement_transaction *>::test): Rename to... (is_a_helper <const gtransaction *>::test): ...this. (gimple_build_return): Strengthen return type to greturn *. (gimple_call_reset_alias_info): Require a gcall *. (gimple_build_call_vec): Return a gcall *. (gimple_build_call): Likewise. (gimple_build_call_valist): Likewise. (gimple_build_call_internal): Likewise. (gimple_build_call_internal_vec): Likewise. (gimple_build_call_from_tree): Likewise. (gimple_build_assign_stat): Return a gassign *. (gimple_build_assign_with_ops): Likewise. (gimple_build_cond): Return a gcond *. (gimple_build_cond_from_tree): Likewise. (gimple_cond_set_condition_from_tree): Require a gcond *. (gimple_build_label): Return a glabel *. (gimple_build_goto): Return a ggoto *. (gimple_build_bind): Return a gbind *. (gimple_build_asm_vec): Return a gasm *. (gimple_build_catch): Return a gcatch *. (gimple_build_eh_filter): Return a geh_filter *. (gimple_build_eh_must_not_throw): Return a geh_mnt *. (gimple_build_eh_else): Return a geh_else *. (gimple_build_try): Return a gtry *. (gimple_build_resx): Return a gresx *. (gimple_build_switch_nlabels): Return a gswitch *. (gimple_build_switch): Return a gswitch *. (gimple_build_eh_dispatch): Return a geh_dispatch *. (gimple_build_debug_bind_stat): Return a gdebug *. (gimple_build_debug_source_bind_stat): Return a gdebug *. (gimple_build_omp_critical): Return a gomp_critical *. (gimple_build_omp_for): Return a gomp_for *. (gimple_build_omp_parallel): Return a gomp_parallel *. (gimple_build_omp_task): Return a gomp_task *. (gimple_build_omp_continue): Return a gomp_continue *. (gimple_build_omp_sections): Return a gomp_sections *. (gimple_build_omp_single): Return a gomp_single *. (gimple_build_omp_target): Return a gomp_target *. (gimple_build_omp_teams): Return a gomp_teams *. (gimple_build_omp_atomic_load): Return a gomp_atomic_load *. (gimple_build_omp_atomic_store): Return a gomp_atomic_store *. (gimple_build_transaction): Return a gtransaction *. (gimple_call_arg_flags): Require a const gcall *. (gimple_call_return_flags): Likewise. (gimple_call_copy_skip_args): Require and return a gcall *. (gimple_asm_clobbers_memory_p): Require a const gasm *. (gimple_seq_first_stmt_as_a_bind): New. (gimple_assign_nontemporal_move_p): Require a const gassign * rather than a const_gimple. (gimple_call_internal_fn): Update for renaming to gcall. (gimple_call_fntype): Likewise. (gimple_call_set_fntype): Require a gcall * rather than a gimple. (gimple_call_set_fn): Likewise. (gimple_call_set_internal_fn): Likewise. (gimple_call_set_chain): Likewise. (gimple_call_set_tail): Likewise. (gimple_call_tail_p): Likewise. (gimple_call_set_return_slot_opt): Likewise. (gimple_call_return_slot_opt_p): Likewise. (gimple_call_set_from_thunk): Likewise. (gimple_call_from_thunk_p): Likewise. (gimple_call_set_va_arg_pack): Likewise. (gimple_call_va_arg_pack_p): Likewise. (gimple_call_set_nothrow): Likewise. (gimple_call_nothrow_p): Likewise. (gimple_call_set_alloca_for_var): Likewise. (gimple_call_alloca_for_var_p): Likewise. (gimple_call_use_set): Likewise. (gimple_call_clobber_set): Likewise. (gimple_call_return_type): Require a const gcall * rather than a const_gimple. (gimple_call_chain_ptr): Likewise. (gimple_call_copy_flags): Require a pair of gcall *. (gimple_cond_set_code): Require a gcond * rather than a gimple (gimple_cond_set_lhs): Likewise. (gimple_cond_set_rhs): Likewise. (gimple_cond_set_true_label): Likewise. (gimple_cond_set_false_label): Likewise. (gimple_cond_make_false): Likewise. (gimple_cond_make_true): Likewise. (gimple_cond_lhs_ptr): Require a const gcond * rather than a const_gimple. (gimple_cond_rhs_ptr): Likewise. (gimple_cond_true_label): Likewise. (gimple_cond_false_label): Likewise. (gimple_cond_true_p): Likewise. (gimple_cond_false_p): Likewise. (gimple_cond_set_condition): Likewise. (gimple_label_label): Require a const glabel *. (gimple_label_set_label): Require a glabel *. (gimple_goto_set_dest): Require a ggoto *. (gimple_bind_vars): Require a const gbind *. (gimple_bind_block): Likewise. (gimple_bind_set_vars): Require a gbind *. (gimple_bind_append_vars): Likewise. (gimple_bind_body_ptr): Likewise. (gimple_bind_body): Likewise. (gimple_bind_set_body): Likewise. (gimple_bind_add_stmt): Likewise. (gimple_bind_add_seq): Likewise. (gimple_bind_set_block): Likewise. (gimple_asm_ninputs): Require a const gasm *. (gimple_asm_noutputs): Likewise. (gimple_asm_nclobbers): Likewise. (gimple_asm_nlabels): Likewise. (gimple_asm_input_op): Likewise. (gimple_asm_input_op_ptr): Likewise. (gimple_asm_output_op): Likewise. (gimple_asm_output_op_ptr): Likewise. (gimple_asm_clobber_op): Likewise. (gimple_asm_label_op): Likewise. (gimple_asm_string): Likewise. (gimple_asm_volatile_p): Likewise. (gimple_asm_input_p): Likewise. (gimple_asm_set_input_op): Require a gasm *. (gimple_asm_set_output_op): Likewise. (gimple_asm_set_clobber_op): Likewise. (gimple_asm_set_label_op): Likewise. (gimple_asm_set_volatile): Likewise. (gimple_asm_set_input): Likewise. (gimple_catch_types): Require a const gcatch *. (gimple_catch_types_ptr): Require a gcatch *. (gimple_catch_handler_ptr): Likewise. (gimple_catch_handler): Likewise. (gimple_catch_set_types): Likewise. (gimple_catch_set_handler): Likewise. (gimple_eh_filter_types): Update for renaming of subclass to geh_filter. (gimple_eh_filter_types_ptr): Likewise. (gimple_eh_filter_failure_ptr): Likewise. (gimple_eh_filter_set_types): Require a geh_filter *. (gimple_eh_filter_set_failure): Likewise. (gimple_eh_must_not_throw_fndecl): Require a geh_mnt *. (gimple_eh_must_not_throw_set_fndecl): Likewise. (gimple_eh_else_n_body_ptr): Require a geh_else *. (gimple_eh_else_n_body): Likewise. (gimple_eh_else_e_body_ptr): Likewise. (gimple_eh_else_e_body): Likewise. (gimple_eh_else_set_n_body): Likewise. (gimple_eh_else_set_e_body): Likewise. (gimple_try_set_kind): Require a gtry *. (gimple_try_set_catch_is_cleanup): Likewise. (gimple_try_set_eval): Likewise. (gimple_try_set_cleanup): Likewise. (gimple_try_eval_ptr): Update for renaming of subclass to gtry. (gimple_try_cleanup_ptr): Likewise. (gimple_phi_capacity): Update for renaming of subclass to gphi. (gimple_phi_num_args): Likewise. (gimple_phi_result): Likewise. (gimple_phi_result_ptr): Likewise. (gimple_phi_arg): Likewise. (gimple_phi_set_result): Require a gphi *. (gimple_phi_set_arg): Likewise. (gimple_phi_arg_def_ptr): Likewise. (gimple_phi_arg_edge): Likewise. (gimple_phi_arg_location): Likewise. (gimple_phi_arg_location_from_edge): Likewise. (gimple_phi_arg_set_location): Likewise. (gimple_phi_arg_has_location): Likewise. (gimple_resx_region): Require a const gresx *. (gimple_resx_set_region): Require a gresx *. (gimple_eh_dispatch_region): Require a const geh_dispatch *. (gimple_eh_dispatch_set_region): Require a geh_dispatch *. (gimple_switch_num_labels): Require a const gswitch *. (gimple_switch_set_num_labels): Likewise. (gimple_switch_index): Likewise. (gimple_switch_index_ptr): Likewise. (gimple_switch_label): Likewise. (gimple_switch_default_label): Likewise. (gimple_switch_set_index): Require a gswitch *. (gimple_switch_set_label): Likewise. (gimple_switch_set_default_label): Likewise. (gimple_omp_critical_name): Require a const gomp_critical *. (gimple_omp_critical_name_ptr): Require a gomp_critical *. (gimple_omp_critical_set_name): Likewise. (gimple_omp_for_set_kind): Require a gomp_for *. (gimple_omp_for_set_combined_p): Likewise. (gimple_omp_for_set_combined_into_p): Likewise. (gimple_omp_for_clauses): Update for renaming of subclass to gomp_for. (gimple_omp_for_clauses_ptr): Likewise. (gimple_omp_for_set_clauses): Likewise. (gimple_omp_for_collapse): Likewise. (gimple_omp_for_index): Likewise. (gimple_omp_for_index_ptr): Likewise. (gimple_omp_for_set_index): Likewise. (gimple_omp_for_initial): Likewise. (gimple_omp_for_initial_ptr): Likewise. (gimple_omp_for_set_initial): Likewise. (gimple_omp_for_final): Likewise. (gimple_omp_for_final_ptr): Likewise. (gimple_omp_for_set_final): Likewise. (gimple_omp_for_incr): Likewise. (gimple_omp_for_incr_ptr): Likewise. (gimple_omp_for_set_incr): Likewise. (gimple_omp_for_pre_body): Likewise. (gimple_omp_for_set_pre_body): Likewise. (gimple_omp_parallel_clauses): Update for renaming of subclass to gomp_parallel. (gimple_omp_parallel_clauses_ptr): Require a gomp_parallel *. (gimple_omp_parallel_set_clauses): Likewise. (gimple_omp_parallel_child_fn_ptr): Likewise. (gimple_omp_parallel_set_child_fn): Likewise. (gimple_omp_parallel_data_arg_ptr): Likewise. (gimple_omp_parallel_set_data_arg): Likewise. (gimple_omp_parallel_child_fn): Require a const gomp_parallel *. (gimple_omp_parallel_data_arg): Likewise. (gimple_omp_task_clauses): Update for renaming of subclass to gomp_task. (gimple_omp_task_clauses_ptr): Likewise. (gimple_omp_task_set_clauses): Likewise. (gimple_omp_task_child_fn): Likewise. (gimple_omp_task_child_fn_ptr): Likewise. (gimple_omp_task_set_child_fn): Likewise. (gimple_omp_task_data_arg): Likewise. (gimple_omp_task_data_arg_ptr): Likewise. (gimple_omp_task_set_data_arg): Likewise. (gimple_omp_taskreg_clauses): Whitespace fixes. (gimple_omp_taskreg_clauses_ptr): Likewise. (gimple_omp_taskreg_set_clauses): Likewise. (gimple_omp_taskreg_child_fn): Likewise. (gimple_omp_taskreg_child_fn_ptr): Likewise. (gimple_omp_taskreg_set_child_fn): Likewise. (gimple_omp_taskreg_data_arg): Likewise. (gimple_omp_taskreg_data_arg_ptr): Likewise. (gimple_omp_taskreg_set_data_arg): Likewise. (gimple_omp_task_copy_fn): Update for renaming of subclass to gomp_task. (gimple_omp_task_copy_fn_ptr): Likewise. (gimple_omp_task_set_copy_fn): Likewise. (gimple_omp_task_arg_size): Likewise. (gimple_omp_task_arg_size_ptr): Likewise. (gimple_omp_task_set_arg_size): Likewise. (gimple_omp_task_arg_align): Likewise. (gimple_omp_task_arg_align_ptr): Likewise. (gimple_omp_task_set_arg_align): Likewise. (gimple_omp_single_clauses): Update for renaming of subclass to gomp_single. (gimple_omp_single_clauses_ptr): Likewise. (gimple_omp_single_set_clauses): Likewise. (gimple_omp_target_clauses): Update for renaming of subclass to gomp_target. (gimple_omp_target_clauses_ptr): Likewise. (gimple_omp_target_set_clauses): Require a gomp_target *. (gimple_omp_target_set_kind): Likewise. (gimple_omp_target_child_fn_ptr): Likewise. (gimple_omp_target_set_child_fn): Likewise. (gimple_omp_target_data_arg_ptr): Likewise. (gimple_omp_target_set_data_arg): Likewise. (gimple_omp_target_child_fn): Require a const gomp_target *. (gimple_omp_target_data_arg): Likewise. (gimple_omp_teams_clauses): Update for renaming of subclass to gomp_teams. (gimple_omp_teams_clauses_ptr): Likewise. (gimple_omp_teams_set_clauses): Require a gomp_teams *. (gimple_omp_sections_clauses): Update for renaming of subclass to gomp_sections. (gimple_omp_sections_clauses_ptr): Likewise. (gimple_omp_sections_set_clauses): Likewise. (gimple_omp_sections_control): Likewise. (gimple_omp_sections_control_ptr): Likewise. (gimple_omp_sections_set_control): Likewise. (gimple_omp_for_set_cond): Likewise. (gimple_omp_for_cond): Likewise. (gimple_omp_atomic_store_set_val): Require a gomp_atomic_store *. (gimple_omp_atomic_store_val_ptr): Likewise. (gimple_omp_atomic_load_set_lhs): Likewise. (gimple_omp_atomic_store_val): Require a const gomp_atomic_store *. (gimple_omp_atomic_load_lhs): Likewise. (gimple_omp_atomic_load_rhs): Likewise. (gimple_omp_atomic_load_lhs_ptr): Require a gomp_atomic_load *. (gimple_omp_atomic_load_set_rhs): Likewise. (gimple_omp_atomic_load_rhs_ptr): Likewise. (gimple_omp_continue_control_def): Require a const gomp_continue *. (gimple_omp_continue_control_use): Likewise. (gimple_omp_continue_control_def_ptr): Require a gomp_continue *. (gimple_omp_continue_set_control_def): Likewise. (gimple_omp_continue_control_use_ptr): Likewise. (gimple_omp_continue_set_control_use): Likewise. (gimple_transaction_body_ptr): Require a gtransaction *. (gimple_transaction_body): Likewise. (gimple_transaction_label_ptr): Likewise. (gimple_transaction_label): Require a const gtransaction *. (gimple_transaction_subcode): Likewise. (gimple_transaction_set_body): Require a gtransaction *. (gimple_transaction_set_label): Likewise. (gimple_transaction_set_subcode): Likewise. (gimple_return_retval_ptr): Require a const greturn *. (gimple_return_retval): Likewise. (gimple_return_set_retval): Require a greturn *. (gimple_expr_type): Introduce local "call_stmt" and use in place of "stmt" for typesafety. * asan.c: Use gimple subclasses. * auto-profile.c: Likewise. * builtins.c: Likewise. * builtins.h: Likewise. * cfgexpand.c: Likewise. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * expr.h: Likewise. * gimple-builder.c: Likewise. * gimple-builder.h: Likewise. * gimple-fold.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * gimplify.h: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * internal-fn.c: Likewise. * internal-fn.def:: Likewise. * internal-fn.h: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf-gimple.h: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-prop.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-split.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * omp-low.c: Likewise. * predict.c: Likewise. * sanopt.c: Likewise. * sese.c: Likewise. * ssa-iterators.h: Likewise. * stmt.c: Likewise. * trans-mem.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfg.h: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp.c: Likewise. * tree-chkp.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-eh.h: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-into-ssa.c: Likewise. * tree-into-ssa.h: Likewise. * tree-loop-distribution.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-phinodes.h: Likewise. * tree-predcom.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h * tree-sra.cn_function): * tree-ssa-alias.c: Likewise. * tree-ssa-alias.h: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c * tree-ssa-structalias.c * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadedge.h: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-stdarg.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * vtable-verify.c: Likewise. gcc/c-family/ChangeLog: Merger of git branch "gimple-classes-v2-option-3". * ChangeLog.gimple-classes: New. * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack" from being just a vec<gimple> to a vec<gbind *>. gcc/java/ChangeLog: Merger of git branch "gimple-classes-v2-option-3". * ChangeLog.gimple-classes: New. * java-gimplify.c (java_gimplify_block): Strengthen local "outer" from gimple to gbind *. From-SVN: r217787
2014-11-19 18:00:54 +01:00
2014-11-19 David Malcolm <dmalcolm@redhat.com>
Merger of git branch "gimple-classes-v2-option-3".
* ChangeLog.gimple-classes: New.
* c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
from being just a vec<gimple> to a vec<gbind *>.
2014-11-18 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/63813
* c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
argument to ptype, set type to TREE_TYPE (ptype). Don't call
get_pointer_alignment for non-pointers. Use ptype, or if it is
reference type, corresponding pointer type, as type of kind
argument.
(ubsan_maybe_instrument_reference,
ubsan_maybe_instrument_member_call): Adjust callers.
2014-11-15 Marek Polacek <polacek@redhat.com>
PR middle-end/63884
* array-notation-common.c (is_sec_implicit_index_fn): Return false
for NULL fndecl.
(extract_array_notation_exprs): Return for NULL node.
2014-11-12 14:33:45 +01:00
2014-11-12 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
re PR c/59708 (clang-compatible checked arithmetic builtins) PR c/59708 * builtin-attrs.def (ATTR_NOTHROW_TYPEGENERIC_LEAF): New attribute. * builtins.c (fold_builtin_arith_overflow): New function. (fold_builtin_3): Use it. * builtins.def (BUILT_IN_ADD_OVERFLOW, BUILT_IN_SUB_OVERFLOW, BUILT_IN_MUL_OVERFLOW, BUILT_IN_SADD_OVERFLOW, BUILT_IN_SADDL_OVERFLOW, BUILT_IN_SADDLL_OVERFLOW, BUILT_IN_SSUB_OVERFLOW, BUILT_IN_SSUBL_OVERFLOW, BUILT_IN_SSUBLL_OVERFLOW, BUILT_IN_SMUL_OVERFLOW, BUILT_IN_SMULL_OVERFLOW, BUILT_IN_SMULLL_OVERFLOW, BUILT_IN_UADDL_OVERFLOW, BUILT_IN_UADDLL_OVERFLOW, BUILT_IN_USUB_OVERFLOW, BUILT_IN_USUBL_OVERFLOW, BUILT_IN_USUBLL_OVERFLOW, BUILT_IN_UMUL_OVERFLOW, BUILT_IN_UMULL_OVERFLOW, BUILT_IN_UMULLL_OVERFLOW): New built-in functions. * builtin-types.def (BT_PTR_UINT, BT_PTR_ULONG, BT_PTR_LONGLONG, BT_FN_BOOL_INT_INT_INTPTR, BT_FN_BOOL_LONG_LONG_LONGPTR, BT_FN_BOOL_LONGLONG_LONGLONG_LONGLONGPTR, BT_FN_BOOL_UINT_UINT_UINTPTR, BT_FN_BOOL_ULONG_ULONG_ULONGPTR, BT_FN_BOOL_ULONGLONG_ULONGLONG_ULONGLONGPTR, BT_FN_BOOL_VAR): New. * expr.c (write_complex_part): Remove prototype, no longer static. * expr.h (write_complex_part): New prototype. * function.c (aggregate_value_p): For internal functions return 0. * gimple-fold.c (arith_overflowed_p): New functions. (gimple_fold_call): Fold {ADD,SUB,MUL}_OVERFLOW internal calls. * gimple-fold.h (arith_overflowed_p): New prototype. * tree-ssa-dce.c: Include tree-ssa-propagate.h and gimple-fold.h. (find_non_realpart_uses, maybe_optimize_arith_overflow): New functions. (eliminate_unnecessary_stmts): Transform {ADD,SUB,MUL}_OVERFLOW into COMPLEX_CST/COMPLEX_EXPR if IMAGPART_EXPR of the result is never used. * gimplify.c (gimplify_call_expr): Handle gimplification of internal calls with lhs. * internal-fn.c (get_range_pos_neg, get_min_precision, expand_arith_overflow_result_store): New functions. (ubsan_expand_si_overflow_addsub_check): Renamed to ... (expand_addsub_overflow): ... this. Add LOC, LHS, ARG0, ARG1, UNSR_P, UNS0_P, UNS1_P, IS_UBSAN arguments, remove STMT argument. Handle ADD_OVERFLOW and SUB_OVERFLOW expansion. (ubsan_expand_si_overflow_neg_check): Renamed to ... (expand_neg_overflow): ... this. Add LOC, LHS, ARG1, IS_UBSAN arguments, remove STMT argument. Handle SUB_OVERFLOW with 0 as first argument expansion. (ubsan_expand_si_overflow_mul_check): Renamed to ... (expand_mul_overflow): ... this. Add LOC, LHS, ARG0, ARG1, UNSR_P, UNS0_P, UNS1_P, IS_UBSAN arguments, remove STMT argument. Handle MUL_OVERFLOW expansion. (expand_UBSAN_CHECK_ADD): Use expand_addsub_overflow, prepare arguments for it. (expand_UBSAN_CHECK_SUB): Use expand_addsub_overflow or expand_neg_overflow, prepare arguments for it. (expand_UBSAN_CHECK_MUL): Use expand_mul_overflow, prepare arguments for it. (expand_arith_overflow, expand_ADD_OVERFLOW, expand_SUB_OVERFLOW, expand_MUL_OVERFLOW): New functions. * internal-fn.def (ADD_OVERFLOW, SUB_OVERFLOW, MUL_OVERFLOW): New internal functions. * tree-vrp.c (check_for_binary_op_overflow): New function. (extract_range_basic): Handle {REAL,IMAG}PART_EXPR if the operand is SSA_NAME set by {ADD,SUB,MUL}_OVERFLOW internal functions. (simplify_internal_call_using_ranges): Handle {ADD,SUB,MUL}_OVERFLOW internal functions. * optabs.def (umulv4_optab): New optab. * config/i386/i386.md (umulv<mode>4, <u>mulvqi4): New define_expands. (*umulv<mode>4, *<u>mulvqi4): New define_insns. * doc/extend.texi (Integer Overflow Builtins): Document __builtin_*_overflow. c-family/ * c-common.c (check_builtin_function_arguments): Handle BUILT_IN_{ADD,SUB,MUL}_OVERFLOW. testsuite/ * c-c++-common/builtin-arith-overflow-1.c: New test. * c-c++-common/torture/builtin-arith-overflow-10.c: New test. * c-c++-common/torture/builtin-arith-overflow-11.c: New test. * c-c++-common/torture/builtin-arith-overflow-12.c: New test. * c-c++-common/torture/builtin-arith-overflow-12.h: New file. * c-c++-common/torture/builtin-arith-overflow-13.c: New test. * c-c++-common/torture/builtin-arith-overflow-14.c: New test. * c-c++-common/torture/builtin-arith-overflow-15.c: New test. * c-c++-common/torture/builtin-arith-overflow-16.c: New test. * c-c++-common/torture/builtin-arith-overflow-17.c: New test. * c-c++-common/torture/builtin-arith-overflow-18.c: New test. * c-c++-common/torture/builtin-arith-overflow-1.c: New test. * c-c++-common/torture/builtin-arith-overflow-1.h: New file. * c-c++-common/torture/builtin-arith-overflow-2.c: New test. * c-c++-common/torture/builtin-arith-overflow-3.c: New test. * c-c++-common/torture/builtin-arith-overflow-4.c: New test. * c-c++-common/torture/builtin-arith-overflow-5.c: New test. * c-c++-common/torture/builtin-arith-overflow-6.c: New test. * c-c++-common/torture/builtin-arith-overflow-7.c: New test. * c-c++-common/torture/builtin-arith-overflow-8.c: New test. * c-c++-common/torture/builtin-arith-overflow-9.c: New test. * c-c++-common/torture/builtin-arith-overflow.h: New file. * gcc.dg/builtin-arith-overflow-1.c: New test. * gcc.dg/builtin-arith-overflow-2.c: New test. From-SVN: r217415
2014-11-12 13:28:06 +01:00
2014-11-12 Jakub Jelinek <jakub@redhat.com>
PR c/59708
* c-common.c (check_builtin_function_arguments): Handle
BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
2014-11-10 Andi Kleen <ak@linux.intel.com>
PR c/60804
* c-common.h (check_no_cilk): Declare.
* cilk.c (get_error_location): New function.
(check_no_cilk): Dito.
2014-11-10 Andi Kleen <ak@linux.intel.com>
* cilk.c (recognize_spawn): Use expression location
for error message.
2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
* c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
cpplib.h (cpp_callbacks): Add has_attribute. libcpp: 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net> * include/cpplib.h (cpp_callbacks): Add has_attribute. * internal.h (lexer_state): Add in__has_attribute__. * directives.c (lex_macro_node): Prevent use of __has_attribute__ as a macro. * expr.c (parse_has_attribute): New function; (eval_token): Look for __has_attribute__ and route to parse_has_attribute. * identifiers.c (_cpp_init_hashtable): Initialize n__has_attribute__. * pch.c (cpp_read_state): Initialize n__has_attribute__. * traditional.c (enum ls): Add ls_has_attribute, ls_has_attribute_close; (_cpp_scan_out_logical_line): Attend to __has_attribute__. gcc/c-family: 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net> * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros; (__cpp_rtti, __cpp_exceptions): New macros for C++98; (__cpp_range_based_for, __cpp_initializer_lists, __cpp_delegating_constructors, __cpp_nsdmi, __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros for C++11; (__cpp_attribute_deprecated): Remove in favor of __has_cpp_attribute. * c-lex.c (cb_has_attribute): New callback CPP function; (init_c_lex): Set has_attribute callback. gcc/testsuite: 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net> * g++.dg/cpp1y/feat-cxx11.C: Test new feature macros for C++98 and C++11; Test existence of __has_cpp_attribute; Test C++11 attributes. * g++.dg/cpp1y/feat-cxx11-neg.C: Ditto. * g++.dg/cpp1y/feat-cxx14.C: Ditto and test for C++14 attributes. * g++.dg/cpp1y/feat-cxx98.C: Test new feature macros for C++98. * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto. * g++.dg/cpp1y/feat-neg.C: Test that __cpp_rtti, _cpp_exceptions will be undefined for -fno-rtti -fno-exceptions. From-SVN: r217292
2014-11-10 16:53:12 +01:00
2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
* c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
(__cpp_rtti, __cpp_exceptions): New macros for C++98;
(__cpp_range_based_for, __cpp_initializer_lists,
__cpp_delegating_constructors, __cpp_nsdmi,
__cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
for C++11; (__cpp_attribute_deprecated): Remove in favor of
__has_cpp_attribute.
* c-lex.c (cb_has_attribute): New callback CPP function;
(init_c_lex): Set has_attribute callback.
2014-11-04 Richard Biener <rguenther@suse.de>
* c-common.c (shorten_compare): Do not shorten mixed
DFP and non-DFP compares.
2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
* g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
* g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
Commentary and rearrangement of tests.
* g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
Commentary and rearrangement of tests.
* g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
* g++.dg/cpp1y/feat-cxx98.C: Commentary.
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
* c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
enum from machine_mode.
cgraph.h: Flatten. * cgraph.h: Flatten. Remove all include files. (symbol_table::initialize): Move to cgraph.c. * cgraph.c: Adjust include files. (symbol_table::initialize): Relocate from cgraph.h. * gengtype.c (open_base_files): Adjust include files. * gccplugin.h: Add hash-map.h, is-a.h, plugin-api.h, and ipa-ref.h to included files. * ipa-inline.h: Remove all include files. * ipa-prop.h: Ditto. * ipa-reference.h: Ditto. * ipa-utils.h: Ditto: * lto-streamer.h: Remove cgraph.h from include list. * asan.c: Adjust include files. * auto-profile.c: Ditto. * bb-reorder.c: Ditto. * calls.c: Ditto. * cfgexpand.c: Ditto. * cgraphbuild.c: Ditto. * cgraphclones.c: Ditto. * cgraphunit.c: Ditto. * combine.c: Ditto. * coverage.c: Ditto. * data-streamer.c: Ditto. * data-streamer-in.c: Ditto. * data-streamer-out.c: Ditto. * dbxout.c: Ditto. * dwarf2out.c: Ditto. * except.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fold-const.c: Ditto. * ggc-page.c: Ditto. * gimple-fold.c: Ditto. * gimple-iterator.c: Ditto. * gimple-pretty-print.c: Ditto. * gimple-streamer-in.c: Ditto. * gimple-streamer-out.c: Ditto. * gimplify.c: Ditto. * ipa.c: Ditto. * ipa-comdats.c: Ditto. * ipa-cp.c: Ditto. * ipa-devirt.c: Ditto. * ipa-icf.c: Ditto. * ipa-icf-gimple.c: Ditto. * ipa-inline-analysis.c: Ditto. * ipa-inline.c: Ditto. * ipa-inline-transform.c: Ditto. * ipa-polymorphic-call.c: Ditto. * ipa-profile.c: Ditto. * ipa-prop.c: Ditto. * ipa-pure-const.c: Ditto. * ipa-ref.c: Ditto. * ipa-reference.c: Ditto. * ipa-split.c: Ditto. * ipa-utils.c: Ditto. * ipa-visibility.c: Ditto. * langhooks.c: Ditto. * lto-cgraph.c: Ditto. * lto-compress.c: Ditto. * lto-opts.c: Ditto. * lto-section-in.c: Ditto. * lto-section-out.c: Ditto. * lto-streamer.c: Ditto. * lto-streamer-in.c: Ditto. * lto-streamer-out.c: Ditto. * omp-low.c: Ditto. * opts-global.c: Ditto. * passes.c: Ditto. * predict.c: Ditto. * print-tree.c: Ditto. * profile.c: Ditto. * ree.c: Ditto. * stor-layout.c: Ditto. * symtab.c: Ditto. * toplev.c: Ditto. * trans-mem.c: Ditto. * tree.c: Ditto. * tree-cfg.c: Ditto. * tree-eh.c: Ditto. * tree-emutls.c: Ditto. * tree-inline.c: Ditto. * tree-nested.c: Ditto. * tree-pretty-print.c: Ditto. * tree-profile.c: Ditto. * tree-sra.c: Ditto. * tree-ssa-alias.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * tree-ssa-pre.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-streamer.c: Ditto. * tree-streamer-in.c: Ditto. * tree-streamer-out.c: Ditto. * tree-switch-conversion.c: Ditto. * tree-tailcall.c: Ditto. * tree-vect-data-refs.c: Ditto. * tree-vectorizer.c: Ditto. * tree-vect-stmts.c: Ditto. * tsan.c: Ditto. * ubsan.c: Ditto. * value-prof.c: Ditto. * varasm.c: Ditto. * varpool.c: Ditto. * config/arm/arm.c: Ditto. * config/bfin/bfin.c: Ditto. * config/c6x/c6x.c: Ditto. * config/cris/cris.c: Ditto. * config/darwin.c: Ditto. * config/darwin-c.c: Ditto. * config/i386/i386.c: Ditto. * config/i386/winnt.c: Ditto. * config/microblaze/microblaze.c: Ditto. * config/mips/mips.c: Ditto. * config/rs6000/rs6000.c: Ditto. * config/rx/rx.c: Ditto. * ada/gcc-interface/trans.c: Adjust include files. * ada/gcc-interface/utils.c: Ditto. * c/c-decl.c: Adjust include files. * c/c-parser.c: Ditto. * c-family/c-common.c: Adjust include files. * c-family/c-gimplify.c: Ditto. * c-family/cilk.c: Ditto. * c-family/c-pragma.c: Ditto. * c-family/c-ubsan.c: Ditto. * cp/call.c: Adjust include files. * cp/class.c: Ditto. * cp/decl2.c: Ditto. * cp/decl.c: Ditto. * cp/lambda.c: Ditto. * cp/mangle.c: Ditto. * cp/method.c: Ditto. * cp/optimize.c: Ditto. * cp/parser.c: Ditto. * cp/semantics.c: Ditto. * cp/tree.c: Ditto. * cp/vtable-class-hierarchy.c: Ditto. * fortran/f95-lang.c: Adjust include files. * fortran/trans-decl.c: Ditto. * go/go-gcc.cc: Adjust include files. * java/class.c: Adjust include files. * java/decl.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * lto/lto.c: Adjust include files. * lto/lto-lang.c: Ditto. * lto/lto-object.c: Ditto. * lto/lto-partition.c: Ditto. * lto/lto-symtab.c: Ditto. * objc/objc-act.c: Adjust include files. From-SVN: r216805
2014-10-28 17:17:19 +01:00
2014-10-28 Andrew MacLeod <amacleod@redhat.com>
* c-common.c: Adjust include files.
* c-gimplify.c: Ditto.
* cilk.c: Ditto.
* c-pragma.c: Ditto.
* c-ubsan.c: Ditto.
cgraph.h: Flatten. * cgraph.h: Flatten. Remove all include files. (symbol_table::initialize): Move to cgraph.c. * cgraph.c: Adjust include files. (symbol_table::initialize): Relocate from cgraph.h. * gengtype.c (open_base_files): Adjust include files. * gccplugin.h: Add hash-map.h, is-a.h, plugin-api.h, and ipa-ref.h to included files. * ipa-inline.h: Remove all include files. * ipa-prop.h: Ditto. * ipa-reference.h: Ditto. * ipa-utils.h: Ditto: * lto-streamer.h: Remove cgraph.h from include list. * asan.c: Adjust include files. * auto-profile.c: Ditto. * bb-reorder.c: Ditto. * calls.c: Ditto. * cfgexpand.c: Ditto. * cgraphbuild.c: Ditto. * cgraphclones.c: Ditto. * cgraphunit.c: Ditto. * combine.c: Ditto. * coverage.c: Ditto. * data-streamer.c: Ditto. * data-streamer-in.c: Ditto. * data-streamer-out.c: Ditto. * dbxout.c: Ditto. * dwarf2out.c: Ditto. * except.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fold-const.c: Ditto. * ggc-page.c: Ditto. * gimple-fold.c: Ditto. * gimple-iterator.c: Ditto. * gimple-pretty-print.c: Ditto. * gimple-streamer-in.c: Ditto. * gimple-streamer-out.c: Ditto. * gimplify.c: Ditto. * ipa.c: Ditto. * ipa-comdats.c: Ditto. * ipa-cp.c: Ditto. * ipa-devirt.c: Ditto. * ipa-icf.c: Ditto. * ipa-icf-gimple.c: Ditto. * ipa-inline-analysis.c: Ditto. * ipa-inline.c: Ditto. * ipa-inline-transform.c: Ditto. * ipa-polymorphic-call.c: Ditto. * ipa-profile.c: Ditto. * ipa-prop.c: Ditto. * ipa-pure-const.c: Ditto. * ipa-ref.c: Ditto. * ipa-reference.c: Ditto. * ipa-split.c: Ditto. * ipa-utils.c: Ditto. * ipa-visibility.c: Ditto. * langhooks.c: Ditto. * lto-cgraph.c: Ditto. * lto-compress.c: Ditto. * lto-opts.c: Ditto. * lto-section-in.c: Ditto. * lto-section-out.c: Ditto. * lto-streamer.c: Ditto. * lto-streamer-in.c: Ditto. * lto-streamer-out.c: Ditto. * omp-low.c: Ditto. * opts-global.c: Ditto. * passes.c: Ditto. * predict.c: Ditto. * print-tree.c: Ditto. * profile.c: Ditto. * ree.c: Ditto. * stor-layout.c: Ditto. * symtab.c: Ditto. * toplev.c: Ditto. * trans-mem.c: Ditto. * tree.c: Ditto. * tree-cfg.c: Ditto. * tree-eh.c: Ditto. * tree-emutls.c: Ditto. * tree-inline.c: Ditto. * tree-nested.c: Ditto. * tree-pretty-print.c: Ditto. * tree-profile.c: Ditto. * tree-sra.c: Ditto. * tree-ssa-alias.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * tree-ssa-pre.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-streamer.c: Ditto. * tree-streamer-in.c: Ditto. * tree-streamer-out.c: Ditto. * tree-switch-conversion.c: Ditto. * tree-tailcall.c: Ditto. * tree-vect-data-refs.c: Ditto. * tree-vectorizer.c: Ditto. * tree-vect-stmts.c: Ditto. * tsan.c: Ditto. * ubsan.c: Ditto. * value-prof.c: Ditto. * varasm.c: Ditto. * varpool.c: Ditto. * config/arm/arm.c: Ditto. * config/bfin/bfin.c: Ditto. * config/c6x/c6x.c: Ditto. * config/cris/cris.c: Ditto. * config/darwin.c: Ditto. * config/darwin-c.c: Ditto. * config/i386/i386.c: Ditto. * config/i386/winnt.c: Ditto. * config/microblaze/microblaze.c: Ditto. * config/mips/mips.c: Ditto. * config/rs6000/rs6000.c: Ditto. * config/rx/rx.c: Ditto. * ada/gcc-interface/trans.c: Adjust include files. * ada/gcc-interface/utils.c: Ditto. * c/c-decl.c: Adjust include files. * c/c-parser.c: Ditto. * c-family/c-common.c: Adjust include files. * c-family/c-gimplify.c: Ditto. * c-family/cilk.c: Ditto. * c-family/c-pragma.c: Ditto. * c-family/c-ubsan.c: Ditto. * cp/call.c: Adjust include files. * cp/class.c: Ditto. * cp/decl2.c: Ditto. * cp/decl.c: Ditto. * cp/lambda.c: Ditto. * cp/mangle.c: Ditto. * cp/method.c: Ditto. * cp/optimize.c: Ditto. * cp/parser.c: Ditto. * cp/semantics.c: Ditto. * cp/tree.c: Ditto. * cp/vtable-class-hierarchy.c: Ditto. * fortran/f95-lang.c: Adjust include files. * fortran/trans-decl.c: Ditto. * go/go-gcc.cc: Adjust include files. * java/class.c: Adjust include files. * java/decl.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * lto/lto.c: Adjust include files. * lto/lto-lang.c: Ditto. * lto/lto-object.c: Ditto. * lto/lto-partition.c: Ditto. * lto/lto-symtab.c: Ditto. * objc/objc-act.c: Adjust include files. From-SVN: r216805
2014-10-28 17:17:19 +01:00
ggcplug.c: Shuffle includes to include gcc-plugin.h earlier. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * testsuite/gcc.dg/plugin/ggcplug.c: Shuffle includes to include gcc-plugin.h earlier. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * c/c-typeck.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * c-family/c-gimplify.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * cp/cp-gimplify.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * go/go-gcc.cc: Adjust include files. * go/go-lang.c: Ditto. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * java/java-gimplify.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * lto/lto-lang.c: Adjust include files. * lto/lto-object.c: Ditto. * lto/lto-partition.c: Ditto. * lto/lto-symtab.c: Ditto. * lto/lto.c: Ditto. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * basic-block.h: Remove all includes. (enum profile_status_d, struct control_flow_graph): Move to cfg.h * cfg.h (profile_status_d, struct control_flow_graph): Relocate here. * Makefile.in (GTFILES): Add cfg.h to list. * cgraph.h (symbol_table::create_empty): Move to cgraph.c. * cgraph.c (symbol_table::create_empty): Relocate from cgraph.h. * genconditions.c (write_header): Add predict.h and basic-block.h to lits of includes. * genemit.c (main): Ditto. * genpreds.c (write_insn_preds_c): Ditto. * genrecog.c (write_header): Ditto. * gengtype.c (open_base_files): Add predict.h, basic-block.h, and cfg.h to list of includes. * alias.c: Adjust include files. * asan.c: Ditto. * auto-inc-dec.c: Ditto. * auto-profile.c: Ditto. * bb-reorder.c: Ditto. * bt-load.c: Ditto. * builtins.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfganal.c: Ditto. * cfgbuild.c: Ditto. * cfgcleanup.c: Ditto. * cfgexpand.c: Ditto. * cfghooks.c: Ditto. * cfgloop.c: Ditto. * cfgloopanal.c: Ditto. * cfgloopmanip.c: Ditto. * cfgrtl.c: Ditto. * cgraphbuild.c: Ditto. * cgraphclones.c: Ditto. * cgraphunit.c: Ditto. * combine-stack-adj.c: Ditto. * combine.c: Ditto. * compare-elim.c: Ditto. * coverage.c: Ditto. * cprop.c: Ditto. * cse.c: Ditto. * cselib.c: Ditto. * data-streamer-in.c: Ditto. * data-streamer-out.c: Ditto. * data-streamer.c: Ditto. * dce.c: Ditto. * ddg.c: Ditto. * ddg.h: Ditto. * df-core.c: Ditto. * df-problems.c: Ditto. * df-scan.c: Ditto. * df.h: Ditto. * dojump.c: Ditto. * dominance.c: Ditto. * domwalk.c: Ditto. * dse.c: Ditto. * dwarf2cfi.c: Ditto. * emit-rtl.c: Ditto. * et-forest.c: Ditto. * except.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * fwprop.c: Ditto. * gcc-plugin.h: Ditto. * gcse.c: Ditto. * generic-match-head.c: Ditto. * ggc-page.c: Ditto. * gimple-builder.c: Ditto. * gimple-expr.c: Ditto. * gimple-fold.c: Ditto. * gimple-iterator.c: Ditto. * gimple-low.c: Ditto. * gimple-match-head.c: Ditto. * gimple-pretty-print.c: Ditto. * gimple-ssa-isolate-paths.c: Ditto. * gimple-ssa-strength-reduction.c: Ditto. * gimple-streamer-in.c: Ditto. * gimple-streamer-out.c: Ditto. * gimple-streamer.h: Ditto. * gimple-walk.c: Ditto. * gimple.c: Ditto. * gimplify-me.c: Ditto. * gimplify.c: Ditto. * graph.c: Ditto. * graphite-blocking.c: Ditto. * graphite-clast-to-gimple.c: Ditto. * graphite-dependences.c: Ditto. * graphite-interchange.c: Ditto. * graphite-isl-ast-to-gimple.c: Ditto. * graphite-optimize-isl.c: Ditto. * graphite-poly.c: Ditto. * graphite-scop-detection.c: Ditto. * graphite-sese-to-poly.c: Ditto. * graphite.c: Ditto. * haifa-sched.c: Ditto. * hw-doloop.c: Ditto. * ifcvt.c: Ditto. * init-regs.c: Ditto. * internal-fn.c: Ditto. * ipa-cp.c: Ditto. * ipa-devirt.c: Ditto. * ipa-icf-gimple.c: Ditto. * ipa-icf.c: Ditto. * ipa-inline-analysis.c: Ditto. * ipa-inline.c: Ditto. * ipa-polymorphic-call.c: Ditto. * ipa-profile.c: Ditto. * ipa-prop.c: Ditto. * ipa-pure-const.c: Ditto. * ipa-reference.c: Ditto. * ipa-split.c: Ditto. * ipa-utils.c: Ditto. * ipa.c: Ditto. * ira-build.c: Ditto. * ira-color.c: Ditto. * ira-conflicts.c: Ditto. * ira-costs.c: Ditto. * ira-emit.c: Ditto. * ira-lives.c: Ditto. * ira.c: Ditto. * jump.c: Ditto. * lcm.c: Ditto. * loop-doloop.c: Ditto. * loop-init.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * loop-unroll.c: Ditto. * lower-subreg.c: Ditto. * lra-assigns.c: Ditto. * lra-coalesce.c: Ditto. * lra-constraints.c: Ditto. * lra-eliminations.c: Ditto. * lra-lives.c: Ditto. * lra-spills.c: Ditto. * lra.c: Ditto. * lto-cgraph.c: Ditto. * lto-compress.c: Ditto. * lto-opts.c: Ditto. * lto-section-in.c: Ditto. * lto-section-out.c: Ditto. * lto-streamer-in.c: Ditto. * lto-streamer-out.c: Ditto. * lto-streamer.c: Ditto. * mcf.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * omp-low.c: Ditto. * optabs.c: Ditto. * opts-global.c: Ditto. * passes.c: Ditto. * postreload-gcse.c: Ditto. * postreload.c: Ditto. * predict.c: Ditto. * print-rtl.c: Ditto. * profile.c: Ditto. * recog.c: Ditto. * ree.c: Ditto. * reg-stack.c: Ditto. * regcprop.c: Ditto. * regcprop.h: Ditto. * reginfo.c: Ditto. * regrename.c: Ditto. * regstat.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtlanal.c: Ditto. * sched-deps.c: Ditto. * sched-ebb.c: Ditto. * sched-int.h: Ditto. * sched-rgn.c: Ditto. * sched-vis.c: Ditto. * sel-sched-dump.c: Ditto. * sel-sched-ir.c: Ditto. * sel-sched-ir.h: Ditto. * sel-sched.c: Ditto. * sese.c: Ditto. * shrink-wrap.c: Ditto. * stack-ptr-mod.c: Ditto. * stmt.c: Ditto. * store-motion.c: Ditto. * symtab.c: Ditto. * toplev.c: Ditto. * tracer.c: Ditto. * trans-mem.c: Ditto. * tree-affine.c: Ditto. * tree-call-cdce.c: Ditto. * tree-cfg.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-chrec.c: Ditto. * tree-complex.c: Ditto. * tree-data-ref.c: Ditto. * tree-dfa.c: Ditto. * tree-eh.c: Ditto. * tree-emutls.c: Ditto. * tree-if-conv.c: Ditto. * tree-inline.c: Ditto. * tree-into-ssa.c: Ditto. * tree-loop-distribution.c: Ditto. * tree-nested.c: Ditto. * tree-nrv.c: Ditto. * tree-object-size.c: Ditto. * tree-outof-ssa.c: Ditto. * tree-parloops.c: Ditto. * tree-phinodes.c: Ditto. * tree-predcom.c: Ditto. * tree-pretty-print.c: Ditto. * tree-profile.c: Ditto. * tree-scalar-evolution.c: Ditto. * tree-sra.c: Ditto. * tree-ssa-address.c: Ditto. * tree-ssa-alias.c: Ditto. * tree-ssa-ccp.c: Ditto. * tree-ssa-coalesce.c: Ditto. * tree-ssa-copy.c: Ditto. * tree-ssa-copyrename.c: Ditto. * tree-ssa-dce.c: Ditto. * tree-ssa-dom.c: Ditto. * tree-ssa-dse.c: Ditto. * tree-ssa-forwprop.c: Ditto. * tree-ssa-ifcombine.c: Ditto. * tree-ssa-live.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * tree-ssa-loop-niter.c: Ditto. * tree-ssa-loop-prefetch.c: Ditto. * tree-ssa-loop-unswitch.c: Ditto. * tree-ssa-loop.c: Ditto. * tree-ssa-math-opts.c: Ditto. * tree-ssa-operands.c: Ditto. * tree-ssa-phiopt.c: Ditto. * tree-ssa-phiprop.c: Ditto. * tree-ssa-pre.c: Ditto. * tree-ssa-propagate.c: Ditto. * tree-ssa-reassoc.c: Ditto. * tree-ssa-sccvn.c: Ditto. * tree-ssa-sink.c: Ditto. * tree-ssa-strlen.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-tail-merge.c: Ditto. * tree-ssa-ter.c: Ditto. * tree-ssa-threadedge.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tree-ssa-uncprop.c: Ditto. * tree-ssa-uninit.c: Ditto. * tree-ssa.c: Ditto. * tree-ssanames.c: Ditto. * tree-stdarg.c: Ditto. * tree-streamer-in.c: Ditto. * tree-streamer-out.c: Ditto. * tree-streamer.c: Ditto. * tree-switch-conversion.c: Ditto. * tree-tailcall.c: Ditto. * tree-vect-data-refs.c: Ditto. * tree-vect-generic.c: Ditto. * tree-vect-loop-manip.c: Ditto. * tree-vect-loop.c: Ditto. * tree-vect-patterns.c: Ditto. * tree-vect-slp.c: Ditto. * tree-vect-stmts.c: Ditto. * tree-vectorizer.c: Ditto. * tree-vrp.c: Ditto. * tree.c: Ditto. * tsan.c: Ditto. * ubsan.c: Ditto. * valtrack.c: Ditto. * valtrack.h: Ditto. * value-prof.c: Ditto. * var-tracking.c: Ditto. * varasm.c: Ditto. * varpool.c: Ditto. * vtable-verify.c: Ditto. * web.c: Ditto. * config/aarch64/aarch64-builtins.c: Ditto. * config/aarch64/aarch64.c: Ditto. * config/alpha/alpha.c: Ditto. * config/arc/arc.c: Ditto. * config/arm/arm.c: Ditto. * config/avr/avr.c: Ditto. * config/bfin/bfin.c: Ditto. * config/c6x/c6x.c: Ditto. * config/cr16/cr16.c: Ditto. * config/cris/cris.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/epiphany/epiphany.c: Ditto. * config/epiphany/mode-switch-use.c: Ditto. * config/epiphany/resolve-sw-modes.c: Ditto. * config/fr30/fr30.c: Ditto. * config/frv/frv.c: Ditto. * config/h8300/h8300.c: Ditto. * config/i386/i386.c: Ditto. * config/i386/winnt.c: Ditto. * config/ia64/ia64.c: Ditto. * config/iq2000/iq2000.c: Ditto. * config/lm32/lm32.c: Ditto. * config/m32c/m32c.c: Ditto. * config/m32r/m32r.c: Ditto. * config/m68k/m68k.c: Ditto. * config/mcore/mcore.c: Ditto. * config/mep/mep.c: Ditto. * config/microblaze/microblaze.c: Ditto. * config/mips/mips.c: Ditto. * config/mmix/mmix.c: Ditto. * config/mn10300/mn10300.c: Ditto. * config/moxie/moxie.c: Ditto. * config/msp430/msp430.c: Ditto. * config/nds32/nds32-cost.c: Ditto. * config/nds32/nds32-fp-as-gp.c: Ditto. * config/nds32/nds32-intrinsic.c: Ditto. * config/nds32/nds32-isr.c: Ditto. * config/nds32/nds32-md-auxiliary.c: Ditto. * config/nds32/nds32-memory-manipulation.c: Ditto. * config/nds32/nds32-pipelines-auxiliary.c: Ditto. * config/nds32/nds32-predicates.c: Ditto. * config/nds32/nds32.c: Ditto. * config/nios2/nios2.c: Ditto. * config/pa/pa.c: Ditto. * config/pdp11/pdp11.c: Ditto. * config/rl78/rl78.c: Ditto. * config/rs6000/rs6000.c: Ditto. * config/rx/rx.c: Ditto. * config/s390/s390.c: Ditto. * config/sh/sh-mem.cc: Ditto. * config/sh/sh.c: Ditto. * config/sh/sh_optimize_sett_clrt.cc: Ditto. * config/sh/sh_treg_combine.cc: Ditto. * config/sparc/sparc.c: Ditto. * config/spu/spu.c: Ditto. * config/stormy16/stormy16.c: Ditto. * config/tilegx/tilegx.c: Ditto. * config/tilepro/tilepro.c: Ditto. * config/v850/v850.c: Ditto. * config/vax/vax.c: Ditto. * config/xtensa/xtensa.c: Ditto. From-SVN: r216735
2014-10-27 13:41:01 +01:00
2014-10-27 Andrew MacLeod <amacleod@redhat.com>
* c-gimplify.c: Adjust include files.
In cp/error.c... In cp/error.c, I separate the initialization of the diagnostic context from the initialization of the scratch pretty-printer (cxx_pp). This was suggested by Gabriel in the last review of the patch and now I realize it was a good idea. Now cxx_initialize_diagnostics is the equivalent version of c_initialize_diagnostics. To avoid having to make extern a bunch of functions, I moved it from cp-objcp-common.c to error.c. I moved the setting of diagnostic_format_decoder (global_dc) = c_tree_printer, from c_objc_common_init to c_initialize_diagnostics, and right after c_common_diagnostics_set_defaults. This mimics what is done in cxx_initialize_diagnostics. Moreover, in both c_initialize_diagnostics and cxx_initialize_diagnostics, the FE-specific pretty-printer is initialized first and then other settings are applied. This does not make a difference right now, but if in the future one wishes to touch something in the pretty-printer, it will not get overriden immediately. In fact, the code I removed in c_common_initialize_diagnostics, which sets line_cutoff to 80, is useless because the pretty-printer created here is actually never used, but overriden by the FE-specific pretty-printers. This also means that doc/invoke.texi was wrong. Finally, it is useless to set the maximum line length to 0 in the constructor of cxx_pretty_printer. It is the default anyway. gcc/c/ChangeLog: 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c++/53061 * c-objc-common.c (c_objc_common_init): Do not do diagnostics initialization here... (c_initialize_diagnostics): ... but here. Set defaults after building pretty-printer. gcc/ChangeLog: 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c++/53061 * doc/invoke.texi (fmessage-length): Update text to match reality. gcc/cp/ChangeLog: 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c++/53061 * cp-objcp-common.c: Do not include new. (cxx_initialize_diagnostics): Move from here to ... * error.c (cxx_initialize_diagnostics): : ... here. Move diagnostics initialization here from init_error. (cxx_pp): Use a real pointer not a macro. (init_error): Just initialize cxx_pp. * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do not set maximum line length. gcc/c-family/ChangeLog: 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c++/53061 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from c_common_initialize_diagnostics. * c-common.h: Likewise. From-SVN: r216720
2014-10-26 22:21:58 +01:00
2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53061
* c-opts.c (c_common_diagnostics_set_defaults): Renamed from
c_common_initialize_diagnostics.
* c-common.h: Likewise.
2014-10-24 Marek Polacek <polacek@redhat.com>
PR c/56980
* c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
print "struct"/"union"/"enum" for typedefed names.
2014-10-23 Marek Polacek <polacek@redhat.com>
* c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
in unsigned type.
New syntax for -fsanitize-recover. 2014-10-22 Jakub Jelinek <jakub@redhat.com> Yury Gribov <y.gribov@samsung.com> gcc/ * common.opt (flag_sanitize_recover): New variable. (fsanitize-recover): Remove Var/Init, deprecate. (fsanitize-recover=): New option. * doc/invoke.texi (fsanitize-recover): Update docs. * opts.c (finish_options): Use opts->x_flag_sanitize instead of flag_sanitize. Prohibit -fsanitize-recover for anything besides UBSan. Formatting. (common_handle_option): Handle OPT_fsanitize_recover_ and OPT_fsanitize_recover. Use opts->x_flag_sanitize instead of flag_sanitize. * asan.c (pass_sanopt::execute): Fix up formatting. * ubsan.c (ubsan_expand_bounds_ifn, ubsan_expand_null_ifn, ubsan_expand_objsize_ifn, ubsan_build_overflow_builtin, instrument_bool_enum_load, ubsan_instrument_float_cast, instrument_nonnull_arg, instrument_nonnull_return): Check bits in flag_sanitize_recover bitmask instead of flag_sanitize_recover as bool flag. gcc/c-family/ * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift, ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask instead of flag_sanitize_recover as bool flag. gcc/testsuite/ * c-c++-common/ubsan/align-1.c: Update cmdline options. * c-c++-common/ubsan/align-3.c: Likewise. * c-c++-common/ubsan/bounds-1.c: Likewise. * c-c++-common/ubsan/div-by-zero-7.c: Likewise. * c-c++-common/ubsan/float-cast-overflow-10.c: Likewise. * c-c++-common/ubsan/float-cast-overflow-7.c: Likewise. * c-c++-common/ubsan/float-cast-overflow-8.c: Likewise. * c-c++-common/ubsan/float-cast-overflow-9.c: Likewise. * c-c++-common/ubsan/nonnull-2.c: Likewise. * c-c++-common/ubsan/nonnull-3.c: Likewise. * c-c++-common/ubsan/object-size-3.c: Likewise. * c-c++-common/ubsan/overflow-1.c: Likewise. * c-c++-common/ubsan/overflow-add-1.c: Likewise. * c-c++-common/ubsan/overflow-add-3.c: Likewise. * c-c++-common/ubsan/overflow-mul-1.c: Likewise. * c-c++-common/ubsan/overflow-mul-3.c: Likewise. * c-c++-common/ubsan/overflow-negate-2.c: Likewise. * c-c++-common/ubsan/overflow-sub-1.c: Likewise. * c-c++-common/ubsan/pr59503.c: Likewise. * c-c++-common/ubsan/pr60613-1.c: Likewise. * c-c++-common/ubsan/save-expr-1.c: Likewise. * c-c++-common/ubsan/shift-3.c: Likewise. * c-c++-common/ubsan/shift-6.c: Likewise. * c-c++-common/ubsan/undefined-1.c: Likewise. * c-c++-common/ubsan/vla-2.c: Likewise. * c-c++-common/ubsan/vla-3.c: Likewise. * c-c++-common/ubsan/vla-4.c: Likewise. * g++.dg/ubsan/cxx11-shift-1.C: Likewise. * g++.dg/ubsan/return-2.C: Likewise. * c-c++-common/ubsan/recovery-1.c: New test. * c-c++-common/ubsan/recovery-2.c: New test. * c-c++-common/ubsan/recovery-3.c: New test. * c-c++-common/ubsan/recovery-common.inc: New file. Co-Authored-By: Yury Gribov <y.gribov@samsung.com> From-SVN: r216552
2014-10-22 13:07:10 +02:00
2014-10-22 Jakub Jelinek <jakub@redhat.com>
Yury Gribov <y.gribov@samsung.com>
* c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
instead of flag_sanitize_recover as bool flag.
2014-10-21 09:58:54 +02:00
2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
* cilk.c: Revert previous change.
2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
PR c/63307
* cilk.c: Include vec.h.
(struct cilk_decls): New structure.
(wrapper_parm_cb): Split this function to...
(fill_decls_vec): ...this...
(create_parm_list): ...and this.
(compare_decls): New function.
(for_local_cb): Remove.
(wrapper_local_cb): Ditto.
(build_wrapper_type): For now first traverse and fill vector of
declarations then sort it and then deal with sorted vector.
(cilk_outline): Ditto.
(declare_one_free_variable): Ditto.
2014-10-17 Marek Polacek <polacek@redhat.com>
* c-opts.c (c_common_post_options): Set warn_implicit_int.
* c.opt (Wimplicit-int): Initialize to -1.
function.h: Flatten file. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * function.h: Flatten file. Remove includes, adjust prototypes to reflect only what is in function.h. (enum direction, struct args_size, struct locate_and_pad_arg_data, ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE, ARGS_SIZE_RTX): Relocate from expr.h. (ASLK_REDUCE_ALIGN, ASLK_RECORD_PAD): Relocate from rtl.h. (optimize_function_for_size_p, optimize_function_for_speed_p): Move prototypes to predict.h. (init_varasm_status): Move prototype to varasm.h. * expr.h: Adjust include files. (enum direction, struct args_size, struct locate_and_pad_arg_data, ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE, ARGS_SIZE_RTX): Move to function.h. (locate_and_pad_parm): Move prototype to function.h. * rtl.h: (assign_stack_local, ASLK_REDUCE_ALIGN, ASLK_RECORD_PAD, assign_stack_local_1, assign_stack_temp, assign_stack_temp_for_type, assign_temp, reposition_prologue_and_epilogue_notes, prologue_epilogue_contains, sibcall_epilogue_contains, update_temp_slot_address, maybe_copy_prologue_epilogue_insn, set_return_jump_label): Move prototypes to function.h. * predict.h (optimize_function_for_size_p, optimize_function_for_speed_p): Relocate prototypes from function.h. * shrink-wrap.h (emit_return_into_block, active_insn_between, convert_jumps_to_returns, emit_return_for_exit): Move prototypes to function.h. * varasm.h (init_varasm_status): Relocate prototype from function.h. * genattrtab.c (write_header): Add predict.h to include list. * genconditions.c (write_header): Add predict.h to include list. * genemit.c (main): Adjust header file includes. * gengtype.c (ifiles): Add flattened function.h header files. * genoutput.c (output_prologue): Add predict.h to include list. * genpreds.c (write_insn_preds_c): Adjust header file includes. * genrecog.c (write_header): Add flattened function.h header files. * alias.c: Adjust include files. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgrtl.c: Likewise. * cgraph.h: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * coverage.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbxout.c: Likewise. * ddg.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dojump.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * function.c: Likewise. * gcse.c: Likewise. * gimple-fold.c: Likewise. * gimple-low.c: Likewise. * gimple-streamer.h: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lcm.c: Likewise. * loop-invariant.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * profile.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * statistics.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * symtab.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * trans-mem.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-stdarg.c: Likewise. * tree-tailcall.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * valtrack.c: Likewise. * varasm.c: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * testsuite/g++.dg/plugin/pragma_plugin.c: Adjust include files. * config/aarch64/aarch64.c: Add flattened includes from function.h. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/score/score.c: Likewise. * config/sh/sh.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/xtensa/xtensa.c: Likewise. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * ada/gcc-interface/misc.c: Adjust include files. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * c/c-decl.c: Adjust include files. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * c-family/c-pragma.c: Adjust include files. * c-family/c-semantics.c: Likewise. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * cp/cp-tree.h: Adjust include files. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * fortran/f95-lang.c: Adjust include files. * fortran/trans-decl.c: Likewise. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * java/class.c: Adjust include files. * java/resource.c: Likewise. 2014-10-16 Andrew MacLeod <amacleod@redhat.com> * objc/objc-act.c: Adjust include files. From-SVN: r216337
2014-10-16 18:37:19 +02:00
2014-10-16 Andrew MacLeod <amacleod@redhat.com>
* c-pragma.c: Adjust include files.
* c-semantics.c: Likewise.
2014-10-16 DJ Delorie <dj@redhat.com>
* c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
multiples of bytes.
2014-10-14 Jason Merrill <jason@redhat.com>
PR c++/63455
* c-common.h (CPP_PREPARSED_EXPR): New.
(N_CP_TTYPES): Adjust.
2014-10-15 Marek Polacek <polacek@redhat.com>
* c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
machmode.h (int_n_data_t): New. * machmode.h (int_n_data_t): New. (int_n_enabled_p): New. (int_n_data): New. * tree.c (int_n_enabled_p): New. (int_n_trees): New. (make_or_reuse_type): Check for all __intN types, not just __int128. (build_common_tree_nodes): Likewise. Also fill in integer_typs[] entries. * tree.h (int128_integer_type_node): Remove. (int128_unsigned_type_node): Remove. (int_n_trees_t): New. (int_n_enabled_p): New. (int_n_trees): New. * toplev.c (standard_type_bitsize): New. (do_compile): Check which __intN types are enabled for the current run. * builtin-types.def (BT_INT128): Remove. (BT_UINT128): Remove. * machmode.def: Add macro to create __int128 for all targets. * stor-layout.c (mode_for_size): Support __intN types. (smallest_mode_for_size): Likewise. (initialize_sizetypes): Support __intN types. * genmodes.c (struct mode_data): Add int_n field. (blank_mode): Likewise. (INT_N): New. (make_int_n): New. (emit_insn_modes_h): Count __intN entries and define NUM_INT_N_ENTS. (emit_mode_int_n): New. (emit_insn_modes_c): Call it. * gimple.c (gimple_signed_or_unsigned_type): Check for all __intN types, not just __int128. * tree-core.h (integer_type_kind): Remove __int128-specific entries, reserve spots for __intN entries. libstdc++-v3/ * src/c++11/limits.cc: Add support for __intN types. * include/std/type_traits: Likewise. * include/std/limits: Likewise. * include/c_std/cstdlib: Likewise. * include/bits/cpp_type_traits.h: Likewise. * include/c_global/cstdlib: Likewise. c-family/ * c-pretty-print.c (pp_c_integer_constant): Check for all __intN types, not just __int128. * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN types, not just __int128. (cpp_atomic_builtins): Round pointer sizes up. (type_suffix): Use type precision, not specific types. * c-common.c (c_common_reswords): Remove __int128 special case. (c_common_type_for_size): Check for all __intN types, not just __int128. (c_common_type_for_mode): Likewise. (c_common_signed_or_unsigned_type): Likewise. (c_build_bitfield_integer_type): Likewise. (c_common_nodes_and_builtins): Likewise. (keyword_begins_type_specifier): Likewise. * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all __intN variants. c/ * c-parser.c (c_parse_init): Add RID entries for each __intN. (c_token_starts_typename): Check all __intN, not just __int128. (c_token_starts_declspecs): Likewise. (c_parser_declspecs): Likewise. (c_parser_attribute_any_word): Likewise. (c_parser_objc_selector): Likewise. * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n. (struct c_declspecs): Add int_n_idx field to record *which* __intN is specified. * c-decl.c (declspecs_add_type): Check for all __intN, not just __int128. (finish_declspecs): Likewise. testsuite/ * g++.dg/abi/mangle64.C: New. cp/ * typeck.c (cp_common_type): Check for all __intN types, not just __int128. * decl.c (grokdeclarator): Likewise. * rtti.c (emit_support_tinfos): Check for all __intN types, not just __int128. * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check for all __intN types, not just __int128. (cp_parser_simple_type_specifier): Likewise. * mangle.c (integer_type_codes): Remove int128-specific codes. * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which __intN was specified. * lex.c (init_reswords): Reserve all __intN keywords. lto/ * lto-lang.c (lto_build_c_type_nodes): Check intN types for size-type as well. (lto_init): Initialize all intN types, not just int128. From-SVN: r216220
2014-10-14 21:44:36 +02:00
2014-10-14 DJ Delorie <dj@redhat.com>
* c-pretty-print.c (pp_c_integer_constant): Check for all __intN
types, not just __int128.
* c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
types, not just __int128.
(cpp_atomic_builtins): Round pointer sizes up.
(type_suffix): Use type precision, not specific types.
* c-common.c (c_common_reswords): Remove __int128 special case.
(c_common_type_for_size): Check for all __intN types, not just
__int128.
(c_common_type_for_mode): Likewise.
(c_common_signed_or_unsigned_type): Likewise.
(c_build_bitfield_integer_type): Likewise.
(c_common_nodes_and_builtins): Likewise.
(keyword_begins_type_specifier): Likewise.
* c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
__intN variants.
2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
* c-common.c: Use hash_table instead of hashtab.
2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
* c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
C++11 section.
2014-10-03 Marc Glisse <marc.glisse@inria.fr>
PR c++/54427
PR c++/57198
PR c++/58845
* c-common.c (warn_logical_operator): Punt for vectors.
Implement SD-6: SG10 Feature Test Recommendations 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net> Implement SD-6: SG10 Feature Test Recommendations * internal.h (lexer_state, spec_nodes): Add in__has_include__. * directives.c: Support __has_include__ builtin. * expr.c (parse_has_include): New function to parse __has_include__ builtin; (eval_token()): Use it. * files.c (_cpp_has_header()): New funtion to look for header; (open_file_failed()): Not an error to not find a header file for __has_include__. * identifiers.c (_cpp_init_hashtable()): Add entry for __has_include__. * pch.c (cpp_read_state): Lookup __has_include__. * traditional.c (enum ls, _cpp_scan_out_logical_line()): Walk through __has_include__ statements. 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net> Implement SD-6: SG10 Feature Test Recommendations * c-cppbuiltin.c (c_cpp_builtins()): Define language feature macros and the __has_header macro. 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net> Implement SD-6: SG10 Feature Test Recommendations * include/bits/basic_string.h: Add __cpp_lib feature test macro. * include/bits/stl_algobase.h: Ditto. * include/bits/stl_function.h: Ditto. * include/bits/unique_ptr.h: Ditto. * include/std/chrono: Ditto. * include/std/complex: Ditto. * include/std/iomanip: Ditto. * include/std/shared_mutex: Ditto. * include/std/tuple: Ditto. * include/std/type_traits: Ditto. * include/std/utility: Ditto. * testsuite/experimental/feat-cxx14.cc: New. * testsuite/experimental/feat-lib-fund.cc: New. * testsuite/20_util/declval/requirements/1_neg.cc: Adjust. * testsuite/20_util/duration/literals/range.cc: Adjust. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Adjust. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Adjust. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust. * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust. * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc: Adjust. 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net> Implement SD-6: SG10 Feature Test Recommendations * g++.dg/cpp1y/feat-cxx11-neg.C: New. * g++.dg/cpp1y/feat-cxx11.C: New. * g++.dg/cpp1y/feat-cxx14.C: New. * g++.dg/cpp1y/feat-cxx98.C: New. * g++.dg/cpp1y/feat-cxx98-neg.C: New. * g++.dg/cpp1y/phoobhar.h: New. * g++.dg/cpp1y/testinc/phoobhar.h: New. From-SVN: r215752
2014-10-01 13:49:23 +02:00
2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
Implement SD-6: SG10 Feature Test Recommendations
* c-cppbuiltin.c (c_cpp_builtins()): Define language feature
macros and the __has_header macro.
2014-09-30 Jason Merrill <jason@redhat.com>
* c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
RID_IS_TRIVIALLY_CONSTRUCTIBLE.
* c-common.c (c_common_reswords): Add __is_trivially_copyable.
* c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
* c-common.c (c_common_reswords): Add __is_trivially_copyable.
* c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
* c-common.c (c_common_reswords): Remove __is_convertible_to.
2014-09-24 Marek Polacek <polacek@redhat.com>
PR c/61405
PR c/53874
* c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
Add an no_reorder attribute for LTO Some projects need to prevent reordering of specific top level declarations with LTO, in particular declarations defining init calls. The only way to do that with LTO was to use -fno-toplevel-reorder, which stops reordering for all declarations and makes LTO partitioning less efficient. This patch adds a new no_reorder attribute that stops reordering only for the marked declaration. The program can then only mark e.g. the initcalls and leave all the other declarations alone. The patch does: - Adds the new no_reorder attribute for the C family. - Initializes a new no_reorder flag in the symtab_nodes in the function visibility flag. - Maintains the no_reorder flag when creating new nodes. - Changes the partition code to always keep a separate sorted queue of ordered nodes and flush them in order with the other nodes. This is used by all nodes with -fno-toplevel-reorder, and only the marked ones without it. Parts of the old -fno-toplevel-reorder code paths are reused. - Adds various checks throughout the tree to make no_reorder marked functions behave the same as with -fno-toplevel-reorder - Changes the LTO streamer to serialize the no_reorder attribute. gcc/c-family/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * c-common.c (handle_no_reorder_attribute): New function. (c_common_attribute_table): Add no_reorder attribute. gcc/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * cgraph.h (symtab_node): Add no_reorder attribute. (symbol_table::output_asm_statements): Remove. * cgraphclones.c (cgraph_node::create_clone): Copy no_reorder. (cgraph_node::create_version_clone): Dito. (symbol_table::output_asm_statements): Remove. * trans-mem.c (ipa_tm_create_version_alias): Dito. * cgraphunit.c (varpool_node::finalize_decl): Check no_reorder. (output_in_order): Add no_reorder flag. Only handle no_reorder nodes when set. (symbol_table::compile): Add separate pass for no_reorder nodes. (process_common_attributes): Set no_reorder flag in symtab node. Add node argument. (process_function_and_variable_attributes): Pass symtab nodes to process_common_attributes. * doc/extend.texi (no_reorder): Document no_reorder attribute. * lto-cgraph.c (lto_output_node): Serialize no_reorder. (lto_output_varpool_node): Dito. (input_overwrite_node): Dito. (input_varpool_node): Dito. * varpool.c (varpool_node::add): Set no_reorder attribute. (symbol_table::remove_unreferenced_decls): Handle no_reorder. (symbol_table::output_variables): Dito. * symtab.c (symtab_node::dump_base): Print no_reorder. gcc/lto/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * lto-partition.c (node_cmp): Update comment. (varpool_node_cmp): Use symtab_node for comparison. (add_sorted_nodes): New function. (lto_balanced_map): Change to keep ordered queue of ordered node. Handle no_reorder attribute. From-SVN: r215537
2014-09-24 05:29:24 +02:00
2014-09-23 Andi Kleen <ak@linux.intel.com>
* c-common.c (handle_no_reorder_attribute): New function.
(c_common_attribute_table): Add no_reorder attribute.
Remove LIBGCC2_LONG_DOUBLE_TYPE_SIZE target macro. This patch removes the target macro LIBGCC2_LONG_DOUBLE_TYPE_SIZE. After recent changes, this macro was used in two ways in libgcc: to determine the mode of long double in dfp-bit.h, and to determine whether a particular mode has excess precision for use in complex multiplication. The former is concerned specifically with long double: it relates to use of strtold for converting between decimal and binary floating point. This is replaced by comparing __LDBL_MANT_DIG__ with the appropriate __LIBGCC_*_MANT_DIG__ macro. The latter is replaced __LIBGCC_*_EXCESS_PRECISION__ predefined macros. Remarks: * Comparing (__LDBL_MANT_DIG__ == __LIBGCC_XF_MANT_DIG__) is more fragile than it looks; it's possible for XFmode to have 53-bit mantissa (TARGET_96_ROUND_53_LONG_DOUBLE, on FreeBSD and DragonFlyBSD 32-bit), in which case such a comparison would not distinguish XFmode and DFmode as possible modes for long double. Fortunately, no target supporting that form of XFmode also supports long double = double (but if some target did, we'd need e.g. an additional macro giving the exponent range of each mode). Furthermore, this code doesn't actually get used for x86 (or any other target with XFmode support), because x86 uses BID not DPD and BID has its own conversion code (which handles conversions for both XFmode and TFmode without needing to go via strtold). And FreeBSD and DragonFlyBSD aren't among the targets with DFP support. So while in principle this code is fragile and it's a deficiency that it can't support both XFmode and TFmode at once (something that can't be solved with the string conversion approach without libc having TS 18661 functions such as strtof128), all these issues should not be a problem in practice. * If other cases of excess precision are supported in future, the code for defining __LIBGCC_*_EXCESS_PRECISION__ may need updating. Although the most likely such cases might not actually involve excess precision for any mode used in libgcc - FLT_EVAL_METHOD being 32 to do _Float16 arithmetic on _Float32 should have the effect of _Complex _Float16 arithmetic using __mulsc3 and __divsc3, rather than currently nonexistent __mulhc3 and __divhc3 as in bug 63250 for ARM. * As has been noted in the context of simultaneous support for __float128 and __ibm128 on Power, the semantics of macros such as LONG_DOUBLE_TYPE_SIZE are problematic because they rely on a poorly-defined precision value for floating-point modes (which seems to be intended as the number of significant bits in the representation, e.g. 80 for XFmode which may be either 12 or 16 bytes) uniquely identifying a mode (although defining an arbitrarily different value for one of the modes you wish to distinguish may work as a hack). It would be cleaner to have a target hook that gives a machine mode directly for float, double and long double, rather than going via these precision values. By eliminating all use of these macros (FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE) from code built for the target, this patch facilitates such a conversion to a hook (which I suppose would take some suitable enum as an argument to identify which of the three types to return a mode for). (The issue of multiple type support for DFP conversions would apply in that Power case. <https://gcc.gnu.org/ml/gcc-patches/2014-07/msg01084.html> doesn't seem to touch on it, but it would seem reasonable to punt on it initially as hard to fix. There would also be the issue of getting functions such as __powikf2, __mulkc3, __divkc3 defined, but that's rather easier to address.) Bootstrapped with no regressions on x86_64-unknown-linux-gnu. gcc: * doc/tm.texi.in (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * doc/tm.texi: Regenerate. * system.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Poison. * config/alpha/alpha.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/i386/i386-interix.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/i386/i386.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/i386/rtemself.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/ia64/ia64.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/m68k/m68k.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/m68k/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/mips/mips.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/mips/n32-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/msp430/msp430.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/rl78/rl78.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/rs6000/rs6000.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/rx/rx.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/s390/s390.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/sparc/freebsd.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/sparc/linux.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/sparc/linux64.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. * config/sparc/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point modes. libgcc: * dfp-bit.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. (__LIBGCC_XF_MANT_DIG__): Define if not already defined. (LONG_DOUBLE_HAS_XF_MODE): Define in terms of __LIBGCC_XF_MANT_DIG__. (__LIBGCC_TF_MANT_DIG__): Define if not already defined. (LONG_DOUBLE_HAS_TF_MODE): Define in terms of __LIBGCC_TF_MANT_DIG__. * libgcc2.c (NOTRUNC): Define in terms of __LIBGCC_*_EXCESS_PRECISION__, not LIBGCC2_LONG_DOUBLE_TYPE_SIZE. * libgcc2.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. From-SVN: r215491
2014-09-23 02:48:46 +02:00
2014-09-22 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (c_cpp_builtins): Define
__LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
modes.
Remove LIBGCC2_TF_CEXT target macro. This patch removes the (undocumented) LIBGCC2_TF_CEXT target macro, replacing it by -fbuilding-libgcc predefines (and thereby gets rid of another LIBGCC2_LONG_DOUBLE_TYPE_SIZE conditional, though some more patches are needed before that target macro can be eliminated). This macro indicated the suffix used on __builtin_huge_val, __builtin_copysign, __builtin_fabs built-in function names to produce the names for a given floating-point mode. Predefines are added for all floating-point modes supported for libgcc, not just TFmode. These are fully accurate for modes corresponding to float, double and long double. For other modes, the suffix for *constants* is determined by the targetm.c.mode_for_suffix hook (the limit to two possible suffixes 'w' and 'q' being hardcoded in various places). This is in fact the suffix for built-in functions as well where such functions exist. * For i386, the *q functions always exist (whether or not TFmode is used for long double). The *w functions never exist (but this doesn't matter for libgcc, since no i386 configuration treats XFmode as a supported scalar mode if long double is TFmode; if __float80 were to be supported for 64-bit Android, properly such functions ought to be added). * For ia64, the *q functions exist for non-HP-UX (under HP-UX, long double is TFmode, so they aren't needed). The *w functions never exist. This is an issue for this libgcc code for the XFmode complex functions in libgcc on HP-UX; as I understand it, right now those will accidentally be using TFmode versions of those three functions, so involving unnecessary conversions, while the sanity check on CEXT accidentally passes because all it tests is the sizes of the types. Because of the lack of 'w' functions, the patch uses 'l' when the constant suffix is 'w', matching what the existing libgcc code would do for IA64 HP-UX in that case. Ideally there would be generic code to create such built-in functions for all supported floating-point types. That may be something to consider if support for TS 18661-3 (standard bindings for IEEE 754-2008, defining names such as _Float128, and function names such as copysignf128) is added in future. Bootstrapped with no regressions on x86_64-unknown-linux-gnu. gcc: * system.h (LIBGCC2_TF_CEXT): Poison. * config/i386/cygming.h (LIBGCC2_TF_CEXT): Remove. * config/i386/darwin.h (LIBGCC2_TF_CEXT): Likewise. * config/i386/dragonfly.h (LIBGCC2_TF_CEXT): Likewise. * config/i386/freebsd.h (LIBGCC2_TF_CEXT): Likewise. * config/i386/gnu-user-common.h (LIBGCC2_TF_CEXT): Likewise. * config/i386/openbsdelf.h (LIBGCC2_TF_CEXT): Likewise. * config/i386/sol2.h (LIBGCC2_TF_CEXT): Likewise. * config/ia64/ia64.h (LIBGCC2_TF_CEXT): Likewise. * config/ia64/linux.h (LIBGCC2_TF_CEXT): Likewise. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__ for supported floating-point modes. libgcc: * libgcc2.c (CEXT): Define using __LIBGCC_*_FUNC_EXT__. From-SVN: r215368
2014-09-19 01:27:26 +02:00
2014-09-18 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
for supported floating-point modes.
2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (Wpsabi): Use LangEnabledBy.
* c-opts.c (c_common_handle_option): Do not handle here.
Remove LIBGCC2_HAS_?F_MODE target macros. This patch removes the LIBGCC2_HAS_{SF,DF,XF,TF}_MODE target macros, replacing them by predefines with -fbuilding-libgcc, together with a target hook that can influence those predefines when needed. The new default is that a floating-point mode is supported in libgcc if (a) it passes the scalar_mode_supported_p hook (otherwise it's not plausible for it to be supported in libgcc) and (b) it's one of those four modes (since those are the modes for which libgcc hardcodes the possibility of support). The target hook can override the default choice (in either direction) for modes that pass scalar_mode_supported_p (although overriding in the direction of returning true when the default would return false only makes sense if all relevant functions are specially defined in libgcc for that particular target). The previous default settings depended on various settings such as LIBGCC2_LONG_DOUBLE_TYPE_SIZE, as well as targets defining the above target macros if the default wasn't correct. The default scalar_mode_supported_p only declares a floating-point mode to be supported if it matches one of float / double / long double. This means that in most cases where a mode is only supported conditionally in libgcc (TFmode only supported if it's the mode of long double, most commonly), the default gets things right. Overrides were needed in the following cases: * SFmode would always have been supported in libgcc (the condition was BITS_PER_UNIT == 8, true for all current targets), but pdp11 defaults to 64-bit float, and in that case SFmode would fail scalar_mode_supported_p. I don't know if libgcc actually built for pdp11 (and the port may well no longer be being used), but this patch adds a scalar_mode_supported_p hook to it to ensure SFmode is treated as supported. * Certain i386 and ia64 targets need the new hook to match the existing cases for when XFmode or TFmode support is present in libgcc. For i386, the hook can always declare XFmode to be supported - the cases where it's not are the cases where long double is TFmode, in which case XFmode fails scalar_mode_supported_p[*] - but TFmode support needs to be conditional. (And of the targets not defining LIBGCC2_HAS_TF_MODE before this patch, some defined LONG_DOUBLE_TYPE_SIZE to 64, so ensuring LIBGCC2_HAS_TF_MODE would always be false, while others did not define it, so allowing it to be true in the -mlong-double-128 case. This patch matches that logic, although I suspect all the latter targets would have been broken if you tried to enable -mlong-double-128 by default, for lack of the soft-fp TFmode support in libgcc, which is separately configured.) [*] I don't know if it's deliberate not to support __float80 at all with -mlong-double-128. In order to implement the default version of the new hook, insn-modes.h was made to contain macros such as HAVE_TFmode for each machine mode, so the default hook can contain conditionals on whether XFmode and TFmode exist (to match the hardcoding of a list of modes in libgcc). This is also used in fortran/trans-types.c; previously it had a conditional on defined(LIBGCC2_HAS_TF_MODE) (a bit dubious, since it ignored the value of the macro), which is replaced by testing defined(HAVE_TFmode), in conjunction with requiring targetm.libgcc_floating_mode_supported_p. (Fortran is testing something stronger than that hook: not only is libgcc support required, but also libm or equivalent. Thus, it has a test for ENABLE_LIBQUADMATH_SUPPORT in the case that the mode is TFmode and that's not the same as any of the three standard types. The old and new tests are intended to accept exactly the same set of modes for all targets.) Apart from the four target macros eliminated by this patch, it gets us closer to eliminating LIBGCC2_LONG_DOUBLE_TYPE_SIZE as well, though a few more places using that macro need changing first. Bootstrapped with no regressions on x86_64-unknown-linux-gnu; also built cc1 for crosses to ia64-elf and pdp11-none as a minimal test of changes for those targets. gcc: * target.def (libgcc_floating_mode_supported_p): New hook. * targhooks.c (default_libgcc_floating_mode_supported_p): New function. * targhooks.h (default_libgcc_floating_mode_supported_p): Declare. * doc/tm.texi.in (LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_XF_MODE) (LIBGCC2_HAS_TF_MODE): Remove. (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): New @hook. * doc/tm.texi: Regenerate. * genmodes.c (emit_insn_modes_h): Define HAVE_%smode for each machine mode. * system.h (LIBGCC2_HAS_SF_MODE, LIBGCC2_HAS_DF_MODE) (LIBGCC2_HAS_XF_MODE, LIBGCC2_HAS_TF_MODE): Poison. * config/i386/cygming.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/darwin.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/djgpp.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/dragonfly.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/freebsd.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/gnu-user-common.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/i386-interix.h (IX86_NO_LIBGCC_TFMODE): Define. * config/i386/i386.c (ix86_libgcc_floating_mode_supported_p): New function. (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define. * config/i386/i386elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/lynx.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/netbsd-elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/netbsd64.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/nto.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/openbsd.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/rtemself.h (IX86_NO_LIBGCC_TFMODE): Define. * config/i386/sol2.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/vx-common.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/ia64/elf.h (IA64_NO_LIBGCC_TFMODE): Define. * config/ia64/freebsd.h (IA64_NO_LIBGCC_TFMODE): Define. * config/ia64/hpux.h (LIBGCC2_HAS_XF_MODE, LIBGCC2_HAS_TF_MODE): Remove. * config/ia64/ia64.c (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): New macro. (ia64_libgcc_floating_mode_supported_p): New function. * config/ia64/linux.h (LIBGCC2_HAS_TF_MODE): Remove. * config/ia64/vms.h (IA64_NO_LIBGCC_XFMODE) (IA64_NO_LIBGCC_TFMODE): Define. * config/msp430/msp430.h (LIBGCC2_HAS_DF_MODE): Remove. * config/pdp11/pdp11.c (TARGET_SCALAR_MODE_SUPPORTED_P): New macro. (pdp11_scalar_mode_supported_p): New function. * config/rl78/rl78.h (LIBGCC2_HAS_DF_MODE): Remove. * config/rx/rx.h (LIBGCC2_HAS_DF_MODE): Remove. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__ macros for floating-point modes. gcc/fortran: * trans-types.c (gfc_init_kinds): Check targetm.libgcc_floating_mode_supported_p for floating-point modes. Check HAVE_TFmode instead of LIBGCC2_HAS_TF_MODE. libgcc: * libgcc2.h (LIBGCC2_HAS_SF_MODE): Define using __LIBGCC_HAS_SF_MODE__. (LIBGCC2_HAS_DF_MODE): Define using __LIBGCC_HAS_DF_MODE__. (LIBGCC2_HAS_XF_MODE): Define using __LIBGCC_HAS_XF_MODE__. (LIBGCC2_HAS_TF_MODE): Define using __LIBGCC_HAS_TF_MODE__. * config/libbid/bid_gcc_intrinsics.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Do not define. (LIBGCC2_HAS_XF_MODE): Define using __LIBGCC_HAS_XF_MODE__. (LIBGCC2_HAS_TF_MODE): Define using __LIBGCC_HAS_TF_MODE__. * fixed-bit.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Do not define. (LIBGCC2_HAS_SF_MODE): Define using __LIBGCC_HAS_SF_MODE__. (LIBGCC2_HAS_DF_MODE): Define using __LIBGCC_HAS_DF_MODE__. From-SVN: r215215
2014-09-12 14:05:18 +02:00
2014-09-12 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
macros for floating-point modes.
2014-09-11 Marc Glisse <marc.glisse@inria.fr>
PR target/58757
* c-cppbuiltin.c (builtin_define_float_constants): Correct
__*_DENORM_MIN__ without denormals.
2014-09-10 Jakub Jelinek <jakub@redhat.com>
* c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
ubsan_instrument_vla, ubsan_instrument_return): Adjust
ubsan_create_data callers.
(ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
index is constant or BIT_AND_EXPR with constant mask and is
small enough for the bound.
* c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt: Add CppReason to various flags.
(Wdate-time): Re-sort.
* c-common.c: Include c-common.h earlier.
(struct reason_option_codes_t): Delete.
(c_option_controlling_cpp_error): Prefix global type and struct
with cpp_.
2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (Wnormalized): New.
(Wnormalized=): Use Enum and Reject Negative.
* c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
2014-09-08 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
digits of floating-point modes if -fbuilding-libgcc.
Use -fbuilding-libgcc for more target macros used in libgcc. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Also define __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__, __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__, __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__, __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__, __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__, __LIBGCC_STACK_GROWS_DOWNWARD__, __LIBGCC_DONT_USE_BUILTIN_SETJMP__, __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__, __LIBGCC_DWARF_FRAME_REGISTERS__, __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__, __LIBGCC_STACK_POINTER_REGNUM__ and __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc. (builtin_define_with_value): Handle backslash-escaping in string macro values. libgcc: * Makefile.in (CRTSTUFF_CFLAGS): Add -fbuilding-libgcc. * config/aarch64/linux-unwind.h (STACK_POINTER_REGNUM): Change all uses to __LIBGCC_STACK_POINTER_REGNUM__. (DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__. * config/alpha/vms-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change use to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__. * config/cr16/unwind-cr16.c (STACK_GROWS_DOWNWARD): Change all uses to __LIBGCC_STACK_GROWS_DOWNWARD__. (DWARF_FRAME_REGISTERS): Change all uses to __LIBGCC_DWARF_FRAME_REGISTERS__. (EH_RETURN_STACKADJ_RTX): Change all uses to __LIBGCC_EH_RETURN_STACKADJ_RTX__. * config/cr16/unwind-dw2.h (DWARF_FRAME_REGISTERS): Change use to __LIBGCC_DWARF_FRAME_REGISTERS__. Remove conditional definition. * config/i386/cygming-crtbegin.c (EH_FRAME_SECTION_NAME): Change use to __LIBGCC_EH_FRAME_SECTION_NAME__. (JCR_SECTION_NAME): Change use to __LIBGCC_JCR_SECTION_NAME__. * config/i386/cygming-crtend.c (EH_FRAME_SECTION_NAME): Change use to __LIBGCC_EH_FRAME_SECTION_NAME__. (JCR_SECTION_NAME): Change use to __LIBGCC_JCR_SECTION_NAME__ * config/mips/linux-unwind.h (STACK_POINTER_REGNUM): Change use to __LIBGCC_STACK_POINTER_REGNUM__. (DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__. * config/nios2/linux-unwind.h (STACK_POINTER_REGNUM): Change use to __LIBGCC_STACK_POINTER_REGNUM__. * config/pa/hpux-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__. * config/pa/linux-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__. * config/rs6000/aix-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__. (STACK_POINTER_REGNUM): Change all uses to __LIBGCC_STACK_POINTER_REGNUM__. * config/rs6000/darwin-fallback.c (STACK_POINTER_REGNUM): Change use to __LIBGCC_STACK_POINTER_REGNUM__. * config/rs6000/linux-unwind.h (STACK_POINTER_REGNUM): Change all uses to __LIBGCC_STACK_POINTER_REGNUM__. * config/sparc/linux-unwind.h (DWARF_FRAME_REGISTERS): Change use to __LIBGCC_DWARF_FRAME_REGISTERS__. * config/sparc/sol2-unwind.h (DWARF_FRAME_REGISTERS): Change use to __LIBGCC_DWARF_FRAME_REGISTERS__. * config/tilepro/linux-unwind.h (STACK_POINTER_REGNUM): Change use to __LIBGCC_STACK_POINTER_REGNUM__. * config/xtensa/unwind-dw2-xtensa.h (DWARF_FRAME_REGISTERS): Remove conditional definition. * crtstuff.c (TEXT_SECTION_ASM_OP): Change all uses to __LIBGCC_TEXT_SECTION_ASM_OP__. (EH_FRAME_SECTION_NAME): Change all uses to __LIBGCC_EH_FRAME_SECTION_NAME__. (EH_TABLES_CAN_BE_READ_ONLY): Change all uses to __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__. (CTORS_SECTION_ASM_OP): Change all uses to __LIBGCC_CTORS_SECTION_ASM_OP__. (DTORS_SECTION_ASM_OP): Change all uses to __LIBGCC_DTORS_SECTION_ASM_OP__. (JCR_SECTION_NAME): Change all uses to __LIBGCC_JCR_SECTION_NAME__. (INIT_SECTION_ASM_OP): Change all uses to __LIBGCC_INIT_SECTION_ASM_OP__. (INIT_ARRAY_SECTION_ASM_OP): Change all uses to __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__. * generic-morestack.c (STACK_GROWS_DOWNWARD): Change all uses to __LIBGCC_STACK_GROWS_DOWNWARD__. * libgcc2.c (INIT_SECTION_ASM_OP): Change all uses to __LIBGCC_INIT_SECTION_ASM_OP__. (INIT_ARRAY_SECTION_ASM_OP): Change all uses to __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__. (EH_FRAME_SECTION_NAME): Change all uses to __LIBGCC_EH_FRAME_SECTION_NAME__. * libgcov-profiler.c (VTABLE_USES_DESCRIPTORS): Remove conditional definitions. Change all uses to __LIBGCC_VTABLE_USES_DESCRIPTORS__. * unwind-dw2.c (STACK_GROWS_DOWNWARD): Change all uses to __LIBGCC_STACK_GROWS_DOWNWARD__. (DWARF_FRAME_REGISTERS): Change all uses to __LIBGCC_DWARF_FRAME_REGISTERS__. (EH_RETURN_STACKADJ_RTX): Change all uses to __LIBGCC_EH_RETURN_STACKADJ_RTX__. * unwind-dw2.h (DWARF_FRAME_REGISTERS): Remove conditional definition. Change use to __LIBGCC_DWARF_FRAME_REGISTERS__. * unwind-sjlj.c (DONT_USE_BUILTIN_SETJMP): Change all uses to __LIBGCC_DONT_USE_BUILTIN_SETJMP__. (JMP_BUF_SIZE): Change use to __LIBGCC_JMP_BUF_SIZE__. From-SVN: r214954
2014-09-05 14:03:46 +02:00
2014-09-05 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (c_cpp_builtins): Also define
__LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
__LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
__LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
__LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
__LIBGCC_STACK_GROWS_DOWNWARD__,
__LIBGCC_DONT_USE_BUILTIN_SETJMP__,
__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
__LIBGCC_DWARF_FRAME_REGISTERS__,
__LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
__LIBGCC_STACK_POINTER_REGNUM__ and
__LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
(builtin_define_with_value): Handle backslash-escaping in string
macro values.
2014-09-05 Richard Biener <rguenther@suse.de>
PR middle-end/63148
* c-format.c (check_format_arg): Properly handle
effectively signed POINTER_PLUS_EXPR offset.
2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
(Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
and Init.
* c-opts.c (c_common_handle_option): Do not handle here.
(sanitize_cpp_opts): Likewise.
* c-common.c (struct reason_option_codes_t): Handle
CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
2014-09-03 Marek Polacek <polacek@redhat.com>
* c.opt (Wlogical-not-parentheses): Enable by -Wall.
cilk-builtins.def (__cilkrts_cilk_for_32): New. gcc/ * cilk-builtins.def (__cilkrts_cilk_for_32): New. (__cilkrts_cilk_for_64): Likewise. * cilk-common.c (declare_cilk_for_builtin): New function. (cilk_init_builtins): Declare __cilkrts_cilk_for_32 and __cilkrts_cilk_for_64 bultins. * cilk.h (enum cilk_tree_index): Added CILK_TI_F_LOOP_32 and CILK_TI_F_LOOP_64. (cilk_for_32_fndecl): New define. (cilk_for_64_fndecl): Likewise. * gimple-pretty-print.c (dump_gimple_omp_for): Correct hadling of GF_OMP_FOR_KIND_CILKFOR cases; Added NE_EXPR case. * gimple.h (enum gf_mask): Added GF_OMP_FOR_KIND_CILKFOR; adjusted GF_OMP_FOR_KIND_MASK, GF_OMP_FOR_SIMD, GF_OMP_FOR_COMBINED, GF_OMP_FOR_COMBINED_INTO. * gimplify.c (gimplify_scan_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_ case. (gimplify_adjust_omp_clauses): Ditto. (gimplify_omp_for): Added CILK_FOR case. (gimplify_expr): Ditto. * omp-low.c: Include cilk.h. (extract_omp_for_data): Set appropriate kind for GF_OMP_FOR_KIND_CILKFOR; added check for GF_OMP_FOR_KIND_CILKFOR. (scan_sharing_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_ cases. (create_omp_child_function_name): Added second argument to handle cilk_for case. (cilk_for_check_loop_diff_type): New function. (expand_cilk_for_call): Likewise. (expand_cilk_for): Likewise. (create_omp_child_function): Set cilk_for_count; handle the cases when it is true; call create_omp_child_function_name with second argument. (expand_omp_taskreg): Set is_cilk_for and handle cases when it's true. (expand_omp_for): Handle case of GF_OMP_FOR_KIND_CILKFOR. * tree-core.h (omp_clause_code): Added OMP_CLAUSE__CILK_FOR_COUNT_. * tree-nested.c (convert_nonlocal_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_ case. (convert_local_omp_clauses): Ditto. * tree-pretty-print.c (dump_omp_clause): Added OMP_CLAUSE__CILK_FOR_COUNT_ and OMP_CLAUSE_SCHEDULE_CILKFOR cases. (dump_generic_node): Added CILK_FOR case. * tree.c (omp_clause_num_ops): New element OMP_CLAUSE__CILK_FOR_COUNT_ (1). (omp_clause_code_name): New element _Cilk_for_count_. (walk_tree_1): Added OMP_CLAUSE__CILK_FOR_COUNT_ case. * tree.def: Add tree code for CILK_FOR. gcc/c/ * c-parser.c (c_parser_cilk_for): New function. (c_parser_cilk_grainsize): Likewise. (c_get_temp_regvar): Likewise. (c_parser_statement_after_labels): Added RID_CILK_FOR case. (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case. (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks. * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_ case. gcc/cp/ * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition simplified. * parser.c (cp_parser_cilk_for): New function. (cp_parser_cilk_grainsize): Likewise. (cp_parser_statement): Added RID_CILK_FOR case. (cp_parser_omp_for_cond): Added CILK_FOR check. (cp_parser_omp_for_loop_init): Change function argument to accept tree_code instead just a bool flag; change the check to use that tree_code; check for initialization declaration in case of Cilk_for. (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR; changed call to cp_parser_omp_for_loop_init according new arguments' list. (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case. * pt.c (tsubst_expr): Added CILK_FOR case. * semantics.c: Include convert.h. (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR case; added OMP_CLAUSE__CILK_FOR_COUNT_. (handle_omp_for_class_iterator): New argument lastp and its usage; added NE_EXPR case. (finish_omp_for): Changed call to handle_omp_for_class_iterator according new arguments' list; in case of Cilk_for save very first decl and create empty stmt_list block; use block to build correct statement tree. gcc/c-family/ * c-cilkplus.c (cilk_for_number_of_iterations): New function. * c-common.c (c_common_reswords): Added _Cilk_for. * c-common.h (enum rid): Added RID_CILK_FOR. (cilk_for_number_of_iterations): Add declaration. * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and CILK_FOR. * c-pragma.c (init_pragma): Register "grainsize" pragma. * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE. gcc/testsuite/ * c-c++-common/cilk-plus/CK/cilk-fors.c: New test. * c-c++-common/cilk-plus/CK/cilk-for-2.c: New test. * c-c++-common/cilk-plus/CK/cilk-for-3.c: New test. * c-c++-common/cilk-plus/CK/cilk_for_errors.c: New test. * c-c++-common/cilk-plus/CK/cilk_for_grain.c: New test. * c-c++-common/cilk-plus/CK/cilk_for_grain_errors.c: New test. * c-c++-common/cilk-plus/CK/cilk_for_ptr_iter.c: New test. * c-c++-common/cilk-plus/CK/nested_cilk_for.c: New test. * g++.dg/cilk-plus/CK/cf3.cc: New test. * g++.dg/cilk-plus/CK/cilk-for-tplt.cc: New test. * g++.dg/cilk-plus/CK/for1.cc: New test. * g++.dg/cilk-plus/CK/stl_iter.cc: New test. * g++.dg/cilk-plus/CK/stl_rev_iter.cc: New test. * g++.dg/cilk-plus/CK/stl_test.cc: New test. Co-Authored-By: Balaji V. Iyer <balaji.v.iyer@intel.com> Co-Authored-By: Igor Zamyatin <igor.zamyatin@intel.com> From-SVN: r214818
2014-09-02 14:52:29 +02:00
2014-09-02 Jakub Jelinek <jakub@redhat.com>
Balaji V. Iyer <balaji.v.iyer@intel.com>
Igor Zamyatin <igor.zamyatin@intel.com>
* c-cilkplus.c (cilk_for_number_of_iterations): New function.
* c-common.c (c_common_reswords): Added _Cilk_for.
* c-common.h (enum rid): Added RID_CILK_FOR.
(cilk_for_number_of_iterations): Add declaration.
* c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
CILK_FOR.
* c-pragma.c (init_pragma): Register "grainsize" pragma.
* c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
Wundef): Use CPP, Var and Init.
* c-opts.c (c_common_handle_option): Do not handle the above flags here.
2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
* c-opts.c (c_common_handle_option): Do not handle here.
2014-08-25 Jason Merrill <jason@redhat.com>
* c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
-std=c++14 and -std=gnu++14, rather than the reverse.
* c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
* c-common.h (cxx_dialect): Remove cxx1y.
cpplib.h (enum c_lang): Add CLK_GNUCXX1Z, CLK_CXX1Z... libcpp/ 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net> * include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Z, CLK_CXX1Z; Rename CLK_GNUCXX1Y, CLK_CXX1Y to CLK_GNUCXX14, CLK_CXX14; * init.c (struct lang_flags lang_defaults): Add column for trigraphs; Add rows for CLK_GNUCXX1Z, CLK_CXX1Z; (cpp_set_lang): Set trigraphs; (cpp_init_builtins): Set __cplusplus to 201402L for C++14; Set __cplusplus to 201500L for C++17. * expr.c (cpp_classify_number): Change C++1y to C++14 in binary constants error message. gcc/c-family/ 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net> * c-common.h (enum cxx_dialect): Add cxx14. * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14. * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11. gcc/cp/ 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net> * decl.c (compute_array_index_type, grokdeclarator, undeduced_auto_decl): Change from cxx1y to cxx14. *lambda.c(add_capture()): Change error message from C++1y to C++14. * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name, cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt, cp_parser_decltype, cp_parser_conversion_type_id, cp_parser_simple_type_specifier, cp_parser_type_id_1, cp_parser_template_type_arg, cp_parser_std_attribute, cp_parser_template_declaration_after_export): Ditto. * pt.c (tsubst): Ditto. * semantics.c (force_paren_expr, finish_decltype_type): Ditto. * tree.c: Change comment. * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type, cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto. gcc/ 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net> * doc/invoke.texi: Change c++1y to c++14 and gnu++1y to gnu++14. Deprecate c++1y. Change language to reflect greater confidence in C++14. gcc/testsuite/ 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net> * g++.dg/cpp0x/cplusplus.C: New. * g++.dg/cpp0x/cplusplus_0x.C: New. * g++.dg/cpp0x/auto3.C: Change c++1y to c++14. * g++.dg/cpp0x/auto41.C: Ditto. * g++.dg/cpp0x/auto9.C: Ditto. * g++.dg/cpp0x/initlist26.C: Ditto. * g++.dg/cpp0x/pr59111.C: Ditto. * g++.dg/cpp0x/trailing2.C: Ditto. * g++.dg/cpp1y/attr-deprecated.C: Ditto. * g++.dg/cpp1y/auto-dtor1.C: Ditto. * g++.dg/cpp1y/auto-fn1.C: Ditto. * g++.dg/cpp1y/auto-fn2.C: Ditto. * g++.dg/cpp1y/auto-fn3.C: Ditto. * g++.dg/cpp1y/auto-fn4.C: Ditto. * g++.dg/cpp1y/auto-fn5.C: Ditto. * g++.dg/cpp1y/auto-fn6.C: Ditto. * g++.dg/cpp1y/auto-fn7.C: Ditto. * g++.dg/cpp1y/auto-fn8.C: Ditto. * g++.dg/cpp1y/auto-fn9.C: Ditto. * g++.dg/cpp1y/auto-fn10.C: Ditto. * g++.dg/cpp1y/auto-fn11.C: Ditto. * g++.dg/cpp1y/auto-fn12.C: Ditto. * g++.dg/cpp1y/auto-fn13.C: Ditto. * g++.dg/cpp1y/auto-fn14.C: Ditto. * g++.dg/cpp1y/auto-fn15.C: Ditto. * g++.dg/cpp1y/auto-fn16.C: Ditto. * g++.dg/cpp1y/auto-fn17.C: Ditto. * g++.dg/cpp1y/auto-fn18.C: Ditto. * g++.dg/cpp1y/auto-fn19.C: Ditto. * g++.dg/cpp1y/auto-fn20.C: Ditto. * g++.dg/cpp1y/auto-fn21.C: Ditto. * g++.dg/cpp1y/auto-fn22.C: Ditto. * g++.dg/cpp1y/auto-fn23.C: Ditto. * g++.dg/cpp1y/auto-fn24.C: Ditto. * g++.dg/cpp1y/auto-fn25.C: Ditto. * g++.dg/cpp1y/auto-mangle1.C: Ditto. * g++.dg/cpp1y/auto-neg1.C: Ditto. * g++.dg/cpp1y/digit-sep.C: Ditto. * g++.dg/cpp1y/digit-sep-neg.C: Ditto. * g++.dg/cpp1y/digit-sep-cxx11-neg.C: Ditto. * g++.dg/cpp1y/fn-generic-member-ool.C: Ditto. * g++.dg/cpp1y/lambda-deduce-mult.C: Ditto. * g++.dg/cpp1y/lambda-generic.C: Ditto. * g++.dg/cpp1y/lambda-generic-cfun.C: Ditto. * g++.dg/cpp1y/lambda-generic-dep.C: Ditto. * g++.dg/cpp1y/lambda-generic-mixed.C: Ditto. * g++.dg/cpp1y/lambda-generic-udt.C: Ditto. * g++.dg/cpp1y/lambda-generic-variadic.C: Ditto. * g++.dg/cpp1y/lambda-generic-vla1.C: Ditto. * g++.dg/cpp1y/lambda-generic-x.C: Ditto. * g++.dg/cpp1y/lambda-generic-xcfun.C: Ditto. * g++.dg/cpp1y/lambda-generic-xudt.C: Ditto. * g++.dg/cpp1y/lambda-init.C: Ditto. * g++.dg/cpp1y/lambda-init1.C: Ditto. * g++.dg/cpp1y/lambda-init2.C: Ditto. * g++.dg/cpp1y/lambda-init3.C: Ditto. * g++.dg/cpp1y/lambda-init4.C: Ditto. * g++.dg/cpp1y/lambda-init5.C: Ditto. * g++.dg/cpp1y/lambda-init6.C: Ditto. * g++.dg/cpp1y/lambda-init7.C: Ditto. * g++.dg/cpp1y/lambda-init8.C: Ditto. * g++.dg/cpp1y/lambda-init9.C: Ditto. * g++.dg/cpp1y/mangle1.C: Ditto. * g++.dg/cpp1y/pr57640.C: Ditto. * g++.dg/cpp1y/pr57644.C: Ditto. * g++.dg/cpp1y/pr58500.C: Ditto. * g++.dg/cpp1y/pr58533.C: Ditto. * g++.dg/cpp1y/pr58534.C: Ditto. * g++.dg/cpp1y/pr58535.C: Ditto. * g++.dg/cpp1y/pr58536.C: Ditto. * g++.dg/cpp1y/pr58548.C: Ditto. * g++.dg/cpp1y/pr58549.C: Ditto. * g++.dg/cpp1y/pr58637.C: Ditto. * g++.dg/cpp1y/pr58708.C: Ditto. * g++.dg/cpp1y/pr59110.C: Ditto. * g++.dg/cpp1y/pr59112.C: Ditto. * g++.dg/cpp1y/pr59113.C: Ditto. * g++.dg/cpp1y/pr59629.C: Ditto. * g++.dg/cpp1y/pr59635.C: Ditto. * g++.dg/cpp1y/pr59636.C: Ditto. * g++.dg/cpp1y/pr59638.C: Ditto. * g++.dg/cpp1y/pr59867.C: Ditto. * g++.dg/cpp1y/pr60033.C: Ditto. * g++.dg/cpp1y/pr60052.C: Ditto. * g++.dg/cpp1y/pr60053.C: Ditto. * g++.dg/cpp1y/pr60054.C: Ditto. * g++.dg/cpp1y/pr60064.C: Ditto. * g++.dg/cpp1y/pr60065.C: Ditto. * g++.dg/cpp1y/pr60190.C: Ditto. * g++.dg/cpp1y/pr60311.C: Ditto. * g++.dg/cpp1y/pr60332.C: Ditto. * g++.dg/cpp1y/pr60376.C: Ditto. * g++.dg/cpp1y/pr60377.C: Ditto. * g++.dg/cpp1y/pr60384.C: Ditto. * g++.dg/cpp1y/pr60390.C: Ditto. * g++.dg/cpp1y/pr60391.C: Ditto. * g++.dg/cpp1y/pr60393.C: Ditto. * g++.dg/cpp1y/pr60573.C: Ditto. * g++.dg/cpp1y/pr60626.C: Ditto. * g++.dg/cpp1y/pr60627.C: Ditto. * g++.dg/cpp1y/regress1.C: Ditto. * g++.dg/cpp1y/system-binary-constants-1.C: Ditto. * g++.dg/cpp1y/udlit-char-template.C: Ditto. * g++.dg/cpp1y/udlit-char-template-neg.C: Ditto. * g++.dg/cpp1y/udlit-empty-string-neg.C: Ditto. * g++.dg/cpp1y/udlit-enc-prefix-neg.C: Ditto. * g++.dg/cpp1y/udlit-userdef-string.C: Ditto. * g++.dg/cpp1y/var-templ1.C: Ditto. * g++.dg/cpp1y/var-templ2.C: Ditto. * g++.dg/cpp1y/var-templ3.C: Ditto. * g++.dg/cpp1y/var-templ4.C: Ditto. * g++.dg/cpp1y/var-templ5.C: Ditto. * g++.dg/cpp1y/var-templ6.C: Ditto. * g++.dg/cpp1y/var-templ7.C: Ditto. * g++.dg/cpp1y/vla1.C: Ditto. * g++.dg/cpp1y/vla2.C: Ditto. * g++.dg/cpp1y/vla3.C: Ditto. * g++.dg/cpp1y/vla4.C: Ditto. * g++.dg/cpp1y/vla5.C: Ditto. * g++.dg/cpp1y/vla8.C: Ditto. * g++.dg/cpp1y/vla9.C: Ditto. * g++.dg/cpp1y/vla10.C: Ditto. * g++.dg/cpp1y/vla11.C: Ditto. * g++.dg/cpp1y/vla12.C: Ditto. * g++.dg/cpp1y/vla13.C: Ditto. * g++.dg/cpp1y/vla-initlist1.C: Ditto. * g++.dg/ext/vector23.C: Ditto. * g++.dg/ext/vla11.C: Ditto. * gcc/testsuite/g++.dg/ubsan/cxx1y-vla.C: Ditto. * g++.dg/warn/Wvla-2.C: Ditto. * g++.dg/debug/dwarf2/auto1.C: Ditto. * g++.dg/cpp1z/typename-tmpl-tmpl-parm-ped-neg.C: Ditto. * g++.dg/cpp1y/cplusplus.C: Check for exact date. * g++.dg/cpp1y/system-binary-constants-1.C: Check C++14 instead of C++1y in error message. * g++.dg/system-binary-constants-1.C: Ditto. * g++.dg/cpp1y/cplusplus_1y.C: New. * g++.dg/cpp1z/cplusplus.C: New. * lib/target-supports.exp: (check_effective_target_c++1y*): Rename to check_effective_target_c++14* (check_effective_target_c++11_only): Call check_effective_target_c++14; (check_effective_target_c++11_down): Ditto. From-SVN: r214400
2014-08-23 18:50:22 +02:00
2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
* c-common.h (enum cxx_dialect): Add cxx14.
* c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
* c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
2014-08-22 Jason Merrill <jason@redhat.com>
* c.opt (std=gnu++17): Fix alias.
2014-08-22 Marek Polacek <polacek@redhat.com>
PR c++/62199
* c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
check for vector types. Drop LHS argument.
* c-common.h (warn_logical_not_parentheses): Adjust.
2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
(Wmultichar): Likewise.
(Wdate-time): Use C-family languages instead of Common. Use CPP
and Var.
* c-opts.c (c_common_handle_option): Do not handle the above
options here.
(sanitize_cpp_opts): Likewise.
2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* c-opts.c: Include tree-diagnostics.h.
(c_diagnostic_finalizer): New.
(c_common_initialize_diagnostics): Use it.
2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR preprocessor/51303
* c-common.c (struct reason_option_codes_t option_codes):
Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/60975
PR c/53063
* c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
* c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
(c_common_post_options): Call init_global_opts_from_cpp.
(sanitize_cpp_opts): Do not handle Wvariadic-macros here.
2014-08-19 Marek Polacek <polacek@redhat.com>
PR c++/62153
* c-common.c (maybe_warn_bool_compare): New function.
* c-common.h (maybe_warn_bool_compare): Declare.
* c.opt (Wbool-compare): New option.
2014-08-19 Marek Polacek <polacek@redhat.com>
* c.opt (Wc99-c11-compat): New option.
2014-08-19 Marek Polacek <polacek@redhat.com>
* c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
to warn_c90_c99_compat.
* c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
to -1.
2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
Steven Bosscher <steven@gcc.gnu.org>
PR c/52952
* c-format.c: Add extra_arg_loc and format_string_loc to struct
format_check_results.
(check_function_format): Use true and add comment for boolean
argument.
(finish_dollar_format_checking): Use explicit location when warning.
(check_format_info): Likewise.
(check_format_arg): Set extra_arg_loc and format_string_loc.
(check_format_info_main): Use explicit location when warning.
(check_format_types): Pass explicit location.
(format_type_warning): Likewise.
2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* c-format.c: Handle Fortran flags.
2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
PR other/61962
* array-notation-common.c (find_rank): Added handling for other
types of references.
re PR c/51849 (-Wc99-compat would be considered useful) PR c/51849 gcc/ * gcc/doc/invoke.texi: Document -Wc90-c99-compat. gcc/c-family/ * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp. * c.opt (Wc90-c99-compat): Add option. gcc/c/ * c-decl.c (build_array_declarator): Remove check for !flag_isoc99. Call pedwarn_c90 instead of pedwarn. (check_bitfield_type_and_width): Likewise. (declspecs_add_qual): Likewise. (declspecs_add_type): Likewise. (warn_variable_length_array): Unify function for -pedantic and -Wvla. Adjust to only call pedwarn_c90. (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call pedwarn_c90 instead of pedwarn. * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat. * c-parser.c (disable_extension_diagnostics): Handle warn_c90_c99_compat. (restore_extension_diagnostics): Likewise. (c_parser_enum_specifier): Remove check for !flag_isoc99. Call pedwarn_c90 instead of pedwarn. (c_parser_initelt): Likewise. (c_parser_postfix_expression): Likewise. (c_parser_postfix_expression_after_paren_type): Likewise. (c_parser_compound_statement_nostart): Remove check for !flag_isoc99. * c-tree.h: Fix formatting. * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call pedwarn_c90 instead of pedwarn. gcc/testsuite/ * gcc.dg/Wc90-c99-compat-1.c: New test. * gcc.dg/Wc90-c99-compat-2.c: New test. * gcc.dg/Wc90-c99-compat-3.c: New test. * gcc.dg/Wc90-c99-compat-4.c: New test. * gcc.dg/Wc90-c99-compat-5.c: New test. * gcc.dg/Wc90-c99-compat-6.c: New test. * gcc.dg/wvla-1.c: Adjust dg-warning. * gcc.dg/wvla-2.c: Adjust dg-warning. * gcc.dg/wvla-4.c: Adjust dg-warning. * gcc.dg/wvla-6.c: Adjust dg-warning. libcpp/ * lex.c (_cpp_lex_direct): Warn when -Wc90-c99-compat is in effect. * charset.c (_cpp_valid_ucn): Likewise. * include/cpplib.h (cpp_options): Add cpp_warn_c90_c99_compat. * macro.c (replace_args): Warn when -Wc90-c99-compat is in effect. (parse_params): Likewise. From-SVN: r213786
2014-08-10 08:10:49 +02:00
2014-08-10 Marek Polacek <polacek@redhat.com>
PR c/51849
* c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
* c.opt (Wc90-c99-compat): Add option.
2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
* c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
2014-08-03 Marek Polacek <polacek@redhat.com>
* c-common.c (check_case_value): Add location_t parameter. Use it.
(c_add_case_label): Pass loc to check_case_value.
2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
* cilk.c: Use hash_map instead of pointer_map.
2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
* c-gimplify.c: Use hash_set instead of pointer_set.
2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
PR middle-end/61455
* array-notation-common.c (extract_array_notation_exprs): Handling
of DECL_EXPR added.
opts.c (common_handle_option): Handle -fsanitize=alignment. * opts.c (common_handle_option): Handle -fsanitize=alignment. * ubsan.h (enum ubsan_null_ckind): Add UBSAN_CTOR_CALL. (ubsan_expand_bounds_ifn, ubsan_expand_null_ifn): Change return type to bool. * stor-layout.h (min_align_of_type): New prototype. * asan.c (pass_sanopt::execute): Don't perform gsi_next if ubsan_expand* told us not to do it. Remove the extra gsi_end_p check. * ubsan.c: Include builtins.h. (ubsan_expand_bounds_ifn): Change return type to bool, always return true. (ubsan_expand_null_ifn): Change return type to bool, change argument to gimple_stmt_iterator *. Handle both null and alignment sanitization, take type from ckind argument's type rather than first argument. (instrument_member_call): Removed. (instrument_mem_ref): Remove t argument, add mem and base arguments. Handle both null and alignment sanitization, don't say whole struct access is member access. Build 3 argument IFN_UBSAN_NULL call instead of 2 argument. (instrument_null): Adjust instrument_mem_ref caller. Don't instrument calls here. (pass_ubsan::gate, pass_ubsan::execute): Handle SANITIZE_ALIGNMENT like SANITIZE_NULL. * stor-layout.c (min_align_of_type): New function. * flag-types.h (enum sanitize_code): Add SANITIZE_ALIGNMENT. Or it into SANITIZE_UNDEFINED. * doc/invoke.texi (-fsanitize=alignment): Document. cp/ * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or -fsanitize=alignment call ubsan_maybe_instrument_reference for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call for calls to member functions. c-family/ * c-common.h (min_align_of_type): Removed prototype. * c-common.c (min_align_of_type): Removed. * c-ubsan.h (ubsan_maybe_instrument_reference, ubsan_maybe_instrument_member_call): New prototypes. * c-ubsan.c: Include stor-layout.h and builtins.h. (ubsan_maybe_instrument_reference_or_call, ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New functions. testsuite/ * c-c++-common/ubsan/align-1.c: New test. * c-c++-common/ubsan/align-2.c: New test. * c-c++-common/ubsan/align-3.c: New test. * c-c++-common/ubsan/align-4.c: New test. * c-c++-common/ubsan/align-5.c: New test. * c-c++-common/ubsan/attrib-4.c: New test. * g++.dg/ubsan/align-1.C: New test. * g++.dg/ubsan/align-2.C: New test. * g++.dg/ubsan/align-3.C: New test. * g++.dg/ubsan/attrib-1.C: New test. * g++.dg/ubsan/null-1.C: New test. * g++.dg/ubsan/null-2.C: New test. From-SVN: r213406
2014-08-01 09:52:43 +02:00
2014-08-01 Jakub Jelinek <jakub@redhat.com>
* c-common.h (min_align_of_type): Removed prototype.
* c-common.c (min_align_of_type): Removed.
* c-ubsan.h (ubsan_maybe_instrument_reference,
ubsan_maybe_instrument_member_call): New prototypes.
* c-ubsan.c: Include stor-layout.h and builtins.h.
(ubsan_maybe_instrument_reference_or_call,
ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
functions.
2014-07-31 Marc Glisse <marc.glisse@inria.fr>
PR c++/60517
* c.opt (-Wreturn-local-addr): Move to common.opt.
2014-07-30 Jason Merrill <jason@redhat.com>
PR c++/61659
PR c++/61687
Revert:
* c.opt (-fuse-all-virtuals): New.
2014-07-30 Tom Tromey <tromey@redhat.com>
PR c/59855
* c.opt (Wdesignated-init): New option.
* c-common.c (c_common_attribute_table): Add "designated_init".
(handle_designated_init): New function.
2014-07-24 Marek Polacek <polacek@redhat.com>
PR c/57653
* c-opts.c (c_finish_options): If -imacros is in effect, return.
PR preprocessor/60723 - missing system-ness marks for macro tokens When a system macro is expanded in a non-system file during out-of-line preprocessing, it can happen that the preprocessor forgets to emit line markers to express the system-ness status of tokens that come after the expansion of the macro. That can lead to situations where the entire non-system file can be considered as being a system file and thus have its warnings be discarded during the compilation of the resulting preprocessed file. My understanding is that this is due to the preprocessor not systematically detecting (and reporting) the change in system-ness of tokens. And this is what this patch does. Each time the system-ness of a given token is different from the previous token that was emitted by the preprocessor, it emits a line marker for the sole purpose of marking the new system-ness of the subsequent tokens to come. Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk. gcc/c-family/ChangeLog: * c-ppoutput.c (struct print::prev_was_system_token): New data member. (init_pp_output): Initialize it. (maybe_print_line_1, maybe_print_line, print_line_1, print_line) (do_line_change): Return a flag saying if a line marker was emitted or not. (scan_translation_unit): Detect if the system-ness of the token we are about to emit is different from the one of the previously emitted token. If so, emit a line marker. Avoid emitting useless adjacent line markers. Avoid emitting line markers for tokens originating from the expansion of built-in macros. (scan_translation_unit_directives_only): Adjust. gcc/testsuite/ChangeLog: * gcc.dg/cpp/syshdr{4,5}.{c,h}: New test files. Signed-off-by: Dodji Seketeli <dodji@redhat.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com> From-SVN: r212638
2014-07-16 12:33:36 +02:00
2014-07-16 Dodji Seketeli <dodji@redhat.com>
PR preprocessor/60723 - missing system-ness marks for macro tokens
* c-ppoutput.c (struct print::prev_was_system_token): New data
member.
(init_pp_output): Initialize it.
(maybe_print_line_1, maybe_print_line, print_line_1, print_line)
(do_line_change): Return a flag saying if a line marker was
emitted or not.
(scan_translation_unit): Detect if the system-ness of the token we
are about to emit is different from the one of the previously
emitted token. If so, emit a line marker. Avoid emitting useless
adjacent line markers. Avoid emitting line markers for tokens
originating from the expansion of built-in macros.
(scan_translation_unit_directives_only): Adjust.
2014-07-15 Marek Polacek <polacek@redhat.com>
* c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
TYPE_MAX_VALUE is NULL.
2014-07-14 Jakub Jelinek <jakub@redhat.com>
PR middle-end/61294
* c.opt (Wmemset-transposed-args): New warning.
2014-07-10 Jason Merrill <jason@redhat.com>
PR c++/61659
PR c++/61687
* c.opt (-fuse-all-virtuals): New.
2014-07-09 Richard Biener <rguenther@suse.de>
PR c-family/61741
* c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
using unsigned arithmetic if overflow does not wrap instead of
if overflow is undefined.
2014-07-06 Marek Polacek <polacek@redhat.com>
PR c/6940
* c.opt (Wsizeof-array-argument): New option.
2014-07-03 Jakub Jelinek <jakub@redhat.com>
* c-ada-spec.c (dump_ada_nodes): Don't call qsort if
comments->count <= 1, as comments->entries might be NULL.
2014-07-01 Marek Polacek <polacek@redhat.com>
* c.opt (Wint-conversion): New option.
2014-07-01 Marek Polacek <polacek@redhat.com>
PR c/58286
* c.opt (Wincompatible-pointer-types): New option.
2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51400
* c-common.c (handle_noreturn_attribute, handle_const_attribute):
Do not discard TYPE_QUALS of type.
2014-06-26 Jason Merrill <jason@redhat.com>
* c-common.h (enum cxx_dialect): Add cxx1z.
* c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
* c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
2014-06-26 Teresa Johnson <tejohnson@google.com>
* c-common.h (get_dump_info): Declare.
* c-gimplify.c (c_genericize): Use saved dump files.
* c-opts.c (c_common_parse_file): Begin and end dumps
once around parsing invocation.
(get_dump_info): New function.
2014-06-23 Marek Polacek <polacek@redhat.com>
Andrew MacLeod <amacleod@redhat.com>
PR c/61553
* c-common.c (get_atomic_generic_size): Don't segfault if the
type doesn't have a size.
asan.c (pass_sanopt::execute): Handle IFN_UBSAN_BOUNDS. * asan.c (pass_sanopt::execute): Handle IFN_UBSAN_BOUNDS. * flag-types.h (enum sanitize_code): Add SANITIZE_BOUNDS and or it into SANITIZE_UNDEFINED. * doc/invoke.texi: Describe -fsanitize=bounds. * gimplify.c (gimplify_call_expr): Add gimplification of internal functions created in the FEs. * internal-fn.c: Move "internal-fn.h" after "tree.h". (expand_UBSAN_BOUNDS): New function. * internal-fn.def (UBSAN_BOUNDS): New internal function. * internal-fn.h: Don't define internal functions here. * opts.c (common_handle_option): Add -fsanitize=bounds. * sanitizer.def (BUILT_IN_UBSAN_HANDLE_OUT_OF_BOUNDS, BUILT_IN_UBSAN_HANDLE_OUT_OF_BOUNDS_ABORT): Add. * tree-core.h: Define internal functions here. (struct tree_base): Add ifn field. * tree-pretty-print.c: Include "internal-fn.h". (dump_generic_node): Handle functions without CALL_EXPR_FN. * tree.c (get_callee_fndecl): Likewise. (build_call_expr_internal_loc): New function. * tree.def (CALL_EXPR): Update description. * tree.h (CALL_EXPR_IFN): Define. (build_call_expr_internal_loc): Declare. * ubsan.c (get_ubsan_type_info_for_type): Return 0 for non-arithmetic types. (ubsan_type_descriptor): Change bool parameter to enum ubsan_print_style. Adjust the code. Add handling of UBSAN_PRINT_ARRAY. (ubsan_expand_bounds_ifn): New function. (ubsan_expand_null_ifn): Adjust ubsan_type_descriptor call. (ubsan_build_overflow_builtin): Likewise. (instrument_bool_enum_load): Likewise. (ubsan_instrument_float_cast): Likewise. * ubsan.h (enum ubsan_print_style): New enum. (ubsan_expand_bounds_ifn): Declare. (ubsan_type_descriptor): Adjust declaration. Use a default parameter. c-family/ * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h". (ubsan_walk_array_refs_r): New function. (c_genericize): Instrument array bounds. * c-ubsan.c: Include "internal-fn.h". (ubsan_instrument_division): Mark instrumented arrays as having side effects. Adjust ubsan_type_descriptor call. (ubsan_instrument_shift): Likewise. (ubsan_instrument_vla): Adjust ubsan_type_descriptor call. (ubsan_instrument_bounds): New function. (ubsan_array_ref_instrumented_p): New function. (ubsan_maybe_instrument_array_ref): New function. * c-ubsan.h (ubsan_instrument_bounds): Declare. (ubsan_array_ref_instrumented_p): Declare. (ubsan_maybe_instrument_array_ref): Declare. testsuite/ * c-c++-common/ubsan/bounds-1.c: New test. * c-c++-common/ubsan/bounds-2.c: New test. * c-c++-common/ubsan/bounds-3.c: New test. * c-c++-common/ubsan/bounds-4.c: New test. * c-c++-common/ubsan/bounds-5.c: New test. * c-c++-common/ubsan/bounds-6.c: New test. From-SVN: r211859
2014-06-20 23:20:51 +02:00
2014-06-20 Marek Polacek <polacek@redhat.com>
* c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
(ubsan_walk_array_refs_r): New function.
(c_genericize): Instrument array bounds.
* c-ubsan.c: Include "internal-fn.h".
(ubsan_instrument_division): Mark instrumented arrays as having
side effects. Adjust ubsan_type_descriptor call.
(ubsan_instrument_shift): Likewise.
(ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
(ubsan_instrument_bounds): New function.
(ubsan_array_ref_instrumented_p): New function.
(ubsan_maybe_instrument_array_ref): New function.
* c-ubsan.h (ubsan_instrument_bounds): Declare.
(ubsan_array_ref_instrumented_p): Declare.
(ubsan_maybe_instrument_array_ref): Declare.
2014-06-20 Hale Wang <hale.wang@arm.com>
PR lto/61123
* c.opt (fshort-enums): Add to LTO.
* c.opt (fshort-wchar): Likewise.
2014-06-16 Marek Polacek <polacek@redhat.com>
PR c/60439
* c.opt (Wswitch-bool): Add Var.
2014-06-12 Jakub Jelinek <jakub@redhat.com>
PR middle-end/61486
* c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
#pragma omp target teams or
#pragma omp {,target }teams distribute simd.
2014-06-12 Jason Merrill <jason@redhat.com>
* c.opt (Wabi=, fabi-compat-version): New.
* c-opts.c (c_common_handle_option): Handle -Wabi=.
(c_common_post_options): Handle flag_abi_compat_version default.
Disallow -fabi-compat-version=1.
* c-common.h (abi_version_crosses): New.
symtab.c (section_hash): New hash. * symtab.c (section_hash): New hash. (symtab_unregister_node): Clear section before freeing. (hash_section_hash_entry): New haser. (eq_sections): New function. (symtab_node::set_section_for_node): New method. (set_section_1): Update. (symtab_node::set_section): Take string instead of tree as parameter. (symtab_resolve_alias): Update. * cgraph.h (section_hash_entry_d): New structure. (section_hash_entry): New typedef. (cgraph_node): Change comdat_group_ to x_comdat_group, change section_ to x_section and turn into section_hash_entry; update accestors; put set_section_for_node offline. * tree.c (decl_section_name): Turn into string. (set_decl_section_name): Change parameter to be string. * tree.h (decl_section_name, set_decl_section_name): Update prototypes. * sdbout.c (sdbout_one_type): Update. * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Update. * varasm.c (IN_NAMED_SECTION, get_named_section, resolve_unique_section, hot_function_section, get_named_text_section, USE_SELECT_SECTION_FOR_FUNCTIONS, default_function_rodata_section, make_decl_rtl, default_unique_section): Update. * config/c6x/c6x.c (c6x_in_small_data_p): Update. (c6x_elf_unique_section): Update. * config/nios2/nios2.c (nios2_in_small_data_p): Update. * config/pa/pa.c (pa_function_section): Update. * config/pa/pa.h (IN_NAMED_SECTION_P): Update. * config/ia64/ia64.c (ia64_in_small_data_p): Update. * config/arc/arc.c (arc_in_small_data_p): Update. * config/arm/unknown-elf.h (IN_NAMED_SECTION_P): Update. * config/mcore/mcore.c (mcore_unique_section): Update. * config/mips/mips.c (mips16_build_function_stub): Update. (mips16_build_call_stub): Update. (mips_function_rodata_section): Update. (mips_in_small_data_p): Update. * config/score/score.c (score_in_small_data_p): Update. * config/rx/rx.c (rx_in_small_data): Update. * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Update. (rs6000_xcoff_asm_named_section): Update. (rs6000_xcoff_unique_section): Update. * config/frv/frv.c (frv_string_begins_with): Update. (frv_in_small_data_p): Update. * config/v850/v850.c (v850_encode_data_area): Update. * config/bfin/bfin.c (DECL_SECTION_NAME): Update. (bfin_handle_l1_data_attribute): Update. (bfin_handle_l2_attribute): Update. * config/mep/mep.c (mep_unique_section): Update. * config/microblaze/microblaze.c (microblaze_elf_in_small_data_p): Update. * config/h8300/h8300.c (h8300_handle_eightbit_data_attribute): Update. (h8300_handle_tiny_data_attribute): Update. * config/m32r/m32r.c (m32r_in_small_data_p): Update. (m32r_in_small_data_p): Update. * config/alpha/alpha.c (alpha_in_small_data_p): Update. * config/i386/i386.c (ix86_in_large_data_p): Update. * config/i386/winnt.c (i386_pe_unique_section): Update. * config/darwin.c (darwin_function_section): Update. * config/lm32/lm32.c (lm32_in_small_data_p): Update. * tree-emutls.c (get_emutls_init_templ_addr): Update. (new_emutls_decl): Update. * lto-cgraph.c (lto_output_node, input_node, input_varpool_node, input_varpool_node): Update. (ead_string_cst): Turn to ... (read_string): ... this one. * dwarf2out.c (secname_for_decl): Update. * asan.c (asan_protect_global): Update. * c-family/c-common.c (handle_section_attribute): Update handling for section names that are no longer trees. * java/class.c (build_utf8_ref): Update handling for section names that are no longer trees. (emit_register_classes_in_jcr_section): Update. * vtable-class-hierarchy.c: Update handling for section names that are no longer trees. * decl.c (duplicate_decls): Likewise. * gcc-interface/utils.c: Update handling for section names that are no longer trees. From-SVN: r211489
2014-06-12 06:03:49 +02:00
2014-06-11 Jan Hubicka <hubicka@ucw.cz>
* c-common.c (handle_section_attribute): Update handling for
symtab.c (section_hash): New hash. * symtab.c (section_hash): New hash. (symtab_unregister_node): Clear section before freeing. (hash_section_hash_entry): New haser. (eq_sections): New function. (symtab_node::set_section_for_node): New method. (set_section_1): Update. (symtab_node::set_section): Take string instead of tree as parameter. (symtab_resolve_alias): Update. * cgraph.h (section_hash_entry_d): New structure. (section_hash_entry): New typedef. (cgraph_node): Change comdat_group_ to x_comdat_group, change section_ to x_section and turn into section_hash_entry; update accestors; put set_section_for_node offline. * tree.c (decl_section_name): Turn into string. (set_decl_section_name): Change parameter to be string. * tree.h (decl_section_name, set_decl_section_name): Update prototypes. * sdbout.c (sdbout_one_type): Update. * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Update. * varasm.c (IN_NAMED_SECTION, get_named_section, resolve_unique_section, hot_function_section, get_named_text_section, USE_SELECT_SECTION_FOR_FUNCTIONS, default_function_rodata_section, make_decl_rtl, default_unique_section): Update. * config/c6x/c6x.c (c6x_in_small_data_p): Update. (c6x_elf_unique_section): Update. * config/nios2/nios2.c (nios2_in_small_data_p): Update. * config/pa/pa.c (pa_function_section): Update. * config/pa/pa.h (IN_NAMED_SECTION_P): Update. * config/ia64/ia64.c (ia64_in_small_data_p): Update. * config/arc/arc.c (arc_in_small_data_p): Update. * config/arm/unknown-elf.h (IN_NAMED_SECTION_P): Update. * config/mcore/mcore.c (mcore_unique_section): Update. * config/mips/mips.c (mips16_build_function_stub): Update. (mips16_build_call_stub): Update. (mips_function_rodata_section): Update. (mips_in_small_data_p): Update. * config/score/score.c (score_in_small_data_p): Update. * config/rx/rx.c (rx_in_small_data): Update. * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Update. (rs6000_xcoff_asm_named_section): Update. (rs6000_xcoff_unique_section): Update. * config/frv/frv.c (frv_string_begins_with): Update. (frv_in_small_data_p): Update. * config/v850/v850.c (v850_encode_data_area): Update. * config/bfin/bfin.c (DECL_SECTION_NAME): Update. (bfin_handle_l1_data_attribute): Update. (bfin_handle_l2_attribute): Update. * config/mep/mep.c (mep_unique_section): Update. * config/microblaze/microblaze.c (microblaze_elf_in_small_data_p): Update. * config/h8300/h8300.c (h8300_handle_eightbit_data_attribute): Update. (h8300_handle_tiny_data_attribute): Update. * config/m32r/m32r.c (m32r_in_small_data_p): Update. (m32r_in_small_data_p): Update. * config/alpha/alpha.c (alpha_in_small_data_p): Update. * config/i386/i386.c (ix86_in_large_data_p): Update. * config/i386/winnt.c (i386_pe_unique_section): Update. * config/darwin.c (darwin_function_section): Update. * config/lm32/lm32.c (lm32_in_small_data_p): Update. * tree-emutls.c (get_emutls_init_templ_addr): Update. (new_emutls_decl): Update. * lto-cgraph.c (lto_output_node, input_node, input_varpool_node, input_varpool_node): Update. (ead_string_cst): Turn to ... (read_string): ... this one. * dwarf2out.c (secname_for_decl): Update. * asan.c (asan_protect_global): Update. * c-family/c-common.c (handle_section_attribute): Update handling for section names that are no longer trees. * java/class.c (build_utf8_ref): Update handling for section names that are no longer trees. (emit_register_classes_in_jcr_section): Update. * vtable-class-hierarchy.c: Update handling for section names that are no longer trees. * decl.c (duplicate_decls): Likewise. * gcc-interface/utils.c: Update handling for section names that are no longer trees. From-SVN: r211489
2014-06-12 06:03:49 +02:00
section names that are no longer trees.
re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) PR fortran/60928 * omp-low.c (lower_rec_input_clauses) <case OMP_CLAUSE_LASTPRIVATE>: Set lastprivate_firstprivate even if omp_private_outer_ref langhook returns true. <case OMP_CLAUSE_REDUCTION>: When calling omp_clause_default_ctor langhook, call unshare_expr on new_var and call build_outer_var_ref to get the last argument. gcc/c-family/ * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK... (omp_pragmas): ... back here. gcc/fortran/ * f95-lang.c (gfc_init_builtin_functions): Handle -fopenmp-simd like -fopenmp. * openmp.c (resolve_omp_clauses): Remove allocatable components diagnostics. Add associate-name and intent(in) pointer diagnostics for various clauses, diagnose procedure pointers in reduction clause. * parse.c (match_word_omp_simd): New function. (matchs, matcho): New macros. (decode_omp_directive): Change match macros to either matchs or matcho. Handle -fopenmp-simd. (next_free, next_fixed): Handle -fopenmp-simd like -fopenmp. * scanner.c (skip_free_comments, skip_fixed_comments, include_line): Likewise. * trans-array.c (get_full_array_size): Rename to... (gfc_full_array_size): ... this. No longer static. (duplicate_allocatable): Adjust caller. Add NO_MEMCPY argument and handle it. (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Adjust duplicate_allocatable callers. (gfc_duplicate_allocatable_nocopy): New function. (structure_alloc_comps): Adjust g*_full_array_size and duplicate_allocatable caller. * trans-array.h (gfc_full_array_size, gfc_duplicate_allocatable_nocopy): New prototypes. * trans-common.c (create_common): Call gfc_finish_decl_attrs. * trans-decl.c (gfc_finish_decl_attrs): New function. (gfc_finish_var_decl, create_function_arglist, gfc_get_fake_result_decl): Call it. (gfc_allocate_lang_decl): If DECL_LANG_SPECIFIC is already allocated, don't allocate it again. (gfc_get_symbol_decl): Set GFC_DECL_ASSOCIATE_VAR_P on associate-names. * trans.h (gfc_finish_decl_attrs): New prototype. (struct lang_decl): Add scalar_allocatable and scalar_pointer bitfields. (GFC_DECL_SCALAR_ALLOCATABLE, GFC_DECL_SCALAR_POINTER, GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER, GFC_DECL_ASSOCIATE_VAR_P): Define. (GFC_POINTER_TYPE_P): Remove. * trans-openmp.c (gfc_omp_privatize_by_reference): Don't check GFC_POINTER_TYPE_P, instead test GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER or GFC_DECL_CRAY_POINTEE on decl. (gfc_omp_predetermined_sharing): Associate-names are predetermined. (enum walk_alloc_comps): New. (gfc_has_alloc_comps, gfc_omp_unshare_expr_r, gfc_omp_unshare_expr, gfc_walk_alloc_comps): New functions. (gfc_omp_private_outer_ref): Return true for scalar allocatables or decls with allocatable components. (gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Fix up handling of allocatables, handle also OMP_CLAUSE_REDUCTION, handle scalar allocatables and decls with allocatable components. (gfc_trans_omp_array_reduction_or_udr): Don't handle allocatable arrays here. (gfc_trans_omp_reduction_list): Call gfc_trans_omp_array_reduction_or_udr even for allocatable scalars. (gfc_trans_omp_do_simd): If -fno-openmp, just expand it as OMP_SIMD. (gfc_trans_omp_parallel_do_simd): Likewise. * trans-types.c (gfc_sym_type): Don't set GFC_POINTER_TYPE_P. (gfc_get_derived_type): Call gfc_finish_decl_attrs. gcc/testsuite/ * gfortran.dg/gomp/allocatable_components_1.f90: Remove dg-error directives. * gfortran.dg/gomp/associate1.f90: New test. * gfortran.dg/gomp/intentin1.f90: New test. * gfortran.dg/gomp/openmp-simd-1.f90: New test. * gfortran.dg/gomp/openmp-simd-2.f90: New test. * gfortran.dg/gomp/openmp-simd-3.f90: New test. * gfortran.dg/gomp/proc_ptr_2.f90: New test. libgomp/ * testsuite/libgomp.fortran/allocatable9.f90: New test. * testsuite/libgomp.fortran/allocatable10.f90: New test. * testsuite/libgomp.fortran/allocatable11.f90: New test. * testsuite/libgomp.fortran/allocatable12.f90: New test. * testsuite/libgomp.fortran/alloc-comp-1.f90: New test. * testsuite/libgomp.fortran/alloc-comp-2.f90: New test. * testsuite/libgomp.fortran/alloc-comp-3.f90: New test. * testsuite/libgomp.fortran/associate1.f90: New test. * testsuite/libgomp.fortran/associate2.f90: New test. * testsuite/libgomp.fortran/procptr1.f90: New test. From-SVN: r211397
2014-06-10 08:05:22 +02:00
2014-06-10 Jakub Jelinek <jakub@redhat.com>
PR fortran/60928
* c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
(omp_pragmas): ... back here.
2014-06-05 Marek Polacek <polacek@redhat.com>
PR c/49706
* c-common.c (warn_logical_not_parentheses): New function.
* c-common.h (warn_logical_not_parentheses): Declare.
* c.opt (Wlogical-not-parentheses): New option.
2014-06-04 Marek Polacek <polacek@redhat.com>
PR c/30020
* c-common.c (check_case_bounds): Add location parameter.
Use it.
(c_add_case_label): Pass loc to check_case_bounds.
2014-06-03 Marek Polacek <polacek@redhat.com>
PR c/60439
* c.opt (Wswitch-bool): New option.
2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
* c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
Remove prototypes.
(record_types_used_by_current_var_decl): Move prototype to where
it belongs.
* c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
(DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
(DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
tree.def (VOID_CST): New. gcc/ * tree.def (VOID_CST): New. * tree-core.h (TI_VOID): New. * tree.h (void_node): New. * tree.c (tree_node_structure_for_code, tree_code_size) (iterative_hash_expr): Handle VOID_CST. (build_common_tree_nodes): Initialize void_node. gcc/c-family/ * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete. * c-common.c (c_common_nodes_and_builtins): Don't initialize void_zero_node. * c-pretty-print.c (pp_c_void_constant): New function. (c_pretty_printer::constant, c_pretty_printer::primary_expression) (c_pretty_printer::expression): Handle VOID_CST. * cilk.c (extract_free_variables): Likewise. * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift) (ubsan_instrument_vla): Use void_node instead of void_zero_node. gcc/c/ * c-array-notation.c (expand_array_notations): Use void_node instead of void_zero_node. gcc/cp/ * cvt.c (convert_to_void): Use void_node instead of void_zero_node. * cp-array-notation.c (replace_invariant_exprs): Likewise. (expand_array_notation): Handle VOID_CST. * error.c (dump_expr): Likewise. * cxx-pretty-print.c (cxx_pretty_printer::primary_expression) (cxx_pretty_printer::expression): Likewise. (pp_cxx_new_expression): Use void_node instead of void_zero_node. * decl.c (register_dtor_fn): Likewise. * init.c (build_raw_new_expr, build_new_1, build_vec_init) (build_delete, push_base_cleanups): Likewise. * mangle.c (write_expression): Likewise. * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise. * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise. (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST. * tree.c (cp_tree_equal): Likewise. (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node instead of void_zero_node. * typeck.c (check_return_expr): Likewise. * typeck2.c (build_functional_cast): Likewise. From-SVN: r210692
2014-05-21 13:00:35 +02:00
2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
* c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
* c-common.c (c_common_nodes_and_builtins): Don't initialize
void_zero_node.
* c-pretty-print.c (pp_c_void_constant): New function.
(c_pretty_printer::constant, c_pretty_printer::primary_expression)
(c_pretty_printer::expression): Handle VOID_CST.
* cilk.c (extract_free_variables): Likewise.
* c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
(ubsan_instrument_vla): Use void_node instead of void_zero_node.
use templates instead of gengtype for typed allocation functions gcc/ChangeLog: * alias.c (record_alias_subset): Adjust. * bitmap.c (bitmap_element_allocate): Likewise. (bitmap_gc_alloc_stat): Likewise. * cfg.c (init_flow): Likewise. (alloc_block): Likewise. (unchecked_make_edge): Likewise. * cfgloop.c (alloc_loop): Likewise. (flow_loops_find): Likewise. (rescan_loop_exit): Likewise. * cfgrtl.c (init_rtl_bb_info): Likewise. * cgraph.c (insert_new_cgraph_node_version): Likewise. (cgraph_allocate_node): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_allocate_init_indirect_info): Likewise. * cgraphclones.c (cgraph_clone_edge): Likewise. * cgraphunit.c (add_asm_node): Likewise. (init_lowered_empty_function): Likewise. * config/aarch64/aarch64.c (aarch64_init_machine_status): Likewise. * config/alpha/alpha.c (alpha_init_machine_status): Likewise. (alpha_use_linkage): Likewise. * config/arc/arc.c (arc_init_machine_status): Likewise. * config/arm/arm.c (arm_init_machine_status): Likewise. * config/avr/avr.c (avr_init_machine_status): Likewise. * config/bfin/bfin.c (bfin_init_machine_status): Likewise. * config/c6x/c6x.c (c6x_init_machine_status): Likewise. * config/cris/cris.c (cris_init_machine_status): Likewise. * config/darwin.c (machopic_indirection_name): Likewise. (darwin_build_constant_cfstring): Likewise. (darwin_enter_string_into_cfstring_table): Likewise. * config/epiphany/epiphany.c (epiphany_init_machine_status): * Likewise. * config/frv/frv.c (frv_init_machine_status): Likewise. * config/i386/i386.c (get_dllimport_decl): Likewise. (ix86_init_machine_status): Likewise. (assign_386_stack_local): Likewise. * config/i386/winnt.c (i386_pe_record_external_function): Likewise. (i386_pe_maybe_record_exported_symbol): Likewise. (i386_pe_record_stub): Likewise. * config/ia64/ia64.c (ia64_init_machine_status): Likewise. * config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise. * config/m32c/m32c.c (m32c_init_machine_status): Likewise. (m32c_note_pragma_address): Likewise. * config/mep/mep.c (mep_init_machine_status): Likewise. (mep_note_pragma_flag): Likewise. * config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise. (mips16_local_alias): Likewise. (mips_init_machine_status): Likewise. * config/mmix/mmix.c (mmix_init_machine_status): Likewise. * config/moxie/moxie.c (moxie_init_machine_status): Likewise. * config/msp430/msp430.c (msp430_init_machine_status): Likewise. * config/nds32/nds32.c (nds32_init_machine_status): Likewise. * config/nios2/nios2.c (nios2_init_machine_status): Likewise. * config/pa/pa.c (pa_init_machine_status): Likewise. (pa_get_deferred_plabel): Likewise. * config/rl78/rl78.c (rl78_init_machine_status): Likewise. * config/rs6000/rs6000.c (builtin_function_type): Likewise. (rs6000_init_machine_status): Likewise. (output_toc): Likewise. * config/s390/s390.c (s390_init_machine_status): Likewise. * config/score/score.c (score_output_external): Likewise. * config/sparc/sparc.c (sparc_init_machine_status): Likewise. * config/spu/spu.c (spu_init_machine_status): Likewise. * config/tilegx/tilegx.c (tilegx_init_machine_status): Likewise. * config/tilepro/tilepro.c (tilepro_init_machine_status): * Likewise. * config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise. * coverage.c (coverage_end_function): Likewise. * dbxout.c (dbxout_init): Likewise. * doc/gty.texi: Don't mention variable_size attribute. * dwarf2cfi.c (new_cfi): Adjust. (new_cfi_row): Likewise. (copy_cfi_row): Likewise. (create_cie_data): Likewise. * dwarf2out.c (dwarf2out_alloc_current_fde): Likewise. (new_loc_descr): Likewise. (find_AT_string_in_table): Likewise. (add_addr_table_entry): Likewise. (new_die): Likewise. (add_var_loc_to_decl): Likewise. (clone_die): Likewise. (clone_as_declaration): Likewise. (break_out_comdat_types): Likewise. (new_loc_list): Likewise. (add_loc_descr_to_each): Likewise. (add_location_or_const_value_attribute): Likewise. (add_linkage_name): Likewise. (lookup_filename): Likewise. (dwarf2out_var_location): Likewise. (new_line_info_table): Likewise. (dwarf2out_init): Likewise. (mem_loc_descriptor): Likewise. (loc_descriptor): Likewise. (add_const_value_attribute): Likewise. (tree_add_const_value_attribute): Likewise. (comp_dir_string): Likewise. (dwarf2out_vms_debug_main_pointer): Likewise. (string_cst_pool_decl): Likewise. * emit-rtl.c (set_mem_attrs): Likewise. (get_reg_attrs): Likewise. (start_sequence): Likewise. (init_emit): Likewise. (init_emit_regs): Likewise. * except.c (init_eh_for_function): Likewise. (gen_eh_region): Likewise. (gen_eh_region_catch): Likewise. (gen_eh_landing_pad): Likewise. (add_call_site): Likewise. * function.c (add_frame_space): Likewise. (insert_temp_slot_address): Likewise. (assign_stack_temp_for_type): Likewise. (get_hard_reg_initial_val): Likewise. (allocate_struct_function): Likewise. (prepare_function_start): Likewise. (types_used_by_var_decl_insert): Likewise. * gengtype.c (variable_size_p): Remove function. (enum alloc_quantity): Remove enum. (write_typed_alloc_def): Remove function. (write_typed_struct_alloc_def): Likewise. (write_typed_typedef_alloc_def): Likewise. (write_typed_alloc_defns): Likewise. (main): Adjust. * ggc-common.c (ggc_cleared_alloc_htab_ignore_args): Adjust. (ggc_cleared_alloc_ptr_array_two_args): Likewise. * ggc.h (ggc_alloc): new function. (ggc_cleared_alloc): Likewise. (ggc_vec_alloc): Template on type of vector element, and remove element size argument. (ggc_cleared_vec_alloc): Likewise. * gimple.c (gimple_build_omp_for): Adjust. (gimple_copy): Likewise. * ipa-cp.c (get_replacement_map): Likewise. (find_aggregate_values_for_callers_subset): Likewise. (known_aggs_to_agg_replacement_list): Likewise. * ipa-devirt.c (get_odr_type): Likewise. * ipa-prop.c (ipa_node_duplication_hook): Likewise. (read_agg_replacement_chain): Likewise. * loop-iv.c (get_simple_loop_desc): Likewise. * lto-cgraph.c (input_node_opt_summary): Likewise. * lto-section-in.c (lto_new_in_decl_state): Likewise. * lto-streamer-in.c (lto_input_eh_catch_list): Likewise. (input_eh_region): Likewise. (input_eh_lp): Likewise. (input_cfg): Likewise. * optabs.c (set_optab_libfunc): Likewise. (init_tree_optimization_optabs): Likewise. (set_conv_libfunc): Likewise. * passes.c (do_per_function_toporder): Likewise. * rtl.h: Don't use variable_size gty attribute. * sese.c (if_region_set_false_region): Adjust. * stringpool.c (gt_pch_save_stringpool): Likewise. * target-globals.c (save_target_globals): Likewise. * toplev.c (general_init): Likewise. * trans-mem.c (record_tm_replacement): Likewise. (split_bb_make_tm_edge): Likewise. * tree-cfg.c (move_sese_region_to_fn): Likewise. * tree-data-ref.h (lambda_vector_new): Likewise. * tree-eh.c (add_stmt_to_eh_lp_fn): Likewise. * tree-iterator.c (tsi_link_before): Likewise. (tsi_link_after): Likewise. * tree-scalar-evolution.c (new_scev_info_str): Likewise. * tree-ssa-loop-niter.c (record_estimate): Likewise. * tree-ssa-operands.c (ssa_operand_alloc): Likewise. * tree-ssa-operands.h: Don't use variable_size gty attribute. * tree-ssa.c (init_tree_ssa): Adjust. * tree-ssanames.c (set_range_info): Likewise. (get_ptr_info): Likewise. (duplicate_ssa_name_ptr_info): Likewise. (duplicate_ssa_name_range_info): Likewise. * tree-streamer-in.c (unpack_ts_real_cst_value_fields): Likewise. (unpack_ts_fixed_cst_value_fields): Likewise. * tree.c (build_fixed): Likewise. (build_real): Likewise. (build_string): Likewise. (decl_priority_info): Likewise. (decl_debug_expr_insert): Likewise. (decl_value_expr_insert): Likewise. (decl_debug_args_insert): Likewise. (type_hash_add): Likewise. (build_omp_clause): Likewise. * ubsan.c (decl_for_type_insert): Likewise. * varasm.c (get_unnamed_section): Likewise. (get_noswitch_section): Likewise. (get_section): Likewise. (get_block_for_section): Likewise. (create_block_symbol): Likewise. (build_constant_desc): Likewise. (create_constant_pool): Likewise. (force_const_mem): Likewise. (record_tm_clone_pair): Likewise. * varpool.c (varpool_create_empty_node): Likewise. gcc/c/ChangeLog: * c-decl.c (finish_struct): Adjust. (finish_enum): Likewise. (bind): Adjust. (record_inline_static): Likewise. (push_scope): Likewise. (make_label): Likewise. (lookup_label_for_goto): Likewise. (finish_struct): Likewise. (finish_enum): Likewise. (store_parm_decls): Likewise. (c_push_function_context): Likewise. * c-lang.h: Remove usage of variable_size gty attribute. * c-parser.c (c_parse_init): Adjust. (c_parse_file): Likewise. gcc/java/ChangeLog: * class.c (add_method_1): Adjust. (java_treetreehash_new): Likewise. * constants.c (set_constant_entry): Likewise. (cpool_for_class): Likewise. * decl.c (make_binding_level): Likewise. (java_dup_lang_specific_decl): Likewise. * expr.c (add_type_assertion): Likewise. * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise. (lang_decl): don't use variable_size gty attribute. (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Adjust. (lang_type): Don't use variable_size gty attribute. * jcf-parse.c (java_parse_file): Adjust. (process_zip_dir): Likewise. * jcf.h: Remove usage of variable_size gty attribute. * jcf-reader.c (jcf_parse_constant_pool): Adjust. (jcf_parse_bootstrap_methods): Likewise. gcc/objc/ChangeLog: * objc-act.c (objc_build_string_object): Adjust. (continue_class): Likewise. * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise. * objc-map.c (objc_map_alloc_ggc): Likewise. (objc_map_private_resize): Likewise. * objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init): Likewise. (hash_name_enter): Likewise. gcc/cp/ChangeLog: * class.c (sorted_fields_type_new): Adjust. * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise. * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise. * cp-tree.h: Remove usage of variable_size gty attribute. * decl.c (make_label_decl): Adjust. (check_goto): Likewise. (start_preparsed_function): Likewise. (save_function_data): Likewise. * lex.c (init_reswords): Likewise. (retrofit_lang_decl): Likewise. (cxx_dup_lang_specific_decl): Likewise. (copy_lang_type): Likewise. (cxx_make_type): Likewise. * name-lookup.c (binding_entry_make): Likewise. (binding_table_construct): Likewise. (binding_table_new): Likewise. (cxx_binding_make): Likewise. (pushdecl_maybe_friend_1): Likewise. (begin_scope): Likewise. (push_to_top_level): Likewise. * parser.c (cp_lexer_alloc): Likewise. (cp_lexer_new_from_tokens): Likewise. (cp_token_cache_new): Likewise. (cp_parser_context_new): Likewise. (cp_parser_new): Likewise. (cp_parser_nested_name_specifier_opt): Likewise. (cp_parser_template_id): Likewise. * pt.c (maybe_process_partial_specialization): Likewise. (register_specialization): Likewise. (add_pending_template): Likewise. (lookup_template_class_1): Likewise. (push_tinst_level): Likewise. * semantics.c (register_constexpr_fundef): Likewise. (cxx_eval_call_expression): Likewise. * typeck2.c (abstract_virtuals_error_sfinae): Likewise. gcc/fortran/ChangeLog: * f95-lang.c (pushlevel): Adjust. * trans-decl.c (gfc_allocate_lang_decl): Adjust. (gfc_find_module): Likewise. * trans-types.c (gfc_get_nodesc_array_type): Likewise. (gfc_get_array_type_bounds): Likewise. (gfc_nonrestricted_type): Likewise. * trans.h: Don't use variable_size gty attribute. gcc/ada/ChangeLog: * gcc-interface/ada-tree.h: Remove usage of variable_size gty annotation. * gcc-interface/decl.c (annotate_value): Adjust. * gcc-interface/trans.c (Attribute_to_gnu): Likewise. (push_range_check_info): Likewise. (Loop_Statement_to_gnu): Likewise. (Subprogram_Body_to_gnu): Likewise. (Compilation_Unit_to_gnu): Likewise. (start_stmt_group): Likewise. * gcc-interface/utils.c (init_gnat_utils): Likewise. (gnat_pushlevel): Likewise. (maybe_pad_type): Likewise. gcc/go/ChangeLog: * go-lang.c (struct GTY): Don't use variable_size gty attribute. gcc/c-family/ChangeLog: * c-common.h (sorted_fields_type): Remove variable_size GTY attribute. * c-pragma.c (push_alignment): Adjust. (handle_pragma_push_options): Likewise. gcc/lto/ChangeLog: * lto-tree.h: Don't use variable_size gty attribute. * lto.c (lto_read_in_decl_state): Adjust. (create_subid_section_table): Likewise. (lto_flatten_files): Likewise. (read_cgraph_and_symbols): Likewise. gcc/objcp/ChangeLog: * objcp-decl.h: Adjust. From-SVN: r210566
2014-05-18 01:07:23 +02:00
2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
* c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
* c-pragma.c (push_alignment): Adjust.
(handle_pragma_push_options): Likewise.
2014-05-09 Marek Polacek <polacek@redhat.com>
PR c/50459
* c-common.c (check_user_alignment): Return -1 if alignment is error
node.
(handle_aligned_attribute): Don't call default_conversion on
FUNCTION_DECLs.
(handle_vector_size_attribute): Likewise.
(handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
(handle_sentinel_attribute): Call default_conversion and allow even
integral types as an argument.
2014-05-08 Marek Polacek <polacek@redhat.com>
PR c/61053
* c-common.c (min_align_of_type): New function factored out from...
(c_sizeof_or_alignof_type): ...here.
* c-common.h (min_align_of_type): Declare.
2014-05-08 Marek Polacek <polacek@redhat.com>
PR c/61077
* c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
parameter type of main.
2014-05-07 DJ Delorie <dj@redhat.com>
* c-cppbuiltin.c (print_bits_of_hex): New.
(builtin_define_type_minmax): Print values using hex so as not to
require a pre-computed list of string values.
2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
Mike Stump <mikestump@comcast.net>
Richard Sandiford <rdsandiford@googlemail.com>
* c-ada-spec.c: Include wide-int.h.
(ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
(dump_generic_ada_node): Use wide-int interfaces.
* c-common.c: Include wide-int-print.h.
(shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
(pointer_int_sum): Use wide-int interfaces.
(c_common_nodes_and_builtins): Use make_int_cst.
(match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
(handle_alloc_size_attribute): Use wide-int interfaces.
(get_nonnull_operand): Likewise.
* c-format.c (get_constant): Use tree_fits_uhwi_p.
* c-lex.c: Include wide-int.h.
(narrowest_unsigned_type): Take a widest_int rather than two
HOST_WIDE_INTs.
(narrowest_signed_type): Likewise.
(interpret_integer): Update accordingly. Use wide-int interfaces.
(lex_charconst): Use wide-int interfaces.
* c-pretty-print.c: Include wide-int.h.
(pp_c_integer_constant): Use wide-int interfaces.
* cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
INT_CST_LT_UNSIGNED.
2014-05-06 Richard Biener <rguenther@suse.de>
* c-opts.c (c_common_post_options): For -freestanding,
-fno-hosted and -fno-builtin disable pattern recognition
if not enabled explicitely.
2014-05-02 Marek Polacek <polacek@redhat.com>
* c.opt (Wsizeof-pointer-memaccess): Describe option.
2014-05-01 Marek Polacek <polacek@redhat.com>
PR c/43245
* c.opt (Wdiscarded-qualifiers): Add.
2014-04-30 Marek Polacek <polacek@redhat.com>
* c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
INT_MIN / -1 sanitization only for integer types.
2014-04-25 Marek Polacek <polacek@redhat.com>
PR c/18079
* c-common.c (handle_noinline_attribute): Warn if the attribute
conflicts with always_inline attribute.
(handle_always_inline_attribute): Warn if the attribute conflicts
with noinline attribute.
2014-04-25 Marek Polacek <polacek@redhat.com>
PR c/60156
* c-common.c (check_main_parameter_types): Warn about variadic main.
2014-04-24 Mike Stump <mikestump@comcast.net>
* c.opt (Wshadow-ivar): Default to on.
2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
* c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
2014-04-23 Marek Polacek <polacek@redhat.com>
* c-common.c (handle_tm_wrap_attribute): Tweak error message.
re PR sanitizer/60275 ([UBSAN] Add -f[no-]sanitize-recover/-fsanitize-undefined-trap-on-error to make UBSAN's runtime errors fatal) PR sanitizer/60275 * common.opt (fsanitize-recover, fsanitize-undefined-trap-on-error): New options. * gcc.c (sanitize_spec_function): Don't return "" for "undefined" if flag_sanitize_undefined_trap_on_error. * sanitizer.def (BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW_ABORT, BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS_ABORT, BUILT_IN_UBSAN_HANDLE_VLA_BOUND_NOT_POSITIVE_ABORT, BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT, BUILT_IN_UBSAN_HANDLE_ADD_OVERFLOW_ABORT, BUILT_IN_UBSAN_HANDLE_SUB_OVERFLOW_ABORT, BUILT_IN_UBSAN_HANDLE_MUL_OVERFLOW_ABORT, BUILT_IN_UBSAN_HANDLE_NEGATE_OVERFLOW_ABORT, BUILT_IN_UBSAN_HANDLE_LOAD_INVALID_VALUE_ABORT): New builtins. * ubsan.c (ubsan_instrument_unreachable): Return __builtin_trap () if flag_sanitize_undefined_trap_on_error. (ubsan_expand_null_ifn): Emit __builtin_trap () if flag_sanitize_undefined_trap_on_error and __ubsan_handle_type_mismatch_abort if !flag_sanitize_recover. (ubsan_expand_null_ifn, ubsan_build_overflow_builtin, instrument_bool_enum_load): Emit __builtin_trap () if flag_sanitize_undefined_trap_on_error and __builtin_handle_*_abort () if !flag_sanitize_recover. * doc/invoke.texi (-fsanitize-recover, -fsanitize-undefined-trap-on-error): Document. c-family/ * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap () if flag_sanitize_undefined_trap_on_error. (ubsan_instrument_division, ubsan_instrument_shift, ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort () if !flag_sanitize_recover. testsuite/ * g++.dg/ubsan/return-2.C: Revert 2014-03-24 changes, add -fno-sanitize-recover to dg-options. * g++.dg/ubsan/cxx11-shift-1.C: Remove c++11 target restriction, add -std=c++11 to dg-options. * g++.dg/ubsan/cxx11-shift-2.C: Likewise. * g++.dg/ubsan/cxx1y-vla.C: Remove c++1y target restriction, add -std=c++1y to dg-options. * c-c++-common/ubsan/undefined-1.c: Revert 2014-03-24 changes, add -fno-sanitize-recover to dg-options. * c-c++-common/ubsan/overflow-sub-1.c: Likewise. * c-c++-common/ubsan/vla-4.c: Likewise. * c-c++-common/ubsan/pr59503.c: Likewise. * c-c++-common/ubsan/vla-3.c: Likewise. * c-c++-common/ubsan/save-expr-1.c: Likewise. * c-c++-common/ubsan/overflow-add-1.c: Likewise. * c-c++-common/ubsan/shift-3.c: Likewise. * c-c++-common/ubsan/overflow-1.c: Likewise. * c-c++-common/ubsan/overflow-negate-2.c: Likewise. * c-c++-common/ubsan/vla-2.c: Likewise. * c-c++-common/ubsan/overflow-mul-1.c: Likewise. * c-c++-common/ubsan/pr60613-1.c: Likewise. * c-c++-common/ubsan/shift-6.c: Likewise. * c-c++-common/ubsan/overflow-mul-3.c: Likewise. * c-c++-common/ubsan/overflow-add-3.c: New test. * c-c++-common/ubsan/overflow-add-4.c: New test. * c-c++-common/ubsan/div-by-zero-6.c: New test. * c-c++-common/ubsan/div-by-zero-7.c: New test. From-SVN: r209672
2014-04-23 10:20:12 +02:00
2014-04-22 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/60275
* c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
if flag_sanitize_undefined_trap_on_error.
(ubsan_instrument_division, ubsan_instrument_shift,
ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
if !flag_sanitize_recover.
2014-04-22 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/43622
* c-common.c (registered_builtin_types): Make non-static.
* c-common.h (registered_builtin_types): Declare.
2014-04-14 Richard Biener <rguenther@suse.de>
Marc Glisse <marc.glisse@inria.fr>
PR c/60819
* c-common.c (convert_vector_to_pointer_for_subscript): Properly
apply may-alias the scalar pointer type when applicable.
2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
PR middle-end/60467
* cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
as possible argument for Cilk_spawn.
2014-04-11 Tobias Burnus <burnus@net-b.de>
PR c/60194
* c.opt (Wformat-signedness): Add
* c-format.c(check_format_types): Use it.
2014-04-11 Jason Merrill <jason@redhat.com>
PR c++/57926
* c-common.c (sync_resolve_size, get_atomic_generic_size): Call
default_conversion for an array argument.
2014-04-08 Marek Polacek <polacek@redhat.com>
PR sanitizer/60745
* c-ubsan.c: Include asan.h.
(ubsan_instrument_return): Call initialize_sanitizer_builtins.
2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
* c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
2014-04-02 Marek Polacek <polacek@redhat.com>
* c-common.h (c_expand_expr): Remove declaration.
2014-03-28 Jakub Jelinek <jakub@redhat.com>
PR c++/60689
* c-common.c (add_atomic_size_parameter): When creating new
params vector, push the size argument first.
2014-03-26 Jakub Jelinek <jakub@redhat.com>
* c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
ubsan_instrument_vla, ubsan_instrument_return): Adjust
ubsan_create_data callers.
2014-03-22 Jakub Jelinek <jakub@redhat.com>
PR debug/60603
* c-opts.c (c_finish_options): Restore cb_file_change call to
<built-in>.
2014-03-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/36282
* c-pragma.c (apply_pragma_weak): Only look at
TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
DECL_ASSEMBLER_NAME_SET_P (decl).
(maybe_apply_pending_pragma_weaks): Exit early if
vec_safe_is_empty (pending_weaks) rather than only when
!pending_weaks.
(maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
set assembler name back to NULL afterwards.
2014-03-11 Jason Merrill <jason@redhat.com>
* c.opt: Add -std=gnu++14.
2014-03-11 Ian Bolton <ian.bolton@arm.com>
* c-opts.c (c_common_post_options): Don't override
-ffp-contract=fast if unsafe-math-optimizations is on.
2014-03-08 Paulo Matos <paulo@matos-sorge.com>
* c.opt: Enable LTO FE for fshort-double.
2014-03-07 Jason Merrill <jason@redhat.com>
* c.opt: Add -std=c++14.
2014-03-06 Marek Polacek <polacek@redhat.com>
PR c/60197
* cilk.c (contains_cilk_spawn_stmt): New function.
(contains_cilk_spawn_stmt_walker): Likewise.
(recognize_spawn): Give error on invalid use of _Cilk_spawn.
* c-common.h (contains_cilk_spawn_stmt): Add declaration.
2014-03-03 Jakub Jelinek <jakub@redhat.com>
* c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
(init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
even when flag_preprocess_only.
2014-02-26 Jason Merrill <jason@redhat.com>
PR c++/59231
PR c++/11586
* c-common.c (shorten_compare): Don't check
c_inhibit_evaluation_warnings.
2014-02-19 Jakub Jelinek <jakub@redhat.com>
PR c/37743
* c-common.c (c_common_nodes_and_builtins): When initializing
c_uint{16,32,64}_type_node, also set corresponding
uint{16,32,64}_type_node to the same value.
PR c++/60267
* c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
for PRAGMA_IVDEP if flag_preprocess_only.
2014-02-12 Jakub Jelinek <jakub@redhat.com>
PR c/60101
* c-common.c (merge_tlist): If copy is true, call new_tlist,
if false, add ADD itself, rather than vice versa.
(verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
copy. For SAVE_EXPR, only call merge_tlist once.
2014-02-08 Jakub Jelinek <jakub@redhat.com>
PR middle-end/60092
* c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
and tree_to_uhwi.
(handle_alloc_align_attribute, handle_assume_aligned_attribute): New
functions.
(c_common_attribute_table): Add alloc_align and assume_aligned
attributes.
2014-02-06 Marek Polacek <polacek@redhat.com>
PR c/60087
* c-common.c (warn_for_sign_compare): Call warning_at with location
instead of warning.
2014-02-05 Marek Polacek <polacek@redhat.com>
PR c/53123
* c-omp.c (c_finish_omp_atomic): Remove unreachable return
statement.
2014-02-04 Marek Polacek <polacek@redhat.com>
PR c/60036
* c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
SAVE_EXPR.
2014-02-03 Marc Glisse <marc.glisse@inria.fr>
PR c++/53017
PR c++/59211
* c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
handle_vector_size_attribute, handle_nonnull_attribute): Call
default_conversion on the attribute argument.
(handle_nonnull_attribute): Increment the argument number.
re PR c/59963 (Wrong column number for warning -Woverflow) PR c/59963 c-family/ * c-common.c (add_atomic_size_parameter): Pass vNULL to build_function_call_vec. (resolve_overloaded_builtin): Likewise. * c-common.h (build_function_call_vec): Adjust declaration. cp/ * typeck.c (build_function_call_vec): Add dummy arg_loc parameter. c/ * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to build_function_call_vec. (build_function_call): Likewise. (build_atomic_assign): Likewise. (build_function_call_vec): Add arg_loc parameter. Use it. (convert_arguments): Likewise. (convert_for_assignment): Rename rhs_loc to expr_loc. * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list. (c_parser_objc_keywordexpr): Likewise. (c_parser_postfix_expression_after_primary): Call build_function_call_vec with expr_loc rather than op_loc. Call c_parser_expr_list to fill arg_loc. Pass arg_loc to build_function_call_vec. (c_parser_expr_list): Add locations parameter. Fill it with locations of function arguments. * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec. objc/ * objc-next-runtime-abi-02.c (build_throw_stmt): Pass vNULL to build_function_call_vec. (finish_catch): Likewise. (next_runtime_abi_02_get_class_reference): Likewise. * objc-next-runtime-abi-01.c (build_objc_method_call): Pass vNULL to build_function_call_vec. (build_throw_stmt): Likewise. * objc-gnu-runtime-abi-01.c: (build_objc_method_call): Pass vNULL to build_function_call_vec. (build_throw_stmt): Likewise. testsuite/ * gcc.dg/pr59940.c (g): Adjust dg-warning. (y): Adjust dg-error. * gcc.dg/cast-function-1.c (bar): Adjust dg-warnings. * gcc.dg/pr59963-1.c: New test. * gcc.dg/pr59963-2.c: New test. * gcc.dg/pr59963-3.c: New test. From-SVN: r207335
2014-01-31 09:13:50 +01:00
2014-01-31 Marek Polacek <polacek@redhat.com>
PR c/59963
* c-common.c (add_atomic_size_parameter): Pass vNULL to
build_function_call_vec.
(resolve_overloaded_builtin): Likewise.
* c-common.h (build_function_call_vec): Adjust declaration.
2014-01-30 17:15:36 +01:00
2014-01-30 Marek Polacek <polacek@redhat.com>
PR c/59940
* c-common.h (unsafe_conversion_p): Adjust declaration.
(warnings_for_convert_and_check): Likewise.
(convert_and_check): Likewise.
* c-common.c (unsafe_conversion_p): Add location parameter. Call
expansion_point_location_if_in_system_header on it.
(warnings_for_convert_and_check): Add location parameter. Call
expansion_point_location_if_in_system_header on it. Use it.
(convert_and_check): Add location parameter. Use it.
(conversion_warning): Likewise.
(c_add_case_label): Adjust convert_and_check calls.
(scalar_to_vector): Adjust unsafe_conversion_p calls.
Replace flag_enable_cilkplus with flag_cilkplus. gcc/ChangeLog +2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * builtins.c (is_builtin_name): Renamed flag_enable_cilkplus to + flag_cilkplus. + * builtins.def: Likewise. + * cilk.h (fn_contains_cilk_spawn_p): Likewise. + * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Likewise. + * ira.c (ira_setup_eliminable_regset): Likewise. + * omp-low.c (gate_expand_omp): Likewise. + (execute_lower_omp): Likewise. + (diagnose_sb_0): Likewise. + (gate_diagnose_omp_blocks): Likewise. + (simd_clone_clauses_extract): Likewise. + (gate): Likewise. + gcc/c-family/ChangeLog +2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with + flag_cilkplus. + * c-pragma.c (init_pragma): Likewise. + * c.opt: Likewise. + gcc/c/ChangeLog +2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * c-parser.c (c_parser_declaration_or_fndef): Replaced + flag_enable_cilkplus with flag_cilkplus. + (c_parser_direct_declarator_inner): Likewise. + (c_parser_attribute_any_word): Likewise. + (c_parser_attributes): Likewise. + (c_parser_compound_statement): Likewise. + (c_parser_statement_after_labels): Likewise. + (c_parser_if_statement): Likewise. + (c_parser_switch_statement): Likewise. + (c_parser_do_statement): Likewise. + (c_parser_for_statement): Likewise. + (c_parser_unary_expression): Likewise. + (c_parser_postfix_expression): Likewise. + (c_parser_postfix_expression_after_primary): Likewise. + (c_parser_postfix_expression_after_primary): Likewise. + (c_parser_omp_clause_name): Likewise. + (c_finish_omp_declare_simd): Likewise. + (c_parser_cilk_verify_simd): Likewise. + * c-typeck.c (build_array_ref): Likewise. + (build_function_call_vec): Likewise. + (convert_arguments): Likewise. + (build_compound_expr): Likewise. + (c_finish_return): Likewise. + (c_finish_if_stmt): Likewise. + (c_finish_loop): Likewise. + (build_binary_op): Likewise. + gcc/lto/ChangeLog +2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with + flag_cilkplus. + From-SVN: r207064
2014-01-25 00:13:49 +01:00
2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
flag_cilkplus.
* c-pragma.c (init_pragma): Likewise.
* c.opt: Likewise.
2014-01-23 Marek Polacek <polacek@redhat.com>
PR c/59846
* c-common.c (shorten_compare): Add location_t parameter.
* c-common.h (shorten_binary_op): Adjust declaration.
2014-01-23 Marek Polacek <polacek@redhat.com>
PR c/58346
* c-common.c (pointer_to_zero_sized_aggr_p): New function.
* c-common.h: Declare it.
2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.h (dump_ada_specs): Revert prototype change.
* c-ada-spec.c (dump_ads): Likewise.
(cpp_check): Likewise.
(dump_ada_specs): Likewise.
2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
PR c++/49718
* c-common.c (handle_no_instrument_function_attribute): Allow
no_instrument_function attribute in class member
definition/declaration.
2014-01-15 Jakub Jelinek <jakub@redhat.com>
PR c/58943
* c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
build_modify_expr with non-NOP_EXPR opcode. Handle return from it
being COMPOUND_EXPR.
(c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
operand a SAVE_EXPR and second MODIFY_EXPR.
2014-01-09 Jakub Jelinek <jakub@redhat.com>
PR target/58115
* c-pch.c (c_common_write_pch): Call
prepare_target_option_nodes_for_pch.
2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
Update copyright years
arc-common.c, [...]: Use the standard form for the copyright notice. gcc/ * common/config/arc/arc-common.c, config/arc/arc-modes.def, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/arc.md, config/arc/arc.opt, config/arm/arm_neon_builtins.def, config/arm/crypto.def, config/i386/avx512cdintrin.h, config/i386/avx512erintrin.h, config/i386/avx512fintrin.h, config/i386/avx512pfintrin.h, config/i386/btver2.md, config/i386/shaintrin.h, config/i386/slm.md, config/linux-protos.h, config/linux.c, config/winnt-c.c, diagnostic-color.c, diagnostic-color.h, gimple-ssa-isolate-paths.c, vtable-verify.c, vtable-verify.h: Use the standard form for the copyright notice. gcc/c-family/ * array-notation-common.c, c-cilkplus.c: Use the standard form for the copyright notice. gcc/c/ * c-array-notation.c: Use the standard form for the copyright notice. gcc/cp/ * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use the standard form for the copyright notice. gcc/testsuite/ * gcc.target/arc/arc.exp: Use the standard form for the copyright notice. libgcc/ * config/arc/asm.h, config/arc/crtg.S, config/arc/crtgend.S, config/arc/crti.S, config/arc/crtn.S, config/arc/divtab-arc700.c, config/arc/dp-hack.h, config/arc/fp-hack.h, config/arc/ieee-754/adddf3.S, config/arc/ieee-754/addsf3.S, config/arc/ieee-754/arc600-dsp/divdf3.S, config/arc/ieee-754/arc600-dsp/divsf3.S, config/arc/ieee-754/arc600-dsp/muldf3.S, config/arc/ieee-754/arc600-dsp/mulsf3.S, config/arc/ieee-754/arc600-mul64/divdf3.S, config/arc/ieee-754/arc600-mul64/divsf3.S, config/arc/ieee-754/arc600-mul64/muldf3.S, config/arc/ieee-754/arc600-mul64/mulsf3.S, config/arc/ieee-754/arc600/divsf3.S, config/arc/ieee-754/arc600/mulsf3.S, config/arc/ieee-754/divdf3.S, config/arc/ieee-754/divsf3-stdmul.S, config/arc/ieee-754/divsf3.S, config/arc/ieee-754/divtab-arc-df.c, config/arc/ieee-754/divtab-arc-sf.c, config/arc/ieee-754/eqdf2.S, config/arc/ieee-754/eqsf2.S, config/arc/ieee-754/extendsfdf2.S, config/arc/ieee-754/fixdfsi.S, config/arc/ieee-754/fixsfsi.S, config/arc/ieee-754/fixunsdfsi.S, config/arc/ieee-754/floatsidf.S, config/arc/ieee-754/floatsisf.S, config/arc/ieee-754/floatunsidf.S, config/arc/ieee-754/gedf2.S, config/arc/ieee-754/gesf2.S, config/arc/ieee-754/gtdf2.S, config/arc/ieee-754/gtsf2.S, config/arc/ieee-754/muldf3.S, config/arc/ieee-754/mulsf3.S, config/arc/ieee-754/orddf2.S, config/arc/ieee-754/ordsf2.S, config/arc/ieee-754/truncdfsf2.S, config/arc/ieee-754/uneqdf2.S, config/arc/ieee-754/uneqsf2.S, config/arc/initfini.c, config/arc/lib1funcs.S, config/arc/t-arc, config/arc/t-arc-newlib, config/cris/umulsidi3.S, config/msp430/cmpsi2.S, config/msp430/epilogue.S, config/msp430/lib2bitcountHI.c, config/msp430/lib2divHI.c, config/msp430/lib2divQI.c, config/msp430/lib2divSI.c, config/msp430/lib2mul.c, config/msp430/msp430-divmod.h, config/msp430/msp430-mul.h, config/msp430/slli.S, config/msp430/srai.S, config/msp430/srli.S, config/rl78/divmodhi.S, config/rl78/divmodqi.S, config/rl78/divmodsi.S, config/rl78/signbit.S, vtv_end.c, vtv_end_preinit.c, vtv_start.c, vtv_start_preinit.c: Use the standard form for the copyright notice. libgomp/ * hashtab.h: Use the standard form for the copyright notice. libstdc++-v3/ * testsuite/18_support/new_handler.cc, testsuite/18_support/terminate_handler.cc, testsuite/18_support/unexpected_handler.cc: Use the standard form for the copyright notice. From-SVN: r206288
2014-01-02 23:09:02 +01:00
2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
* array-notation-common.c, c-cilkplus.c: Use the standard form for
the copyright notice.
2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (print_constructor): New function.
(print_destructor): Retrieve the origin of the destructor.
(print_ada_declaration): Revamp handling of constructors/destructors.
2013-12-23 Stuart Hastings <stuart@apple.com>
re PR c++/41090 (Using static label reference in c++ class constructor produces wrong code) PR c++/41090 Add -fdeclone-ctor-dtor. gcc/cp/ * optimize.c (can_alias_cdtor, populate_clone_array): Split out from maybe_clone_body. (maybe_thunk_body): New function. (maybe_clone_body): Call it. * mangle.c (write_mangled_name): Remove code to suppress writing of mangled name for cloned constructor or destructor. (write_special_name_constructor): Handle decloned constructor. (write_special_name_destructor): Handle decloned destructor. * method.c (trivial_fn_p): Handle decloning. * semantics.c (expand_or_defer_fn_1): Clone after setting linkage. gcc/c-family/ * c.opt: Add -fdeclone-ctor-dtor. * c-opts.c (c_common_post_options): Default to on iff -Os. gcc/ * cgraph.h (struct cgraph_node): Add calls_comdat_local. (symtab_comdat_local_p, symtab_in_same_comdat_p): New. * cif-code.def: Add USES_COMDAT_LOCAL. * symtab.c (verify_symtab_base): Make sure we don't refer to a comdat-local symbol from outside its comdat. * cgraph.c (verify_cgraph_node): Likewise. * cgraphunit.c (mark_functions_to_output): Don't mark comdat-locals. * ipa.c (symtab_remove_unreachable_nodes): Likewise. (function_and_variable_visibility): Handle comdat-local fns. * ipa-cp.c (determine_versionability): Don't clone comdat-locals. * ipa-inline-analysis.c (compute_inline_parameters): Update calls_comdat_local. * ipa-inline-transform.c (inline_call): Likewise. (save_inline_function_body): Don't clear DECL_COMDAT_GROUP. * ipa-inline.c (can_inline_edge_p): Check calls_comdat_local. * lto-cgraph.c (input_overwrite_node): Read calls_comdat_local. (lto_output_node): Write it. * symtab.c (symtab_dissolve_same_comdat_group_list): Clear DECL_COMDAT_GROUP for comdat-locals. include/ * demangle.h (enum gnu_v3_ctor_kinds): Added literal gnu_v3_unified_ctor. (enum gnu_v3_ctor_kinds): Added literal gnu_v3_unified_dtor. libiberty/ * cp-demangle.c (cplus_demangle_fill_ctor,cplus_demangle_fill_dtor): Handle unified ctor/dtor. (d_ctor_dtor_name): Handle unified ctor/dtor. From-SVN: r206182
2013-12-23 18:49:47 +01:00
Bill Maddox <maddox@google.com>
Jason Merrill <jason@redhat.com>
* c.opt: Add -fdeclone-ctor-dtor.
* c-opts.c (c_common_post_options): Default to on iff -Os.
Added support for Cilk Plus SIMD-enabled function for C. +++ gcc/ChangeLog +2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * omp-low.c (simd_clone_clauses_extract): Replaced the string + "cilk simd elemental" with "cilk simd function." + * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen): + Removed a carriage-return from a warning string. + +++ gcc/c-family/ChangeLog +2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * c-common.c (c_common_attribute_table): Added "cilk simd function" + attribute. + * c-pragma.h (enum pragma_cilk_clause): Remove. + (enum pragma_omp_clause): Added the following fields: + PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK, + PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE, + PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE, + PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE, + PRAGMA_CILK_CLAUSE_UNIFORM. + + +++ gcc/c/ChangeLog +2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field. + (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens + field in parser is not empty. If not-empty, call the function + c_parser_finish_omp_declare_simd. + (c_parser_cilk_clause_vectorlength): Modified function to be shared + between SIMD-enabled functions and #pragma simd. Added new parameter. + (c_parser_cilk_all_clauses): Modified the usage of the function + c_parser_cilk_clause_vectorlength as mentioned above. + (c_parser_cilk_simd_fn_vector_attrs): New function. + (c_finish_cilk_simd_fn_tokens): Likewise. + (is_cilkplus_vector_p): Likewise. + (c_parser_omp_clause_name): Added checking for "vectorlength," + "nomask," and "mask" strings in clause name. + (c_parser_omp_all_clauses): Added 3 new case statements: + PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and + PRAGMA_CILK_CLAUSE_NOMASK. + (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a + check for vector attribute and if so call the function + c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled, + called the function c_finish_cilk_simd_fn_tokens. + (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in + parser field is non-empty. If so, parse them as you would parse + the omp declare simd pragma. + (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn. + Added a check when step is a parameter and flag it as error. + (CILK_SIMD_FN_CLAUSE_MASK): New #define. + (c_parser_cilk_clause_name): Changed pragma_cilk_clause to + pragma_omp_clause. + +++ gcc/testsuite/ChangeLog +2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * c-c++-common/cilk-plus/SE/ef_test.c: New test. + * c-c++-common/cilk-plus/SE/ef_test2.c: Likewise. + * c-c++-common/cilk-plus/SE/vlength_errors.c: Likewise. + * c-c++-common/cilk-plus/SE/ef_error.c: Likewise. + * c-c++-common/cilk-plus/SE/ef_error2.c: Likewise. + * c-c++-common/cilk-plus/SE/ef_error3.c: Likewise. + * gcc.dg/cilk-plus/cilk-plus.exp: Added calls for the above tests. + From-SVN: r206095
2013-12-18 20:00:21 +01:00
2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-common.c (c_common_attribute_table): Added "cilk simd function"
attribute.
* c-pragma.h (enum pragma_cilk_clause): Remove.
(enum pragma_omp_clause): Added the following fields:
PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
PRAGMA_CILK_CLAUSE_UNIFORM.
Added Compiler Support for _Cilk_spawn and _Cilk_sync for C++. gcc/c-family/ChangeLog 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com> * cilk.c (cilk_outline): Made this function non-static. (gimplify_cilk_spawn): Removed pre_p and post_p arguments. (create_cilk_wrapper): Added a new parameter: a function pointer. (c_install_body_w_frame_cleanup): Remove (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case. * c-common.h (cilk_outline): New prototype. (gimplify_cilk_spawn): Removed two parameters. (cilk_install_body_with_frame_cleanup): New prototype. * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and CILK_SPAWN_STMT case. gcc/c/ChangeLog 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove. (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise. (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise. * c-typeck.c (cilk_install_body_with_frame_cleanup): New function. gcc/ChangeLog 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com> * langhooks.h (lang_hooks_for_decls): Remove lang_hooks_for_cilkplus. (lang_hooks_for_cilkplus): Remove. * langhooks.c (lhd_cilk_detect_spawn): Likewise. (lhd_install_body_with_frame_cleanup): Likewise. * langhooks-def.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise. (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise. (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise. (LANG_HOOKS_CILKPLUS): Likewise. (LANG_HOOKS_DECLS): Remove LANG_HOOKS_CILKPLUS. * gimplify.c (gimplify_expr): Removed CILK_SPAWN_STMT case. (gimplify_modify_expr): Removed handling of _Cilk_spawn in expr. (gimplify_call_expr): Likewise. gcc/cp/ChangeLog 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com> * cp-tree.h (cilk_valid_spawn): New prototype. (gimplify_cilk_spawn): Likewise. (create_try_catch_expr): Likewise. * decl.c (finish_function): Insert Cilk function-calls when a _Cilk_spawn is used in a function. * parser.c (cp_parser_postfix_expression): Added RID_CILK_SPAWN and RID_CILK_SYNC cases. * cp-cilkplus.c (set_cilk_except_flag): New function. (set_cilk_except_data): Likewise. (cilk_install_body_with_frame_cleanup): Likewise. * except.c (create_try_catch_expr): Likewise. * parser.h (IN_CILK_SPAWN): New #define. * pt.c (tsubst_expr): Added CILK_SPAWN_STMT and CILK_SYNC_STMT cases. * semantics.c (potential_constant_expression_1): Likewise. * typeck.c (cp_build_compound_expr): Reject a spawned function in a compound expression. (check_return_expr): Reject a spawned function in a return expression. * cp-gimplify.c (cp_gimplify_expr): Added a CILK_SPAWN_STMT and CALL_EXPR case. Added handling of spawned function in MODIFY_EXPR and INIT_EXPR. gcc/testsuite/ChangeLog 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com> * g++.dg/cilk-plus/CK/catch_exc.cc: New test case. * g++.dg/cilk-plus/CK/const_spawn.cc: Likewise. * g++.dg/cilk-plus/CK/fib-opr-overload.cc: Likewise. * g++.dg/cilk-plus/CK/fib-tplt.cc: Likewise. * g++.dg/cilk-plus/CK/lambda_spawns.cc: Likewise. * g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc: Likewise. * g++.dg/cilk-plus/cilk-plus.exp: Added support to run Cilk Keywords test stored in c-c++-common. Also, added the Cilk runtime's library to the ld_library_path. From-SVN: r205902
2013-12-11 19:23:27 +01:00
2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (cilk_outline): Made this function non-static.
(gimplify_cilk_spawn): Removed pre_p and post_p arguments.
(create_cilk_wrapper): Added a new parameter: a function pointer.
(c_install_body_w_frame_cleanup): Remove
(extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
* c-common.h (cilk_outline): New prototype.
(gimplify_cilk_spawn): Removed two parameters.
(cilk_install_body_with_frame_cleanup): New prototype.
* c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
CILK_SPAWN_STMT case.
2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
* c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
* c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
(int_array_type_node): Remove.
* c-common.c (c_common_nodes_and_builtins): Don't build it.
2013-12-05 Marek Polacek <polacek@redhat.com>
PR c/52023
* c-common.c (c_sizeof_or_alignof_type): Move a declaration into
[ADJUST_FIELD_ALIGN].
2013-12-04 Joseph Myers <joseph@codesourcery.com>
PR c/52023
* c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
and check field alignment if set.
* c-common.h (c_sizeof_or_alignof_type): Update prototype.
(c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
2013-12-04 Jakub Jelinek <jakub@redhat.com>
Marek Polacek <polacek@redhat.com>
* c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
PR c/59309
* cilk.c (gimplify_cilk_spawn): Properly handle function without
arguments.
2013-11-29 Jakub Jelinek <jakub@redhat.com>
PR c/59280
* c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
goto invalid. If it is error_mark_node, don't issue further
diagnostics.
2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
* c.opt (Wopenmp-simd): New.
2013-11-22 Jakub Jelinek <jakub@redhat.com>
* c-ubsan.h (ubsan_instrument_return): New prototype.
* c-ubsan.c (ubsan_instrument_return): New function.
gimple.h: Remove all includes. * gimple.h: Remove all includes. (recalculate_side_effects): Move prototype to gimplify.h. * Makefile.in (PLUGIN_HEADERS): Add flattened gimple.h includes. * gengtype.c (open_base_files): Add gimple.h include list. * gimplify.h (recalculate_side_effects): Relocate prototype here. * gimple.c: Adjust include list. (recalculate_side_effects): Move to gimplify.c. * gimplify.c: Adjust include list. (recalculate_side_effects): Relocate from gimple.c. * alias.c: Add required include files removed from gimple.h. * asan.c: Likewise. * builtins.c: Likewise. * calls.c: Likewise. * cfgexpand.c: Likewise. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphbuild.c: Likewise. * cgraph.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * data-streamer.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimplify-me.c: Likewise. * graphite-blocking.c: Likewise. * graphite.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * internal-fn.c: Likewise. * ipa.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * omp-low.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * predict.c: Likewise. * profile.c: Likewise. * sese.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * symtab.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * varpool.c: Likewise. * var-tracking.c: Likewise. * vtable-verify.c: Likewise. * ada/gcc-interface/trans.c: Add required include files from gimple.h. * c/c-typeck.c: Add required include files from gimple.h. * c-family/c-common.c: Add required include files from gimple.h. * c-family/c-gimplify.c: Likewise * c-family/cilk.c: Likewise * cp/class.c: Add required include files from gimple.h. * cp/cp-gimplify.c: Likewise * cp/decl2.c: Likewise * cp/init.c: Likewise * cp/optimize.c: Likewise * cp/pt.c: Likewise * cp/semantics.c: Likewise * cp/tree.c: Likewise * cp/typeck.c: Likewise * cp/vtable-class-hierarchy.c: Likewise * fortran/trans.c: Add required include files from gimple.h. * fortran/trans-expr.c: Likewise * fortran/trans-openmp.c: Likewise * go/gofrontend/expressions.cc: Add required include files from gimple.h. * go/gofrontend/gogo-tree.cc: Likewise * go/gofrontend/types.cc: Likewise * go/go-gcc.cc: Likewise * go/go-lang.c: Likewise * java/java-gimplify.c: Add required include files from gimple.h. * lto/lto.c: Add required include files from gimple.h. * lto/lto-lang.c: Likewise * lto/lto-object.c: Likewise * lto/lto-partition.c: Likewise * lto/lto-symtab.c: Likewise * objc/objc-act.c: Add required include files from gimple.h. * config/darwin.c: Add required include files removed from gimple.h. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/alpha/alpha.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64.c: Likewise. * config/m32c/m32c.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/xtensa/xtensa.c: Likewise. * testsuite/gcc.dg/plugin/finish_unit_plugin.c: Add required include files removed from gimple.h. * testsuite/gcc.dg/plugin/ggcplug.c: Likewise. * testsuite/gcc.dg/plugin/one_time_plugin.c: Likewise. * testsuite/gcc.dg/plugin/selfassign.c: Likewise. * testsuite/gcc.dg/plugin/start_unit_plugin.c: Likewise. * testsuite/g++.dg/plugin/selfassign.c: Likewise. From-SVN: r205272
2013-11-22 16:58:51 +01:00
2013-11-22 Andrew MacLeod <amacleod@redhat.com>
* c-common.c: Add required include files from gimple.h.
* c-gimplify.c: Likewise
* cilk.c: Likewise
Remove macros that implicitly use input_location gcc/ * input.h (input_line): Remove. (input_filename): Likewise. (in_system_header): Likewise. * tree.h (EXPR_LOC_OR_HERE): Remove. * config/bfin/bfin.c (output_file_start): Remove use of input_filename macro. * builtins.c (c_strlen): Remove use of EXPR_LOC_OR_HERE macro. * gimplify.c (internal_get_tmp_var): Likewise. EXPR_LOC_OR_HERE macro. (shortcut_cond_expr): Likewise. * tree-diagnostic.c (diagnostic_report_current_function): Remove use of input_filename macro. * tree.c (get_file_function_name): Likewise. gcc/ada * gcc-interface/utils2.c (build_call_raise): Remove use of input_line macro. (build_call_raise_range): Likewise. (build_call_raise_column): Likewise. gcc/c-family * c-common.c (unsafe_conversion_p): Remove use of EXPR_LOC_OR_HERE macro. (conversion_warning): Likewise. (warnings_for_convert_and_check): Likewise. (warn_for_collisions_1): Likewise. (shorten_compare): Likewise, and remove use of in_system_header macro, using the location from the former. * c-lex.c (dump_one_header): Remove use of input_filename macro. (cb_def_pragma): Remove use of in_system_header macro. (lex_string): Likewise. * c-pragma.c (handle_pragma_float_const_decimal64): Likewise. gcc/c * c-decl.c (define_label, shadow_tag_warned) (check_bitfield_type_and_width, grokdeclarator, grokparms, store_parm_decls_newstyle, store_parm_decls_oldstyle) (declspecs_add_type): Remove use of in_system_header macro. * c-parser.c (c_parser_unary_expression): Likewise. * c-typeck.c (store_init_value, process_init_element) (c_start_case): Likewise. * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE macro. * c-parser.c (c_parser_set_source_position_from_token): Remove reference to in_system_header from comment. gcc/cp * call.c (build_integral_nontype_arg_conv): Remove use of EXPR_LOC_OR_HERE macro. (convert_like_real): Likewise. (convert_arg_to_ellipsis): Likewise. (build_cxx_call): Likewise. (perform_implicit_conversion_flags): Likewise. (initialize_reference): Likewise. * cvt.c (cp_convert_to_pointer): Likewise. (convert_to_reference): Likewise. (ocp_convert): Likewise. (convert_to_void): Likewise. * decl.c (pop_label): Update comment. (pop_switch): Remove use of EXPR_LOC_OR_HERE macro. (check_tag_decl): Remove use of in_system_header macro. (make_rtl_for_nonlocal_decl): Remove use of input_filename macro. (compute_array_index_type): Remove use of in_system_header macro. (grokdeclarator): Likewise. * error.c (dump_global_iord): Remove use of input_filename macro. (location_of): Remove use of EXPR_LOC_OR_HERE macro. (maybe_warn_cpp0x): Remove use of in_system_header macro. * init.c (build_new_1): Remove use of EXPR_LOC_OR_HERE macro. * lex.c (handle_pragma_interface): Remove use of input_filename macro. (handle_pragma_implementation): Likewise. (cxx_make_type): Likewise. (in_main_input_context): Likewise. * name-lookup.c (push_binding_level): Remove use of input_line macro. (leave_scope): Likewise. (resume_scope): Likewise. * parser.c (cp_parser_unqualified_id): Remove use of in_system_header macro. (cp_parser_cast_expression): Likewise. (cp_parser_declaration_seq_opt): Likewise. (cp_parser_enumerator_list): Likewise. (cp_parser_parameter_declaration_clause): Likewise. (cp_parser_exception_specification_opt): Likewise. * pt.c (unify_arg_conversion): Remove use of EXPR_LOC_OR_HERE macro. (convert_nontype_argument): Likewise. (push_tinst_level): Remove use of in_system_header macro. (tsubst_copy_and_build): Remove use of EXPR_LOC_OR_HERE macros. (do_decl_instantiation): Remove use of in_system_header macro. (do_type_instantiation): Likewise. * semantics.c (finish_call_expr): Remove use of EXPR_LOC_OR_HERE macro. (begin_class_definition): Remove use of input_filename macro. (cxx_eval_call_expression): Remove use of EXPR_LOC_OR_HERE macro. (cxx_eval_constant_expression): Likewise. (potential_constant_expression_1): Likewise. * typeck.c (decay_conversion): Likewise. (rationalize_conditional_expr): Likewise. (build_x_compound_expr_from_list): Likewise. (convert_for_assignment): Likewise. * typeck2.c (check_narrowing): Likewise. gcc/fortran * trans.c (trans_runtime_error_vararg): Remove use of input_line macro. gcc/java * class.c (maybe_layout_super_class): Update comment. * decl.c (java_add_stmt): Remove use of input_filename macro. * jcf-parse.c (set_source_filename): Remove use of input_filename macro. (parse_class_file): Remove use of input_line and input_filename macros. (java_parse_file): Remove use of input_filename macro. From-SVN: r205262
2013-11-22 15:18:13 +01:00
2013-11-22 David Malcolm <dmalcolm@redhat.com>
* c-common.c (unsafe_conversion_p): Remove use of
EXPR_LOC_OR_HERE macro.
(conversion_warning): Likewise.
(warnings_for_convert_and_check): Likewise.
(warn_for_collisions_1): Likewise.
(shorten_compare): Likewise, and remove use of in_system_header
macro, using the location from the former.
* c-lex.c (dump_one_header): Remove use of input_filename macro.
(cb_def_pragma): Remove use of in_system_header macro.
(lex_string): Likewise.
* c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
cuintp.c (UI_From_gnu): Use tree_to_shwi. gcc/ada/ 2013-11-19 Kenneth Zadeck <zadeck@naturalbridge.com> Mike Stump <mikestump@comcast.net> Richard Sandiford <rdsandiford@googlemail.com> * gcc-interface/cuintp.c (UI_From_gnu): Use tree_to_shwi. * gcc-interface/decl.c (gnat_to_gnu_entity): Use tree_to_uhwi. * gcc-interface/utils.c (make_packable_type): Likewise. gcc/c-family/ 2013-11-19 Kenneth Zadeck <zadeck@naturalbridge.com> Mike Stump <mikestump@comcast.net> Richard Sandiford <rdsandiford@googlemail.com> * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi instead of TREE_INT_CST_LOW, in cases where there is a protecting tree_fits_shwi_p or tree_fits_uhwi_p. (dump_generic_ada_node): Likewise. * c-format.c (check_format_arg): Likewise. * c-pretty-print.c (pp_c_integer_constant): Likewise. gcc/ 2013-11-19 Kenneth Zadeck <zadeck@naturalbridge.com> Mike Stump <mikestump@comcast.net> Richard Sandiford <rdsandiford@googlemail.com> * alias.c (ao_ref_from_mem): Use tree_to_shwi and tree_to_uhwi instead of TREE_INT_CST_LOW, in cases where there is a protecting tree_fits_shwi_p or tree_fits_uhwi_p. * builtins.c (fold_builtin_powi): Likewise. * config/epiphany/epiphany.c (epiphany_special_round_type_align): Likewise. * dbxout.c (dbxout_symbol): Likewise. * expr.c (expand_expr_real_1): Likewise. * fold-const.c (fold_single_bit_test, fold_plusminus_mult_expr) (fold_binary_loc): Likewise. * gimple-fold.c (fold_const_aggregate_ref_1): Likewise. * gimple-ssa-strength-reduction.c (stmt_cost): Likewise. * omp-low.c (lower_omp_for_lastprivate): Likewise. * simplify-rtx.c (delegitimize_mem_from_attrs): Likewise. * stor-layout.c (compute_record_mode): Likewise. * tree-cfg.c (verify_expr): Likewise. * tree-dfa.c (get_ref_base_and_extent): Likewise. * tree-pretty-print.c (dump_array_domain): Likewise. * tree-sra.c (build_user_friendly_ref_for_offset): Likewise. * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Likewise. * tree-ssa-loop-ivopts.c (get_loop_invariant_expr_id): Likewise. * tree-ssa-math-opts.c (execute_cse_sincos): Likewise. * tree-ssa-phiopt.c (hoist_adjacent_loads): Likewise. * tree-ssa-reassoc.c (acceptable_pow_call): Likewise. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise. (ao_ref_init_from_vn_reference, vn_reference_fold_indirect): Likewise. (vn_reference_lookup_3, simplify_binary_expression): Likewise. * tree-ssa-structalias.c (bitpos_of_field): Likewise. (get_constraint_for_1, push_fields_onto_fieldstack): Likewise. (create_variable_info_for_1): Likewise. * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise. (vect_verify_datarefs_alignment): Likewise. (vect_analyze_data_ref_accesses): Likewise. (vect_prune_runtime_alias_test_list): Likewise. * tree-vectorizer.h (NITERS_KNOWN_P): Likewise. Co-Authored-By: Mike Stump <mikestump@comcast.net> Co-Authored-By: Richard Sandiford <rdsandiford@googlemail.com> From-SVN: r205103
2013-11-20 12:57:27 +01:00
2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
Mike Stump <mikestump@comcast.net>
Richard Sandiford <rdsandiford@googlemail.com>
* c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
instead of TREE_INT_CST_LOW, in cases where there is a protecting
tree_fits_shwi_p or tree_fits_uhwi_p.
(dump_generic_ada_node): Likewise.
* c-format.c (check_format_arg): Likewise.
* c-pretty-print.c (pp_c_integer_constant): Likewise.
2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
* c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
PR c/53001
* c-common.c (unsafe_conversion_p): Make this function
return an enumeration with more detail.
(conversion_warning): Use the new return type of
unsafe_conversion_p to separately warn either about conversions
that lower floating point number precision or about the other
kinds of conversions.
* c-common.h (enum conversion_safety): New enumeration.
(unsafe_conversion_p): switching return type to
conversion_safety enumeration.
* c.opt: Adding new warning -Wfloat-conversion and
enabling it with -Wconversion.
2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
* c-opts.c: Include plugin.h.
(cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Add -ldl. config/ * bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Add -ldl. gcc/c-family/ * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data call. (ubsan_instrument_shift): Likewise. (ubsan_instrument_vla): Likewise. gcc/ * opts.c (common_handle_option): Add -fsanitize=null option. Turn off -fdelete-null-pointer-checks option when doing the NULL pointer checking. * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH): Add. * tree-pass.h (make_pass_ubsan): Declare. (make_pass_sanopt): Declare. * timevar.def (TV_TREE_UBSAN): New timevar. * passes.def: Add pass_sanopt and pass_ubsan. * ubsan.h (ubsan_null_ckind): New enum. (ubsan_mismatch_data): New struct. (ubsan_expand_null_ifn): Declare. (ubsan_create_data): Adjust declaration. (ubsan_type_descriptor): Likewise. * asan.c: Include "ubsan.h". (pass_data_sanopt): New pass. (execute_sanopt): New function. (gate_sanopt): Likewise. (make_pass_sanopt): Likewise. (class pass_sanopt): New class. * ubsan.c: Include tree-pass.h, gimple-ssa.h, gimple-walk.h, gimple-iterator.h and cfgloop.h. (PROB_VERY_UNLIKELY): Define. (tree_type_map_hash): New function. (ubsan_type_descriptor): Add new parameter. Improve type name generation. (ubsan_create_data): Add new parameter. Add pointer data into ubsan structure. (ubsan_expand_null_ifn): New function. (instrument_member_call): Likewise. (instrument_mem_ref): Likewise. (instrument_null): Likewise. (ubsan_pass): Likewise. (gate_ubsan): Likewise. (make_pass_ubsan): Likewise. (ubsan_instrument_unreachable): Adjust ubsan_create_data call. (class pass_ubsan): New class. (pass_data_ubsan): New pass. * flag-types.h (enum sanitize_code): Add SANITIZE_NULL. * internal-fn.c (expand_UBSAN_NULL): New function. * cgraphunit.c (varpool_finalize_decl): Call varpool_assemble_decl even when !flag_toplevel_reorder. * internal-fn.def (UBSAN_NULL): New. gcc/testsuite/ * c-c++-common/ubsan/null-1.c: New test. * c-c++-common/ubsan/null-2.c: New test. * c-c++-common/ubsan/null-3.c: New test. * c-c++-common/ubsan/null-4.c: New test. * c-c++-common/ubsan/null-5.c: New test. * c-c++-common/ubsan/null-6.c: New test. * c-c++-common/ubsan/null-7.c: New test. * c-c++-common/ubsan/null-8.c: New test. * c-c++-common/ubsan/null-9.c: New test. * c-c++-common/ubsan/null-10.c: New test. * c-c++-common/ubsan/null-11.c: New test. * gcc.dg/ubsan/c99-shift-2.c: Adjust dg-output. * c-c++-common/ubsan/shift-1.c: Likewise. * c-c++-common/ubsan/div-by-zero-3.c: Likewise. From-SVN: r205021
2013-11-19 12:45:15 +01:00
2013-11-19 Marek Polacek <polacek@redhat.com>
* c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
call.
(ubsan_instrument_shift): Likewise.
(ubsan_instrument_vla): Likewise.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* c-common.c (convert_vector_to_pointer_for_subscript): Remove
cast to unsigned type.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
tree_low_cst.
(complete_array_type): Update comment to refer to tree_to_[su]hwi
rather than tree_low_cst.
decl.c, [...]: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. gcc/ada/ * gcc-interface/decl.c, gcc-interface/utils.c, gcc-interface/utils2.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. gcc/c-family/ * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. gcc/c/ * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. gcc/cp/ * call.c, class.c, decl.c, error.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. gcc/objc/ * objc-encoding.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. gcc/ * alias.c, asan.c, builtins.c, cfgexpand.c, cgraph.c, config/aarch64/aarch64.c, config/alpha/predicates.md, config/arm/arm.c, config/darwin.c, config/epiphany/epiphany.c, config/i386/i386.c, config/iq2000/iq2000.c, config/m32c/m32c-pragma.c, config/mep/mep-pragma.c, config/mips/mips.c, config/picochip/picochip.c, config/rs6000/rs6000.c, cppbuiltin.c, dbxout.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, fold-const.c, function.c, gimple-fold.c, godump.c, ipa-cp.c, ipa-prop.c, omp-low.c, predict.c, sdbout.c, stor-layout.c, trans-mem.c, tree-object-size.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-forwprop.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-niter.c, tree-ssa-loop-prefetch.c, tree-ssa-strlen.c, tree-stdarg.c, tree-switch-conversion.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vrp.c, tree.c, tsan.c, ubsan.c, varasm.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. From-SVN: r204961
2013-11-18 15:52:19 +01:00
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
tree_to_uhwi throughout.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
tree_low_cst (..., 0) with tree_to_shwi throughout.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
host_integerp (..., 1) with tree_fits_uhwi_p throughout.
cuintp.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/ada/ * gcc-interface/cuintp.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/c-family/ * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/c/ * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/cp/ * error.c, init.c, parser.c, semantics.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/go/ * gofrontend/expressions.cc: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/java/ * class.c, expr.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/ * builtins.c, config/alpha/alpha.c, config/c6x/predicates.md, config/ia64/predicates.md, config/iq2000/iq2000.c, config/mips/mips.c, config/s390/s390.c, dbxout.c, dwarf2out.c, except.c, explow.c, expr.c, expr.h, fold-const.c, gimple-fold.c, gimple-ssa-strength-reduction.c, gimple.c, godump.c, graphite-scop-detection.c, graphite-sese-to-poly.c, omp-low.c, predict.c, rtlanal.c, sdbout.c, simplify-rtx.c, stor-layout.c, tree-data-ref.c, tree-dfa.c, tree-pretty-print.c, tree-sra.c, tree-ssa-alias.c, tree-ssa-forwprop.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-phiopt.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-vect-data-refs.c, tree-vect-patterns.c, tree-vectorizer.h, tree.c, var-tracking.c, varasm.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. From-SVN: r204955
2013-11-18 15:51:10 +01:00
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
host_integerp (..., 0) with tree_fits_shwi_p throughout.
Makefile.in (C_COMMON_OBJS): Depend on c-cilkplus.o. * Makefile.in (C_COMMON_OBJS): Depend on c-cilkplus.o. * gimple-pretty-print.c (dump_omp_for): Add case for GF_OMP_FOR_KIND_CILKSIMD. * gimple.h (enum gf_mask): Restructure entries to add GF_OMP_FOR_KIND_CILKSIMD. * gimplify.c (is_gimple_stmt): Add case for CILK_SIMD. (gimplify_omp_for): Handle CILK_SIMD. (gimplify_expr): Add ccase for CILK_SIMD. * omp-low.c (extract_omp_for_data): Handle CILK_SIMD. (build_outer_var_ref): Same. (check_omp_nesting_restrictions): Same. (lower_rec_input_clauses): Same. (lower_lastprivate_clauses): Same. (expand_omp_for): Same. (execute_expand_omp): Check flag_enable_cilkplus. (execute_lower_omp): Same. (diagnose_sb_0): Handle CILK_SIMD. (diagnose_omp_structured_block_errors): Check flag_enable_cilkplus. (setjmp_or_longjmp_p): New. (scan_omp_1_stmt): Error on setjmp/longjmp in a simd construct. * tree-pretty-print.c (dump_generic_node): Add case for CILK_SIMD. * tree.def: Add tree code for CILK_SIMD. testsuite/ * c-c++-common/cilk-plus/PS: New directory. * g++.dg/cilk-plus/cilk-plus.exp: Run shared tests. * g++.dg/dg.exp: Run Cilk Plus tests. * gcc.dg/cilk-plus/cilk-plus.exp: Run shared tests. c-family/ * c-cilkplus.c: New file. * c-common.c (readonly_error): Add location argument. * c-common.h (readonly_error): Same. (c_finish_cilk_clauses): Protoize. (c_check_cilk_loop): Same. c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes. Do not fail on error_mark_node. Abstract increment canonicalization to here... (c_omp_for_incr_canonicalize_ptr): New. c-pragma.c (init_pragma): Register "simd" pragma. c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD. (enum pragma_cilk_clause): New. c/ * c-parser.c (c_parser_cilk_simd): New. (c_parser_cilk_verify_simd): New. (c_parser_pragma): Add case for PRAGMA_CILK_SIMD. (c_parser_omp_for_loop): Add case for NE_EXPR. Set c_break_label for CILK_SIMD. (c_parser_cilk_clause_vectorlength): New. (c_parser_cilk_clause_linear): New. (c_parser_cilk_clause_name): New. (c_parser_cilk_all_clauses): New. * c-typeck.c (build_unary_op): Pass location argument to readonly_error. (build_modify_expr): Same. (build_asm_expr): Same. (c_finish_bc_stmt): Error on break/continue in loops. cp/ * Make-lang.in (CXX_AND_OBJCXX_OBJS): Depend on cp/cp-cilkplus.o. * cp-cilkplus.c: New file. * cp-tree.h (cpp_validate_cilk_plus_loop): Protoize. * parser.c (cp_parser_cilk_simd): New. (cp_debug_parser): Add case for IN_CILK_SIMD_FOR. (cp_parser_jump_statement): Same. (cp_parser_omp_for_cond): Add new argument. Add case for NE_EXPR. (cp_parser_omp_for_loop): Pass new argument to cp_parser_omp_for_cond. Handle CILK_SIMD nodes. Abstract initilization code to.. (cp_parser_omp_for_loop_init): ...here. (cp_parser_pragma): Add case for PRAGMA_CILK_SIMD. (cp_parser_cilk_simd_vectorlength): New. (cp_parser_cilk_simd_linear): New. (cp_parser_cilk_simd_clause_name): New. (cp_parser_cilk_simd_all_clauses): New. (cp_parser_cilk_simd): New. * parser.h (IN_CILK_SIMD_FOR): New macro. * pt.c (tsubst_expr): Add case for CILK_SIMD. * typeck2.c (cxx_readonly_error): Pass location argument to readonly_error. From-SVN: r204863
2013-11-15 22:43:59 +01:00
2013-11-15 Aldy Hernandez <aldyh@redhat.com>
* c-cilkplus.c: New file.
* c-common.c (readonly_error): Add location argument.
* c-common.h (readonly_error): Same.
(c_finish_cilk_clauses): Protoize.
(c_check_cilk_loop): Same.
c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
Do not fail on error_mark_node.
Abstract increment canonicalization to here...
(c_omp_for_incr_canonicalize_ptr): New.
c-pragma.c (init_pragma): Register "simd" pragma.
c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
(enum pragma_cilk_clause): New.
2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
* c-pretty-print.c (pp_c_character_constant): Remove unnecessary
wchar_type and host_integerp checks.
gimplify-be.h: New file. * gimplify-be.h: New file. Add prototypes. * gimplify.h: Don't include gimple.h. (struct gimplify_hasher, struct gimplify_ctx, is_gimple_sizepos, gimplify_hasher::hash, gimplify_hasher::equal): Relocate from gimple.h. * gimple.h (struct gimplify_hasher, gimplify_hasher::hash, gimplify_hasher::equal, struct gimplify_ctx, is_gimple_sizepos): Move to gimplify.h. (enum gsi_iterator_update): Move to gimple-iterator.h. * gimple-iterator.h (enum gsi_iterator_update): Relocate from gimple.h. * gimplify-be.c: New File. (force_gimple_operand_1, force_gimple_operand, force_gimple_operand_gsi_1, force_gimple_operand_gsi): Relocate from gimplify.c. * gimplify.c (force_gimple_operand_1, force_gimple_operand, force_gimple_operand_gsi_1, force_gimple_operand_gsi): Move to gimplify-be.c. * Makefile.in (OBJS): Add gimplify-be.o * asan.c: Include only gimplify.h, gimplify-be.h, and/or gimple.h as required. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-sese-to-poly.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa.c: Likewise. * langhooks.c: Likewise. * omp-low.c: Likewise. * sese.c: Likewise. * stor-layout.c: Likewise. * targhooks.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-complex.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-stmts.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * value-prof.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/alpha/alpha.c: Likewise. * config/darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/xtensa/xtensa.c: Likewise. * c/c-typeck.c: Include only gimplify.h and gimple.h as needed. * c-family/c-common.c: Likewise. * c-family/c-gimplify.c: Likewise. * c-family/cilk.c: Likewise. * cp/class.c: Include only gimplify.h and gimple.h as needed. * cp/cp-gimplify.c: Likewise. * cp/error.c: Likewise. * cp/init.c: Likewise. * cp/optimize.c: Likewise. * cp/pt.c: Likewise. * cp/semantics.c: Likewise. * cp/tree.c: Likewise. * cp/vtable-class-hierarchy.c: Likewise. * fortran/trans-expr.c: Include only gimplify.h and gimple.h as needed. * fortran/trans-openmp.c: Likewise. * go/go-lang.c: Include only gimplify.h and gimple.h as needed. * java/java-gimplify.c: Include only gimplify.h and gimple.h as needed. * objc/objc-act.c: Include only gimplify.h and gimple.h as needed. From-SVN: r204812
2013-11-14 20:39:38 +01:00
2013-11-14 Andrew MacLeod <amacleod@redhat.com>
* c-common.c: Likewise.
* c-gimplify.c: Likewise.
* cilk.c: Likewise.
Factor unrelated declarations out of tree.h. This patch applies the rule that functions defined in FOO.c must be declared in FOO.h. One of the worst offenders in the code base is tree.h, unsurprisingly. The patch creates several new headers: attribs.h calls.h fold-const.h gcc-symtab.h print-rtl.h print-tree.h stmt.h stor-layout.h stringpool.h tree-nested.h tree-object-size.h varasm.h. Functions in each corresponding .c file got moved to those headers and others that already existed. I wanted to make this patch as mechanical as possible, so I made no attempt to fix problems like having build_addr defined in tree-inline.c. I left that for later. There were some declarations that I could not move out of tree.h because of header poisoning or the use of target macros. We forbid the inclusion of things like expr.h from FE files. While that's a reasonable idea, the FE file *still* manage to at expr.c functionality because the declarations they want to use were defined in tree.h. The affected files are builtins.h, emit-rtl.h and expr.h. If that functionality is allowed to be accessed from the FEs, then I will later move those functions out of expr.c into tree.c. I have moved these declarations to the bottom of tree.h so they are easy to identify later. There is a namespace collision with libcpp. The file gcc/symtab.c cannot use gcc/symtab.h because the #include command picks up libcpp/include/symtab.h first. So I named this file gcc-symtab.h for now. Finally, I added a new header to PLUGIN_HEADERS to account for the tree.h refactoring. I did not add all headers factored out of tree.h because it is unclear (and impossible to tell) what plugins need. This adds the one header used by the plugins in the testsuite. This will be changing quite dramatically as we progress with the header refactoring. This patch should offer some minimal incremental build advantages by reducing the size of tree.h. Changes that would otherwise affected tree.h, will now go to other headers which are less frequently included. * tree.h: Include fold-const.h. (aggregate_value_p): Moved to function.h. (alloca_call_p): Moved to calls.h. (allocate_struct_function): Moved to function.h. (apply_tm_attr): Moved to attribs.h. (array_at_struct_end_p): Moved to expr.h. (array_ref_element_size): Moved to tree-dfa.h. (array_ref_low_bound): Moved to tree-dfa.h. (array_ref_up_bound): Moved to tree.h. (assemble_alias): Moved to cgraph.h. (bit_from_pos): Moved to stor-layout.h. (build_addr): Moved to tree-nested.h. (build_duplicate_type): Moved to tree-inline.h. (build_fold_addr_expr): Moved to fold-const.h. (build_fold_addr_expr_with_type): Moved to fold-const.h. (build_fold_addr_expr_with_type_loc): Moved to fold-const.h. (build_fold_indirect_ref): Moved to fold-const.h. (build_fold_indirect_ref_loc): Moved to fold-const.h. (build_personality_function): Moved to tree.h. (build_range_check): Moved to fold-const.h. (build_simple_mem_ref): Moved to fold-const.h. (build_simple_mem_ref_loc): Moved to fold-const.h. (build_tm_abort_call): Moved to trans-mem.h. (byte_from_pos): Moved to stor-layout.h. (call_expr_flags): Moved to calls.h. (can_move_by_pieces): Moved to expr.h. (categorize_ctor_elements): Moved to expr.h. (change_decl_assembler_name): Moved to gcc-symtab.h. (combine_comparisons): Moved to fold-const.h. (complete_ctor_at_level_p): Moved to tree.h. (component_ref_field_offset): Moved to tree-dfa.h. (compute_builtin_object_size): Moved to tree-object-size.h. (compute_record_mode): Moved to stor-layout.h. (constant_boolean_node): Moved to fold-const.h. (constructor_static_from_elts_p): Moved to varasm.h. (cxx11_attribute_p): Moved to attribs.h. (debug_body): Moved to print-tree.h. (debug_find_tree): Moved to tree-inline.h. (debug_fold_checksum): Moved to fold-const.h. (debug_head): Moved to print-tree.h. (debug_head): Moved to print-tree.h. (debug_raw): Moved to print-tree.h. (debug_tree): Moved to print-tree.h. (debug_vec_tree): Moved to print-tree.h. (debug_verbose): Moved to print-tree.h. (debug_verbose): Moved to print-tree.h. (decl_attributes): Moved to attribs.h. (decl_binds_to_current_def_p): Moved to varasm.h. (decl_default_tls_model): Moved to varasm.h. (decl_replaceable_p): Moved to varasm.h. (div_if_zero_remainder): Moved to fold-const.h. (double_int mem_ref_offset): Moved to fold-const.h. (dump_addr): Moved to print-tree.h. (element_precision): Moved to machmode.h. (expand_dummy_function_end): Moved to function.h. (expand_function_end): Moved to function.h. (expand_function_start): Moved to function.h. (expand_label): Moved to stmt.h. (expr_first): Moved to tree-iterator.h. (expr_last): Moved to tree-iterator.h. (finalize_size_functions): Moved to stor-layout.h. (finish_builtin_struct): Moved to stor-layout.h. (finish_record_layout): Moved to stor-layout.h. (fixup_signed_type): Moved to stor-layout.h. (fixup_unsigned_type): Moved to stor-layout.h. (flags_from_decl_or_type): Moved to calls.h. (fold): Moved to fold-const.h. (fold_abs_const): Moved to fold-const.h. (fold_binary): Moved to fold-const.h. (fold_binary_loc): Moved to fold-const.h. (fold_binary_to_constant): Moved to fold-const.h. (fold_build1): Moved to fold-const.h. (fold_build1_initializer_loc): Moved to fold-const.h. (fold_build1_loc): Moved to fold-const.h. (fold_build1_stat_loc): Moved to fold-const.h. (fold_build2): Moved to fold-const.h. (fold_build2_initializer_loc): Moved to fold-const.h. (fold_build2_loc): Moved to fold-const.h. (fold_build2_stat_loc): Moved to fold-const.h. (fold_build3): Moved to fold-const.h. (fold_build3_loc): Moved to fold-const.h. (fold_build3_stat_loc): Moved to fold-const.h. (fold_build_call_array): Moved to fold-const.h. (fold_build_call_array_initializer): Moved to fold-const.h. (fold_build_call_array_initializer_loc): Moved to fold-const.h. (fold_build_call_array_loc): Moved to fold-const.h. (fold_build_cleanup_point_expr): Moved to fold-const.h. (fold_convert): Moved to fold-const.h. (fold_convert_loc): Moved to fold-const.h. (fold_convertible_p): Moved to fold-const.h. (fold_defer_overflow_warnings): Moved to fold-const.h. (fold_deferring_overflow_warnings_p): Moved to fold-const.h. (fold_fma): Moved to fold-const.h. (fold_ignored_result): Moved to fold-const.h. (fold_indirect_ref): Moved to fold-const.h. (fold_indirect_ref_1): Moved to fold-const.h. (fold_indirect_ref_loc): Moved to fold-const.h. (fold_read_from_constant_string): Moved to fold-const.h. (fold_real_zero_addition_p): Moved to fold-const.h. (fold_single_bit_test): Moved to fold-const.h. (fold_strip_sign_ops): Moved to fold-const.h. (fold_ternary): Moved to fold-const.h. (fold_ternary_loc): Moved to fold-const.h. (fold_unary): Moved to tree-data-ref.h. (fold_unary_ignore_overflow): Moved to fold-const.h. (fold_unary_ignore_overflow_loc): Moved to fold-const.h. (fold_unary_loc): Moved to fold-const.h. (fold_unary_to_constant): Moved to fold-const.h. (fold_undefer_and_ignore_overflow_warnings): Moved to fold-const.h. (fold_undefer_overflow_warnings): Moved to fold-const.h. (folding_initializer): Moved to fold-const.h. (free_temp_slots): Moved to function.h. (generate_setjmp_warnings): Moved to function.h. (get_attribute_name): Moved to attribs.h. (get_identifier): Moved to stringpool.h. (get_identifier_with_length): Moved to stringpool.h. (get_inner_reference): Moved to tree.h. (gimple_alloca_call_p): Moved to calls.h. (gimplify_parameters): Moved to function.h. (highest_pow2_factor): Moved to expr.h. (indent_to): Moved to print-tree.h. (init_attributes): Moved to attribs.h. (init_dummy_function_start): Moved to function.h. (init_function_start): Moved to function.h. (init_inline_once): Moved to tree-inline.h. (init_object_sizes): Moved to tree-object-size.h. (init_temp_slots): Moved to function.h. (init_tree_optimization_optabs): Moved to optabs.h. (initialize_sizetypes): Moved to stor-layout.h. (initializer_constant_valid_for_bitfield_p): Moved to varasm.h. (initializer_constant_valid_p): Moved to varasm.h. (int_const_binop): Moved to fold-const.h. (internal_reference_types): Moved to stor-layout.h. (invert_tree_comparison): Moved to fold-const.h. (invert_truthvalue): Moved to fold-const.h. (invert_truthvalue_loc): Moved to fold-const.h. (is_tm_ending_fndecl): Moved to trans-mem.h. (is_tm_may_cancel_outer): Moved to trans-mem.h. (is_tm_pure): Moved to trans-mem.h. (is_tm_safe): Moved to trans-mem.h. (layout_decl): Moved to stor-layout.h. (layout_type): Moved to stor-layout.h. (lookup_attribute_spec): Moved to attribs.h. (make_accum_type): Moved to stor-layout.h. (make_decl_one_only): Moved to varasm.h. (make_decl_rtl): Moved to tree.h. (make_decl_rtl_for_debug): Moved to varasm.h. (make_fract_type): Moved to stor-layout.h. (make_or_reuse_sat_signed_accum_type): Moved to stor-layout.h. (make_or_reuse_sat_signed_fract_type): Moved to stor-layout.h. (make_or_reuse_sat_unsigned_accum_type): Moved to stor-layout.h. (make_or_reuse_sat_unsigned_fract_type): Moved to stor-layout.h. (make_or_reuse_signed_accum_type): Moved to stor-layout.h. (make_or_reuse_signed_fract_type): Moved to stor-layout.h. (make_or_reuse_unsigned_accum_type): Moved to stor-layout.h. (make_or_reuse_unsigned_fract_type): Moved to stor-layout.h. (make_range): Moved to fold-const.h. (make_range_step): Moved to fold-const.h. (make_sat_signed_accum_type): Moved to stor-layout.h. (make_sat_signed_fract_type): Moved to stor-layout.h. (make_sat_unsigned_accum_type): Moved to stor-layout.h. (make_sat_unsigned_fract_type): Moved to stor-layout.h. (make_signed_accum_type): Moved to stor-layout.h. (make_signed_fract_type): Moved to stor-layout.h. (make_signed_type): Moved to stor-layout.h. (make_unsigned_accum_type): Moved to stor-layout.h. (make_unsigned_fract_type): Moved to stor-layout.h. (make_unsigned_type): Moved to stor-layout.h. (mark_decl_referenced): Moved to varasm.h. (mark_referenced): Moved to varasm.h. (may_negate_without_overflow_p): Moved to fold-const.h. (maybe_get_identifier): Moved to stringpool.h. (merge_ranges): Moved to fold-const.h. (merge_weak): Moved to varasm.h. (mode_for_size_tree): Moved to stor-layout.h. (multiple_of_p): Moved to fold-const.h. (must_pass_in_stack_var_size): Moved to calls.h. (must_pass_in_stack_var_size_or_pad): Moved to calls.h. (native_encode_expr): Moved to fold-const.h. (native_interpret_expr): Moved to fold-const.h. (non_lvalue): Moved to fold-const.h. (non_lvalue_loc): Moved to fold-const.h. (normalize_offset): Moved to stor-layout.h. (normalize_rli): Moved to stor-layout.h. (notice_global_symbol): Moved to varasm.h. (omit_one_operand): Moved to fold-const.h. (omit_one_operand_loc): Moved to fold-const.h. (omit_two_operands): Moved to fold-const.h. (omit_two_operands_loc): Moved to fold-const.h. (operand_equal_p): Moved to tree-data-ref.h. (parse_input_constraint): Moved to stmt.h. (parse_output_constraint): Moved to stmt.h. (place_field): Moved to stor-layout.h. (pop_function_context): Moved to function.h. (pop_temp_slots): Moved to function.h. (pos_from_bit): Moved to stor-layout.h. (preserve_temp_slots): Moved to function.h. (print_node): Moved to print-tree.h. (print_node_brief): Moved to print-tree.h. (print_rtl): Moved to rtl.h. (process_pending_assemble_externals): Moved to varasm.h. (ptr_difference_const): Moved to fold-const.h. (push_function_context): Moved to function.h. (push_struct_function): Moved to function.h. (push_temp_slots): Moved to function.h. (record_tm_replacement): Moved to trans-mem.h. (relayout_decl): Moved to stor-layout.h. (resolve_asm_operand_names): Moved to stmt.h. (resolve_unique_section): Moved to varasm.h. (rli_size_so_far): Moved to stor-layout.h. (rli_size_unit_so_far): Moved to stor-layout.h. (round_down): Moved to fold-const.h. (round_down_loc): Moved to fold-const.h. (round_up): Moved to fold-const.h. (round_up_loc): Moved to fold-const.h. (set_decl_incoming_rtl): Moved to emit-rtl.h. (set_decl_rtl): Moved to tree.h. (set_min_and_max_values_for_integral_type): Moved to stor-layout.h. (set_user_assembler_name): Moved to varasm.h. (setjmp_call_p): Moved to calls.h. (size_binop): Moved to fold-const.h. (size_binop_loc): Moved to fold-const.h. (size_diffop): Moved to fold-const.h. (size_diffop_loc): Moved to fold-const.h. (size_int_kind): Moved to fold-const.h. (stack_protect_epilogue): Moved to function.h. (start_record_layout): Moved to stor-layout.h. (supports_one_only): Moved to varasm.h. (swap_tree_comparison): Moved to fold-const.h. (tm_malloc_replacement): Moved to trans-mem.h. (tree build_fold_addr_expr_loc): Moved to fold-const.h. (tree build_invariant_address): Moved to fold-const.h. (tree_binary_nonnegative_warnv_p): Moved to fold-const.h. (tree_binary_nonzero_warnv_p): Moved to fold-const.h. (tree_call_nonnegative_warnv_p): Moved to fold-const.h. (tree_expr_nonnegative_p): Moved to fold-const.h. (tree_expr_nonnegative_warnv_p): Moved to fold-const.h. (tree_output_constant_def): Moved to varasm.h. (tree_overlaps_hard_reg_set): Moved to stmt.h. (tree_single_nonnegative_warnv_p): Moved to fold-const.h. (tree_single_nonzero_warnv_p): Moved to fold-const.h. (tree_swap_operands_p): Moved to fold-const.h. (tree_unary_nonnegative_warnv_p): Moved to fold-const.h. (tree_unary_nonzero_warnv_p): Moved to fold-const.h. (update_alignment_for_field): Moved to stor-layout.h. (use_register_for_decl): Moved to function.h. (variable_size): Moved to rtl.h. (vector_type_mode): Moved to stor-layout.h. * cgraph.h: Corresponding changes. * emit-rtl.h: Corresponding changes. * expr.h: Corresponding changes. * function.h: Corresponding changes. * optabs.h: Corresponding changes. * trans-mem.h: Corresponding changes. Protect against multiple inclusion. * tree-inline.h: Corresponding changes. * tree-iterator.h: Corresponding changes. * tree-dfa.h: Include expr.h. * tree-ssanames.h: Include stringpool.h. * attribs.h: New file. * calls.h: New file. * fold-const.h: New file. * gcc-symtab.h: New file. * print-rtl.h: New file. * print-tree.h: New file. * stmt.h: New file. * stor-layout.h: New file. * strinpool.h: New file. * tree-nested.h: New file * tree-object-size.h: New file. * varasm.h: New file. * Makefile.in (PLUGIN_HEADERS): Add stringpool.h. * alias.c: Include varasm.h. Include expr.h. * asan.c: Include calls.h. Include stor-layout.h. Include varasm.h. * attribs.c: Include stringpool.h. Include attribs.h. Include stor-layout.h. * builtins.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. Include tree-object-size.h. * calls.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. Include attribs.h. * cfgexpand.c: Include stringpool.h. Include varasm.h. Include stor-layout.h. Include stmt.h. Include print-tree.h. * cgraph.c: Include varasm.h. Include calls.h. Include print-tree.h. * cgraphclones.c: Include stringpool.h. Include function.h. Include emit-rtl.h. Move inclusion of rtl.h earlier in the file. * cgraphunit.c: Include varasm.h. Include stor-layout.h. Include stringpool.h. * cilk-common.c: Include stringpool.h. Include stor-layout.h. * combine.c: Include stor-layout.h. * config/aarch64/aarch64-builtins.c: Include stor-layout.h. Include stringpool.h. Include calls.h. * config/aarch64/aarch64.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/alpha/alpha.c: Include stor-layout.h. Include calls.h. Include varasm.h. * config/arc/arc.c: Include varasm.h. Include stor-layout.h. Include stringpool.h. Include calls.h. * config/arm/arm.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/avr/avr-c.c: Include stor-layout.h. * config/avr/avr-log.c: Include print-tree.h. * config/avr/avr.c: Include print-tree.h. Include calls.h. Include stor-layout.h. Include stringpool.h. * config/bfin/bfin.c: Include varasm.h. Include calls.h. * config/c6x/c6x.c: Include stor-layout.h. Include varasm.h. Include calls.h. Include stringpool.h. * config/cr16/cr16.c: Include stor-layout.h. Include calls.h. * config/cris/cris.c: Include varasm.h. Include stor-layout.h. Include calls.h. Include stmt.h. * config/darwin.c: Include stringpool.h. Include varasm.h. Include stor-layout.h. * config/epiphany/epiphany.c: Include stor-layout.h. Include varasm.h. Include calls.h. Include stringpool.h. * config/fr30/fr30.c: Include stor-layout.h. Include varasm.h. * config/frv/frv.c: Include varasm.h. Include stor-layout.h. Include stringpool.h. * config/h8300/h8300.c: Include stor-layout.h. Include varasm.h. Include calls.h. Include stringpool.h. * config/i386/i386.c: Include stringpool.h. Include attribs.h. Include calls.h. Include stor-layout.h. Include varasm.h. * config/i386/winnt-cxx.c: Include stringpool.h. Include attribs.h. * config/i386/winnt.c: Include stringpool.h. Include varasm.h. * config/ia64/ia64-c.c: Include stringpool.h. * config/ia64/ia64.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/iq2000/iq2000.c: Include stor-layout.h. Include calls.h. Include varasm.h. * config/lm32/lm32.c: Include calls.h. * config/m32c/m32c.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/m32r/m32r.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. Include calls.h. * config/m68k/m68k.c: Include calls.h. Include stor-layout.h. Include varasm.h. * config/mcore/mcore.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. Include calls.h. * config/mep/mep.c: Include varasm.h. Include calls.h. Include stringpool.h. Include stor-layout.h. * config/microblaze/microblaze.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/mips/mips.c: Include varasm.h. Include stringpool.h. Include stor-layout.h. Include calls.h. * config/mmix/mmix.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/mn10300/mn10300.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/moxie/moxie.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/msp430/msp430.c: Include stor-layout.h. Include calls.h. * config/nds32/nds32.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/pa/pa.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. Include calls.h. * config/pdp11/pdp11.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/picochip/picochip.c: Include calls.h. Include stor-layout.h. Include stringpool.h. Include varasm.h. * config/rl78/rl78.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/rs6000/rs6000-c.c: Include stor-layout.h. Include stringpool.h. * config/rs6000/rs6000.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include print-tree.h. Include varasm.h. * config/rx/rx.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/s390/s390.c: Include print-tree.h. Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/score/score.c: Include stringpool.h. Include calls.h. Include varasm.h. Include stor-layout.h. * config/sh/sh-c.c: Include stringpool.h. Include attribs.h.h. * config/sh/sh.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/sol2-c.c: Include stringpool.h. Include attribs.h. * config/sol2-cxx.c: Include stringpool.h. * config/sol2.c: Include stringpool.h. Include varasm.h. * config/sparc/sparc.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/spu/spu-c.c: Include stringpool.h. * config/spu/spu.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/stormy16/stormy16.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/tilegx/tilegx.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/tilepro/tilepro.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/v850/v850-c.c: Include stringpool.h. Include attribs.h. * config/v850/v850.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/vax/vax.c: Include calls.h. Include varasm.h. * config/vms/vms.c: Include stringpool.h. * config/vxworks.c: Include stringpool.h. * config/xtensa/xtensa.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * convert.c: Include stor-layout.h. * coverage.c: Include stringpool.h. Include stor-layout.h. * dbxout.c: Include varasm.h. Include stor-layout.h. * dojump.c: Include stor-layout.h. * dse.c: Include stor-layout.h. * dwarf2asm.c: Include stringpool.h. Include varasm.h. * dwarf2cfi.c: Include stor-layout.h. * dwarf2out.c: Include rtl.h. Include stringpool.h. Include stor-layout.h. Include varasm.h. Include function.h. Include emit-rtl.h. Move inclusion of rtl.h earlier in the file. * emit-rtl.c: Include varasm.h. * except.c: Include stringpool.h. Include stor-layout.h. * explow.c: Include stor-layout.h. * expmed.c: Include stor-layout.h. * expr.c: Include stringpool.h. Include stor-layout.h. Include attribs.h. Include varasm.h. * final.c: Include varasm.h. * fold-const.c: Include stor-layout.h. Include calls.h. Include tree-iterator.h. * function.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. * genattrtab.c (write_header): Emit includes for varasm.h, stor-layout.h and calls.h. * genautomata.c (main): Likewise. * genemit.c: Likewise. * genopinit.c: Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c: Likewise. * genpreds.c (write_insn_preds_c): Likewise. * gengtype.c (open_base_files): Add stringpool.h. * gimple-expr.c: Include stringpool.h. Include stor-layout.h. * gimple-fold.c: Include stringpool.h. Include expr.h. Include stmt.h. Include stor-layout.h. * gimple-low.c: Include tree-nested.h. Include calls.h. * gimple-pretty-print.c: Include stringpool.h. * gimple-ssa-strength-reduction.c: Include stor-layout.h. Include expr.h. * gimple-walk.c: Include stmt.h. * gimple.c: Include calls.h. Include stmt.h. Include stor-layout.h. * gimplify.c: Include stringpool.h. Include calls.h. Include varasm.h. Include stor-layout.h. Include stmt.h. Include print-tree.h. Include expr.h. * gimplify-me.c: Include stmt.h Include stor-layout.h * internal-fn.c: Include stor-layout.h. * ipa-devirt.c: Include print-tree.h. Include calls.h. * ipa-inline-analysis.c: Include stor-layout.h. Include stringpool.h. Include print-tree.h. * ipa-inline.c: Include trans-mem.h. Include calls.h. * ipa-prop.c: Include expr.h. Include stor-layout.h. Include print-tree.h. * ipa-pure-const.c: Include print-tree.h. Include calls.h. * ipa-reference.c: Include calls.h. * ipa-split.c: Include stringpool.h. Include expr.h. Include calls.h. * ipa.c: Include calls.h. Include stringpool.h. * langhooks.c: Include stringpool.h. Include attribs.h. * lto-cgraph.c: Include stringpool.h. * lto-streamer-in.c: Include stringpool.h. * lto-streamer-out.c: Include stor-layout.h. Include stringpool.h. * omp-low.c: Include stringpool.h. Include stor-layout.h. Include expr.h. * optabs.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. * passes.c: Include varasm.h. * predict.c: Include calls.h. * print-rtl.c: Include print-tree.h. * print-tree.c: Include varasm.h. Include print-rtl.h. Include stor-layout.h. * realmpfr.c: Include stor-layout.h. * reg-stack.c: Include varasm.h. * sdbout.c: Include varasm.h. Include stor-layout.h. * simplify-rtx.c: Include varasm.h. * stmt.c: Include varasm.h. Include stor-layout.h. * stor-layout.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. Include print-tree.h. * symtab.c: Include rtl.h. Include print-tree.h. Include varasm.h. Include function.h. Include emit-rtl.h. * targhooks.c: Include stor-layout.h. Include varasm.h. * toplev.c: Include varasm.h. Include tree-inline.h. * trans-mem.c: Include calls.h. Include function.h. Include rtl.h. Include emit-rtl.h. * tree-affine.c: Include expr.h. * tree-browser.c: Include print-tree.h. * tree-call-cdce.c: Include stor-layout.h. * tree-cfg.c: Include trans-mem.h. Include stor-layout.h. Include print-tree.h. * tree-complex.c: Include stor-layout.h. * tree-data-ref.c: Include expr.h. * tree-dfa.c: Include stor-layout.h. * tree-eh.c: Include expr.h. Include calls.h. * tree-emutls.c: Include stor-layout.h. Include varasm.h. * tree-if-conv.c: Include stor-layout.h. * tree-inline.c: Include stor-layout.h. Include calls.h. * tree-loop-distribution.c: Include stor-layout.h. * tree-nested.c: Include stringpool.h. Include stor-layout.h. * tree-object-size.c: Include tree-object-size.h. * tree-outof-ssa.c: Include stor-layout.h. * tree-parloops.c: Include stor-layout.h. Include tree-nested.h. * tree-pretty-print.c: Include stor-layout.h. Include expr.h. * tree-profile.c: Include varasm.h. Include tree-nested.h. * tree-scalar-evolution.c: Include expr.h. * tree-sra.c: Include stor-layout.h. * tree-ssa-address.c: Include stor-layout.h. * tree-ssa-ccp.c: Include stor-layout.h. * tree-ssa-dce.c: Include calls.h. * tree-ssa-dom.c: Include stor-layout.h. * tree-ssa-forwprop.c: Include stor-layout.h. * tree-ssa-ifcombine.c: Include stor-layout.h. * tree-ssa-loop-ivopts.c: Include stor-layout.h. * tree-ssa-loop-niter.c: Include calls.h. Include expr.h. * tree-ssa-loop-prefetch.c: Include stor-layout.h. * tree-ssa-math-opts.c: Include stor-layout.h. * tree-ssa-operands.c: Include stmt.h. Include print-tree.h. * tree-ssa-phiopt.c: Include stor-layout.h. * tree-ssa-reassoc.c: Include stor-layout.h. * tree-ssa-sccvn.c: Include stor-layout.h. * tree-ssa-sink.c: Include stor-layout.h. * tree-ssa-strlen.c: Include stor-layout.h. * tree-ssa-structalias.c: Include stor-layout.h. Include stmt.h. * tree-ssa-tail-merge.c: Include stor-layout.h. Include trans-mem.h. * tree-ssa-uncprop.c: Include stor-layout.h. * tree-ssa.c: Include stor-layout.h. * tree-ssanames.c: Include stor-layout.h. * tree-streamer-in.c: Include stringpool.h. * tree-streamer-out.c: Include stor-layout.h. * tree-switch-conversion.c: Include varasm.h. Include stor-layout.h. * tree-tailcall.c: Include stor-layout.h. * tree-vect-data-refs.c: Include stor-layout.h. * tree-vect-generic.c: Include stor-layout.h. * tree-vect-loop.c: Include stor-layout.h. * tree-vect-patterns.c: Include stor-layout.h. * tree-vect-slp.c: Include stor-layout.h. * tree-vect-stmts.c: Include stor-layout.h. * tree-vectorizer.c: Include stor-layout.h. * tree-vrp.c: Include stor-layout.h. Include calls.h. * tree.c: Include stor-layout.h. Include calls.h. Include attribs.h. Include varasm.h. * tsan.c: Include expr.h. * ubsan.c: Include stor-layout.h. Include stringpool.h. * value-prof.c: Include tree-nested.h. Include calls.h. * var-tracking.c: Include varasm.h. Include stor-layout.h. * varasm.c: Include stor-layout.h. Include stringpool.h. Include gcc-symtab.h. Include varasm.h. * varpool.c: Include varasm.h. * vmsdbgout.c: Include varasm.h. * xcoffout.c: Include varasm.h. ada/ChangeLog * gcc-interface/decl.c: Include stringpool.h Include stor-layout.h * gcc-interface/misc.c: Include stor-layout.h Include print-tree.h * gcc-interface/trans.c: Include stringpool.h Include stor-layout.h Include stmt.h Include varasm.h * gcc-interface/utils.c: Include stringpool.h Include stor-layout.h Include attribs.h Include varasm.h * gcc-interface/utils2.c: Include stringpool.h Include stor-layout.h Include attribs.h Include varasm.h c-family/ChangeLog * c-common.c: Include fold-const.h. Include stor-layout.h. Include calls.h. Include stringpool.h. Include attribs.h. Include varasm.h. Include trans-mem.h. * c-cppbuiltin.c: Include stor-layout.h. Include stringpool.h. * c-format.c: Include stringpool.h. * c-lex.c: Include stringpool.h. Include stor-layout.h. * c-pragma.c: Include stringpool.h. Include attribs.h. Include varasm.h. Include gcc-symtab.h. * c-pretty-print.c: Include stor-layout.h. Include attribs.h. * cilk.c: Include stringpool.h. Include calls.h. c/ChangeLog * c-decl.c: Include print-tree.h. Include stor-layout.h. Include varasm.h. Include attribs.h. Include stringpool.h. * c-lang.c: Include fold-const.h. * c-parser.c: Include stringpool.h. Include attribs.h. Include stor-layout.h. Include varasm.h. Include trans-mem.h. * c-typeck.c: Include stor-layout.h. Include trans-mem.h. Include varasm.h. Include stmt.h. cp/ChangeLog * call.c: Include stor-layout.h. Include trans-mem.h. Include stringpool.h. * class.c: Include stringpool.h. Include stor-layout.h. Include attribs.h. * cp-gimplify.c: Include stor-layout.h. * cvt.c: Include stor-layout.h. * decl.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include attribs.h. Include calls.h. * decl2.c: Include stringpool.h. Include varasm.h. Include attribs.h. Include stor-layout.h. Include calls.h. * error.c: Include stringpool.h. * except.c: Include stringpool.h. Include trans-mem.h. Include attribs.h. * init.c: Include stringpool.h. Include varasm.h. * lambda.c: Include stringpool.h. * lex.c: Include stringpool.h. * mangle.c: Include stor-layout.h. Include stringpool.h. * method.c: Include stringpool.h. Include varasm.h. * name-lookup.c: Include stringpool.h. Include print-tree.h. Include attribs.h. * optimize.c: Include stringpool.h. * parser.c: Include print-tree.h. Include stringpool.h. Include attribs.h. Include trans-mem.h. * pt.c: Include stringpool.h. Include varasm.h. Include attribs.h. Include stor-layout.h. * ptree.c: Include print-tree.h. * repo.c: Include stringpool.h. * rtti.c: Include stringpool.h. Include stor-layout.h. * semantics.c: Include stmt.h. Include varasm.h. Include stor-layout.h. Include stringpool.h. * tree.c: Include stor-layout.h. Include print-tree.h. Include tree-iterator.h. * typeck.c: Include stor-layout.h. Include varasm.h. * typeck2.c: Include stor-layout.h. Include varasm.h. * vtable-class-hierarchy.c: Include stringpool.h. Include stor-layout.h. fortran/ChangeLog * decl.c: Include stringpool.h. * iresolve.c: Include stringpool.h. * match.c: Include stringpool.h. * module.c: Include stringpool.h. * target-memory.c: Include stor-layout.h. * trans-common.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. * trans-const.c: Include stor-layout.h. * trans-decl.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include attribs.h. * trans-expr.c: Include stringpool.h. * trans-intrinsic.c: Include stringpool.h. Include tree-nested.h. Include stor-layout.h. * trans-io.c: Include stringpool.h. Include stor-layout.h. * trans-openmp.c: Include stringpool.h. * trans-stmt.c: Include stringpool.h. * trans-types.c: Include stor-layout.h. Include stringpool.h. * trans.c: Include stringpool.h. go/ChangeLog * go-backend.c: Include stor-layout.h. * go-gcc.cc: Include stringpool.h. Include stor-layout.h. Include varasm.h. * go-lang.c: Include stor-layout.h. java/ChangeLog * builtins.c: Include stor-layout.h. Include stringpool.h. * class.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. * constants.c: Include stringpool.h. Include stor-layout.h. * decl.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. * except.c: Include stringpool.h. Include stor-layout.h. * expr.c: Include stringpool.h. Include stor-layout.h. * jcf-parse.c: Include stringpool.h. * mangle.c: Include stringpool.h. * resource.c: Include stringpool.h. Include stor-layout.h. * typeck.c: Include stor-layout.h. Include stringpool.h. * verify-glue.c: Include stringpool.h. lto/ChangeLog * lto-lang.c: Include stringpool.h. Include stor-layout.h. * lto-partition.c: Include gcc-symtab.h. * lto.c: Include stor-layout.h. objc/ChangeLog * objc-act.c: Include stringpool.h. Include stor-layout.h. Include attribs.h. * objc-encoding.c: Include stringpool.h. Include stor-layout.h. * objc-gnu-runtime-abi-01.c: Include stringpool.h. * objc-next-runtime-abi-01.c: Include stringpool.h. * objc-next-runtime-abi-02.c: Include stringpool.h. * objc-runtime-shared-support.c: Include stringpool.h. testsuite/ChangeLog * gcc.dg/plugin/selfassign.c: Include stringpool.h. * gcc.dg/plugin/start_unit_plugin.c: Likewise. From-SVN: r205023
2013-11-19 13:31:09 +01:00
2013-11-14 Diego Novillo <dnovillo@google.com>
* c-common.c: Include fold-const.h.
Include stor-layout.h.
Include calls.h.
Include stringpool.h.
Include attribs.h.
Include varasm.h.
Include trans-mem.h.
* c-cppbuiltin.c: Include stor-layout.h.
Include stringpool.h.
* c-format.c: Include stringpool.h.
* c-lex.c: Include stringpool.h.
Include stor-layout.h.
* c-pragma.c: Include stringpool.h.
Include attribs.h.
Include varasm.h.
Include gcc-symtab.h.
* c-pretty-print.c: Include stor-layout.h.
Include attribs.h.
* cilk.c: Include stringpool.h.
Include calls.h.
2013-11-13 Joseph Myers <joseph@codesourcery.com>
* c-common.h (enum rid): Add RID_AUTO_TYPE.
* c-common.c (c_common_reswords): Add __auto_type.
(keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
gimple-expr.h (create_tmp_var_name, [...]): Relocate prototypes from gimple.h. 2013-11-12 Andrew MacLeod <amacleod@redhat.com> * gimple-expr.h (create_tmp_var_name, create_tmp_var_raw, create_tmp_var, create_tmp_reg, mark_addressable, is_gimple_reg_rhs): Relocate prototypes from gimple.h. * gimplify.h: New File. Relocate some prototypes from gimple.h here. (gimple_predicate, enum fallback, enum gimplify_status): Relocate from gimple.h. * gimple.h: Move some prototypes to gimplify.h. (gimple_predicate, enum fallback, enum gimplify_status): Move to gimplify.h. (gimple_do_not_emit_location_p, gimple_set_do_not_emit_location): Relocate from gimpify.c. * gimple-expr.c (remove_suffix, tmp_var_id_num, create_tmp_var_name, create_tmp_var_raw, create_tmp_var, create_tmp_reg, mark_addressable, is_gimple_reg_rhs) Relocate from gimplify.c. * gimplify.c (mark_addressable): Move to gimple-expr.c. (gimple_seq_add_stmt_without_update): Move to gimple.c. (remove_suffix, tmp_var_id_num, create_tmp_var_name, create_tmp_var_raw, create_tmp_var, create_tmp_reg, is_gimple_reg_rhs): Move to gimple-expr.c. (should_carry_location_p): Move to gimple.c. (gimple_do_not_emit_location_p, gimple_set_do_not_emit_location): Move to gimple.h. (annotate_one_with_location, annotate_all_with_location_after, annotate_all_with_location): Move to gimple.c. (compare_case_labels, sort_case_labels, preprocess_case_label_vec_for_gimple): Move to gimple.c. (rhs_predicate_for): Make static. (gimplify_assign): Relocate from gimple.c. * gimple.c (gimplify_assign): Move to gimplify.c. (gimple_seq_add_stmt_without_update, should_carry_location_p, annotate_one_with_location, annotate_all_with_location_after, annotate_all_with_location, compare_case_labels, sort_case_labels, preprocess_case_label_vec_for_gimple): Relocate from gimplify.c. * tree.h (unshare_expr, unshare_expr_without_location, mark_addressable): Move prototypes to gimplify.h. * Makefile.in (GTFILES): gimple-expr.c now has the GTY tag for tmp_var_id_num * asan.c: Include gimplify.h rather than gimple.h. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * dwarf2out.c: Dont include gimple.h. * fold-const.c: Include gimplify.h rather than gimple.h. * function.c: Likewise. * gimple-fold.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-sese-to-poly.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa.c: Likewise. * langhooks.c: Dont include gimple.h. * loop-init.c: Include gimplify.h rather than gimple.h. * omp-low.c: Likewise. * sese.c: Likewise. * stor-layout.c: Likewise. * targhooks.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-complex.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa.c: Likewise. * tree-switch-conversio: Likewise.n.c * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-stmts.c: Likewise. * tsan.c: Likewise. * value-prof.c: Likewise. * config/aarch64/aarch64.c: Include gimplify.h instead of gimple.h. * config/alpha/alpha.c: Likewise. * config/darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/xtensa/xtensa.c: Likewise. * ada/gcc-interface/trans.c: Include gimplify.h. * c/c-typeck.c: Include gimplify.h. * c-family/c-common.c: Include gimplify.h. * c-family/c-gimplify.c: Likewise. * c-family/cilk.c: Likewise. * c-family/c-omp.c: Include gimple-expr.h instead of gimple.h. * c-family/c-ubsan.c: Don't include gimple.h. * cp/class.c: Include gimplify.h. * cp/cp-gimplify.c: Likewise. * cp/error.c: Likewise. * cp/init.c: Likewise. * cp/optimize.c: Likewise. * cp/pt.c: Likewise. * cp/semantics.c: Likewise. * cp/tree.c: Likewise. * cp/vtable-class-hierarchy.c: Likewise. * cp/decl2.c: Don't include gimple.h. * cp/except.c: Likewise. * cp/method.c: Include pointer-set.h instead of gimple.h. * fortran/f95-lang.c: Don't include gimple.h. * fortran/trans-array.c: Include gimple-expr.h instead of gimple.h. * fortran/trans.c: Likewise. * fortran/trans-decl.c: Likewise. * fortran/trans-expr.c: Include gimplify.h. * fortran/trans-openmp.c: Likewise. * go/go-lang.c: Include gimplify.h. * java/java-gimplify.c: Include gimplify.h. * objc/objc-act.c: Include gimplify.h. From-SVN: r204717
2013-11-12 21:26:43 +01:00
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
gimplify-be.h: New file. * gimplify-be.h: New file. Add prototypes. * gimplify.h: Don't include gimple.h. (struct gimplify_hasher, struct gimplify_ctx, is_gimple_sizepos, gimplify_hasher::hash, gimplify_hasher::equal): Relocate from gimple.h. * gimple.h (struct gimplify_hasher, gimplify_hasher::hash, gimplify_hasher::equal, struct gimplify_ctx, is_gimple_sizepos): Move to gimplify.h. (enum gsi_iterator_update): Move to gimple-iterator.h. * gimple-iterator.h (enum gsi_iterator_update): Relocate from gimple.h. * gimplify-be.c: New File. (force_gimple_operand_1, force_gimple_operand, force_gimple_operand_gsi_1, force_gimple_operand_gsi): Relocate from gimplify.c. * gimplify.c (force_gimple_operand_1, force_gimple_operand, force_gimple_operand_gsi_1, force_gimple_operand_gsi): Move to gimplify-be.c. * Makefile.in (OBJS): Add gimplify-be.o * asan.c: Include only gimplify.h, gimplify-be.h, and/or gimple.h as required. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-sese-to-poly.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa.c: Likewise. * langhooks.c: Likewise. * omp-low.c: Likewise. * sese.c: Likewise. * stor-layout.c: Likewise. * targhooks.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-complex.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-stmts.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * value-prof.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/alpha/alpha.c: Likewise. * config/darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/xtensa/xtensa.c: Likewise. * c/c-typeck.c: Include only gimplify.h and gimple.h as needed. * c-family/c-common.c: Likewise. * c-family/c-gimplify.c: Likewise. * c-family/cilk.c: Likewise. * cp/class.c: Include only gimplify.h and gimple.h as needed. * cp/cp-gimplify.c: Likewise. * cp/error.c: Likewise. * cp/init.c: Likewise. * cp/optimize.c: Likewise. * cp/pt.c: Likewise. * cp/semantics.c: Likewise. * cp/tree.c: Likewise. * cp/vtable-class-hierarchy.c: Likewise. * fortran/trans-expr.c: Include only gimplify.h and gimple.h as needed. * fortran/trans-openmp.c: Likewise. * go/go-lang.c: Include only gimplify.h and gimple.h as needed. * java/java-gimplify.c: Include only gimplify.h and gimple.h as needed. * objc/objc-act.c: Include only gimplify.h and gimple.h as needed. From-SVN: r204812
2013-11-14 20:39:38 +01:00
* c-common.c: Include gimplify.h.
* c-gimplify.c: Likewise.
* cilk.c: Likewise.
* c-omp.c: Include gimple-expr.h instead of gimple.h.
* c-ubsan.c: Don't include gimple.h.
gimple-expr.h (create_tmp_var_name, [...]): Relocate prototypes from gimple.h. 2013-11-12 Andrew MacLeod <amacleod@redhat.com> * gimple-expr.h (create_tmp_var_name, create_tmp_var_raw, create_tmp_var, create_tmp_reg, mark_addressable, is_gimple_reg_rhs): Relocate prototypes from gimple.h. * gimplify.h: New File. Relocate some prototypes from gimple.h here. (gimple_predicate, enum fallback, enum gimplify_status): Relocate from gimple.h. * gimple.h: Move some prototypes to gimplify.h. (gimple_predicate, enum fallback, enum gimplify_status): Move to gimplify.h. (gimple_do_not_emit_location_p, gimple_set_do_not_emit_location): Relocate from gimpify.c. * gimple-expr.c (remove_suffix, tmp_var_id_num, create_tmp_var_name, create_tmp_var_raw, create_tmp_var, create_tmp_reg, mark_addressable, is_gimple_reg_rhs) Relocate from gimplify.c. * gimplify.c (mark_addressable): Move to gimple-expr.c. (gimple_seq_add_stmt_without_update): Move to gimple.c. (remove_suffix, tmp_var_id_num, create_tmp_var_name, create_tmp_var_raw, create_tmp_var, create_tmp_reg, is_gimple_reg_rhs): Move to gimple-expr.c. (should_carry_location_p): Move to gimple.c. (gimple_do_not_emit_location_p, gimple_set_do_not_emit_location): Move to gimple.h. (annotate_one_with_location, annotate_all_with_location_after, annotate_all_with_location): Move to gimple.c. (compare_case_labels, sort_case_labels, preprocess_case_label_vec_for_gimple): Move to gimple.c. (rhs_predicate_for): Make static. (gimplify_assign): Relocate from gimple.c. * gimple.c (gimplify_assign): Move to gimplify.c. (gimple_seq_add_stmt_without_update, should_carry_location_p, annotate_one_with_location, annotate_all_with_location_after, annotate_all_with_location, compare_case_labels, sort_case_labels, preprocess_case_label_vec_for_gimple): Relocate from gimplify.c. * tree.h (unshare_expr, unshare_expr_without_location, mark_addressable): Move prototypes to gimplify.h. * Makefile.in (GTFILES): gimple-expr.c now has the GTY tag for tmp_var_id_num * asan.c: Include gimplify.h rather than gimple.h. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * dwarf2out.c: Dont include gimple.h. * fold-const.c: Include gimplify.h rather than gimple.h. * function.c: Likewise. * gimple-fold.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-sese-to-poly.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa.c: Likewise. * langhooks.c: Dont include gimple.h. * loop-init.c: Include gimplify.h rather than gimple.h. * omp-low.c: Likewise. * sese.c: Likewise. * stor-layout.c: Likewise. * targhooks.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-complex.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa.c: Likewise. * tree-switch-conversio: Likewise.n.c * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-stmts.c: Likewise. * tsan.c: Likewise. * value-prof.c: Likewise. * config/aarch64/aarch64.c: Include gimplify.h instead of gimple.h. * config/alpha/alpha.c: Likewise. * config/darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/xtensa/xtensa.c: Likewise. * ada/gcc-interface/trans.c: Include gimplify.h. * c/c-typeck.c: Include gimplify.h. * c-family/c-common.c: Include gimplify.h. * c-family/c-gimplify.c: Likewise. * c-family/cilk.c: Likewise. * c-family/c-omp.c: Include gimple-expr.h instead of gimple.h. * c-family/c-ubsan.c: Don't include gimple.h. * cp/class.c: Include gimplify.h. * cp/cp-gimplify.c: Likewise. * cp/error.c: Likewise. * cp/init.c: Likewise. * cp/optimize.c: Likewise. * cp/pt.c: Likewise. * cp/semantics.c: Likewise. * cp/tree.c: Likewise. * cp/vtable-class-hierarchy.c: Likewise. * cp/decl2.c: Don't include gimple.h. * cp/except.c: Likewise. * cp/method.c: Include pointer-set.h instead of gimple.h. * fortran/f95-lang.c: Don't include gimple.h. * fortran/trans-array.c: Include gimple-expr.h instead of gimple.h. * fortran/trans.c: Likewise. * fortran/trans-decl.c: Likewise. * fortran/trans-expr.c: Include gimplify.h. * fortran/trans-openmp.c: Likewise. * go/go-lang.c: Include gimplify.h. * java/java-gimplify.c: Include gimplify.h. * objc/objc-act.c: Include gimplify.h. From-SVN: r204717
2013-11-12 21:26:43 +01:00
2013-11-12 Joseph Myers <joseph@codesourcery.com>
* c-common.c (c_common_reswords): Add _Thread_local.
2013-11-09 Joseph Myers <joseph@codesourcery.com>
* c-common.c (atomic_size_supported_p): New function.
(resolve_overloaded_atomic_exchange)
(resolve_overloaded_atomic_compare_exchange)
(resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
Use it instead of comparing size with a local list of sizes.
tree-core.h (enum cv_qualifier): Add TYPE_QUAL_ATOMIC. gcc: 2013-11-05 Andrew MacLeod <amacleod@redhat.com> Joseph Myers <joseph@codesourcery.com> * tree-core.h (enum cv_qualifier): Add TYPE_QUAL_ATOMIC. (enum tree_index): Add TI_ATOMICQI_TYPE, TI_ATOMICHI_TYPE, TI_ATOMICSI_TYPE, TI_ATOMICDI_TYPE and TI_ATOMICTI_TYPE. (struct tree_base): Add atomic_flag field. * tree.h (TYPE_ATOMIC): New accessor macro. (TYPE_QUALS, TYPE_QUALS_NO_ADDR_SPACE): Add TYPE_QUAL_ATOMIC. (TYPE_QUALS_NO_ADDR_SPACE_NO_ATOMIC): New macro. (atomicQI_type_node, atomicHI_type_node, atomicSI_type_node) (atomicDI_type_node, atomicTI_type_node): New macros for type nodes. * tree.c (set_type_quals): Set TYPE_ATOMIC. (find_atomic_core_type): New function. (build_qualified_type): Adjust alignment for qualified types. (build_atomic_base): New function (build_common_tree_nodes): Build atomicQI_type_node, atomicHI_type_node, atomicSI_type_node, atomicDI_type_node and atomicTI_type_node. * print-tree.c (print_node): Print atomic qualifier. * tree-pretty-print.c (dump_generic_node): Print atomic type attribute. * target.def (atomic_assign_expand_fenv): New hook. * doc/tm.texi.in (TARGET_ATOMIC_ASSIGN_EXPAND_FENV): New @hook. * doc/tm.texi: Regenerate. * targhooks.c (default_atomic_assign_expand_fenv): New function. * targhooks.h (default_atomic_assign_expand_fenv): Declare. * sync-builtins.def (__atomic_feraiseexcept): New built-in function. * config/i386/i386-builtin-types.def (VOID_FTYPE_PUSHORT): New function type. * config/i386/i386.c (enum ix86_builtins): Add IX86_BUILTIN_FNSTENV, IX86_BUILTIN_FLDENV, IX86_BUILTIN_FNSTSW and IX86_BUILTIN_FNCLEX. (bdesc_special_args): Add __builtin_ia32_fnstenv, __builtin_ia32_fldenv, __builtin_ia32_fnstsw and __builtin_ia32_fnclex. (ix86_expand_builtin): Handle the new built-in functions. (ix86_atomic_assign_expand_fenv): New function. (TARGET_ATOMIC_ASSIGN_EXPAND_FENV): New macro. * config/i386/i386.md (UNSPECV_FNSTENV, UNSPECV_FLDENV) (UNSPECV_FNSTSW, UNSPECV_FNCLEX): New unspecs. (fnstenv, fldenv, fnstsw, fnclex): New insns. gcc/c-family: 2013-11-05 Andrew MacLeod <amacleod@redhat.com> Joseph Myers <joseph@codesourcery.com> * c-common.h (enum rid): Add RID_ATOMIC. * c-common.c (c_common_reswords): Add _Atomic. (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument. (keyword_is_type_qualifier): Accept RID_ATOMIC. * c-format.c (check_format_types): Check for extra _Atomic qualifiers in format argument. * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier. (pp_c_type_qualifier_list): Mention _Atomic in comment. gcc/c: 2013-11-05 Joseph Myers <joseph@codesourcery.com> Andrew MacLeod <amacleod@redhat.com> * c-aux-info.c (gen_type): Handle atomic qualifier. * c-decl.c (validate_proto_after_old_defn): Do not remove atomic qualifiers when compating types. (shadow_tag_warned): Handle atomic_p in declspecs. (quals_from_declspecs): Likewise. (start_decl): Use c_type_promotes_to when promoting argument types. (grokdeclarator): Handle _Atomic. (get_parm_info): Diagnose any qualifier on "void" as only parameter. (store_parm_decls_oldstyle): Do not remove atomic qualifiers when comparing types. Use c_type_promotes_to when promoting argument types. (finish_function): Use c_type_promotes_to when promoting argument types. (build_null_declspecs): Handle atomic_p in declspecs. (declspecs_add_qual): Handle RID_ATOMIC. * c-parser.c (c_token_starts_typename, c_token_is_qualifier) (c_token_starts_declspecs): Handle RID_ATOMIC. (c_parser_declspecs): Handle atomic type specifiers and qualifiers. (c_parser_typeof_specifier): Remove const and _Atomic qualifiers from types of expressions with atomic type. (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue. (c_parser_attribute_any_word): Handle RID_ATOMIC. (c_parser_initializer, c_parser_initelt, c_parser_initval) (c_parser_statement_after_labels, c_parser_switch_statement) (c_parser_for_statement, c_parser_expr_no_commas) (c_parser_conditional_expression, c_parser_binary_expression) (c_parser_cast_expression, c_parser_unary_expression) (c_parser_postfix_expression) (c_parser_postfix_expression_after_primary, c_parser_expression): Use convert_lvalue_to_rvalue. (c_parser_expression_conv, c_parser_expr_list): Document conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue. (c_parser_objc_synchronized_statement): Use convert_lvalue_to_rvalue. (c_parser_objc_selector): Handle RID_ATOMIC. (c_parser_objc_receiver, c_parser_array_notation): Use convert_lvalue_to_rvalue. * c-tree.h (ctsk_typeof): Adjust comment to mention use for _Atomic (type-name). (struct c_declspecs): Add atomic_p field. (convert_lvalue_to_rvalue): Declare. * c-typeck.c (c_type_promotes_to): Promote atomic types to corresponding atomic types. (qualify_type): Don't add _Atomic qualifiers from second argument. (comp_target_types): Do not allow _Atomic mismatches. (type_lists_compatible_p): Do not remove atomic qualifiers when comparing types. (really_atomic_lvalue, convert_lvalue_to_rvalue) (build_atomic_assign): New functions. (build_unary_op): Use build_atomic_assign for atomic increment and decrement. (build_conditional_expr): Do not treat _Atomic void as a qualified version of void. (build_modify_expr): Use build_atomic_assign for atomic LHS. (find_anonymous_field_with_type, convert_to_anonymous_field) (convert_for_assignment): Do not remove atomic qualifiers when comparing types. (digest_init): Do not accept initialization of arrays of atomic elements by string constants. (build_asm_expr): Use convert_lvalue_to_rvalue. (build_binary_op): Do not treat _Atomic void as a qualified version of void. gcc/objc: 2013-11-05 Andrew MacLeod <amacleod@redhat.com> * objc-act.c (objc_push_parm): Handle atomic qualifier. gcc/testsuite: 2013-11-05 Joseph Myers <joseph@codesourcery.com> * lib/target-supports.exp (check_effective_target_fenv_exceptions): New function. * lib/atomic-dg.exp, gcc.dg/atomic/atomic.exp: New files. * gcc.dg/atomic/c11-atomic-exec-1.c, gcc.dg/atomic/c11-atomic-exec-2.c, gcc.dg/atomic/c11-atomic-exec-3.c, gcc.dg/atomic/c11-atomic-exec-4.c, gcc.dg/atomic/c11-atomic-exec-5.c, gcc.dg/c11-atomic-1.c, gcc.dg/c11-atomic-2.c, gcc.dg/c11-atomic-3.c, gcc.dg/c90-atomic-1.c, gcc.dg/c99-atomic-1.c: New tests. libatomic: 2013-11-05 Joseph Myers <joseph@codesourcery.com> * fenv.c: New file. * libatomic.map (LIBATOMIC_1.1): New symbol version. Include __atomic_feraiseexcept. * configure.ac (libtool_VERSION): Change to 2:0:1. (fenv.h): Test for header. * Makefile.am (libatomic_la_SOURCES): Add fenv.c. * Makefile.in, auto-config.h.in, configure: Regenerate. From-SVN: r204544
2013-11-07 22:15:25 +01:00
2013-11-07 Andrew MacLeod <amacleod@redhat.com>
Joseph Myers <joseph@codesourcery.com>
* c-common.h (enum rid): Add RID_ATOMIC.
* c-common.c (c_common_reswords): Add _Atomic.
(sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
(keyword_is_type_qualifier): Accept RID_ATOMIC.
* c-format.c (check_format_types): Check for extra _Atomic
qualifiers in format argument.
* c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
(pp_c_type_qualifier_list): Mention _Atomic in comment.
2013-11-06 Tobias Burnus <burnus@net-b.de>
* c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
2013-11-06 Joseph Myers <joseph@codesourcery.com>
* c-opts.c (c_common_post_options): Set -ffp-contract=off in C
standards modes.
* c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
to mean lack of IEEE 754 support.
2013-11-05 Tobias Burnus <burnus@net-b.de>
* c.opt (-Wdate-time): New option
* c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
2013-11-05 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (cpp_iec_559_value): Test
flag_excess_precision_cmdline not flag_excess_precision.
2013-11-05 Tobias Burnus <burnus@net-b.de>
* c.opt (fopenmp-simd): New option.
* c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
(omp_pragmas): ... this new struct.
(c_pp_lookup_pragma): Also walk omp_pragmas.
(init_pragma): Init pragmas for -fopenmp-simd.
2013-11-04 Marek Polacek <polacek@redhat.com>
PR c++/58979
* c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
2013-11-04 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
New functions.
(c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
c-ada-spec.h (cpp_operation): Add IS_TRIVIAL. c-family/ * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL. (dump_ada_specs): Adjust prototype of second callback. * c-ada-spec.c (cpp_check): New global variable. (dump_ada_nodes): Remove cpp_check parameter and do not pass it down. (print_generic_ada_decl): Likewise. (has_static_fields): Change return type to bool and add guard. (has_nontrivial_methods): New predicate. (is_tagged_type): Change return type to bool. (separate_class_package): Call has_nontrivial_methods. (pp_ada_tree_identifier): Minor tweaks. (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node. (dump_ada_array_domains): Likewise. (dump_ada_array_type): Likewise. (dump_template_types): Remove cpp_check parameter and do not pass it to dump_generic_ada_node. (dump_ada_template): Likewise. (dump_generic_ada_node): Remove cpp_check parameter and do not pass it recursively. (print_ada_methods): Change return type to integer. Remove cpp_check parameter and do not pass it down. (dump_nested_types): Remove cpp_check parameter and do not pass it to dump_generic_ada_node. (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before accessing methods. (print_ada_struct_decl): Remove cpp_check parameter and do not pass it down. Use has_nontrivial_methods to recognize C++ classes. Use return value of print_ada_methods. (dump_ads): Rename cpp_check parameter to check and adjust prototype. Set cpp_check to it before invoking dump_ada_nodes. (dump_ada_specs): Likewise. cp/ * decl2.c (cpp_check): Change type of first parameter and deal with IS_TRIVIAL. From-SVN: r204344
2013-11-04 08:24:44 +01:00
2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
(dump_ada_specs): Adjust prototype of second callback.
* c-ada-spec.c (cpp_check): New global variable.
(dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
(print_generic_ada_decl): Likewise.
(has_static_fields): Change return type to bool and add guard.
(has_nontrivial_methods): New predicate.
(is_tagged_type): Change return type to bool.
(separate_class_package): Call has_nontrivial_methods.
(pp_ada_tree_identifier): Minor tweaks.
(dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
(dump_ada_array_domains): Likewise.
(dump_ada_array_type): Likewise.
(dump_template_types): Remove cpp_check parameter and do not pass it to
dump_generic_ada_node.
(dump_ada_template): Likewise.
(dump_generic_ada_node): Remove cpp_check parameter and do not pass it
recursively.
(print_ada_methods): Change return type to integer. Remove cpp_check
parameter and do not pass it down.
(dump_nested_types): Remove cpp_check parameter and do not pass it to
dump_generic_ada_node.
(print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
accessing methods.
(print_ada_struct_decl): Remove cpp_check parameter and do not pass it
down. Use has_nontrivial_methods to recognize C++ classes. Use return
value of print_ada_methods.
(dump_ads): Rename cpp_check parameter to check and adjust prototype.
Set cpp_check to it before invoking dump_ada_nodes.
(dump_ada_specs): Likewise.
2013-11-03 Marek Polacek <polacek@redhat.com>
* c-ubsan.c: Don't include hash-table.h.
(ubsan_instrument_vla): New function.
* c-ubsan.h: Declare it.
Automated part of renaming of symtab_node_base to symtab_node. gcc/ Patch autogenerated by rename_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 with ChangeLog entry fixed up by hand. * cgraph.c (x_cgraph_nodes_queue): Rename symtab_node_base to symtab_node. (cgraph_node_for_asm): Likewise. * cgraph.h (symtab_node_base): Likewise. (cgraph_node): Likewise. (varpool_node): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (is_a_helper <varpool_node>::test): Likewise. (symtab_nodes): Likewise. (symtab_register_node): Likewise. (symtab_unregister_node): Likewise. (symtab_remove_node): Likewise. (symtab_get_node): Likewise. (symtab_node_for_asm): Likewise. (symtab_node_asm_name): Likewise. (symtab_node_name): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (dump_symtab_node): Likewise. (debug_symtab_node): Likewise. (dump_symtab_base): Likewise. (verify_symtab_node): Likewise. (verify_symtab_base): Likewise. (symtab_used_from_object_file_p): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_nonoverwritable_alias): Likewise. (availability symtab_node_availability): Likewise. (symtab_semantically_equivalent_p): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_prevail_in_asm_name_hash): Likewise. (cgraph): Likewise. (varpool): Likewise. (varpool_first_variable): Likewise. (varpool_next_variable): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_defined_variable): Likewise. (cgraph_first_defined_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (symtab_alias_target): Likewise. (symtab_real_symbol_p): Likewise. (symtab_can_be_discarded): Likewise. * cgraphbuild.c (mark_address): Likewise. (mark_load): Likewise. (mark_store): Likewise. * cgraphunit.c (decide_is_symbol_needed): Likewise. (first): Likewise. (enqueue_node): Likewise. (referred_to_p): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_functions): Likewise. (handle_alias_pairs): Likewise. (output_weakrefs): Likewise. (compile): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. * ipa-prop.c (remove_described_reference): Likewise. (try_decrement_rdesc_refcount): Likewise. (ipa_edge_duplication_hook): Likewise. * ipa-ref.c (ipa_record_reference): Likewise. (ipa_maybe_record_reference): Likewise. (ipa_clone_ref): Likewise. (ipa_clone_references): Likewise. (ipa_clone_referring): Likewise. (ipa_find_reference): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_clear_stmts_in_references): Likewise. * ipa-ref.h (symtab_node_base): Likewise. (ipa_ref): Likewise. (ipa_record_reference): Likewise. (ipa_maybe_record_reference): Likewise. (ipa_clone_references): Likewise. (ipa_clone_referring): Likewise. (ipa_clone_ref): Likewise. (ipa_find_reference): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_clear_stmts_in_references): Likewise. * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise. * ipa.c (enqueue_node): Likewise. (process_references): Likewise. (walk_polymorphic_call_targets): Likewise. (symtab_remove_unreachable_nodes): Likewise. (address_taken_from_non_vtable_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (comdat_can_be_unshared_p): Likewise. (can_replace_by_local_alias): Likewise. (function_and_variable_visibility): Likewise. * is-a.h: Likewise (within example in comment). * lto-cgraph.c (input_cgraph_opt_summary): Likewise. (lto_symtab_encoder_encode): Likewise. (lto_symtab_encoder_delete_node): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (output_refs): Likewise. (compute_ltrans_boundary): Likewise. (output_symtab): Likewise. (input_node): Likewise. (input_ref): Likewise. (input_edge): Likewise. (input_cgraph_1): Likewise. (input_refs): Likewise. (output_cgraph_opt_summary): Likewise. (input_node_opt_summary): Likewise. (input_cgraph_opt_section): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-out.c (lto_output): Likewise. (output_symbol_p): Likewise. (produce_symtab): Likewise. * lto-streamer.h (lto_encoder_entry): Likewise. (lto_free_function_in_decl_state_for_node): Likewise. (lto_symtab_encoder_encode): Likewise. (lto_symtab_encoder_delete_node): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_lookup): Likewise. (lsei_node): Likewise. (lto_symtab_encoder_deref): Likewise. * symtab.c (symtab_hash): Likewise. (assembler_name_hash): Likewise. (symtab_nodes): Likewise. (hash_node): Likewise. (eq_node): Likewise. (hash_node_by_assembler_name): Likewise. (eq_assembler_name): Likewise. (insert_to_assembler_name_hash): Likewise. (unlink_from_assembler_name_hash): Likewise. (symtab_prevail_in_asm_name_hash): Likewise. (symtab_register_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_unregister_node): Likewise. (symtab_get_node): Likewise. (symtab_remove_node): Likewise. (symtab_initialize_asm_name_hash): Likewise. (symtab_node_for_asm): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_node_asm_name): Likewise. (symtab_node_name): Likewise. (dump_symtab_base): Likewise. (dump_symtab_node): Likewise. (dump_symtab): Likewise. (debug_symtab_node): Likewise. (verify_symtab_base): Likewise. (verify_symtab_node): Likewise. (verify_symtab): Likewise. (symtab_used_from_object_file_p): Likewise. (symtab_node_availability): Likewise. (symtab_alias_ultimate_target): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_resolve_alias): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_semantically_equivalent_p): Likewise. * value-prof.c (init_node_map): Likewise. * varasm.c (find_decl): Likewise. * varpool.c (varpool_node_for_asm): Likewise. (varpool_remove_unreferenced_decls): Likewise. gcc/c-family/ Patch autogenerated by rename_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename symtab_node_base to symtab_node. gcc/lto/ Patch autogenerated by rename_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (add_symbol_to_partition): Rename symtab_node_base to symtab_node. (get_symbol_class): Likewise. (symbol_partitioned_p): Likewise. (add_references_to_partition): Likewise. (add_symbol_to_partition_1): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition): Likewise. (lto_1_to_1_map): Likewise. (lto_max_map): Likewise. (lto_balanced_map): Likewise. (privatize_symbol_name): Likewise. (promote_symbol): Likewise. (may_need_named_section_p): Likewise. (rename_statics): Likewise. (lto_promote_statics_nonwpa): Likewise. * lto-symtab.c (lto_symtab_merge): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_prevailing_decl): Likewise. * lto.c (lto_wpa_write_files): Likewise. (read_cgraph_and_symbols): Likewise. (do_whole_program_analysis): Likewise. From-SVN: r204279
2013-10-31 22:26:14 +01:00
2013-10-31 David Malcolm <dmalcolm@redhat.com>
Automated part of renaming of symtab_node_base to symtab_node.
Patch autogenerated by rename_symtab.py from
https://github.com/davidmalcolm/gcc-refactoring-scripts
revision 58bb219cc090b2f4516a9297d868c245495ee622
* c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
symtab_node_base to symtab_node.
2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
Implement C++14 digit separators.
* c-lex.c (interpret_float): Remove digit separators from scratch string
before building real literal.
2013-10-30 Jakub Jelinek <jakub@redhat.com>
* cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
Added _Cilk_spawn and _Cilk_sync (2 cilk keywords) for C. gcc/ChangeLog: 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com> * builtins.c (is_builtin_name): Added a check for __cilkrts_detach and __cilkrts_pop_frame. If matched, then return true for built-in function name. (expand_builtin): Added BUILT_IN_CILK_DETACH and BUILT_IN_CILK_POP_FRAME case. * langhooks-def.h (lhd_install_body_with_frame_cleanup): New prototype. (lhs_cilk_detect_spawn): Likewise. (LANG_HOOKS_DECLS): Added LANG_HOOKS_CILKPLUS. (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): New #define. (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise. (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): Likewise. (LANG_HOOKS_CILKPLUS): Likewise. * tree.h (CILK_SPAWN_FN): Likewise. * builtin.def (DEF_CILK_BUILTIN_STUB): Likewise. * Makefile.in (C_COMMON_OBJS): Added c-family/cilk.o. (OBJS): Added cilk-common.o. (CILK_H): Added a new define. (gimplify.o): Added CILK_H into dependency list. (builtins.o): Likewise. (ipa-inline.o): Likewise. (ipa-inline-analysis.o): Likewise. (BUILTINS_DEF): Added cilk-builtins.def. * langhooks.c (lhd_install_body_with_frame_cleanup): New function. (lhd_cilk_detect_spawn): Likewise. * langhooks.h (lang_hooks_for_cilkplus): New struct. (struct lang_hooks): Added new field called "cilkplus." * cilk-common.c: New file. * cilk.h: Likewise. * cilk-builtins.def: Likewise. * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Added "__cilk" macro and set it to 200. * function.h (struct function::cilk_frame_decl): New field. (struct function::is_cilk_function): Likewise. (struct function::calls_cilk_spawn): Likewise. * gimplify.c (gimplify_call_expr): Added a check if the function call being gimplified is a spawn detach point. If so, then add pop_frame and detach function calls. (gimplify_expr): Added a CILK_SPAWN_STMT and CILK_SYNC_STMT case for gimplifying _Cilk_spawn and _Cilk_sync statements. (gimplify_return_expr): Added a check for _Cilk_spawn usage in function. If so, added a _Cilk_sync and gimplified it. (gimplify_modify_expr): Added a check for _Cilk_spawn in MODIFY and INIT_EXPRs. If so, then call gimplify_cilk_spawn. * ipa-inline-analysis (initialize_inline_failed): Prevent inlining of spawner function. (can_inline_edge_p): Prevent inling of spawnee function. * ira.c (ira_setup_eliminable_regset): Force usage of frame pointer for functions that use Cilk keywords. * tree-inline.h (struct copy_body_data::remap_var_for_cilk): New field. * tree-pretty-print.c (dump_generic_node): Added CILK_SPAWN_STMT and CILK_SYNC_STMT cases. * tree.def (DEFTREECODE): Added CILK_SPAWN_STMT and CILK_SYNC_STMT trees. * generic.texi (CILK_SPAWN_STMT): Added documentation for _Cilk_spawn. (CILK_SYNC_STMT): Added documentation for _Cilk_sync. * passes.texi (Cilk Keywords): New section that describes the compiler code changes for handling Cilk Keywords. gcc/c/ChangeLog: 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-decl.c (finish_function): Added a call for insert_cilk_frame when a spawning function is found. * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define. (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise. (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise. * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC case. (c_parser_postfix_expression): Added RID_CILK_SPAWN case. * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma expr. (c_finish_return): Added a check to reject _Cilk_spawn in return expression. (build_cilk_spawn): New function. (build_cilk_sync): Likewise. * Makefile.in (c-decl.o): Added cilk.h in dependency list. gcc/c-family/ChangeLog 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync fields. (c_define_builtins): Called cilk_init_builtins if Cilk Plus is enabled. * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC. (insert_cilk_frame): New prototype. (cilk_init_builtins): Likewise. (gimplify_cilk_spawn): Likewise. (c_cilk_install_body_w_frame_cleanup): Likewise. (cilk_detect_spawn_and_unwrap): Likewise. (cilk_set_spawn_marker): Likewise. (build_cilk_sync): Likewise. (build_cilk_spawn): Likewise. * cilk.c: New file. gcc/lto/ChangeLog 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com> * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list. * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk Plus is enabled. gcc/testsuite/ChangeLog 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-c++-common/cilk-plus/CK/compound_cilk_spawn.c: New test. * c-c++-common/cilk-plus/CK/concec_cilk_spawn.c: Likewise. * c-c++-common/cilk-plus/CK/fib.c: Likewise. * c-c++-common/cilk-plus/CK/no_args_error.c: Likewise. * c-c++-common/cilk-plus/CK/spawnee_inline.c: Likewise. * c-c++-common/cilk-plus/CK/spawner_inline.c: Likewise. * c-c++-common/cilk-plus/CK/spawning_arg.c: Likewise. * c-c++-common/cilk-plus/CK/steal_check.c: Likewise. * c-c++-common/cilk-plus/CK/test__cilk.c: Likewise. * c-c++-common/cilk-plus/CK/varargs_test.c: Likewise. * c-c++-common/cilk-plus/CK/sync_wo_spawn.c: Likewise. * c-c++-common/cilk-plus/CK/invalid_spawn.c: Likewise. * c-c++-common/cilk-plus/CK/spawn_in_return.c: Likewise. * c-c++-common/cilk-plus/CK/fib_init_expr_xy.c: Likewise. * c-c++-common/cilk-plus/CK/fib_no_sync.c: Likewise. * c-c++-common/cilk-plus/CK/fib_no_return.c: Likewise. * gcc.dg/cilk-plus/cilk-plus.exp: Added support to run Cilk Keywords test stored in c-c++-common. Also, added the Cilk runtime's library to the ld_library_path. From-SVN: r204172
2013-10-29 19:36:31 +01:00
2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
fields.
(c_define_builtins): Called cilk_init_builtins if Cilk Plus is
enabled.
* c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
(insert_cilk_frame): New prototype.
(cilk_init_builtins): Likewise.
(gimplify_cilk_spawn): Likewise.
(c_cilk_install_body_w_frame_cleanup): Likewise.
(cilk_detect_spawn_and_unwrap): Likewise.
(cilk_set_spawn_marker): Likewise.
(build_cilk_sync): Likewise.
(build_cilk_spawn): Likewise.
* cilk.c: New file.
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
2013-10-29 David Malcolm <dmalcolm@redhat.com>
Patch autogenerated by refactor_symtab.py from
https://github.com/davidmalcolm/gcc-refactoring-scripts
revision 58bb219cc090b2f4516a9297d868c245495ee622
* c-gimplify.c (c_genericize): Update for conversion of symtab types
to a true class hierarchy.
* c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
* c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
Makefile.def (target_modules): Remove libmudflap * Makefile.def (target_modules): Remove libmudflap (languages): Remove check-target-libmudflap). * Makefile.in: Rebuilt. * Makefile.tpl (check-target-libmudflap-c++): Remove. * configure.ac (target_libraries): Remove target-libmudflap. Remove checks which disabled libmudflap on some systems. * configure: Rebuilt. * libmudflap: Directory removed. * Makefile.in (C_COMMON_OBJS): Remove tree-mudflap. (OBJS): Remove tree-nomudflap.o (GTFILES): Remove tree-mudflap.c * builtins.c (expand_builtin_alloc): Remove mudflap support. * gcc.c (MFWRAP_SPEC, MFLIB_SPEC): Likewise. (mfwrap_spec, mflib_spec): Likewise. (cpp_unique_options, cc1_options, static_specs): Likewise. * gimplify (gimplify_vla_decl, build_va_arg_indirect_ref): Likewise. * passes.def: Likewise. * toplev.c (compile_file, process_options): Likewise. * tree-inline.c (copy_tree_r): Likewise. * tree-pass.,h (make_pass_mudflap_1, make_pass_mudflap_2): Likewise. * varasm.c (make_decl_rtl, make_decl_rtl_for_debug): Likewise. (build_constant_desc, output_constant_def_contents): Likewise. (categorize_decl_for_section): Likewise. * tree-mudflap.c: Removed. * tree-mudflap.h: Removed. * tree-nomudflap.c: Removed. * bfin/uclinux.h (MFWRAP_SPEC): Remove. * moxie/uclinux.h (MFWRAP_SPEC): Likewise. * rs6000/aix.h (MFWRAP_SPEC, MFLIB_SPEC): Likewise. * config/sol2.h (MFLIB_SPEC): Likewise. * doc/install.texi: Remove mudflap references. * doc/passes.texi: Similarly. * doc/sourcebuild.texi: Similarly. * doc/invoke.texi: Remove mudlfap related options. * c-family/c-common.c (c_define_builtins): Remove mudflap support. * c-family/c.opt: Ignore and warn for mudflap options. * g++.dg/torture/pr49309.C: Removed. * gcc.dg/dfp/pr35739.c: Removed. From-SVN: r204090
2013-10-26 12:14:34 +02:00
2013-10-26 Jeff Law <law@redhat.com>
* c-common.c (c_define_builtins): Remove mudflap support.
* c.opt: Ignore and warn for mudflap options.
Makefile.def (target_modules): Remove libmudflap * Makefile.def (target_modules): Remove libmudflap (languages): Remove check-target-libmudflap). * Makefile.in: Rebuilt. * Makefile.tpl (check-target-libmudflap-c++): Remove. * configure.ac (target_libraries): Remove target-libmudflap. Remove checks which disabled libmudflap on some systems. * configure: Rebuilt. * libmudflap: Directory removed. * Makefile.in (C_COMMON_OBJS): Remove tree-mudflap. (OBJS): Remove tree-nomudflap.o (GTFILES): Remove tree-mudflap.c * builtins.c (expand_builtin_alloc): Remove mudflap support. * gcc.c (MFWRAP_SPEC, MFLIB_SPEC): Likewise. (mfwrap_spec, mflib_spec): Likewise. (cpp_unique_options, cc1_options, static_specs): Likewise. * gimplify (gimplify_vla_decl, build_va_arg_indirect_ref): Likewise. * passes.def: Likewise. * toplev.c (compile_file, process_options): Likewise. * tree-inline.c (copy_tree_r): Likewise. * tree-pass.,h (make_pass_mudflap_1, make_pass_mudflap_2): Likewise. * varasm.c (make_decl_rtl, make_decl_rtl_for_debug): Likewise. (build_constant_desc, output_constant_def_contents): Likewise. (categorize_decl_for_section): Likewise. * tree-mudflap.c: Removed. * tree-mudflap.h: Removed. * tree-nomudflap.c: Removed. * bfin/uclinux.h (MFWRAP_SPEC): Remove. * moxie/uclinux.h (MFWRAP_SPEC): Likewise. * rs6000/aix.h (MFWRAP_SPEC, MFLIB_SPEC): Likewise. * config/sol2.h (MFLIB_SPEC): Likewise. * doc/install.texi: Remove mudflap references. * doc/passes.texi: Similarly. * doc/sourcebuild.texi: Similarly. * doc/invoke.texi: Remove mudlfap related options. * c-family/c-common.c (c_define_builtins): Remove mudflap support. * c-family/c.opt: Ignore and warn for mudflap options. * g++.dg/torture/pr49309.C: Removed. * gcc.dg/dfp/pr35739.c: Removed. From-SVN: r204090
2013-10-26 12:14:34 +02:00
2013-10-24 Tobias Burnus <burnus@net-b.de>
PR other/33426
* c-pragma.c (init_pragma) Add #pragma ivdep handling.
* c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
2013-10-23 Jason Merrill <jason@redhat.com>
* c-format.c (gcc_cxxdiag_char_table): Add %X.
target.c: New file. libgomp/ * target.c: New file. * Makefile.am (libgomp_la_SOURCES): Add target.c. * Makefile.in: Regenerated. * libgomp_g.h (GOMP_task): Add depend argument. (GOMP_barrier_cancel, GOMP_loop_end_cancel, GOMP_sections_end_cancel, GOMP_target, GOMP_target_data, GOMP_target_end_data, GOMP_target_update, GOMP_teams, GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic, GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime, GOMP_parallel, GOMP_cancel, GOMP_cancellation_point, GOMP_taskgroup_start, GOMP_taskgroup_end, GOMP_parallel_sections): New prototypes. * fortran.c (omp_is_initial_device): Add ialias_redirect. (omp_is_initial_device_): New function. (ULP, STR1, STR2, ialias_redirect): Removed. (omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_, omp_set_default_device_8_, omp_get_default_device_, omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New functions. * libgomp.map (GOMP_barrier_cancel, GOMP_loop_end_cancel, GOMP_sections_end_cancel, GOMP_target, GOMP_target_data, GOMP_target_end_data, GOMP_target_update, GOMP_teams): Export @@GOMP_4.0. (omp_is_initial_device, omp_is_initial_device_, omp_get_cancellation, omp_get_cancellation_, omp_get_proc_bind, omp_get_proc_bind_, omp_set_default_device, omp_set_default_device_, omp_set_default_device_8_, omp_get_default_device, omp_get_default_device_, omp_get_num_devices, omp_get_num_devices_, omp_get_num_teams, omp_get_num_teams_, omp_get_team_num, omp_get_team_num_): Export @@OMP_4.0. * team.c (struct gomp_thread_start_data): Add place field. (gomp_thread_start): Clear thr->thread_pool and thr->task before returning. Use gomp_team_barrier_wait_final instead of gomp_team_barrier_wait. Initialize thr->place. (gomp_new_team): Initialize work_shares_to_free, work_share_cancelled, team_cancelled and task_queued_count fields. (gomp_free_pool_helper): Clear thr->thread_pool and thr->task before calling pthread_exit. (gomp_free_thread): No longer static. Use gomp_managed_threads_lock instead of gomp_remaining_threads_lock. (gomp_team_start): Add flags argument. Set thr->thread_pool->threads_busy to nthreads immediately after creating new pool. Use gomp_managed_threads_lock instead of gomp_remaining_threads_lock. Handle OpenMP 4.0 affinity. (gomp_team_end): Use gomp_managed_threads_lock instead of gomp_remaining_threads_lock. Use gomp_team_barrier_wait_final instead of gomp_team_barrier_wait. If team->team_cancelled, call gomp_fini_worshare on ws chain starting at team->work_shares_to_free rather than thr->ts.work_share. (initialize_team): Don't call gomp_sem_init here. * sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start caller. (GOMP_parallel_sections, GOMP_sections_end_cancel): New functions. * env.c (gomp_global_icv): Add default_device_var, target_data and bind_var initializers. (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove. (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list, gomp_places_list_len): New variables. (parse_bind_var, parse_one_place, parse_places_var): New functions. (parse_affinity): Rewritten to construct OMP_PLACES list with unit sized places. (gomp_cancel_var): New global variable. (parse_int): New function. (handle_omp_display_env): New function. (initialize_env): Use it. Initialize default_device_var. Parse OMP_CANCELLATION env var. Use parse_bind_var to parse OMP_PROC_BIND instead of parse_boolean. Use parse_places_var for OMP_PLACES parsing. Don't call parse_affinity if OMP_PLACES has been successfully parsed (and call gomp_init_affinity in that case). (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device, omp_get_default_device, omp_get_num_devices, omp_get_num_teams, omp_get_team_num, omp_is_initial_device): New functions. * libgomp.h: Include stdlib.h. (ialias_ulp, ialias_str1, ialias_str2, ialias_redirect, ialias_call): Define. (struct target_mem_desc): Forward declare. (struct gomp_task_icv): Add default_device_var, target_data, bind_var and thread_limit_var fields. (gomp_get_num_devices): New prototype. (gomp_cancel_var): New extern decl. (struct gomp_team): Add work_shares_to_free, work_share_cancelled, team_cancelled and task_queued_count fields. Add comments about task_{,queued_,running_}count. (gomp_cancel_kind): New enum. (gomp_work_share_end_cancel): New prototype. (struct gomp_task): Add next_taskgroup, prev_taskgroup, taskgroup, copy_ctors_done, dependers, depend_hash, depend_count, num_dependees and depend fields. (struct gomp_taskgroup): New type. (struct gomp_task_depend_entry, struct gomp_dependers_vec): New types. (gomp_finish_task): Free depend_hash if non-NULL. (struct gomp_team_state): Add place_partition_off and place_partition_len fields. (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list, gomp_places_list_len): New extern decls. (struct gomp_thread): Add place field. (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove. (gomp_init_thread_affinity): Add place argument. (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus, gomp_affinity_remove_cpu, gomp_affinity_copy_place, gomp_affinity_same_place, gomp_affinity_finalize_place_list, gomp_affinity_init_level, gomp_affinity_print_place): New prototypes. (gomp_team_start): Add flags argument. (gomp_thread_limit_var, gomp_remaining_threads_count, gomp_remaining_threads_lock): Remove. (gomp_managed_threads_lock): New variable. (struct gomp_thread_pool): Add threads_busy field. (gomp_free_thread): New prototype. * task.c: Include hashtab.h. (hash_entry_type): New typedef. (htab_alloc, htab_free, htab_hash, htab_eq): New inlines. (gomp_init_task): Clear dependers, depend_hash, depend_count, copy_ctors_done and taskgroup fields. (GOMP_task): Add depend argument, handle depend clauses. If gomp_team_barrier_cancelled or if it's taskgroup has been cancelled, don't queue or start new tasks. Set copy_ctors_done field if needed. Initialize taskgroup field. If copy_ctors_done and already cancelled, don't discard the task. If taskgroup is non-NULL, enqueue the task into taskgroup queue. Increment num_children field in taskgroup. Increment task_queued_count. (gomp_task_run_pre, gomp_task_run_post_remove_parent, gomp_task_run_post_remove_taskgroup): New inline functions. (gomp_task_run_post_handle_depend_hash, gomp_task_run_post_handle_dependers, gomp_task_run_post_handle_depend): New functions. (GOMP_taskwait): Use them. If more than one new tasks have been queued, wake other threads if needed. (gomp_barrier_handle_tasks): Likewise. If gomp_team_barrier_cancelled, don't start any new tasks, just free all tasks. (GOMP_taskgroup_start, GOMP_taskgroup_end): New functions. * omp_lib.f90.in (omp_proc_bind_kind, omp_proc_bind_false, omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close, omp_proc_bind_spread): New params. (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device, omp_get_default_device, omp_get_num_devices, omp_get_num_teams, omp_get_team_num, omp_is_initial_device): New interfaces. (omp_get_dynamic, omp_get_nested, omp_in_parallel, omp_get_max_threads, omp_get_num_procs, omp_get_num_threads, omp_get_thread_num, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level, omp_in_final): Remove useless use omp_lib_kinds. * omp.h.in (omp_proc_bind_t): New typedef. (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device, omp_get_default_device, omp_get_num_devices, omp_get_num_teams, omp_get_team_num, omp_is_initial_device): New prototypes. * loop.c (gomp_parallel_loop_start): Add flags argument, pass it through to gomp_team_start. (GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start, GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start): Adjust gomp_parallel_loop_start callers. (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic, GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime, GOMP_loop_end_cancel): New functions. (GOMP_parallel_end): Add ialias_redirect. * hashtab.h: New file. * libgomp.texi (Environment Variables): Minor cleanup, update section refs to OpenMP 4.0rc2. (OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these environment variables. * work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set team->work_shares_to_free to thr->ts.work_share before calling free_work_share. (gomp_work_share_end_cancel): New function. * config/linux/proc.c: Include errno.h. (gomp_get_cpuset_size, gomp_cpuset_size, gomp_cpusetp): New variables. (gomp_cpuset_popcount): Add cpusetsize argument, use it instead of sizeof (cpu_set_t) to determine number of iterations. Fix up check extern decl. Use CPU_COUNT_S if available, or CPU_COUNT if gomp_cpuset_size is sizeof (cpu_set_t). (gomp_init_num_threads): Initialize gomp_cpuset_size, gomp_get_cpuset_size and gomp_cpusetp here, use gomp_cpusetp instead of &cpuset and pass gomp_cpuset_size instead of sizeof (cpu_set_t) to pthread_getaffinity_np. Free and clear gomp_cpusetp if it didn't contain any logical CPUs. (get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp is NULL. Use gomp_cpusetp instead of &cpuset and pass gomp_get_cpuset_size instead of sizeof (cpu_set_t) to pthread_getaffinity_np. Check gomp_places_list instead of gomp_cpu_affinity. Adjust gomp_cpuset_popcount caller. * config/linux/bar.c (gomp_barrier_wait_end, gomp_barrier_wait_last): Use BAR_* defines. (gomp_team_barrier_wait_end): Likewise. Clear BAR_CANCELLED from state where needed. Set work_share_cancelled to 0 on last thread. (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New functions. * config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden. Add cpusetsize argument. (gomp_cpuset_size, gomp_cpusetp): Declare. * config/linux/affinity.c: Include errno.h, stdio.h and string.h. (affinity_counter): Remove. (CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S, CPU_CLR_S): Define if CPU_ALLOC_SIZE isn't defined. (gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try silently create OMP_PLACES=threads, if it is non-NULL afterwards, bind current thread to the first place. (gomp_init_thread_affinity): Rewritten. Add place argument, just pthread_setaffinity_np to gomp_places_list[place]. (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus, gomp_affinity_remove_cpu, gomp_affinity_copy_place, gomp_affinity_same_place, gomp_affinity_finalize_place_list, gomp_affinity_init_level, gomp_affinity_print_place): New functions. * config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST, BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define. (gomp_barrier_t): Add awaited_final field. (gomp_barrier_init): Initialize awaited_final field. (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New prototypes. (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit. Use BAR_* defines. (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start, gomp_team_barrier_cancelled): New inline functions. (gomp_barrier_last_thread, gomp_team_barrier_set_task_pending, gomp_team_barrier_clear_task_pending, gomp_team_barrier_set_waiting_for_tasks, gomp_team_barrier_waiting_for_tasks, gomp_team_barrier_done): Use BAR_* defines. * config/posix/bar.c (gomp_barrier_init): Clear cancellable field. (gomp_barrier_wait_end): Use BAR_* defines. (gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state. Set work_share_cancelled to 0 on last thread, use __atomic_load_n. Use BAR_* defines. (gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New functions. * config/posix/affinity.c (gomp_init_thread_affinity): Add place argument. (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus, gomp_affinity_remove_cpu, gomp_affinity_copy_place, gomp_affinity_same_place, gomp_affinity_finalize_place_list, gomp_affinity_init_level, gomp_affinity_print_place): New stubs. * config/posix/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST, BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define. (gomp_barrier_t): Add cancellable field. (gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New prototypes. (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit. (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final, gomp_team_barrier_cancelled): New inline functions. (gomp_barrier_wait_start, gomp_barrier_last_thread, gomp_team_barrier_set_task_pending, gomp_team_barrier_clear_task_pending, gomp_team_barrier_set_waiting_for_tasks, gomp_team_barrier_waiting_for_tasks, gomp_team_barrier_done): Use BAR_* defines. * barrier.c (GOMP_barrier_cancel): New function. * omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false, omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close, omp_proc_bind_spread): New params. (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device, omp_get_default_device, omp_get_num_devices, omp_get_num_teams, omp_get_team_num, omp_is_initial_device): New externals. * parallel.c (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point): New functions. (gomp_resolve_num_threads): Adjust for thread_limit now being in icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as infinity. If not nested, just return minimum of max_num_threads and icv->thread_limit_var and if thr->thread_pool, set threads_busy to the returned value. Otherwise, don't update atomically gomp_remaining_threads_count, but instead thr->thread_pool->threads_busy. (GOMP_parallel_end): Adjust for thread_limit now being in icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as infinity. Adjust threads_busy in the pool rather than gomp_remaining_threads_count. Remember team->nthreads and call gomp_team_end before adjusting threads_busy, if not nested afterwards, just set it to 1 non-atomically. Add ialias. (GOMP_parallel_start): Adjust gomp_team_start caller. * testsuite/libgomp.c/atomic-14.c: Add parens to make it valid. * testsuite/libgomp.c/affinity-1.c: New test. * testsuite/libgomp.c/atomic-15.c: New test. * testsuite/libgomp.c/atomic-16.c: New test. * testsuite/libgomp.c/atomic-17.c: New test. * testsuite/libgomp.c/cancel-for-1.c: New test. * testsuite/libgomp.c/cancel-for-2.c: New test. * testsuite/libgomp.c/cancel-parallel-1.c: New test. * testsuite/libgomp.c/cancel-parallel-2.c: New test. * testsuite/libgomp.c/cancel-parallel-3.c: New test. * testsuite/libgomp.c/cancel-sections-1.c: New test. * testsuite/libgomp.c/cancel-taskgroup-1.c: New test. * testsuite/libgomp.c/cancel-taskgroup-2.c: New test. * testsuite/libgomp.c/depend-1.c: New test. * testsuite/libgomp.c/depend-2.c: New test. * testsuite/libgomp.c/depend-3.c: New test. * testsuite/libgomp.c/depend-4.c: New test. * testsuite/libgomp.c/for-1.c: New test. * testsuite/libgomp.c/for-1.h: New file. * testsuite/libgomp.c/for-2.c: New test. * testsuite/libgomp.c/for-2.h: New file. * testsuite/libgomp.c/for-3.c: New test. * testsuite/libgomp.c/pr58392.c: New test. * testsuite/libgomp.c/simd-1.c: New test. * testsuite/libgomp.c/simd-2.c: New test. * testsuite/libgomp.c/simd-3.c: New test. * testsuite/libgomp.c/simd-4.c: New test. * testsuite/libgomp.c/simd-5.c: New test. * testsuite/libgomp.c/simd-6.c: New test. * testsuite/libgomp.c/target-1.c: New test. * testsuite/libgomp.c/target-2.c: New test. * testsuite/libgomp.c/target-3.c: New test. * testsuite/libgomp.c/target-4.c: New test. * testsuite/libgomp.c/target-5.c: New test. * testsuite/libgomp.c/target-6.c: New test. * testsuite/libgomp.c/target-7.c: New test. * testsuite/libgomp.c/taskgroup-1.c: New test. * testsuite/libgomp.c/thread-limit-1.c: New test. * testsuite/libgomp.c/thread-limit-2.c: New test. * testsuite/libgomp.c/thread-limit-3.c: New test. * testsuite/libgomp.c/udr-1.c: New test. * testsuite/libgomp.c/udr-2.c: New test. * testsuite/libgomp.c/udr-3.c: New test. * testsuite/libgomp.c++/affinity-1.C: New test. * testsuite/libgomp.c++/atomic-10.C: New test. * testsuite/libgomp.c++/atomic-11.C: New test. * testsuite/libgomp.c++/atomic-12.C: New test. * testsuite/libgomp.c++/atomic-13.C: New test. * testsuite/libgomp.c++/atomic-14.C: New test. * testsuite/libgomp.c++/atomic-15.C: New test. * testsuite/libgomp.c++/cancel-for-1.C: New test. * testsuite/libgomp.c++/cancel-for-2.C: New test. * testsuite/libgomp.c++/cancel-parallel-1.C: New test. * testsuite/libgomp.c++/cancel-parallel-2.C: New test. * testsuite/libgomp.c++/cancel-parallel-3.C: New test. * testsuite/libgomp.c++/cancel-sections-1.C: New test. * testsuite/libgomp.c++/cancel-taskgroup-1.C: New test. * testsuite/libgomp.c++/cancel-taskgroup-2.C: New test. * testsuite/libgomp.c++/cancel-taskgroup-3.C: New test. * testsuite/libgomp.c++/cancel-test.h: New file. * testsuite/libgomp.c++/for-9.C: New test. * testsuite/libgomp.c++/for-10.C: New test. * testsuite/libgomp.c++/for-11.C: New test. * testsuite/libgomp.c++/simd-1.C: New test. * testsuite/libgomp.c++/simd-2.C: New test. * testsuite/libgomp.c++/simd-3.C: New test. * testsuite/libgomp.c++/simd-4.C: New test. * testsuite/libgomp.c++/simd-5.C: New test. * testsuite/libgomp.c++/simd-6.C: New test. * testsuite/libgomp.c++/simd-7.C: New test. * testsuite/libgomp.c++/simd-8.C: New test. * testsuite/libgomp.c++/target-1.C: New test. * testsuite/libgomp.c++/target-2.C: New test. * testsuite/libgomp.c++/target-2-aux.cc: New file. * testsuite/libgomp.c++/target-3.C: New test. * testsuite/libgomp.c++/taskgroup-1.C: New test. * testsuite/libgomp.c++/udr-1.C: New test. * testsuite/libgomp.c++/udr-2.C: New test. * testsuite/libgomp.c++/udr-3.C: New test. * testsuite/libgomp.c++/udr-4.C: New test. * testsuite/libgomp.c++/udr-5.C: New test. * testsuite/libgomp.c++/udr-6.C: New test. * testsuite/libgomp.c++/udr-7.C: New test. * testsuite/libgomp.c++/udr-8.C: New test. * testsuite/libgomp.c++/udr-9.C: New test. gcc/ * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__LOOPTEMP_ and new OpenMP 4.0 clauses, handle UDR OMP_CLAUSE_REDUCTION, formatting fixes, use pp_colon instead of pp_character (..., ':'), similarly pp_right_paren. (dump_generic_node): Handle OMP_DISTRIBUTE, OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET, OMP_TARGET_UPDATE, OMP_TASKGROUP, allow OMP_FOR_INIT to be NULL, handle OMP_ATOMIC_SEQ_CST. * tree.c (omp_clause_num_ops, omp_clause_code_name): Add OpenMP 4.0 clauses. (omp_declare_simd_clauses_equal, omp_remove_redundant_declare_simd_attrs): New functions. (attribute_value_equal): Use omp_declare_simd_clauses_equal. (walk_tree_1): Handle new OpenMP 4.0 clauses. * tree.h (OMP_LOOP_CHECK): Define. (OMP_FOR_BODY, OMP_FOR_CLAUSES, OMP_FOR_INIT, OMP_FOR_COND, OMP_FOR_INCR, OMP_FOR_PRE_BODY): Use it. (OMP_TASKGROUP_BODY, OMP_TEAMS_BODY, OMP_TEAMS_CLAUSES, OMP_TARGET_DATA_BODY, OMP_TARGET_DATA_CLAUSES, OMP_TARGET_BODY, OMP_TARGET_CLAUSES, OMP_TARGET_UPDATE_CLAUSES, OMP_CLAUSE_SIZE, OMP_ATOMIC_SEQ_CST, OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_MAP_KIND, OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION, OMP_CLAUSE_PROC_BIND_KIND, OMP_CLAUSE_REDUCTION_OMP_ORIG_REF, OMP_CLAUSE_ALIGNED_ALIGNMENT, OMP_CLAUSE_NUM_TEAMS_EXPR, OMP_CLAUSE_THREAD_LIMIT_EXPR, OMP_CLAUSE_DEVICE_ID, OMP_CLAUSE_DIST_SCHEDULE_CHUNK_EXPR, OMP_CLAUSE_SIMDLEN_EXPR): Define. (OMP_CLAUSE_DECL): Change range up to OMP_CLAUSE__LOOPTEMP_. (omp_remove_redundant_declare_simd_attrs): New prototype. * gimple.def (GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS): New codes. (GIMPLE_OMP_RETURN): Use GSS_OMP_ATOMIC_STORE instead of GSS_BASE. * omp-low.c (struct omp_context): Add cancel_label and cancellable fields. (target_nesting_level): New variable. (extract_omp_for_data): Handle GF_OMP_FOR_KIND_DISTRIBUTE and OMP_CLAUSE_DIST_SCHEDULE. Don't fallback to library implementation for collapse > 1 static schedule unless ordered. (get_ws_args_for): Add par_stmt argument. Handle combined loops. (determine_parallel_type): Adjust get_ws_args_for caller. (install_var_field): Handle mask & 4 for double indirection. (scan_sharing_clauses): Ignore shared clause on teams construct. Handle OMP_CLAUSE__LOOPTEMP_ and new OpenMP 4.0 clauses. (create_omp_child_function): If inside target or declare target constructs, set "omp declare target" attribute on the child function. (find_combined_for): New function. (scan_omp_parallel): Handle combined loops. (scan_omp_target, scan_omp_teams): New functions. (check_omp_nesting_restrictions): Check new OpenMP 4.0 nesting restrictions and set ctx->cancellable for cancellable constructs. (scan_omp_1_stmt): Call check_omp_nesting_restrictions also on selected builtin calls. Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS. (build_omp_barrier): Add lhs argument, return gimple rather than tree. (omp_clause_aligned_alignment): New function. (lower_rec_simd_input_clauses): Only call SET_DECL_VALUE_EXPR on decls. (lower_rec_input_clauses): Add FD argument. Ignore shared clauses on teams constructs. Handle user defined reductions and new OpenMP 4.0 clauses. (lower_reduction_clauses): Don't set placeholder to address of ref if it has already the right type. (lower_send_clauses): Handle OMP_CLAUSE__LOOPTEMP_. (expand_parallel_call): Use the new non-_start suffixed builtins, handle OMP_CLAUSE_PROC_BIND, don't call the outlined function and GOMP_parallel_end after the call. (expand_task_call): Handle OMP_CLAUSE_DEPEND. (expand_omp_for_init_counts): Handle combined loops. (expand_omp_for_init_vars): Add inner_stmt argument, handle combined loops. (expand_omp_for_generic): Likewise. Use GOMP_loop_end_cancel at the end of cancellable loops. (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Likewise. Handle collapse > 1 loops. (expand_omp_simd): Handle combined loops. (expand_omp_for): Add inner_stmt argument, adjust callers of expand_omp_for* functions, use expand_omp_for_static*chunk even for collapse > 1 unless ordered. (expand_omp_sections): Use GOMP_sections_end_cancel at the end of cancellable sections. (expand_omp_single): Remove need_barrier variable, just rely on gimple_omp_return_nowait_p. Adjust build_omp_barrier caller. (expand_omp_synch): Allow GIMPLE_OMP_TASKGROUP and GIMPLE_OMP_TEAMS. (expand_omp_atomic_load, expand_omp_atomic_store, expand_omp_atomic_fetch_op): Handle gimple_omp_atomic_seq_cst_p. (expand_omp_target): New function. (expand_omp): Handle combined loops. Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TEAMS, GIMPLE_OMP_TARGET. (build_omp_regions_1): Immediately close region for GF_OMP_TARGET_KIND_UPDATE. (maybe_add_implicit_barrier_cancel): New function. (lower_omp_sections): Adjust lower_rec_input_clauses caller. Handle cancellation. (lower_omp_single): Likewise. Add clobber after the barrier. (lower_omp_taskgroup): New function. (lower_omp_for): Handle combined loops. Adjust lower_rec_input_clauses caller. Handle cancellation. (lower_depend_clauses): New function. (lower_omp_taskreg): Lower depend clauses. Adjust lower_rec_input_clauses caller. Add clobber after the call. Handle cancellation. (lower_omp_target, lower_omp_teams): New functions. (lower_omp_1): Handle cancellation. Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GOMP_barrier, GOMP_cancel and GOMP_cancellation_point calls. (lower_omp): Fold stmts inside of target region. (diagnose_sb_1, diagnose_sb_2): Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS. * builtin-types.def (DEF_FUNCTION_TYPE_8): Document. (BT_FN_VOID_OMPFN_PTR_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove. (BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT, BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT, BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1, call_may_clobber_ref_p_1): Handle BUILT_IN_GOMP_BARRIER_CANCEL, BUILT_IN_GOMP_TASKGROUP_END, BUILT_IN_GOMP_LOOP_END_CANCEL, BUILT_IN_GOMP_SECTIONS_END_CANCEL. Don't handle BUILT_IN_GOMP_PARALLEL_END. * gimple-low.c (lower_stmt): Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS. * gimple-pretty-print.c (dump_gimple_omp_for): Handle GF_OMP_FOR_KIND_DISTRIBUTE. (dump_gimple_omp_target, dump_gimple_omp_teams): New functions. (dump_gimple_omp_block): Handle GIMPLE_OMP_TASKGROUP. (dump_gimple_omp_return): Print lhs if it has any. (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Handle gimple_omp_atomic_seq_cst_p. (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS. * langhooks.c (lhd_omp_mappable_type): New function. * tree-vectorizer.c (struct simd_array_to_simduid): Fix up comment. * langhooks.h (struct lang_hooks_for_types): Add omp_mappable_type hook. * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP, GOVD_ALIGNED and GOVD_MAP_TO_ONLY. (enum omp_region_type): Add ORT_TEAMS, ORT_TARGET_DATA and ORT_TARGET. (struct gimplify_omp_ctx): Add combined_loop field. (gimplify_call_expr, gimplify_modify_expr): Don't call fold_stmt on stmts inside of target region. (is_gimple_stmt): Return true for OMP_DISTRIBUTE and OMP_TASKGROUP. (omp_firstprivatize_variable): Handle GOVD_MAP, GOVD_ALIGNED, ORT_TARGET and ORT_TARGET_DATA. (omp_add_variable): Avoid checks on readding var for GOVD_ALIGNED. Handle GOVD_MAP. (omp_notice_threadprivate_variable): Complain about threadprivate variables in target region. (omp_notice_variable): Complain about vars with non-mappable type in target region. Handle ORT_TEAMS, ORT_TARGET and ORT_TARGET_DATA. (omp_check_private): Ignore ORT_TARGET* regions. (gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Handle new OpenMP 4.0 clauses. (find_combined_omp_for): New function. (gimplify_omp_for): Handle gimplification of combined loops. (gimplify_omp_workshare): Gimplify also OMP_TARGET, OMP_TARGET_DATA, OMP_TEAMS. (gimplify_omp_target_update): New function. (gimplify_omp_atomic): Handle OMP_ATOMIC_SEQ_CST. (gimplify_expr): Handle OMP_DISTRIBUTE, OMP_TARGET, OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TEAMS, OMP_TASKGROUP. (gimplify_body): If fndecl has "omp declare target" attribute, add implicit ORT_TARGET context around it. * tree.def (OMP_DISTRIBUTE, OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET, OMP_TASKGROUP, OMP_TARGET_UPDATE): New tree codes. * tree-nested.c (convert_nonlocal_reference_stmt, convert_local_reference_stmt, convert_gimple_call): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * omp-builtins.def (BUILT_IN_GOMP_TASK): Use BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR instead of BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT. (BUILT_IN_GOMP_TARGET, BUILT_IN_GOMP_TARGET_DATA, BUILT_IN_GOMP_TARGET_END_DATA, BUILT_IN_GOMP_TARGET_UPDATE, BUILT_IN_GOMP_TEAMS, BUILT_IN_BARRIER_CANCEL, BUILT_IN_GOMP_LOOP_END_CANCEL, BUILT_IN_GOMP_SECTIONS_END_CANCEL, BUILT_IN_OMP_GET_TEAM_NUM, BUILT_IN_OMP_GET_NUM_TEAMS, BUILT_IN_GOMP_TASKGROUP_START, BUILT_IN_GOMP_TASKGROUP_END, BUILT_IN_GOMP_PARALLEL_LOOP_STATIC, BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC, BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED, BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME, BUILT_IN_GOMP_PARALLEL, BUILT_IN_GOMP_PARALLEL_SECTIONS, BUILT_IN_GOMP_CANCEL, BUILT_IN_GOMP_CANCELLATION_POINT): New built-ins. (BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START, BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START, BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START, BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START, BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END, BUILT_IN_GOMP_PARALLEL_SECTIONS_START): Remove. * tree-inline.c (remap_gimple_stmt, estimate_num_insns): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * gimple.c (gimple_build_omp_taskgroup, gimple_build_omp_target, gimple_build_omp_teams): New functions. (walk_gimple_op): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. Walk optional lhs on GIMPLE_OMP_RETURN. (walk_gimple_stmt, gimple_copy): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * gimple.h (enum gf_mask): GF_OMP_FOR_KIND_DISTRIBUTE, GF_OMP_FOR_COMBINED, GF_OMP_FOR_COMBINED_INTO, GF_OMP_TARGET_KIND_MASK, GF_OMP_TARGET_KIND_REGION, GF_OMP_TARGET_KIND_DATA, GF_OMP_TARGET_KIND_UPDATE, GF_OMP_ATOMIC_SEQ_CST): New. (gimple_build_omp_taskgroup, gimple_build_omp_target, gimple_build_omp_teams): New prototypes. (gimple_has_substatements): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. (gimple_omp_subcode): Use GIMPLE_OMP_TEAMS instead of GIMPLE_OMP_SINGLE as end of range. (gimple_omp_return_set_lhs, gimple_omp_return_lhs, gimple_omp_return_lhs_ptr, gimple_omp_atomic_seq_cst_p, gimple_omp_atomic_set_seq_cst, gimple_omp_for_combined_p, gimple_omp_for_set_combined_p, gimple_omp_for_combined_into_p, gimple_omp_for_set_combined_into_p, gimple_omp_target_clauses, gimple_omp_target_clauses_ptr, gimple_omp_target_set_clauses, gimple_omp_target_kind, gimple_omp_target_set_kind, gimple_omp_target_child_fn, gimple_omp_target_child_fn_ptr, gimple_omp_target_set_child_fn, gimple_omp_target_data_arg, gimple_omp_target_data_arg_ptr, gimple_omp_target_set_data_arg, gimple_omp_teams_clauses, gimple_omp_teams_clauses_ptr, gimple_omp_teams_set_clauses): New inlines. (CASE_GIMPLE_OMP): Add GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * tree-core.h (enum omp_clause_code): Add new OpenMP 4.0 clause codes. (enum omp_clause_depend_kind, enum omp_clause_map_kind, enum omp_clause_proc_bind_kind): New. (union omp_clause_subcode): Add depend_kind, map_kind and proc_bind_kind fields. * tree-cfg.c (make_edges): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * langhooks-def.h (lhd_omp_mappable_type): New prototype. (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add it. gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to 201307 instead of 201107. * c-common.c (DEF_FUNCTION_TYPE_8): Define. (c_common_attribute_table): Add "omp declare target" and "omp declare simd" attributes. (handle_omp_declare_target_attribute, handle_omp_declare_simd_attribute): New functions. * c-omp.c: Include c-pragma.h. (c_finish_omp_taskgroup): New function. (c_finish_omp_atomic): Add swapped argument, if true, build the operation first with rhs, lhs arguments and use NOP_EXPR build_modify_expr. (c_finish_omp_for): Add code argument, pass it down to make_code. (c_omp_split_clauses): New function. (c_split_parallel_clauses): Removed. (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers, c_omp_declare_simd_clauses_to_decls): New functions. * c-common.h (omp_clause_mask): New type. (OMP_CLAUSE_MASK_1): Define. (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=, omp_clause_mask::operator |=, omp_clause_mask::operator ~, omp_clause_mask::operator |, omp_clause_mask::operator &, omp_clause_mask::operator <<, omp_clause_mask::operator >>, omp_clause_mask::operator ==): New methods. (enum c_omp_clause_split): New. (c_finish_omp_taskgroup): New prototype. (c_finish_omp_atomic): Add swapped argument. (c_finish_omp_for): Add code argument. (c_omp_split_clauses): New prototype. (c_split_parallel_clauses): Removed. (c_omp_declare_simd_clauses_to_numbers, c_omp_declare_simd_clauses_to_decls): New prototypes. * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs. * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL, PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION, PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD, PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS. Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS. (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED, PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE, PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR, PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH, PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP, PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS, PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND, PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS, PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP, PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and PRAGMA_OMP_CLAUSE_UNIFORM. gcc/ada/ * gcc-interface/utils.c (DEF_FUNCTION_TYPE_8): Define. gcc/fortran/ * trans-openmp.c (gfc_omp_clause_default_ctor, gfc_omp_clause_dtor): Return NULL for OMP_CLAUSE_REDUCTION. * f95-lang.c (ATTR_NULL, DEF_FUNCTION_TYPE_8): Define. * types.def (DEF_FUNCTION_TYPE_8): Document. (BT_FN_VOID_OMPFN_PTR_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove. (BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT, BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT, BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New. gcc/lto/ * lto-lang.c (DEF_FUNCTION_TYPE_8): Define. gcc/c/ * c-lang.h (current_omp_declare_target_attribute): New extern decl. * c-parser.c: Include c-lang.h. (struct c_parser): Change tokens to c_token *. Add tokens_buf field. Change tokens_avail type to unsigned int. (c_parser_consume_token): If parser->tokens isn't &parser->tokens_buf[0], increment parser->tokens. (c_parser_consume_pragma): Likewise. (enum pragma_context): Add pragma_struct and pragma_param. (c_parser_external_declaration): Adjust c_parser_declaration_or_fndef caller. (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses argument, if it is non-vNULL vector, call c_finish_omp_declare_simd. Adjust recursive call. (c_parser_struct_or_union_specifier): Use pragma_struct instead of pragma_external. (c_parser_parameter_declaration): Use pragma_param instead of pragma_external. (c_parser_compound_statement_nostart, c_parser_label, c_parser_for_statement): Adjust c_parser_declaration_or_fndef callers. (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass it through to c_parser_conditional_expression. (c_parser_conditional_expression): Add omp_atomic_lhs argument, pass it through to c_parser_binary_expression. Adjust recursive call. (c_parser_binary_expression): Remove prec argument, add omp_atomic_lhs argument instead. Always start from PREC_NONE, if omp_atomic_lhs is non-NULL and one of the arguments of toplevel binop matches it, use build2 instead of parser_build_binary_op. (c_parser_pragma): Handle PRAGMA_OMP_CANCEL, PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION. Handle pragma_struct and pragma_param the same as pragma_external. (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names. (c_parser_omp_variable_list): Parse array sections for OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. (c_parser_omp_clause_collapse): Fully fold collapse expression. (c_parser_omp_clause_reduction): Handle user defined reductions. (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind, c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned, c_parser_omp_clause_linear, c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen, c_parser_omp_clause_depend, c_parser_omp_clause_map, c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule, c_parser_omp_clause_proc_bind, c_parser_omp_clause_to, c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions. (c_parser_omp_all_clauses): Add finish_p argument. Don't call c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses. (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms. (c_parser_omp_for_loop): Add CODE argument, pass it through to c_finish_omp_for. Change last argument to cclauses, and adjust uses to grab parallel clauses from the array of all the split clauses. Adjust c_parser_binary_expression, c_parser_declaration_or_fndef and c_finish_omp_for callers. (omp_split_clauses): New function. (c_parser_omp_simd): New function. (c_parser_omp_for): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs, and call c_parser_omp_simd when parsing for simd. (c_parser_omp_sections_scope): If section-sequence doesn't start with #pragma omp section, require exactly one structured-block instead of sequence of statements. (c_parser_omp_sections): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs. (c_parser_omp_parallel): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs. (c_parser_omp_taskgroup, c_parser_omp_cancel, c_parser_omp_cancellation_point, c_parser_omp_distribute, c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target_update, c_parser_omp_target, c_parser_omp_declare_simd, c_finish_omp_declare_simd, c_parser_omp_declare_target, c_parser_omp_end_declare_target, c_parser_omp_declare_reduction, c_parser_omp_declare): New functions. (c_parser_omp_construct): Add p_name and mask vars. Handle PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP, PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel and c_parser_omp_sections callers. (c_parse_file): Initialize tparser.tokens and the_parser->tokens here. (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND. (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add OMP_CLAUSE_DEPEND. (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK, OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK, OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK, OMP_DECLARE_SIMD_CLAUSE_MASK): Define. * c-typeck.c: Include tree-inline.h. (c_finish_omp_cancel, c_finish_omp_cancellation_point, handle_omp_array_sections_1, handle_omp_array_sections, c_clone_omp_udr, c_find_omp_placeholder_r): New functions. (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined reductions. (c_tree_equal): New function. * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls, c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal, c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup, c_check_omp_declare_reduction_r): New prototypes. * c-decl.c (current_omp_declare_target_attribute): New variable. (c_decl_attributes): New function. (start_decl, start_function): Use it instead of decl_attributes. (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup, c_check_omp_declare_reduction_r): New functions. gcc/cp/ * decl.c (duplicate_decls): Error out for redeclaration of UDRs. (declare_simd_adjust_this): New function. (grokfndecl): If "omp declare simd" attribute is present, call declare_simd_adjust_this if needed and c_omp_declare_simd_clauses_to_numbers. * cp-array-notation.c (expand_array_notation_exprs): Handle OMP_TASKGROUP. * cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and OMP_DISTRIBUTE. Handle is_invisiref_parm decls in OMP_CLAUSE_REDUCTION. (cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like OMP_FOR. (cxx_omp_privatize_by_reference): Return true for is_invisiref_parm decls. (cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info caller. * pt.c (apply_late_template_attributes): For "omp declare simd" attribute call tsubst_omp_clauses, c_omp_declare_simd_clauses_to_decls, finish_omp_clauses and c_omp_declare_simd_clauses_to_numbers. (instantiate_class_template_1): Call cp_check_omp_declare_reduction for UDRs. (tsubst_decl): Handle UDRs. (tsubst_omp_clauses): Add declare_simd argument, if true don't call finish_omp_clauses. Handle new OpenMP 4.0 clauses. Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on OMP_CLAUSE_REDUCTION. (tsubst_expr): For UDRs call pushdecl and cp_check_omp_declare_reduction. Adjust tsubst_omp_clauses callers. Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP. Adjust finish_omp_atomic caller. (tsubst_omp_udr): New function. (instantiate_decl): For UDRs at block scope, don't call start_preparsed_function/finish_function. Call tsubst_omp_udr. * semantics.c (cxx_omp_create_clause_info): Add need_dtor argument, use it instead of need_default_ctor || need_copy_ctor. (struct cp_check_omp_declare_reduction_data): New type. (handle_omp_array_sections_1, handle_omp_array_sections, omp_reduction_id, omp_reduction_lookup, cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r, cp_check_omp_declare_reduction, clone_omp_udr, find_omp_placeholder_r, finish_omp_reduction_clause): New functions. (finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined reductions. (finish_omp_for): Add CODE argument, use it instead of hardcoded OMP_FOR. Adjust c_finish_omp_for caller. (finish_omp_atomic): Add seq_cst argument, adjust c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0 atomic variants. (finish_omp_cancel, finish_omp_cancellation_point): New functions. * decl2.c (mark_used): Force immediate instantiation of DECL_OMP_DECLARE_REDUCTION_P decls. (is_late_template_attribute): Return true for "omp declare simd" attribute. (cp_omp_mappable_type): New function. (cplus_decl_attributes): Add implicit "omp declare target" attribute if requested. * parser.c (cp_debug_parser): Print parser->colon_doesnt_start_class_def_p. (cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New functions. (enum pragma_context): Add pragma_member and pragma_objc_icode. (cp_parser_binary_expression): Handle no_toplevel_fold_p even for binary operations other than comparison. (cp_parser_linkage_specification): Call cp_ensure_no_omp_declare_simd if needed. (cp_parser_namespace_definition): Likewise. (cp_parser_init_declarator): Call cp_finalize_omp_declare_simd. (cp_parser_direct_declarator): Pass declarator to cp_parser_late_return_type_opt. (cp_parser_late_return_type_opt): Add declarator argument, call cp_parser_late_parsing_omp_declare_simd for declare simd. (cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd. Parse UDRs before all other methods. (cp_parser_member_specification_opt): Use pragma_member instead of pragma_external. (cp_parser_member_declaration): Call cp_finalize_omp_declare_simd. (cp_parser_function_definition_from_specifiers_and_declarator, cp_parser_save_member_function_body): Likewise. (cp_parser_late_parsing_for_member): Handle UDRs specially. (cp_parser_next_token_starts_class_definition_p): Don't allow CPP_COLON if colon_doesnt_start_class_def_p flag is true. (cp_parser_objc_interstitial_code): Use pragma_objc_icode instead of pragma_external. (cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names. (cp_parser_omp_var_list_no_open): Parse array sections for OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. Add COLON argument, if non-NULL, allow parsing to end with a colon rather than close paren. (cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open caller. (cp_parser_omp_clause_reduction): Handle user defined reductions. (cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind, cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit, cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear, cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen, cp_parser_omp_clause_depend, cp_parser_omp_clause_map, cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule, cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to, cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New functions. (cp_parser_omp_all_clauses): Add finish_p argument. Don't call finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses. (cp_parser_omp_atomic): Parse seq_cst clause, pass true if it is present to finish_omp_atomic. Handle new OpenMP 4.0 atomic forms. (cp_parser_omp_for_loop): Add CODE argument, pass it through to finish_omp_for. Change last argument to cclauses, and adjust uses to grab parallel clauses from the array of all the split clauses. (cp_omp_split_clauses): New function. (cp_parser_omp_simd): New function. (cp_parser_omp_for): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs, and call c_parser_omp_simd when parsing for simd. (cp_parser_omp_sections_scope): If section-sequence doesn't start with #pragma omp section, require exactly one structured-block instead of sequence of statements. (cp_parser_omp_sections): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs. (cp_parser_omp_parallel): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs. (cp_parser_omp_taskgroup, cp_parser_omp_cancel, cp_parser_omp_cancellation_point, cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target_data, cp_parser_omp_target_update, cp_parser_omp_target, cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd, cp_parser_omp_declare_target, cp_parser_omp_end_declare_target, cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction, cp_parser_omp_declare): New functions. (cp_parser_omp_construct): Add p_name and mask vars. Handle PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP, PRAGMA_OMP_TEAMS. Adjust cp_parser_omp_for, cp_parser_omp_parallel and cp_parser_omp_sections callers. (cp_parser_pragma): Handle PRAGMA_OMP_CANCEL, PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION, PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP, PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET. Handle pragma_member and pragma_objc_icode like pragma_external. (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND. (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add OMP_CLAUSE_DEPEND. (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK, OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK, OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK, OMP_DECLARE_SIMD_CLAUSE_MASK): Define. * parser.h (struct cp_omp_declare_simd_data): New type. (struct cp_parser): Add colon_doesnt_start_class_def_p and omp_declare_simd fields. * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define. * cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p bit. (DECL_OMP_DECLARE_REDUCTION_P): Define. (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro. (struct saved_scope): Add omp_declare_target_attribute field. (cp_omp_mappable_type, omp_reduction_id, cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction, finish_omp_cancel, finish_omp_cancellation_point): New prototypes. (finish_omp_for): Add CODE argument. (finish_omp_atomic): Add seq_cst argument. (cxx_omp_create_clause_info): Add need_dtor argument. gcc/testsuite/ * c-c++-common/gomp/atomic-15.c: Adjust for C diagnostics. Remove error test that is now valid in OpenMP 4.0. * c-c++-common/gomp/atomic-16.c: New test. * c-c++-common/gomp/cancel-1.c: New test. * c-c++-common/gomp/depend-1.c: New test. * c-c++-common/gomp/depend-2.c: New test. * c-c++-common/gomp/map-1.c: New test. * c-c++-common/gomp/pr58472.c: New test. * c-c++-common/gomp/sections1.c: New test. * c-c++-common/gomp/simd1.c: New test. * c-c++-common/gomp/simd2.c: New test. * c-c++-common/gomp/simd3.c: New test. * c-c++-common/gomp/simd4.c: New test. * c-c++-common/gomp/simd5.c: New test. * c-c++-common/gomp/single1.c: New test. * g++.dg/gomp/block-0.C: Adjust for stricter #pragma omp sections parser. * g++.dg/gomp/block-3.C: Likewise. * g++.dg/gomp/clause-3.C: Adjust error messages. * g++.dg/gomp/declare-simd-1.C: New test. * g++.dg/gomp/declare-simd-2.C: New test. * g++.dg/gomp/depend-1.C: New test. * g++.dg/gomp/depend-2.C: New test. * g++.dg/gomp/target-1.C: New test. * g++.dg/gomp/target-2.C: New test. * g++.dg/gomp/taskgroup-1.C: New test. * g++.dg/gomp/teams-1.C: New test. * g++.dg/gomp/udr-1.C: New test. * g++.dg/gomp/udr-2.C: New test. * g++.dg/gomp/udr-3.C: New test. * g++.dg/gomp/udr-4.C: New test. * g++.dg/gomp/udr-5.C: New test. * g++.dg/gomp/udr-6.C: New test. * gcc.dg/autopar/outer-1.c: Expect 4 instead of 5 loopfn matches. * gcc.dg/autopar/outer-2.c: Likewise. * gcc.dg/autopar/outer-3.c: Likewise. * gcc.dg/autopar/outer-4.c: Likewise. * gcc.dg/autopar/outer-5.c: Likewise. * gcc.dg/autopar/outer-6.c: Likewise. * gcc.dg/autopar/parallelization-1.c: Likewise. * gcc.dg/gomp/block-3.c: Adjust for stricter #pragma omp sections parser. * gcc.dg/gomp/clause-1.c: Adjust error messages. * gcc.dg/gomp/combined-1.c: Look for GOMP_parallel_loop_runtime instead of GOMP_parallel_loop_runtime_start. * gcc.dg/gomp/declare-simd-1.c: New test. * gcc.dg/gomp/declare-simd-2.c: New test. * gcc.dg/gomp/nesting-1.c: Adjust for stricter #pragma omp sections parser. Add further #pragma omp sections nesting tests. * gcc.dg/gomp/target-1.c: New test. * gcc.dg/gomp/target-2.c: New test. * gcc.dg/gomp/taskgroup-1.c: New test. * gcc.dg/gomp/teams-1.c: New test. * gcc.dg/gomp/udr-1.c: New test. * gcc.dg/gomp/udr-2.c: New test. * gcc.dg/gomp/udr-3.c: New test. * gcc.dg/gomp/udr-4.c: New test. * gfortran.dg/gomp/appendix-a/a.35.5.f90: Add dg-error. Co-Authored-By: Richard Henderson <rth@redhat.com> Co-Authored-By: Tobias Burnus <burnus@net-b.de> From-SVN: r203408
2013-10-11 11:26:50 +02:00
2013-10-11 Jakub Jelinek <jakub@redhat.com>
* c-common.h (omp_clause_mask::operator !=): New method.
* c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
instead of if (mask & something) tests everywhere.
target.c: New file. libgomp/ * target.c: New file. * Makefile.am (libgomp_la_SOURCES): Add target.c. * Makefile.in: Regenerated. * libgomp_g.h (GOMP_task): Add depend argument. (GOMP_barrier_cancel, GOMP_loop_end_cancel, GOMP_sections_end_cancel, GOMP_target, GOMP_target_data, GOMP_target_end_data, GOMP_target_update, GOMP_teams, GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic, GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime, GOMP_parallel, GOMP_cancel, GOMP_cancellation_point, GOMP_taskgroup_start, GOMP_taskgroup_end, GOMP_parallel_sections): New prototypes. * fortran.c (omp_is_initial_device): Add ialias_redirect. (omp_is_initial_device_): New function. (ULP, STR1, STR2, ialias_redirect): Removed. (omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_, omp_set_default_device_8_, omp_get_default_device_, omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New functions. * libgomp.map (GOMP_barrier_cancel, GOMP_loop_end_cancel, GOMP_sections_end_cancel, GOMP_target, GOMP_target_data, GOMP_target_end_data, GOMP_target_update, GOMP_teams): Export @@GOMP_4.0. (omp_is_initial_device, omp_is_initial_device_, omp_get_cancellation, omp_get_cancellation_, omp_get_proc_bind, omp_get_proc_bind_, omp_set_default_device, omp_set_default_device_, omp_set_default_device_8_, omp_get_default_device, omp_get_default_device_, omp_get_num_devices, omp_get_num_devices_, omp_get_num_teams, omp_get_num_teams_, omp_get_team_num, omp_get_team_num_): Export @@OMP_4.0. * team.c (struct gomp_thread_start_data): Add place field. (gomp_thread_start): Clear thr->thread_pool and thr->task before returning. Use gomp_team_barrier_wait_final instead of gomp_team_barrier_wait. Initialize thr->place. (gomp_new_team): Initialize work_shares_to_free, work_share_cancelled, team_cancelled and task_queued_count fields. (gomp_free_pool_helper): Clear thr->thread_pool and thr->task before calling pthread_exit. (gomp_free_thread): No longer static. Use gomp_managed_threads_lock instead of gomp_remaining_threads_lock. (gomp_team_start): Add flags argument. Set thr->thread_pool->threads_busy to nthreads immediately after creating new pool. Use gomp_managed_threads_lock instead of gomp_remaining_threads_lock. Handle OpenMP 4.0 affinity. (gomp_team_end): Use gomp_managed_threads_lock instead of gomp_remaining_threads_lock. Use gomp_team_barrier_wait_final instead of gomp_team_barrier_wait. If team->team_cancelled, call gomp_fini_worshare on ws chain starting at team->work_shares_to_free rather than thr->ts.work_share. (initialize_team): Don't call gomp_sem_init here. * sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start caller. (GOMP_parallel_sections, GOMP_sections_end_cancel): New functions. * env.c (gomp_global_icv): Add default_device_var, target_data and bind_var initializers. (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove. (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list, gomp_places_list_len): New variables. (parse_bind_var, parse_one_place, parse_places_var): New functions. (parse_affinity): Rewritten to construct OMP_PLACES list with unit sized places. (gomp_cancel_var): New global variable. (parse_int): New function. (handle_omp_display_env): New function. (initialize_env): Use it. Initialize default_device_var. Parse OMP_CANCELLATION env var. Use parse_bind_var to parse OMP_PROC_BIND instead of parse_boolean. Use parse_places_var for OMP_PLACES parsing. Don't call parse_affinity if OMP_PLACES has been successfully parsed (and call gomp_init_affinity in that case). (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device, omp_get_default_device, omp_get_num_devices, omp_get_num_teams, omp_get_team_num, omp_is_initial_device): New functions. * libgomp.h: Include stdlib.h. (ialias_ulp, ialias_str1, ialias_str2, ialias_redirect, ialias_call): Define. (struct target_mem_desc): Forward declare. (struct gomp_task_icv): Add default_device_var, target_data, bind_var and thread_limit_var fields. (gomp_get_num_devices): New prototype. (gomp_cancel_var): New extern decl. (struct gomp_team): Add work_shares_to_free, work_share_cancelled, team_cancelled and task_queued_count fields. Add comments about task_{,queued_,running_}count. (gomp_cancel_kind): New enum. (gomp_work_share_end_cancel): New prototype. (struct gomp_task): Add next_taskgroup, prev_taskgroup, taskgroup, copy_ctors_done, dependers, depend_hash, depend_count, num_dependees and depend fields. (struct gomp_taskgroup): New type. (struct gomp_task_depend_entry, struct gomp_dependers_vec): New types. (gomp_finish_task): Free depend_hash if non-NULL. (struct gomp_team_state): Add place_partition_off and place_partition_len fields. (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list, gomp_places_list_len): New extern decls. (struct gomp_thread): Add place field. (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove. (gomp_init_thread_affinity): Add place argument. (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus, gomp_affinity_remove_cpu, gomp_affinity_copy_place, gomp_affinity_same_place, gomp_affinity_finalize_place_list, gomp_affinity_init_level, gomp_affinity_print_place): New prototypes. (gomp_team_start): Add flags argument. (gomp_thread_limit_var, gomp_remaining_threads_count, gomp_remaining_threads_lock): Remove. (gomp_managed_threads_lock): New variable. (struct gomp_thread_pool): Add threads_busy field. (gomp_free_thread): New prototype. * task.c: Include hashtab.h. (hash_entry_type): New typedef. (htab_alloc, htab_free, htab_hash, htab_eq): New inlines. (gomp_init_task): Clear dependers, depend_hash, depend_count, copy_ctors_done and taskgroup fields. (GOMP_task): Add depend argument, handle depend clauses. If gomp_team_barrier_cancelled or if it's taskgroup has been cancelled, don't queue or start new tasks. Set copy_ctors_done field if needed. Initialize taskgroup field. If copy_ctors_done and already cancelled, don't discard the task. If taskgroup is non-NULL, enqueue the task into taskgroup queue. Increment num_children field in taskgroup. Increment task_queued_count. (gomp_task_run_pre, gomp_task_run_post_remove_parent, gomp_task_run_post_remove_taskgroup): New inline functions. (gomp_task_run_post_handle_depend_hash, gomp_task_run_post_handle_dependers, gomp_task_run_post_handle_depend): New functions. (GOMP_taskwait): Use them. If more than one new tasks have been queued, wake other threads if needed. (gomp_barrier_handle_tasks): Likewise. If gomp_team_barrier_cancelled, don't start any new tasks, just free all tasks. (GOMP_taskgroup_start, GOMP_taskgroup_end): New functions. * omp_lib.f90.in (omp_proc_bind_kind, omp_proc_bind_false, omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close, omp_proc_bind_spread): New params. (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device, omp_get_default_device, omp_get_num_devices, omp_get_num_teams, omp_get_team_num, omp_is_initial_device): New interfaces. (omp_get_dynamic, omp_get_nested, omp_in_parallel, omp_get_max_threads, omp_get_num_procs, omp_get_num_threads, omp_get_thread_num, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level, omp_in_final): Remove useless use omp_lib_kinds. * omp.h.in (omp_proc_bind_t): New typedef. (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device, omp_get_default_device, omp_get_num_devices, omp_get_num_teams, omp_get_team_num, omp_is_initial_device): New prototypes. * loop.c (gomp_parallel_loop_start): Add flags argument, pass it through to gomp_team_start. (GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start, GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start): Adjust gomp_parallel_loop_start callers. (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic, GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime, GOMP_loop_end_cancel): New functions. (GOMP_parallel_end): Add ialias_redirect. * hashtab.h: New file. * libgomp.texi (Environment Variables): Minor cleanup, update section refs to OpenMP 4.0rc2. (OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these environment variables. * work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set team->work_shares_to_free to thr->ts.work_share before calling free_work_share. (gomp_work_share_end_cancel): New function. * config/linux/proc.c: Include errno.h. (gomp_get_cpuset_size, gomp_cpuset_size, gomp_cpusetp): New variables. (gomp_cpuset_popcount): Add cpusetsize argument, use it instead of sizeof (cpu_set_t) to determine number of iterations. Fix up check extern decl. Use CPU_COUNT_S if available, or CPU_COUNT if gomp_cpuset_size is sizeof (cpu_set_t). (gomp_init_num_threads): Initialize gomp_cpuset_size, gomp_get_cpuset_size and gomp_cpusetp here, use gomp_cpusetp instead of &cpuset and pass gomp_cpuset_size instead of sizeof (cpu_set_t) to pthread_getaffinity_np. Free and clear gomp_cpusetp if it didn't contain any logical CPUs. (get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp is NULL. Use gomp_cpusetp instead of &cpuset and pass gomp_get_cpuset_size instead of sizeof (cpu_set_t) to pthread_getaffinity_np. Check gomp_places_list instead of gomp_cpu_affinity. Adjust gomp_cpuset_popcount caller. * config/linux/bar.c (gomp_barrier_wait_end, gomp_barrier_wait_last): Use BAR_* defines. (gomp_team_barrier_wait_end): Likewise. Clear BAR_CANCELLED from state where needed. Set work_share_cancelled to 0 on last thread. (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New functions. * config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden. Add cpusetsize argument. (gomp_cpuset_size, gomp_cpusetp): Declare. * config/linux/affinity.c: Include errno.h, stdio.h and string.h. (affinity_counter): Remove. (CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S, CPU_CLR_S): Define if CPU_ALLOC_SIZE isn't defined. (gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try silently create OMP_PLACES=threads, if it is non-NULL afterwards, bind current thread to the first place. (gomp_init_thread_affinity): Rewritten. Add place argument, just pthread_setaffinity_np to gomp_places_list[place]. (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus, gomp_affinity_remove_cpu, gomp_affinity_copy_place, gomp_affinity_same_place, gomp_affinity_finalize_place_list, gomp_affinity_init_level, gomp_affinity_print_place): New functions. * config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST, BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define. (gomp_barrier_t): Add awaited_final field. (gomp_barrier_init): Initialize awaited_final field. (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New prototypes. (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit. Use BAR_* defines. (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start, gomp_team_barrier_cancelled): New inline functions. (gomp_barrier_last_thread, gomp_team_barrier_set_task_pending, gomp_team_barrier_clear_task_pending, gomp_team_barrier_set_waiting_for_tasks, gomp_team_barrier_waiting_for_tasks, gomp_team_barrier_done): Use BAR_* defines. * config/posix/bar.c (gomp_barrier_init): Clear cancellable field. (gomp_barrier_wait_end): Use BAR_* defines. (gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state. Set work_share_cancelled to 0 on last thread, use __atomic_load_n. Use BAR_* defines. (gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New functions. * config/posix/affinity.c (gomp_init_thread_affinity): Add place argument. (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus, gomp_affinity_remove_cpu, gomp_affinity_copy_place, gomp_affinity_same_place, gomp_affinity_finalize_place_list, gomp_affinity_init_level, gomp_affinity_print_place): New stubs. * config/posix/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST, BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define. (gomp_barrier_t): Add cancellable field. (gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New prototypes. (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit. (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final, gomp_team_barrier_cancelled): New inline functions. (gomp_barrier_wait_start, gomp_barrier_last_thread, gomp_team_barrier_set_task_pending, gomp_team_barrier_clear_task_pending, gomp_team_barrier_set_waiting_for_tasks, gomp_team_barrier_waiting_for_tasks, gomp_team_barrier_done): Use BAR_* defines. * barrier.c (GOMP_barrier_cancel): New function. * omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false, omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close, omp_proc_bind_spread): New params. (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device, omp_get_default_device, omp_get_num_devices, omp_get_num_teams, omp_get_team_num, omp_is_initial_device): New externals. * parallel.c (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point): New functions. (gomp_resolve_num_threads): Adjust for thread_limit now being in icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as infinity. If not nested, just return minimum of max_num_threads and icv->thread_limit_var and if thr->thread_pool, set threads_busy to the returned value. Otherwise, don't update atomically gomp_remaining_threads_count, but instead thr->thread_pool->threads_busy. (GOMP_parallel_end): Adjust for thread_limit now being in icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as infinity. Adjust threads_busy in the pool rather than gomp_remaining_threads_count. Remember team->nthreads and call gomp_team_end before adjusting threads_busy, if not nested afterwards, just set it to 1 non-atomically. Add ialias. (GOMP_parallel_start): Adjust gomp_team_start caller. * testsuite/libgomp.c/atomic-14.c: Add parens to make it valid. * testsuite/libgomp.c/affinity-1.c: New test. * testsuite/libgomp.c/atomic-15.c: New test. * testsuite/libgomp.c/atomic-16.c: New test. * testsuite/libgomp.c/atomic-17.c: New test. * testsuite/libgomp.c/cancel-for-1.c: New test. * testsuite/libgomp.c/cancel-for-2.c: New test. * testsuite/libgomp.c/cancel-parallel-1.c: New test. * testsuite/libgomp.c/cancel-parallel-2.c: New test. * testsuite/libgomp.c/cancel-parallel-3.c: New test. * testsuite/libgomp.c/cancel-sections-1.c: New test. * testsuite/libgomp.c/cancel-taskgroup-1.c: New test. * testsuite/libgomp.c/cancel-taskgroup-2.c: New test. * testsuite/libgomp.c/depend-1.c: New test. * testsuite/libgomp.c/depend-2.c: New test. * testsuite/libgomp.c/depend-3.c: New test. * testsuite/libgomp.c/depend-4.c: New test. * testsuite/libgomp.c/for-1.c: New test. * testsuite/libgomp.c/for-1.h: New file. * testsuite/libgomp.c/for-2.c: New test. * testsuite/libgomp.c/for-2.h: New file. * testsuite/libgomp.c/for-3.c: New test. * testsuite/libgomp.c/pr58392.c: New test. * testsuite/libgomp.c/simd-1.c: New test. * testsuite/libgomp.c/simd-2.c: New test. * testsuite/libgomp.c/simd-3.c: New test. * testsuite/libgomp.c/simd-4.c: New test. * testsuite/libgomp.c/simd-5.c: New test. * testsuite/libgomp.c/simd-6.c: New test. * testsuite/libgomp.c/target-1.c: New test. * testsuite/libgomp.c/target-2.c: New test. * testsuite/libgomp.c/target-3.c: New test. * testsuite/libgomp.c/target-4.c: New test. * testsuite/libgomp.c/target-5.c: New test. * testsuite/libgomp.c/target-6.c: New test. * testsuite/libgomp.c/target-7.c: New test. * testsuite/libgomp.c/taskgroup-1.c: New test. * testsuite/libgomp.c/thread-limit-1.c: New test. * testsuite/libgomp.c/thread-limit-2.c: New test. * testsuite/libgomp.c/thread-limit-3.c: New test. * testsuite/libgomp.c/udr-1.c: New test. * testsuite/libgomp.c/udr-2.c: New test. * testsuite/libgomp.c/udr-3.c: New test. * testsuite/libgomp.c++/affinity-1.C: New test. * testsuite/libgomp.c++/atomic-10.C: New test. * testsuite/libgomp.c++/atomic-11.C: New test. * testsuite/libgomp.c++/atomic-12.C: New test. * testsuite/libgomp.c++/atomic-13.C: New test. * testsuite/libgomp.c++/atomic-14.C: New test. * testsuite/libgomp.c++/atomic-15.C: New test. * testsuite/libgomp.c++/cancel-for-1.C: New test. * testsuite/libgomp.c++/cancel-for-2.C: New test. * testsuite/libgomp.c++/cancel-parallel-1.C: New test. * testsuite/libgomp.c++/cancel-parallel-2.C: New test. * testsuite/libgomp.c++/cancel-parallel-3.C: New test. * testsuite/libgomp.c++/cancel-sections-1.C: New test. * testsuite/libgomp.c++/cancel-taskgroup-1.C: New test. * testsuite/libgomp.c++/cancel-taskgroup-2.C: New test. * testsuite/libgomp.c++/cancel-taskgroup-3.C: New test. * testsuite/libgomp.c++/cancel-test.h: New file. * testsuite/libgomp.c++/for-9.C: New test. * testsuite/libgomp.c++/for-10.C: New test. * testsuite/libgomp.c++/for-11.C: New test. * testsuite/libgomp.c++/simd-1.C: New test. * testsuite/libgomp.c++/simd-2.C: New test. * testsuite/libgomp.c++/simd-3.C: New test. * testsuite/libgomp.c++/simd-4.C: New test. * testsuite/libgomp.c++/simd-5.C: New test. * testsuite/libgomp.c++/simd-6.C: New test. * testsuite/libgomp.c++/simd-7.C: New test. * testsuite/libgomp.c++/simd-8.C: New test. * testsuite/libgomp.c++/target-1.C: New test. * testsuite/libgomp.c++/target-2.C: New test. * testsuite/libgomp.c++/target-2-aux.cc: New file. * testsuite/libgomp.c++/target-3.C: New test. * testsuite/libgomp.c++/taskgroup-1.C: New test. * testsuite/libgomp.c++/udr-1.C: New test. * testsuite/libgomp.c++/udr-2.C: New test. * testsuite/libgomp.c++/udr-3.C: New test. * testsuite/libgomp.c++/udr-4.C: New test. * testsuite/libgomp.c++/udr-5.C: New test. * testsuite/libgomp.c++/udr-6.C: New test. * testsuite/libgomp.c++/udr-7.C: New test. * testsuite/libgomp.c++/udr-8.C: New test. * testsuite/libgomp.c++/udr-9.C: New test. gcc/ * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__LOOPTEMP_ and new OpenMP 4.0 clauses, handle UDR OMP_CLAUSE_REDUCTION, formatting fixes, use pp_colon instead of pp_character (..., ':'), similarly pp_right_paren. (dump_generic_node): Handle OMP_DISTRIBUTE, OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET, OMP_TARGET_UPDATE, OMP_TASKGROUP, allow OMP_FOR_INIT to be NULL, handle OMP_ATOMIC_SEQ_CST. * tree.c (omp_clause_num_ops, omp_clause_code_name): Add OpenMP 4.0 clauses. (omp_declare_simd_clauses_equal, omp_remove_redundant_declare_simd_attrs): New functions. (attribute_value_equal): Use omp_declare_simd_clauses_equal. (walk_tree_1): Handle new OpenMP 4.0 clauses. * tree.h (OMP_LOOP_CHECK): Define. (OMP_FOR_BODY, OMP_FOR_CLAUSES, OMP_FOR_INIT, OMP_FOR_COND, OMP_FOR_INCR, OMP_FOR_PRE_BODY): Use it. (OMP_TASKGROUP_BODY, OMP_TEAMS_BODY, OMP_TEAMS_CLAUSES, OMP_TARGET_DATA_BODY, OMP_TARGET_DATA_CLAUSES, OMP_TARGET_BODY, OMP_TARGET_CLAUSES, OMP_TARGET_UPDATE_CLAUSES, OMP_CLAUSE_SIZE, OMP_ATOMIC_SEQ_CST, OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_MAP_KIND, OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION, OMP_CLAUSE_PROC_BIND_KIND, OMP_CLAUSE_REDUCTION_OMP_ORIG_REF, OMP_CLAUSE_ALIGNED_ALIGNMENT, OMP_CLAUSE_NUM_TEAMS_EXPR, OMP_CLAUSE_THREAD_LIMIT_EXPR, OMP_CLAUSE_DEVICE_ID, OMP_CLAUSE_DIST_SCHEDULE_CHUNK_EXPR, OMP_CLAUSE_SIMDLEN_EXPR): Define. (OMP_CLAUSE_DECL): Change range up to OMP_CLAUSE__LOOPTEMP_. (omp_remove_redundant_declare_simd_attrs): New prototype. * gimple.def (GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS): New codes. (GIMPLE_OMP_RETURN): Use GSS_OMP_ATOMIC_STORE instead of GSS_BASE. * omp-low.c (struct omp_context): Add cancel_label and cancellable fields. (target_nesting_level): New variable. (extract_omp_for_data): Handle GF_OMP_FOR_KIND_DISTRIBUTE and OMP_CLAUSE_DIST_SCHEDULE. Don't fallback to library implementation for collapse > 1 static schedule unless ordered. (get_ws_args_for): Add par_stmt argument. Handle combined loops. (determine_parallel_type): Adjust get_ws_args_for caller. (install_var_field): Handle mask & 4 for double indirection. (scan_sharing_clauses): Ignore shared clause on teams construct. Handle OMP_CLAUSE__LOOPTEMP_ and new OpenMP 4.0 clauses. (create_omp_child_function): If inside target or declare target constructs, set "omp declare target" attribute on the child function. (find_combined_for): New function. (scan_omp_parallel): Handle combined loops. (scan_omp_target, scan_omp_teams): New functions. (check_omp_nesting_restrictions): Check new OpenMP 4.0 nesting restrictions and set ctx->cancellable for cancellable constructs. (scan_omp_1_stmt): Call check_omp_nesting_restrictions also on selected builtin calls. Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS. (build_omp_barrier): Add lhs argument, return gimple rather than tree. (omp_clause_aligned_alignment): New function. (lower_rec_simd_input_clauses): Only call SET_DECL_VALUE_EXPR on decls. (lower_rec_input_clauses): Add FD argument. Ignore shared clauses on teams constructs. Handle user defined reductions and new OpenMP 4.0 clauses. (lower_reduction_clauses): Don't set placeholder to address of ref if it has already the right type. (lower_send_clauses): Handle OMP_CLAUSE__LOOPTEMP_. (expand_parallel_call): Use the new non-_start suffixed builtins, handle OMP_CLAUSE_PROC_BIND, don't call the outlined function and GOMP_parallel_end after the call. (expand_task_call): Handle OMP_CLAUSE_DEPEND. (expand_omp_for_init_counts): Handle combined loops. (expand_omp_for_init_vars): Add inner_stmt argument, handle combined loops. (expand_omp_for_generic): Likewise. Use GOMP_loop_end_cancel at the end of cancellable loops. (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Likewise. Handle collapse > 1 loops. (expand_omp_simd): Handle combined loops. (expand_omp_for): Add inner_stmt argument, adjust callers of expand_omp_for* functions, use expand_omp_for_static*chunk even for collapse > 1 unless ordered. (expand_omp_sections): Use GOMP_sections_end_cancel at the end of cancellable sections. (expand_omp_single): Remove need_barrier variable, just rely on gimple_omp_return_nowait_p. Adjust build_omp_barrier caller. (expand_omp_synch): Allow GIMPLE_OMP_TASKGROUP and GIMPLE_OMP_TEAMS. (expand_omp_atomic_load, expand_omp_atomic_store, expand_omp_atomic_fetch_op): Handle gimple_omp_atomic_seq_cst_p. (expand_omp_target): New function. (expand_omp): Handle combined loops. Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TEAMS, GIMPLE_OMP_TARGET. (build_omp_regions_1): Immediately close region for GF_OMP_TARGET_KIND_UPDATE. (maybe_add_implicit_barrier_cancel): New function. (lower_omp_sections): Adjust lower_rec_input_clauses caller. Handle cancellation. (lower_omp_single): Likewise. Add clobber after the barrier. (lower_omp_taskgroup): New function. (lower_omp_for): Handle combined loops. Adjust lower_rec_input_clauses caller. Handle cancellation. (lower_depend_clauses): New function. (lower_omp_taskreg): Lower depend clauses. Adjust lower_rec_input_clauses caller. Add clobber after the call. Handle cancellation. (lower_omp_target, lower_omp_teams): New functions. (lower_omp_1): Handle cancellation. Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GOMP_barrier, GOMP_cancel and GOMP_cancellation_point calls. (lower_omp): Fold stmts inside of target region. (diagnose_sb_1, diagnose_sb_2): Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS. * builtin-types.def (DEF_FUNCTION_TYPE_8): Document. (BT_FN_VOID_OMPFN_PTR_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove. (BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT, BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT, BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1, call_may_clobber_ref_p_1): Handle BUILT_IN_GOMP_BARRIER_CANCEL, BUILT_IN_GOMP_TASKGROUP_END, BUILT_IN_GOMP_LOOP_END_CANCEL, BUILT_IN_GOMP_SECTIONS_END_CANCEL. Don't handle BUILT_IN_GOMP_PARALLEL_END. * gimple-low.c (lower_stmt): Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS. * gimple-pretty-print.c (dump_gimple_omp_for): Handle GF_OMP_FOR_KIND_DISTRIBUTE. (dump_gimple_omp_target, dump_gimple_omp_teams): New functions. (dump_gimple_omp_block): Handle GIMPLE_OMP_TASKGROUP. (dump_gimple_omp_return): Print lhs if it has any. (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Handle gimple_omp_atomic_seq_cst_p. (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP, GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS. * langhooks.c (lhd_omp_mappable_type): New function. * tree-vectorizer.c (struct simd_array_to_simduid): Fix up comment. * langhooks.h (struct lang_hooks_for_types): Add omp_mappable_type hook. * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP, GOVD_ALIGNED and GOVD_MAP_TO_ONLY. (enum omp_region_type): Add ORT_TEAMS, ORT_TARGET_DATA and ORT_TARGET. (struct gimplify_omp_ctx): Add combined_loop field. (gimplify_call_expr, gimplify_modify_expr): Don't call fold_stmt on stmts inside of target region. (is_gimple_stmt): Return true for OMP_DISTRIBUTE and OMP_TASKGROUP. (omp_firstprivatize_variable): Handle GOVD_MAP, GOVD_ALIGNED, ORT_TARGET and ORT_TARGET_DATA. (omp_add_variable): Avoid checks on readding var for GOVD_ALIGNED. Handle GOVD_MAP. (omp_notice_threadprivate_variable): Complain about threadprivate variables in target region. (omp_notice_variable): Complain about vars with non-mappable type in target region. Handle ORT_TEAMS, ORT_TARGET and ORT_TARGET_DATA. (omp_check_private): Ignore ORT_TARGET* regions. (gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Handle new OpenMP 4.0 clauses. (find_combined_omp_for): New function. (gimplify_omp_for): Handle gimplification of combined loops. (gimplify_omp_workshare): Gimplify also OMP_TARGET, OMP_TARGET_DATA, OMP_TEAMS. (gimplify_omp_target_update): New function. (gimplify_omp_atomic): Handle OMP_ATOMIC_SEQ_CST. (gimplify_expr): Handle OMP_DISTRIBUTE, OMP_TARGET, OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TEAMS, OMP_TASKGROUP. (gimplify_body): If fndecl has "omp declare target" attribute, add implicit ORT_TARGET context around it. * tree.def (OMP_DISTRIBUTE, OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET, OMP_TASKGROUP, OMP_TARGET_UPDATE): New tree codes. * tree-nested.c (convert_nonlocal_reference_stmt, convert_local_reference_stmt, convert_gimple_call): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * omp-builtins.def (BUILT_IN_GOMP_TASK): Use BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR instead of BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT. (BUILT_IN_GOMP_TARGET, BUILT_IN_GOMP_TARGET_DATA, BUILT_IN_GOMP_TARGET_END_DATA, BUILT_IN_GOMP_TARGET_UPDATE, BUILT_IN_GOMP_TEAMS, BUILT_IN_BARRIER_CANCEL, BUILT_IN_GOMP_LOOP_END_CANCEL, BUILT_IN_GOMP_SECTIONS_END_CANCEL, BUILT_IN_OMP_GET_TEAM_NUM, BUILT_IN_OMP_GET_NUM_TEAMS, BUILT_IN_GOMP_TASKGROUP_START, BUILT_IN_GOMP_TASKGROUP_END, BUILT_IN_GOMP_PARALLEL_LOOP_STATIC, BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC, BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED, BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME, BUILT_IN_GOMP_PARALLEL, BUILT_IN_GOMP_PARALLEL_SECTIONS, BUILT_IN_GOMP_CANCEL, BUILT_IN_GOMP_CANCELLATION_POINT): New built-ins. (BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START, BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START, BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START, BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START, BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END, BUILT_IN_GOMP_PARALLEL_SECTIONS_START): Remove. * tree-inline.c (remap_gimple_stmt, estimate_num_insns): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * gimple.c (gimple_build_omp_taskgroup, gimple_build_omp_target, gimple_build_omp_teams): New functions. (walk_gimple_op): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. Walk optional lhs on GIMPLE_OMP_RETURN. (walk_gimple_stmt, gimple_copy): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * gimple.h (enum gf_mask): GF_OMP_FOR_KIND_DISTRIBUTE, GF_OMP_FOR_COMBINED, GF_OMP_FOR_COMBINED_INTO, GF_OMP_TARGET_KIND_MASK, GF_OMP_TARGET_KIND_REGION, GF_OMP_TARGET_KIND_DATA, GF_OMP_TARGET_KIND_UPDATE, GF_OMP_ATOMIC_SEQ_CST): New. (gimple_build_omp_taskgroup, gimple_build_omp_target, gimple_build_omp_teams): New prototypes. (gimple_has_substatements): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. (gimple_omp_subcode): Use GIMPLE_OMP_TEAMS instead of GIMPLE_OMP_SINGLE as end of range. (gimple_omp_return_set_lhs, gimple_omp_return_lhs, gimple_omp_return_lhs_ptr, gimple_omp_atomic_seq_cst_p, gimple_omp_atomic_set_seq_cst, gimple_omp_for_combined_p, gimple_omp_for_set_combined_p, gimple_omp_for_combined_into_p, gimple_omp_for_set_combined_into_p, gimple_omp_target_clauses, gimple_omp_target_clauses_ptr, gimple_omp_target_set_clauses, gimple_omp_target_kind, gimple_omp_target_set_kind, gimple_omp_target_child_fn, gimple_omp_target_child_fn_ptr, gimple_omp_target_set_child_fn, gimple_omp_target_data_arg, gimple_omp_target_data_arg_ptr, gimple_omp_target_set_data_arg, gimple_omp_teams_clauses, gimple_omp_teams_clauses_ptr, gimple_omp_teams_set_clauses): New inlines. (CASE_GIMPLE_OMP): Add GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * tree-core.h (enum omp_clause_code): Add new OpenMP 4.0 clause codes. (enum omp_clause_depend_kind, enum omp_clause_map_kind, enum omp_clause_proc_bind_kind): New. (union omp_clause_subcode): Add depend_kind, map_kind and proc_bind_kind fields. * tree-cfg.c (make_edges): Handle GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS and GIMPLE_OMP_TASKGROUP. * langhooks-def.h (lhd_omp_mappable_type): New prototype. (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add it. gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to 201307 instead of 201107. * c-common.c (DEF_FUNCTION_TYPE_8): Define. (c_common_attribute_table): Add "omp declare target" and "omp declare simd" attributes. (handle_omp_declare_target_attribute, handle_omp_declare_simd_attribute): New functions. * c-omp.c: Include c-pragma.h. (c_finish_omp_taskgroup): New function. (c_finish_omp_atomic): Add swapped argument, if true, build the operation first with rhs, lhs arguments and use NOP_EXPR build_modify_expr. (c_finish_omp_for): Add code argument, pass it down to make_code. (c_omp_split_clauses): New function. (c_split_parallel_clauses): Removed. (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers, c_omp_declare_simd_clauses_to_decls): New functions. * c-common.h (omp_clause_mask): New type. (OMP_CLAUSE_MASK_1): Define. (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=, omp_clause_mask::operator |=, omp_clause_mask::operator ~, omp_clause_mask::operator |, omp_clause_mask::operator &, omp_clause_mask::operator <<, omp_clause_mask::operator >>, omp_clause_mask::operator ==): New methods. (enum c_omp_clause_split): New. (c_finish_omp_taskgroup): New prototype. (c_finish_omp_atomic): Add swapped argument. (c_finish_omp_for): Add code argument. (c_omp_split_clauses): New prototype. (c_split_parallel_clauses): Removed. (c_omp_declare_simd_clauses_to_numbers, c_omp_declare_simd_clauses_to_decls): New prototypes. * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs. * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL, PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION, PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD, PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS. Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS. (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED, PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE, PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR, PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH, PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP, PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS, PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND, PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS, PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP, PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and PRAGMA_OMP_CLAUSE_UNIFORM. gcc/ada/ * gcc-interface/utils.c (DEF_FUNCTION_TYPE_8): Define. gcc/fortran/ * trans-openmp.c (gfc_omp_clause_default_ctor, gfc_omp_clause_dtor): Return NULL for OMP_CLAUSE_REDUCTION. * f95-lang.c (ATTR_NULL, DEF_FUNCTION_TYPE_8): Define. * types.def (DEF_FUNCTION_TYPE_8): Document. (BT_FN_VOID_OMPFN_PTR_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove. (BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT, BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT, BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR, BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New. gcc/lto/ * lto-lang.c (DEF_FUNCTION_TYPE_8): Define. gcc/c/ * c-lang.h (current_omp_declare_target_attribute): New extern decl. * c-parser.c: Include c-lang.h. (struct c_parser): Change tokens to c_token *. Add tokens_buf field. Change tokens_avail type to unsigned int. (c_parser_consume_token): If parser->tokens isn't &parser->tokens_buf[0], increment parser->tokens. (c_parser_consume_pragma): Likewise. (enum pragma_context): Add pragma_struct and pragma_param. (c_parser_external_declaration): Adjust c_parser_declaration_or_fndef caller. (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses argument, if it is non-vNULL vector, call c_finish_omp_declare_simd. Adjust recursive call. (c_parser_struct_or_union_specifier): Use pragma_struct instead of pragma_external. (c_parser_parameter_declaration): Use pragma_param instead of pragma_external. (c_parser_compound_statement_nostart, c_parser_label, c_parser_for_statement): Adjust c_parser_declaration_or_fndef callers. (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass it through to c_parser_conditional_expression. (c_parser_conditional_expression): Add omp_atomic_lhs argument, pass it through to c_parser_binary_expression. Adjust recursive call. (c_parser_binary_expression): Remove prec argument, add omp_atomic_lhs argument instead. Always start from PREC_NONE, if omp_atomic_lhs is non-NULL and one of the arguments of toplevel binop matches it, use build2 instead of parser_build_binary_op. (c_parser_pragma): Handle PRAGMA_OMP_CANCEL, PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION. Handle pragma_struct and pragma_param the same as pragma_external. (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names. (c_parser_omp_variable_list): Parse array sections for OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. (c_parser_omp_clause_collapse): Fully fold collapse expression. (c_parser_omp_clause_reduction): Handle user defined reductions. (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind, c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned, c_parser_omp_clause_linear, c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen, c_parser_omp_clause_depend, c_parser_omp_clause_map, c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule, c_parser_omp_clause_proc_bind, c_parser_omp_clause_to, c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions. (c_parser_omp_all_clauses): Add finish_p argument. Don't call c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses. (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms. (c_parser_omp_for_loop): Add CODE argument, pass it through to c_finish_omp_for. Change last argument to cclauses, and adjust uses to grab parallel clauses from the array of all the split clauses. Adjust c_parser_binary_expression, c_parser_declaration_or_fndef and c_finish_omp_for callers. (omp_split_clauses): New function. (c_parser_omp_simd): New function. (c_parser_omp_for): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs, and call c_parser_omp_simd when parsing for simd. (c_parser_omp_sections_scope): If section-sequence doesn't start with #pragma omp section, require exactly one structured-block instead of sequence of statements. (c_parser_omp_sections): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs. (c_parser_omp_parallel): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs. (c_parser_omp_taskgroup, c_parser_omp_cancel, c_parser_omp_cancellation_point, c_parser_omp_distribute, c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target_update, c_parser_omp_target, c_parser_omp_declare_simd, c_finish_omp_declare_simd, c_parser_omp_declare_target, c_parser_omp_end_declare_target, c_parser_omp_declare_reduction, c_parser_omp_declare): New functions. (c_parser_omp_construct): Add p_name and mask vars. Handle PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP, PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel and c_parser_omp_sections callers. (c_parse_file): Initialize tparser.tokens and the_parser->tokens here. (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND. (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add OMP_CLAUSE_DEPEND. (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK, OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK, OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK, OMP_DECLARE_SIMD_CLAUSE_MASK): Define. * c-typeck.c: Include tree-inline.h. (c_finish_omp_cancel, c_finish_omp_cancellation_point, handle_omp_array_sections_1, handle_omp_array_sections, c_clone_omp_udr, c_find_omp_placeholder_r): New functions. (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined reductions. (c_tree_equal): New function. * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls, c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal, c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup, c_check_omp_declare_reduction_r): New prototypes. * c-decl.c (current_omp_declare_target_attribute): New variable. (c_decl_attributes): New function. (start_decl, start_function): Use it instead of decl_attributes. (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup, c_check_omp_declare_reduction_r): New functions. gcc/cp/ * decl.c (duplicate_decls): Error out for redeclaration of UDRs. (declare_simd_adjust_this): New function. (grokfndecl): If "omp declare simd" attribute is present, call declare_simd_adjust_this if needed and c_omp_declare_simd_clauses_to_numbers. * cp-array-notation.c (expand_array_notation_exprs): Handle OMP_TASKGROUP. * cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and OMP_DISTRIBUTE. Handle is_invisiref_parm decls in OMP_CLAUSE_REDUCTION. (cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like OMP_FOR. (cxx_omp_privatize_by_reference): Return true for is_invisiref_parm decls. (cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info caller. * pt.c (apply_late_template_attributes): For "omp declare simd" attribute call tsubst_omp_clauses, c_omp_declare_simd_clauses_to_decls, finish_omp_clauses and c_omp_declare_simd_clauses_to_numbers. (instantiate_class_template_1): Call cp_check_omp_declare_reduction for UDRs. (tsubst_decl): Handle UDRs. (tsubst_omp_clauses): Add declare_simd argument, if true don't call finish_omp_clauses. Handle new OpenMP 4.0 clauses. Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on OMP_CLAUSE_REDUCTION. (tsubst_expr): For UDRs call pushdecl and cp_check_omp_declare_reduction. Adjust tsubst_omp_clauses callers. Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP. Adjust finish_omp_atomic caller. (tsubst_omp_udr): New function. (instantiate_decl): For UDRs at block scope, don't call start_preparsed_function/finish_function. Call tsubst_omp_udr. * semantics.c (cxx_omp_create_clause_info): Add need_dtor argument, use it instead of need_default_ctor || need_copy_ctor. (struct cp_check_omp_declare_reduction_data): New type. (handle_omp_array_sections_1, handle_omp_array_sections, omp_reduction_id, omp_reduction_lookup, cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r, cp_check_omp_declare_reduction, clone_omp_udr, find_omp_placeholder_r, finish_omp_reduction_clause): New functions. (finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined reductions. (finish_omp_for): Add CODE argument, use it instead of hardcoded OMP_FOR. Adjust c_finish_omp_for caller. (finish_omp_atomic): Add seq_cst argument, adjust c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0 atomic variants. (finish_omp_cancel, finish_omp_cancellation_point): New functions. * decl2.c (mark_used): Force immediate instantiation of DECL_OMP_DECLARE_REDUCTION_P decls. (is_late_template_attribute): Return true for "omp declare simd" attribute. (cp_omp_mappable_type): New function. (cplus_decl_attributes): Add implicit "omp declare target" attribute if requested. * parser.c (cp_debug_parser): Print parser->colon_doesnt_start_class_def_p. (cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New functions. (enum pragma_context): Add pragma_member and pragma_objc_icode. (cp_parser_binary_expression): Handle no_toplevel_fold_p even for binary operations other than comparison. (cp_parser_linkage_specification): Call cp_ensure_no_omp_declare_simd if needed. (cp_parser_namespace_definition): Likewise. (cp_parser_init_declarator): Call cp_finalize_omp_declare_simd. (cp_parser_direct_declarator): Pass declarator to cp_parser_late_return_type_opt. (cp_parser_late_return_type_opt): Add declarator argument, call cp_parser_late_parsing_omp_declare_simd for declare simd. (cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd. Parse UDRs before all other methods. (cp_parser_member_specification_opt): Use pragma_member instead of pragma_external. (cp_parser_member_declaration): Call cp_finalize_omp_declare_simd. (cp_parser_function_definition_from_specifiers_and_declarator, cp_parser_save_member_function_body): Likewise. (cp_parser_late_parsing_for_member): Handle UDRs specially. (cp_parser_next_token_starts_class_definition_p): Don't allow CPP_COLON if colon_doesnt_start_class_def_p flag is true. (cp_parser_objc_interstitial_code): Use pragma_objc_icode instead of pragma_external. (cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names. (cp_parser_omp_var_list_no_open): Parse array sections for OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. Add COLON argument, if non-NULL, allow parsing to end with a colon rather than close paren. (cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open caller. (cp_parser_omp_clause_reduction): Handle user defined reductions. (cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind, cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit, cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear, cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen, cp_parser_omp_clause_depend, cp_parser_omp_clause_map, cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule, cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to, cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New functions. (cp_parser_omp_all_clauses): Add finish_p argument. Don't call finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses. (cp_parser_omp_atomic): Parse seq_cst clause, pass true if it is present to finish_omp_atomic. Handle new OpenMP 4.0 atomic forms. (cp_parser_omp_for_loop): Add CODE argument, pass it through to finish_omp_for. Change last argument to cclauses, and adjust uses to grab parallel clauses from the array of all the split clauses. (cp_omp_split_clauses): New function. (cp_parser_omp_simd): New function. (cp_parser_omp_for): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs, and call c_parser_omp_simd when parsing for simd. (cp_parser_omp_sections_scope): If section-sequence doesn't start with #pragma omp section, require exactly one structured-block instead of sequence of statements. (cp_parser_omp_sections): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs. (cp_parser_omp_parallel): Add p_name, mask and cclauses arguments. Allow the function to be called also when parsing combined constructs. (cp_parser_omp_taskgroup, cp_parser_omp_cancel, cp_parser_omp_cancellation_point, cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target_data, cp_parser_omp_target_update, cp_parser_omp_target, cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd, cp_parser_omp_declare_target, cp_parser_omp_end_declare_target, cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction, cp_parser_omp_declare): New functions. (cp_parser_omp_construct): Add p_name and mask vars. Handle PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP, PRAGMA_OMP_TEAMS. Adjust cp_parser_omp_for, cp_parser_omp_parallel and cp_parser_omp_sections callers. (cp_parser_pragma): Handle PRAGMA_OMP_CANCEL, PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION, PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP, PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET. Handle pragma_member and pragma_objc_icode like pragma_external. (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND. (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add OMP_CLAUSE_DEPEND. (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK, OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK, OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK, OMP_DECLARE_SIMD_CLAUSE_MASK): Define. * parser.h (struct cp_omp_declare_simd_data): New type. (struct cp_parser): Add colon_doesnt_start_class_def_p and omp_declare_simd fields. * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define. * cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p bit. (DECL_OMP_DECLARE_REDUCTION_P): Define. (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro. (struct saved_scope): Add omp_declare_target_attribute field. (cp_omp_mappable_type, omp_reduction_id, cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction, finish_omp_cancel, finish_omp_cancellation_point): New prototypes. (finish_omp_for): Add CODE argument. (finish_omp_atomic): Add seq_cst argument. (cxx_omp_create_clause_info): Add need_dtor argument. gcc/testsuite/ * c-c++-common/gomp/atomic-15.c: Adjust for C diagnostics. Remove error test that is now valid in OpenMP 4.0. * c-c++-common/gomp/atomic-16.c: New test. * c-c++-common/gomp/cancel-1.c: New test. * c-c++-common/gomp/depend-1.c: New test. * c-c++-common/gomp/depend-2.c: New test. * c-c++-common/gomp/map-1.c: New test. * c-c++-common/gomp/pr58472.c: New test. * c-c++-common/gomp/sections1.c: New test. * c-c++-common/gomp/simd1.c: New test. * c-c++-common/gomp/simd2.c: New test. * c-c++-common/gomp/simd3.c: New test. * c-c++-common/gomp/simd4.c: New test. * c-c++-common/gomp/simd5.c: New test. * c-c++-common/gomp/single1.c: New test. * g++.dg/gomp/block-0.C: Adjust for stricter #pragma omp sections parser. * g++.dg/gomp/block-3.C: Likewise. * g++.dg/gomp/clause-3.C: Adjust error messages. * g++.dg/gomp/declare-simd-1.C: New test. * g++.dg/gomp/declare-simd-2.C: New test. * g++.dg/gomp/depend-1.C: New test. * g++.dg/gomp/depend-2.C: New test. * g++.dg/gomp/target-1.C: New test. * g++.dg/gomp/target-2.C: New test. * g++.dg/gomp/taskgroup-1.C: New test. * g++.dg/gomp/teams-1.C: New test. * g++.dg/gomp/udr-1.C: New test. * g++.dg/gomp/udr-2.C: New test. * g++.dg/gomp/udr-3.C: New test. * g++.dg/gomp/udr-4.C: New test. * g++.dg/gomp/udr-5.C: New test. * g++.dg/gomp/udr-6.C: New test. * gcc.dg/autopar/outer-1.c: Expect 4 instead of 5 loopfn matches. * gcc.dg/autopar/outer-2.c: Likewise. * gcc.dg/autopar/outer-3.c: Likewise. * gcc.dg/autopar/outer-4.c: Likewise. * gcc.dg/autopar/outer-5.c: Likewise. * gcc.dg/autopar/outer-6.c: Likewise. * gcc.dg/autopar/parallelization-1.c: Likewise. * gcc.dg/gomp/block-3.c: Adjust for stricter #pragma omp sections parser. * gcc.dg/gomp/clause-1.c: Adjust error messages. * gcc.dg/gomp/combined-1.c: Look for GOMP_parallel_loop_runtime instead of GOMP_parallel_loop_runtime_start. * gcc.dg/gomp/declare-simd-1.c: New test. * gcc.dg/gomp/declare-simd-2.c: New test. * gcc.dg/gomp/nesting-1.c: Adjust for stricter #pragma omp sections parser. Add further #pragma omp sections nesting tests. * gcc.dg/gomp/target-1.c: New test. * gcc.dg/gomp/target-2.c: New test. * gcc.dg/gomp/taskgroup-1.c: New test. * gcc.dg/gomp/teams-1.c: New test. * gcc.dg/gomp/udr-1.c: New test. * gcc.dg/gomp/udr-2.c: New test. * gcc.dg/gomp/udr-3.c: New test. * gcc.dg/gomp/udr-4.c: New test. * gfortran.dg/gomp/appendix-a/a.35.5.f90: Add dg-error. Co-Authored-By: Richard Henderson <rth@redhat.com> Co-Authored-By: Tobias Burnus <burnus@net-b.de> From-SVN: r203408
2013-10-11 11:26:50 +02:00
* c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
201307 instead of 201107.
* c-common.c (DEF_FUNCTION_TYPE_8): Define.
(c_common_attribute_table): Add "omp declare target" and
"omp declare simd" attributes.
(handle_omp_declare_target_attribute,
handle_omp_declare_simd_attribute): New functions.
* c-omp.c: Include c-pragma.h.
(c_finish_omp_taskgroup): New function.
(c_finish_omp_atomic): Add swapped argument, if true,
build the operation first with rhs, lhs arguments and use NOP_EXPR
build_modify_expr.
(c_finish_omp_for): Add code argument, pass it down to make_code.
(c_omp_split_clauses): New function.
(c_split_parallel_clauses): Removed.
(c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
c_omp_declare_simd_clauses_to_decls): New functions.
* c-common.h (omp_clause_mask): New type.
(OMP_CLAUSE_MASK_1): Define.
(omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
omp_clause_mask::operator |=, omp_clause_mask::operator ~,
omp_clause_mask::operator |, omp_clause_mask::operator &,
omp_clause_mask::operator <<, omp_clause_mask::operator >>,
omp_clause_mask::operator ==): New methods.
(enum c_omp_clause_split): New.
(c_finish_omp_taskgroup): New prototype.
(c_finish_omp_atomic): Add swapped argument.
(c_finish_omp_for): Add code argument.
(c_omp_split_clauses): New prototype.
(c_split_parallel_clauses): Removed.
(c_omp_declare_simd_clauses_to_numbers,
c_omp_declare_simd_clauses_to_decls): New prototypes.
* c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
(enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
PRAGMA_OMP_CLAUSE_UNIFORM.
2013-10-09 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/20318
* c-common.c (handle_returns_nonnull_attribute): New function.
(c_common_attribute_table): Add returns_nonnull.
2013-10-03 Marc Glisse <marc.glisse@inria.fr>
PR c++/19476
* c.opt (fcheck-new): Move to common.opt.
2013-09-25 Marek Polacek <polacek@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR sanitizer/58413
* c-ubsan.c (ubsan_instrument_shift): Don't instrument
an expression if we can prove it is correct.
(ubsan_instrument_division): Likewise. Remove unnecessary
check.
2013-09-18 Marek Polacek <polacek@redhat.com>
PR sanitizer/58411
* c-common.c (handle_no_sanitize_undefined_attribute): New function.
Declare it.
(struct attribute_spec c_common_att): Add no_sanitize_undefined.
2013-09-14 Iain Sandoe <iain@codesourcery.com>
PR target/48094
* c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
fobjc-gc, freplace-objc-classes): Accept for LTO.
2013-09-13 Jacek Caban <jacek@codeweavers.com>
* c-target.def: New hook
2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/43452
* c.opt (Wdelete-incomplete): Add.
2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
* c-common.c (same_scalar_type_ignoring_signedness): Delete.
(vector_types_compatible_elements_p): New function.
* c-common.h: (same_scalar_type_ignoring_signedness): Delete
declaration.
(vector_types_compatible_elements_p): Declare.
2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
a virtual member function.
(pp_simple_type_specifier): Remove.
(pp_c_type_specifier): Likewise.
* c-pretty-print.c (c_pretty_printer::simple_type_specifier):
Rename from pp_c_type_specifier. Adjust.
(c_pretty_printer::c_pretty_printer): Do not assign to
simple_type_specifier.
c-objc-common.c (c_tree_printer): Tidy. c/ * c-objc-common.c (c_tree_printer): Tidy. c-family/ * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual member function. (c_pretty_printer::storage_class_specifier): Likewise. (c_pretty_printer::initializer): Likewise. (pp_declaration): Remove. (pp_declaration_specifiers): Likewise. (pp_abstract_declarator): Likewise. (pp_declarator): Likewise. (pp_type_id): Likewise. (pp_statement): Likewise. (pp_constant): Likewise. (pp_id_expression): Likewise. (pp_primary_expression): Likewise. (pp_unary_expression): Likewise. (pp_multiplicative_expression): Likewise. (pp_conditional_expression): Likewise. (pp_assignment_expression): Likewise. (pp_expression): Likewise. (pp_c_type_id): Likewise. (pp_c_storage_class_specifier): Likewise. * c-pretty-print.c (pp_c_type_cast): Tidy. (pp_c_pointer): Likewise. (pp_c_type_specifier): Likewise. (pp_c_parameter_type_list): Likewise. (pp_c_function_definition): Likewise. (pp_c_init_declarator): Likewise. (pp_c_initializer_list): Likewise. (pp_c_constructor_elts): Likewise. (c_pretty_printer::direct_abstract_declarator): Likewise. (c_pretty_printer::declaration_specifiers): Likewise. (c_pretty_printer::primary_expression): Likewise. (c_pretty_printer::postfix_expression): Likewise. (c_pretty_printer::type_id): Rename from pp_c_type_id. (c_pretty_printer::storage_class_specifier): Rename from pp_c_storage_class_specifier. (c_pretty_printer::initializer): Rename from pp_c_initializer. (c_pretty_printer::c_pretty_printer): Do not assign to type_id, storage_class_specifier, initializer, offset_list, flags. cp/ * cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as overrider. * cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove. (pp_cxx_userdef_literal): Tidy. (pp_cxx_template_argument_list): Likewise. (pp_cxx_typeid_expression): Likewise. (pp_cxx_offsetof_expression_1): Likewise. (cxx_pretty_printer::postfix_expression): Likewise. (cxx_pretty_printer::unary_expression): Likewise. (cxx_pretty_printer::statement): Likewise. (cxx_pretty_printer::type_id): Rename from pp_cxx_type_id. (c_pretty_printer::cxx_pretty_printer): Do not assign to type_id. * error.c (dump_decl): Tidy. (dump_expr): Likewise. From-SVN: r202203
2013-09-03 11:52:19 +02:00
2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
member function.
(c_pretty_printer::storage_class_specifier): Likewise.
(c_pretty_printer::initializer): Likewise.
(pp_declaration): Remove.
(pp_declaration_specifiers): Likewise.
(pp_abstract_declarator): Likewise.
(pp_declarator): Likewise.
(pp_type_id): Likewise.
(pp_statement): Likewise.
(pp_constant): Likewise.
(pp_id_expression): Likewise.
(pp_primary_expression): Likewise.
(pp_unary_expression): Likewise.
(pp_multiplicative_expression): Likewise.
(pp_conditional_expression): Likewise.
(pp_assignment_expression): Likewise.
(pp_expression): Likewise.
(pp_c_type_id): Likewise.
(pp_c_storage_class_specifier): Likewise.
* c-pretty-print.c (pp_c_type_cast): Tidy.
(pp_c_pointer): Likewise.
(pp_c_type_specifier): Likewise.
(pp_c_parameter_type_list): Likewise.
(pp_c_function_definition): Likewise.
(pp_c_init_declarator): Likewise.
(pp_c_initializer_list): Likewise.
(pp_c_constructor_elts): Likewise.
(c_pretty_printer::direct_abstract_declarator): Likewise.
(c_pretty_printer::declaration_specifiers): Likewise.
(c_pretty_printer::primary_expression): Likewise.
(c_pretty_printer::postfix_expression): Likewise.
(c_pretty_printer::type_id): Rename from pp_c_type_id.
(c_pretty_printer::storage_class_specifier): Rename from
pp_c_storage_class_specifier.
(c_pretty_printer::initializer): Rename from pp_c_initializer.
(c_pretty_printer::c_pretty_printer): Do not assign to type_id,
storage_class_specifier, initializer, offset_list, flags.
2013-08-30 Marek Polacek <polacek@redhat.com>
* c-ubsan.c: New file.
* c-ubsan.h: New file.
c-pretty-print.h (c_pretty_printer::declaration): Now a virtual member function. c-family/ * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual member function. (c_pretty_printer::declaration_specifiers): Likewise. (c_pretty_printer::declarator): Likewise. (c_pretty_printer::abstract_declarator): Likewise. (c_pretty_printer::direct_abstract_declarator): Likewise. (c_pretty_printer::direct_declarator): Likewise. (c_pretty_printer::function_specifier): Likewise. (pp_declaration): Adjust. (pp_declaration_specifiers): Likewise. (pp_abstract_declarator): Likewise. (pp_direct_declarator): Likewise. (pp_function_specifier): Likewise. (pp_direct_abstract_declarator): Remove as unused. (pp_c_declaration): Remove. (pp_c_declaration_specifiers): Likewise. (pp_c_declarator): Likewise. (pp_c_direct_declarator): Likewise. (pp_c_function_specifier): Likewise. (pp_c_direct_abstract_declarator): Likewise. * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename from pp_c_abstract_declarator. Adjust. (c_pretty_printer::direct_abstract_declarator): Rename from pp_c_direct_abstract_declarator. Adjust. (c_pretty_printer::function_specifier): Rename from pp_c_function_specifier. Adjust. (c_pretty_printer::declaration_specifiers): Rename from pp_c_declaration_specifiers. Adjust. (c_pretty_printer::direct_declarator): Rename from pp_c_direct_declarator. Adjust. (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust. (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust. (c_pretty_printer::c_pretty_printer): Do not assign to declaration, declaration_specifiers, declarator, direct_declarator, direct_abstract_declarator, function_specifier. cp/ * cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as overrider. (cxx_pretty_printer::declaration_specifiers): Likewise. (cxx_pretty_printer::function_specifier): Likewise. (cxx_pretty_printer::declarator): Likewise. (cxx_pretty_printer::direct_declarator): Likewise. (cxx_pretty_printer::abstract_declarator): Likewise. (cxx_pretty_printer::direct_abstract_declarator): Likewise. (pp_cxx_declaration): Remove. * cxx-pretty-print.c (cxx_pretty_printer::function_specifier): Rename from pp_cxx_function_specifier. Adjust. (cxx_pretty_printer::declaration_specifiers): Rename from pp_cxx_decl_specifier_seq. Adjust. (cxx_pretty_printer::direct_declarator): Rename from pp_cxx_direct_declarator. Adjust. (cxx_pretty_printer::declarator): Rename from pp_cxx_declarator. Adjust. (cxx_pretty_printer::abstract_declarator): Rename from pp_cxx_abstract_declarator. Adjust. (cxx_pretty_printer::direct_abstract_declarator): Rename from pp_cxx_direct_abstract_declarator. Adjust. (cxx_pretty_printer::declaration): Rename from pp_cxx_declaration. Adjust. (cxx_pretty_printer::cxx_pretty_printer): Do not assign to declaration, declaration_specifiers, function_specifier, declarator, direct_declarator, abstract_declarator, direct_abstract_declarator. * error.c (dump_decl): Adjust. From-SVN: r202109
2013-08-30 17:28:51 +02:00
2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
member function.
(c_pretty_printer::declaration_specifiers): Likewise.
(c_pretty_printer::declarator): Likewise.
(c_pretty_printer::abstract_declarator): Likewise.
(c_pretty_printer::direct_abstract_declarator): Likewise.
(c_pretty_printer::direct_declarator): Likewise.
(c_pretty_printer::function_specifier): Likewise.
(pp_declaration): Adjust.
(pp_declaration_specifiers): Likewise.
(pp_abstract_declarator): Likewise.
(pp_direct_declarator): Likewise.
(pp_function_specifier): Likewise.
(pp_direct_abstract_declarator): Remove as unused.
(pp_c_declaration): Remove.
(pp_c_declaration_specifiers): Likewise.
(pp_c_declarator): Likewise.
(pp_c_direct_declarator): Likewise.
(pp_c_function_specifier): Likewise.
(pp_c_direct_abstract_declarator): Likewise.
* c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
from pp_c_abstract_declarator. Adjust.
(c_pretty_printer::direct_abstract_declarator): Rename from
pp_c_direct_abstract_declarator. Adjust.
(c_pretty_printer::function_specifier): Rename from
pp_c_function_specifier. Adjust.
(c_pretty_printer::declaration_specifiers): Rename from
pp_c_declaration_specifiers. Adjust.
(c_pretty_printer::direct_declarator): Rename from
pp_c_direct_declarator. Adjust.
(c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
(c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
(c_pretty_printer::c_pretty_printer): Do not assign to
declaration, declaration_specifiers, declarator,
direct_declarator, direct_abstract_declarator, function_specifier.
c-pretty-print.h (c_pretty_printer::unary_expression): Now a virtual member function. c-family/ * c-pretty-print.h (c_pretty_printer::unary_expression): Now a virtual member function. (c_pretty_printer::multiplicative_expression): Likewise. (c_pretty_printer::conditional_expression): Likewise. (c_pretty_printer::assignment_expression): Likewise. (c_pretty_printer::expression): Likewise. (pp_unary_expression): Adjust. (pp_multiplicative_expression): Likewise. (pp_assignment_expression): Likewise. (pp_conditional_expression): Likewise. (pp_expression): Likewise. * c-pretty-print.c (c_pretty_printer::unary_expression): Rename from pp_c_unary_expression. Adjust. (c_pretty_printer::multiplicative_expression): Rename from pp_c_multiplicative_expression. Adjust. (c_pretty_printer::conditional_expression): Rename from pp_c_conditional_expression. Adjust. (c_pretty_printer::assignment_expression): Rename from pp_c_assignment_expression. Adjust. (c_pretty_printer::expression): Rename from pp_c_expression. Adjust. (c_pretty_printer::c_pretty_printer): Do not assign to unary_expression, multiplicative_expression, conditional_expression, expression. cp/ * cxx-pretty-print.h (cxx_pretty_printer::unary_expression): Declare as overrider. (cxx_pretty_printer::multiplicative_expression): Likewise. (cxx_pretty_printer::conditional_expression): Likewise. (cxx_pretty_printer::assignment_expression): Likewise. (cxx_pretty_printer::expression): Likewise. * cxx-pretty-print.c (cxx_pretty_printer::unary_expression): Rename from pp_cxx_unary_expression. Adjust. (cxx_pretty_printer::multiplicative_expression): Rename from pp_cxx_multiplicative_expression. Adjust. (cxx_pretty_printer::conditional_expression): Rename from pp_cxx_conditional_expression. Adjust. (cxx_pretty_printer::assignment_expression): Rename from pp_cxx_assignment_expression. Adjust. (cxx_pretty_printer::expression): Rename from pp_cxx_expression. Adjust. (cxx_pretty_printer::cxx_pretty_printer): Dot not assign to unary_expression, multiplicative_expression, conditional_expression, assignment_expression, expression. From-SVN: r201987
2013-08-26 10:37:24 +02:00
2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
* c-pretty-print.h (c_pretty_printer::unary_expression): Now a
virtual member function.
(c_pretty_printer::multiplicative_expression): Likewise.
(c_pretty_printer::conditional_expression): Likewise.
(c_pretty_printer::assignment_expression): Likewise.
(c_pretty_printer::expression): Likewise.
(pp_unary_expression): Adjust.
(pp_multiplicative_expression): Likewise.
(pp_assignment_expression): Likewise.
(pp_conditional_expression): Likewise.
(pp_expression): Likewise.
* c-pretty-print.c (c_pretty_printer::unary_expression): Rename
from pp_c_unary_expression. Adjust.
(c_pretty_printer::multiplicative_expression): Rename from
pp_c_multiplicative_expression. Adjust.
(c_pretty_printer::conditional_expression): Rename from
pp_c_conditional_expression. Adjust.
(c_pretty_printer::assignment_expression): Rename from
pp_c_assignment_expression. Adjust.
(c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
(c_pretty_printer::c_pretty_printer): Do not assign to
unary_expression, multiplicative_expression,
conditional_expression, expression.
2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
virtual member function.
(pp_postfix_expression): Adjust.
(pp_c_postfix_expression): Remove.
* c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
from pp_c_postfix_expression. Adjust.
(c_pretty_printer::c_pretty_printer): Do not assign to
postfix_expression.
2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.h (c_pretty_printer::primary_expression): Now a
virtua member function.
(pp_primary_expression): Adjust.
(pp_c_primary_expression): Remove.
* c-pretty-print.c (c_pretty_printer::primary_expression): Rename
from pp_c_primary_expression. Adjust.
(pp_c_initializer_list): Use pp_primary_expression.
(c_pretty_printer::c_pretty_printer): Do not assign to
primary_expression.
2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.h (c_pretty_printer::translate_string): Declare.
* c-pretty-print.c (M_): Remove.
(c_pretty_printer::translate_string): Define.
(pp_c_type_specifier): Use it.
(pp_c_primary_expression): Likewise.
(pp_c_expression): Likewise.
2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.h (c_pretty_printer::id_expression): Now a
virtual function.
(pp_c_id_expression): Remove.
(pp_id_expression): Adjust.
* c-pretty-print.c (c_pretty_printer::id_expression): Rename from
pp_c_id_expression. Adjust.
(pp_c_postfix_expression): Use pp_id_expression.
(c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.h (c_pretty_printer::constant): Now a virtual
member function.
(pp_constant): Adjust.
(pp_c_constant): Remove.
* c-pretty-print.c (c_pretty_printer::constant): Rename from
pp_c_constant. Adjust.
(pp_c_constant)
(pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
(c_pretty_printer::c_pretty_printer): Remove assignment to constant.
pretty-print.h (output_buffer::output_buffer): Declare. * pretty-print.h (output_buffer::output_buffer): Declare. (pretty_printer::pretty_printer): Likewise. (pp_construct): Remove. * pretty-print.c (output_buffer::output_buffer): Define. (pretty_printer::pretty_printer): Rename from pp_construct. Simplify. * gimple-pretty-print.c (print_gimple_stmt): Do not call pp_construct. (print_gimple_expr): Likewise. (print_gimple_seq): Likewise. (gimple_dump_bb): Likewise. * sched-vis.c (dump_value_slim): Likewise. (dump_insn_slim): Likewise. (dump_rtl_slim): Likewise. (str_pattern_slim): Likewise. * tree-mudflap.c (mf_varname_tree): Likewise. * graph.c (print_graph_cfg): Likewise. (start_graph_dump): Likewise. * tree-pretty-print.c (maybe_init_pretty_print): Likewise. Use placement-new. * diagnostic.c (diagnostic_initialize): Simplify early diagnostic pretty printer initialization. * coretypes.h (diagnostic_context): Remove superflous type alias declaration. (pretty_printer): Likewise. Declare directly as a class. (pretty_print_info): Remove declaration as class. * asan.c (asan_emit_stack_protection): Remove call to pp_construct and pp_clear_output_area. (asan_add_global): Likewise. c/ * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty printer initialization. c-family/ * c-pretty-print.h (pp_c_pretty_printer_init): Remove. (c_pretty_printer::c_pretty_printer): Declare. * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from c_pretty_printer_init. Adjust. (print_c_tree): Do not call c_pretty_printer_init. * c-ada-spec.c (dump_ads): Remove call to pp_construct. cp/ * error.c (init_error): Remove calls to pp_construct and pp_cxx_pretty_printer_init. Initialize cxx_pp with placement-new. * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare. (cxx_pretty_printer_init): Remove. * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Rename from cxx_pretty_printer_init. Adjust. * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify initialization of C++ diagnostics pretty printer. From-SVN: r201918
2013-08-22 12:14:46 +02:00
2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.h (pp_c_pretty_printer_init): Remove.
(c_pretty_printer::c_pretty_printer): Declare.
* c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
c_pretty_printer_init. Adjust.
(print_c_tree): Do not call c_pretty_printer_init.
* c-ada-spec.c (dump_ads): Remove call to pp_construct.
2013-08-09 Arnaud Charlet <charlet@adacore.com>
* c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58080
* c-common.c (pointer_int_sum): Add bool parameter.
* c-common.h (pointer_int_sum): Adjust declaration.
2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.c (print_c_tree): Simplify. Use non-static local
c_pretty_printer variable.
pretty-print.h (pp_base): Remove. * pretty-print.h (pp_base): Remove. Adjust dependent macros. * diagnostic.h (diagnostic_flush_buffer): Adjust. * pretty-print.c (pp_formatted_text_data): Likewise. (pp_indent): Rename from pp_base_indent. (pp_format): Rename from pp_base_format. (pp_output_formatted_text): Rename from pp_base_output_formatted_text. (pp_format_verbatim): Rename from pp_base_format_verbatim. (pp_flush): Rename from pp_base_flush. (pp_set_line_maximum_length): Rename from pp_base_set_line_maximum_length. (pp_clear_output_area): Rename from pp_base_clear_output_area. (pp_set_prefix): Rename from pp_base_set_prefix. (pp_destroy_prefix): Rename from pp_base_destroy_prefix. (pp_emit_prefix): Rename from pp_base_emit_prefix. (pp_append_text): Rename from pp_base_append_text. (pp_formatted_text): Rename from pp_base_formatted_text. (pp_last_position_in_text): Rename from pp_base_last_position_in_text. (pp_remaining_character_count_for_line): Rename from pp_base_remaining_character_count_for_line. (pp_newline): Rename from pp_base_newline. (pp_character): Rename from pp_base_character. (pp_string): Rename from pp_base_string. (pp_maybe_space): Rename from pp_base_maybe_space. * asan.c (asan_pp_string): Adjust. (asan_emit_stack_protection): Likewise. (asan_add_global): Likewise. * sched-vis.c (str_pattern_slim): Adjust pretty printer function call. * tree-mudflap.c (mf_varname_tree): Likewise. * tree-pretty-print.c (pp_tree_identifier): Rename from pp_base_tree_identifier. * tree-pretty-print.h (pp_tree_identifier): Remove macro definition. Declare as function. c/ * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base. c-family/ * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer. (pp_base): Remove. (pp_c_base): Likewise. Adjust users. * c-pretty-print.c (pp_c_maybe_whitespace): Adjust. (pp_c_whitespace): Do not call pp_base. (pp_c_left_paren): Likewise. (pp_c_right_paren): Likewise. (pp_c_left_brace): Likewise. (pp_c_right_brace): Likewise. (pp_c_left_bracket): Likewise. (pp_c_right_bracket): Likewise. (pp_c_dot): Likewise. (pp_c_ampersand): Likewise. (pp_c_star): Likewise. (pp_c_arrow): Likewise. (pp_c_semicolon): Likewise. (pp_c_complement): Likewise. (pp_c_exclamation): Likewise. (pp_c_direct_declarator): Likewise. (pp_c_ws_string): Likewise. (pp_c_identifier): Likewise. (pp_c_statement): Likewise. (print_c_tree): Likewise. cp/ * cxx-pretty-print.h (pp_c_base): Remove. (cxx_pretty_printer): Derive from c_pretty_printer. Adjust macros using pp_c_base. * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base. * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise. (pp_cxx_colon_colon): Likewise. (pp_cxx_separate_with): Likewise. (pp_cxx_storage_class_specifier): Do not call pp_c_base. (pp_cxx_expression_list): Likewise. (pp_cxx_space_for_pointer_operator): Likewise. (pp_cxx_init_declarator): Likewise. (pp_cxx_call_argument_list): Likewise. (pp_cxx_constant): Likewise. (pp_cxx_postfix_expression): Likewise. (pp_cxx_new_expression): Likewise. (pp_cxx_unary_expression): Likewise. (pp_cxx_cast_expression): Likewise. (pp_cxx_conditional_expression): Likewise. (pp_cxx_assignment_expression): Likewise. (pp_cxx_expression): Likewise. (pp_cxx_function_specifier): Likewise. (pp_cxx_decl_specifier_seq): Likewise. (pp_cxx_simple_type_specifier): Likewise. (pp_cxx_type_specifier_seq): Likewise. (pp_cxx_ptr_operator): Likewise. (pp_cxx_parameter_declaration_clause): Likewise. (pp_cxx_direct_declarator): Likewise. (pp_cxx_direct_abstract_declarator): Likewise. (pp_cxx_type_id): Likewise. (pp_cxx_statement): Likewise. (pp_cxx_pretty_printer_init): Tidy. * error.c (init_error): Do not use pp_base. (dump_aggr_type): Likewise. (dump_type_prefix): Likewise. (dump_type_suffix): Likewise. (dump_global_iord): Likewise. (dump_decl): Likewise. (dump_function_decl): Likewise. (dump_ref_qualifier): Likewise. (reinit_cxx_pp): Likewise. (decl_as_dwarf_string): Likewise. (lang_decl_dwarf_name): Likewise. (type_to_string): Likewise. (cv_to_string): Likewise. (cxx_print_error_function): Likewise. (cp_diagnostic_starter): Likewise. (cp_diagnostic_finalizer): Likewise. (cp_print_error_function): Likewise. (print_instantiation_context): Likewise. (cp_printer): Likewise. From-SVN: r201479
2013-08-05 06:00:57 +02:00
2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
(pp_base): Remove.
(pp_c_base): Likewise. Adjust users.
* c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
(pp_c_whitespace): Do not call pp_base.
(pp_c_left_paren): Likewise.
(pp_c_right_paren): Likewise.
(pp_c_left_brace): Likewise.
(pp_c_right_brace): Likewise.
(pp_c_left_bracket): Likewise.
(pp_c_right_bracket): Likewise.
(pp_c_dot): Likewise.
(pp_c_ampersand): Likewise.
(pp_c_star): Likewise.
(pp_c_arrow): Likewise.
(pp_c_semicolon): Likewise.
(pp_c_complement): Likewise.
(pp_c_exclamation): Likewise.
(pp_c_direct_declarator): Likewise.
(pp_c_ws_string): Likewise.
(pp_c_identifier): Likewise.
(pp_c_statement): Likewise.
(print_c_tree): Likewise.
2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/58072
* c-common.c (c_parse_error): Catch user-defined literal tokens and
provide useful error strings.
2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
printer functions instead of pp_string or operators and punctuators.
(dump_generic_ada_node): Likewise.
* c-pretty-print.c (pp_c_type_specifier): Likewise.
(pp_c_relational_expression): Likewise.
(pp_c_logical_or_expression): Likewise.
pretty-print.h (pp_underscore): New. * pretty-print.h (pp_underscore): New. (pp_comma): Tidy. * gimple-pretty-print.c (dump_unary_rhs): Use specialized pretty printer functions instead of pp_character. (dump_binary_rhs): Likewise. (dump_ternary_rhs): Likewise. (dump_gimple_call_args): Likewise. (pp_points_to_solution): Likewise. (dump_gimple_call): Likewise. (dump_gimple_switch): Likewise. (dump_gimple_cond): Likewise. (dump_gimple_bind): Likewise. (dump_gimple_try): Likewise. (dump_gimple_omp_for): Likewise. (dump_gimple_omp_continue): Likewise. (dump_gimple_omp_single): Likewise. (dump_gimple_omp_sections): Likewise. (dump_gimple_omp_block): Likewise. (dump_gimple_omp_critical): Likewise. (dump_gimple_transaction): Likewise. (dump_gimple_asm): Likewise. (dump_gimple_phi): Likewise. (dump_gimple_omp_parallel): Likewise. (dump_gimple_omp_task): Likewise. (dump_gimple_omp_atomic_load): Likewise. (dump_gimple_omp_atomic_store): Likewise. (dump_gimple_mem_ops): Likewise. (pp_gimple_stmt_1): Likewise. (pp_cfg_jump): Likewise. (dump_implicit_edges): Likewise. (gimple_dump_bb_for_graph): Likewise. * graph.c (draw_cfg_node): Likewise. * langhooks.c (lhd_print_error_function): Likewise. * sched-vis.c (print_exp): Likewise. (print_value): Likewise. (print_pattern): Likewise. (print_insn): Likewise. (rtl_dump_bb_for_graph): Likewise. * tree-pretty-print.c (dump_function_declaration): Likewise. (dump_array_domain): Likewise. (dump_omp_clause): Likewise. (dump_location): Likewise. (dump_generic_node): Likewise. (print_struct_decl): Likewise. * diagnostic.c (diagnostic_show_locus): Use pp_space. c-family/ * c-ada-spec.c (print_ada_macros): Use specialized pretty printer functions instead of pp_character. (pp_ada_tree_identifier): Likewise. (dump_ada_double_name): Likewise. (dump_ada_function_declaration): Likewise. (dump_ada_array_domains): Likewise. (dump_template_types): Likewise. (dump_generic_ada_node): Likewise. (print_ada_declaration): Likewise. (print_ada_struct_decl): Likewise. * c-pretty-print.c (pp_c_integer_constant): Likewise. cp/ * error.c (dump_aggr_type): Use specialized pretty printer functions instead of pp_character. (dump_type_prefix): Likewise. (dump_simple_decl): Likewise. (type_to_string): Likewise. From-SVN: r201467
2013-08-03 20:57:25 +02:00
2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-ada-spec.c (print_ada_macros): Use specialized pretty printer
functions instead of pp_character.
(pp_ada_tree_identifier): Likewise.
(dump_ada_double_name): Likewise.
(dump_ada_function_declaration): Likewise.
(dump_ada_array_domains): Likewise.
(dump_template_types): Likewise.
(dump_generic_ada_node): Likewise.
(print_ada_declaration): Likewise.
(print_ada_struct_decl): Likewise.
* c-pretty-print.c (pp_c_integer_constant): Likewise.
2013-07-23 Tom Tromey <tromey@redhat.com>
* c-common.h (enum rid) <RID_GENERIC>: New constant.
* c-common.c (c_common_reswords): Add _Generic.
2013-07-21 Ondřej Bílka <neleai@seznam.cz>
* c-common.c: Fix typos.
* c-common.h: Likewise.
2013-07-13 Lubos Lunak <l.lunak@suse.cz>
PR c++/55203
* c-common.c (c_common_attribute_table): Add warn_unused.
(handle_warn_unused_attribute): New.
2013-07-10 Jakub Jelinek <jakub@redhat.com>
* c-ppoutput.c (scan_translation_unit): Call account_for_newlines
for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57869
* c.opt: Add Wconditionally-supported.
2013-07-08 Graham Stott <graham.stott@btinternet.com>
* array-notation-common.c (length_mismatch_in_expr_p): Delete
unused variables l_length and l_node.
2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
PR c/57821
* c-common.c (complete_array_type): Delay folding first index
like other indices. When folding, check for index overflow.
2013-06-27 Marc Glisse <marc.glisse@inria.fr>
PR c++/57509
* c-common.h (c_build_vec_perm_expr): New complain argument.
* c-common.c (c_build_vec_perm_expr): Likewise.
Use save_expr also in C++.
c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x. 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net> * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x. * c-cppbuiltin.c (c_cpp_builtins): Likewise. * c-opts.c (c_common_post_options): Likewise. cp/ 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net> * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x. * class.c (add_implicitly_declared_members): Likewise. (check_field_decl): Likewise. (finalize_literal_type_property): Likewise. (check_bases_and_members): Likewise. * decl.c (poplevel): Likewise. (case_conversion): Likewise. (check_initializer): Likewise. (grokfndecl): Likewise. (check_static_variable_definition): Likewise. (compute_array_index_type): Likewise. (grokdeclarator): Likewise. (build_enumerator): Likewise. * friend.c (make_friend_class): Likewise. * lex.c (init_reswords): Likewise. * method.c (synthesized_method_walk): Likewise. (implicitly_declare_fn): Likewise. * parser.c (cp_parser_diagnose_invalid_type_name): Likewise. (cp_parser_constant_expression): Likewise. (cp_parser_for_init_statement): Likewise. (cp_parser_block_declaration): Likewise. (cp_parser_type_name): Likewise. (cp_parser_enum_specifier): Likewise. (cp_parser_enumerator_list): Likewise. (cp_parser_member_declaration): Likewise. (cp_nth_tokens_can_be_std_attribute_p): Likewise. (cp_parser_template_declaration_after_export): Likewise. * pt.c (convert_nontype_argument_function): Likewise. (convert_nontype_argument): Likewise. (convert_template_argument): Likewise. (tsubst_copy_and_build): Likewise. (build_non_dependent_expr): Likewise. * semantics.c (non_const_var_error): Likewise. (potential_constant_expression_1): Likewise. * tree.c (lvalue_kind): Likewise. (build_vec_init_expr): Likewise. (cast_valid_in_integral_constant_expression_p): Likewise. * typeck.c (build_x_conditional_expr): Likewise. * typeck2.c (check_narrowing): Likewise. From-SVN: r200348
2013-06-23 04:27:03 +02:00
2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
* c-cppbuiltin.c (c_cpp_builtins): Likewise.
* c-opts.c (c_common_post_options): Likewise.
2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
* array-notation-common.c (length_mismatch_in_expr): Changed the
parameter type's from a dynamic array to a vec_tree. Also removed
the size parameters.
* c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
the change above.
Implemented Cilk Plus Array Notation for C++ Implemented Cilk Plus Array Notation for C++ gcc/c-family/ChangeLog 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-common.h (struct cilkplus_an_parts): New structure. (struct cilkplus_an_loop_parts): Likewise. (cilkplus_extract_an_triplets): New prototype. (fix_sec_implicit_args): Likewise. * array-notation-common.c (cilkplus_extract_an_triplets): New function. (fix_sec_implicit_args): Likewise. gcc/cp/ChangeLog 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com> * call.c (convert_like_real): Added a check if array notation is present in expression. If so, then no conversion of arguments is necessary. (build_over_call): Likewise. * typeck.c (cp_build_function_call_vec): Likewise. (convert_for_assignment): Likewise. (cp_build_array_ref): Reject array notations with a rank greater than 1 as an array's index. (cp_build_binary_op): If array notations are preent in op, then call find_correct_array_notation_type. (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF. * cp-array-notation.c: New file. * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree as typed. * cp-tree.h (fix_array_notation_exprs): New prototype. * semantics.c (finish_return_stmt): Reject array notations as return value. (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case. (potential_constant_expression_1): Likewise. * tree.c (lvalue_kind): Likewise. * error.c (dump_decl): Likewise. (dump_expr): Likewise. * pt.c (ARRAY_NOTATION_REF): Likewise. (type_unification_real): Do not unify any arguments if array notations are found in arg. (instantiate_decl): Added a check for array notaitons inside the function body. If so, then expand them. * parser.c (cp_parser_array_notation): New function. (cp_parser_postfix_open_square_expression): Added a check for colons inside square braces. If found, then handle the array access as an array notation access. Also, disable auto-correction from a single colon to scope when Cilk Plus is enabled. (cp_parser_compound_statement): Added a check for array notations inside the statement. If found, then expand them. (cp_parser_ctor_initializer_opt_and_function_body): Likewise. (cp_parser_function_definition_after_declarator): Likewise. (cp_parser_selection_statement): Searched for array notations inside condition. If so, then emit an error. (cp_parser_iteration_statement): Likewise. (cp_parser_direct_declarator): Reject array notations inside a variable or array declaration. * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o. gcc/testsuite/ChangeLog 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-c++-common/cilk-plus/AN/array_test1.c: Make this an execution test. Also changed the returns from error as distinct values so that debugging can get easier. * c-c++-common/cilk-plus/AN/if_test_errors.c (main): Made certain errors specific to C, if necessary. Also added new error hooks for C++. * c-c++-common/cilk-plus/AN/misc.c (main): Likewise. * c-c++-common/cilk-plus/AN/parser_errors.c (main): Likewise. * c-c++-common/cilk-plus/AN/parser_errors2.c (main): Likewise. * c-c++-common/cilk-plus/AN/parser_errors3.c (main): Likewise. * c-c++-common/cilk-plus/AN/pr57541.c (main): Likewise. * c-c++-common/cilk-plus/AN/parser_errors4.c (main): In addition to the same changes as parser_errors3.c, spaces were added between colons to not confuse C++ compiler with 2 colons as scope. * c-c++-common/cilk-plus/AN/vla.c: Make this test C specific. * g++.dg/cilk-plus/AN/array_test1_tplt.cc: New test. * g++.dg/cilk-plus/AN/array_test2_tplt.cc: Likewise. * g++.dg/cilk-plus/AN/array_test_ND_tplt.cc: Likewise. * g++.dg/cilk-plus/AN/braced_list.cc: Likewise. * g++.dg/cilk-plus/AN/builtin_fn_custom_tplt.cc: Likewise. * g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc: Likewise. * g++.dg/cilk-plus/AN/fp_triplet_values_tplt.c: Likewise. * g++.dg/cilk-plus/AN/preincr_test.cc: Likewise. * g++.dg/cilk-plus/AN/postincr_test.cc: Likewise. * g++.dg/cilk-plus/cilk-plus.exp: New script. * gcc/testsuite/g++.dg/dg.exp: Included Cilk Plus C++ tests in the list. From-SVN: r200319
2013-06-21 21:36:47 +02:00
2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-common.h (struct cilkplus_an_parts): New structure.
(struct cilkplus_an_loop_parts): Likewise.
(cilkplus_extract_an_triplets): New prototype.
(fix_sec_implicit_args): Likewise.
* array-notation-common.c (cilkplus_extract_an_triplets): New function.
(fix_sec_implicit_args): Likewise.
c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x. 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net> * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x. * c-cppbuiltin.c (c_cpp_builtins): Likewise. * c-opts.c (c_common_post_options): Likewise. cp/ 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net> * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x. * class.c (add_implicitly_declared_members): Likewise. (check_field_decl): Likewise. (finalize_literal_type_property): Likewise. (check_bases_and_members): Likewise. * decl.c (poplevel): Likewise. (case_conversion): Likewise. (check_initializer): Likewise. (grokfndecl): Likewise. (check_static_variable_definition): Likewise. (compute_array_index_type): Likewise. (grokdeclarator): Likewise. (build_enumerator): Likewise. * friend.c (make_friend_class): Likewise. * lex.c (init_reswords): Likewise. * method.c (synthesized_method_walk): Likewise. (implicitly_declare_fn): Likewise. * parser.c (cp_parser_diagnose_invalid_type_name): Likewise. (cp_parser_constant_expression): Likewise. (cp_parser_for_init_statement): Likewise. (cp_parser_block_declaration): Likewise. (cp_parser_type_name): Likewise. (cp_parser_enum_specifier): Likewise. (cp_parser_enumerator_list): Likewise. (cp_parser_member_declaration): Likewise. (cp_nth_tokens_can_be_std_attribute_p): Likewise. (cp_parser_template_declaration_after_export): Likewise. * pt.c (convert_nontype_argument_function): Likewise. (convert_nontype_argument): Likewise. (convert_template_argument): Likewise. (tsubst_copy_and_build): Likewise. (build_non_dependent_expr): Likewise. * semantics.c (non_const_var_error): Likewise. (potential_constant_expression_1): Likewise. * tree.c (lvalue_kind): Likewise. (build_vec_init_expr): Likewise. (cast_valid_in_integral_constant_expression_p): Likewise. * typeck.c (build_x_conditional_expr): Likewise. * typeck2.c (check_narrowing): Likewise. From-SVN: r200348
2013-06-23 04:27:03 +02:00
2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
* array-notation-common.c (find_inv_trees): Removed an unwanted
typecasting.
* c-common.h (struct inv_list::additional_tcodes): Changed type from
enum rid to enum tree_code.
c-common.c (handle_alias_ifunc_attribute): Do not set DECL_EXTERNAL for weakref variables. * c-family/c-common.c (handle_alias_ifunc_attribute): Do not set DECL_EXTERNAL for weakref variables. * c-family/c-pragma.c (handle_pragma_weak): Make sure aliases are not declared as external. * cgraph.c (cgraph_create_function_alias): Set weakref flag. * cgraph.h (symtab_node_base): Add weakref flag. * cgraphunit.c (cgraph_reset_node): Clear weakref flag. (handle_alias_pairs): Set weakref flag, do not set DECL_EXTERNAL. (output_weakrefs): Use weakref flag. * fold-const.c (simple_operand_p): Handle WEAK. * gimple-fold.c (can_refer_decl_in_current_unit_p): Drop weakref. * ipa.c (varpool_externally_visible_p): Drop weakref. (function_and_variable_visibility): Update comment; fix weakref sanity checks; do not clear DECL_WEAK on them. * lto-cgraph.c (lto_output_node): update. (lto_output_varpool_node): Update. (input_overwrite_node): Update. (input_node): Update. (input_varpool_node): Update. * lto-symtab.c (lto_symtab_symbol_p): Do not special case weakrefs. (lto_symtab_merge_symbols): Add sanity check. (lto_symtab_prevailing_decl): Do not special case weakrefs. * passes.c (rest_of_decl_compilation): Set static flag, too. * symtab.c (dump_symtab_base): Dump weakref. (verify_symtab_base): Sanity check weakrefs. (symtab_make_decl_local): Remove duplicated code. (symtab_alias_ultimate_target): Simplify. * varpool.c (varpool_create_variable_alias): Set weakref flag. * lto-partition.c (get_symbol_class): Simplify weakref handling. (add_symbol_to_partition_1): Likewise. (contained_in_symbol): Likewise. (lto_balanced_map): Likewise. (rename_statics): Drop weakref. From-SVN: r199971
2013-06-12 00:41:54 +02:00
2013-06-11 Jan Hubicka <jh@suse.cz>
* c-common.c (handle_alias_ifunc_attribute): Do not set
DECL_EXTERNAL for weakref variables.
* c-pragma.c (handle_pragma_weak): Make sure aliases
are not declared as external.
Moved array notation helper functions from c/ to c-family/ files. 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-array-notation.c (length_mismatch_in_expr_p): Moved this function to c-family/array-notation-common.c. (is_cilkplus_reduce_builtin): Likewise. (find_rank): Likewise. (extract_array_notation_exprs): Likewise. (replace_array_notations): Likewise. (find_inv_trees): Likewise. (replace_inv_trees): Likewise. (contains_array_notation_expr): Likewise. (find_correct_array_notation_type): Likewise. (replace_invariant_exprs): Initialized additional_tcodes to NULL. (struct inv_list): Moved this to c-family/array-notation-common.c. * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype. 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com> * array-notation-common.c (length_mismatch_in_expr_p): Moved this function from c/c-array-notation.c. (is_cilkplus_reduce_builtin): Likewise. (find_rank): Likewise. (extract_array_notation_exprs): Likewise. (replace_array_notations): Likewise. (find_inv_trees): Likewise. (replace_inv_trees): Likewise. (contains_array_notation_expr): Likewise. (find_correct_array_notation_type): Likewise. * c-common.h (struct inv_list): Moved this struct from the file c/c-array-notation.c and added a new field called additional tcodes. (length_mismatch_in_expr_p): New prototype. (is_cilkplus_reduce_builtin): Likewise. (find_rank): Likewise. (extract_array_notation_exprs): Likewise. (replace_array_notation): Likewise. (find_inv_trees): Likewise. (replace_inv_trees): Likewise. From-SVN: r199825
2013-06-07 19:41:52 +02:00
2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
* array-notation-common.c (length_mismatch_in_expr_p): Moved this
function from c/c-array-notation.c.
(is_cilkplus_reduce_builtin): Likewise.
(find_rank): Likewise.
(extract_array_notation_exprs): Likewise.
(replace_array_notations): Likewise.
(find_inv_trees): Likewise.
(replace_inv_trees): Likewise.
(contains_array_notation_expr): Likewise.
(find_correct_array_notation_type): Likewise.
* c-common.h (struct inv_list): Moved this struct from the file
c/c-array-notation.c and added a new field called additional tcodes.
(length_mismatch_in_expr_p): New prototype.
(is_cilkplus_reduce_builtin): Likewise.
(find_rank): Likewise.
(extract_array_notation_exprs): Likewise.
(replace_array_notation): Likewise.
(find_inv_trees): Likewise.
(replace_inv_trees): Likewise.
(find_correct_array_notation_type): Likewise.
Implemented Cilk Plus Array Notation for C Compiler. gcc/ChangeLog 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com> * doc/extend.texi (C Extensions): Added documentation about Cilk Plus array notation built-in reduction functions. * doc/passes.texi (Passes): Added documentation about changes done for Cilk Plus. * doc/invoke.texi (C Dialect Options): Added documentation about the -fcilkplus flag. * Makefile.in (C_COMMON_OBJS): Added c-family/array-notation-common.o. (BUILTINS_DEF): Depend on cilkplus.def. * builtins.def: Include cilkplus.def. Define DEF_CILKPLUS_BUILTIN. * builtin-types.def: Define BT_FN_INT_PTR_PTR_PTR. * cilkplus.def: New file. gcc/c-family/ChangeLog 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-common.c (c_define_builtins): When cilkplus is enabled, the function array_notation_init_builtins is called. (c_common_init_ts): Added ARRAY_NOTATION_REF as typed. * c-common.def (ARRAY_NOTATION_REF): New tree. * c-common.h (build_array_notation_expr): New function declaration. (build_array_notation_ref): Likewise. (extract_sec_implicit_index_arg): New extern declaration. (is_sec_implicit_index_fn): Likewise. (ARRAY_NOTATION_CHECK): New define. (ARRAY_NOTATION_ARRAY): Likewise. (ARRAY_NOTATION_START): Likewise. (ARRAY_NOTATION_LENGTH): Likewise. (ARRAY_NOTATION_STRIDE): Likewise. * c-pretty-print.c (pp_c_postifix_expression): Added a new case for ARRAY_NOTATION_REF. (pp_c_expression): Likewise. * c.opt (flag_enable_cilkplus): New flag. * array-notation-common.c: New file. gcc/c/ChangeLog 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-typeck.c (build_array_ref): Added a check to see if array's index is greater than one. If true, then emit an error. (build_function_call_vec): Exclude error reporting and checking for builtin array-notation functions. (convert_arguments): Likewise. (c_finish_return): Added a check for array notations as a return expression. If true, then emit an error. (c_finish_loop): Added a check for array notations in a loop condition. If true then emit an error. (lvalue_p): Added a ARRAY_NOTATION_REF case. (build_binary_op): Added a check for array notation expr inside op1 and op0. If present, we call another function to find correct type. * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o. * c-parser.c (c_parser_compound_statement): Check if array notation code is used in tree, if so, then transform them into appropriate C code. (c_parser_expr_no_commas): Check if array notation is used in LHS or RHS, if so, then build array notation expression instead of regular modify. (c_parser_postfix_expression_after_primary): Added a check for colon(s) after square braces, if so then handle it like an array notation. Also, break up array notations in unary op if found. (c_parser_direct_declarator_inner): Added a check for array notation. (c_parser_compound_statement): Added a check for array notation in a stmt. If one is present, then expand array notation expr. (c_parser_if_statement): Likewise. (c_parser_switch_statement): Added a check for array notations in a switch statement's condition. If true, then output an error. (c_parser_while_statement): Similarly, but for a while. (c_parser_do_statement): Similarly, but for a do-while. (c_parser_for_statement): Similarly, but for a for-loop. (c_parser_unary_expression): Check if array notation is used in a pre-increment or pre-decrement expression. If true, then expand them. (c_parser_array_notation): New function. * c-array-notation.c: New file. * c-tree.h (is_cilkplus_reduce_builtin): Protoize. gcc/testsuite/ChangeLog 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-c++-common/cilk-plus/AN/array_test1.c: New test. * c-c++-common/cilk-plus/AN/array_test2.c: Likewise. * c-c++-common/cilk-plus/AN/array_test_ND.c: Likewise. * c-c++-common/cilk-plus/AN/builtin_func_double.c: Likewise. * c-c++-common/cilk-plus/AN/builtin_func_double2.c: Likewise. * c-c++-common/cilk-plus/AN/gather-scatter-errors.c: Likewise. * c-c++-common/cilk-plus/AN/if_test.c: Likewise. * c-c++-common/cilk-plus/AN/sec_implicit_ex.c: Likewise. * c-c++-common/cilk-plus/AN/decl-ptr-colon.c: Likewise. * c-c++-common/cilk-plus/AN/dimensionless-arrays.c: Likewise. * c-c++-common/cilk-plus/AN/fn_ptr.c: Likewise. * c-c++-common/cilk-plus/AN/fp_triplet_values.c: Likewise. * c-c++-common/cilk-plus/AN/gather-scatter.c: Likewise. * c-c++-common/cilk-plus/AN/misc.c: Likewise. * c-c++-common/cilk-plus/AN/parser_errors.c: Likewise. * c-c++-common/cilk-plus/AN/parser_errors2.c: Likewise. * c-c++-common/cilk-plus/AN/parser_errors3.c: Likewise. * c-c++-common/cilk-plus/AN/parser_errors4.c: Likewise. * c-c++-common/cilk-plus/AN/rank_mismatch.c: Likewise. * c-c++-common/cilk-plus/AN/rank_mismatch2.c: Likewise. * c-c++-common/cilk-plus/AN/rank_mismatch3.c: Likewise. * c-c++-common/cilk-plus/AN/sec_implicit.c: Likewise. * c-c++-common/cilk-plus/AN/sec_implicit2.c: Likewise. * c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c: Likewise. * c-c++-common/cilk-plus/AN/tst_lngth.c: Likewise. * c-c++-common/cilk-plus/AN/vla.c: Likewise. * c-c++-common/cilk-plus/AN/an-if.c: Likewise. * c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Likewise. * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Likewise. * c-c++-common/cilk-plus/AN/comma_exp.c: Likewise. * c-c++-common/cilk-plus/AN/conditional.c: Likewise. * c-c++-common/cilk-plus/AN/exec-once.c: Likewise. * c-c++-common/cilk-plus/AN/exec-once2.c: Likewise. * c-c++-common/cilk-plus/AN/gather_scatter.c: Likewise. * c-c++-common/cilk-plus/AN/n-ptr-test.c: Likewise. * c-c++-common/cilk-plus/AN/side-effects-1.c: Likewise. * c-c++-common/cilk-plus/AN/test_builtin_return.c: Likewise. * c-c++-common/cilk-plus/AN/test_sec_limits.c: Likewise. * gcc.dg/cilk-plus/cilk-plus.exp: New script. From-SVN: r199389
2013-05-28 21:55:10 +02:00
2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-common.c (c_define_builtins): When cilkplus is enabled, the
function array_notation_init_builtins is called.
(c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
* c-common.def (ARRAY_NOTATION_REF): New tree.
* c-common.h (build_array_notation_expr): New function declaration.
(build_array_notation_ref): Likewise.
(extract_sec_implicit_index_arg): New extern declaration.
(is_sec_implicit_index_fn): Likewise.
(ARRAY_NOTATION_CHECK): New define.
(ARRAY_NOTATION_ARRAY): Likewise.
(ARRAY_NOTATION_START): Likewise.
(ARRAY_NOTATION_LENGTH): Likewise.
(ARRAY_NOTATION_STRIDE): Likewise.
* c-pretty-print.c (pp_c_postifix_expression): Added a new case for
ARRAY_NOTATION_REF.
(pp_c_expression): Likewise.
* c.opt (flag_enable_cilkplus): New flag.
* array-notation-common.c: New file.
2013-05-14 Jakub Jelinek <jakub@redhat.com>
PR c++/57274
* c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
2013-05-10 Marc Glisse <marc.glisse@inria.fr>
* c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
vectors.
2013-05-07 Han Shen <shenhan@google.com>
* c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* c-common.c (check_user_alignment): Emit error for negative values.
2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
* c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
* c-cppbuiltin.c (c_cpp_builtins): Do not define
__GXX_EXPERIMENTAL_CXX1Y__.
2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
* c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
to simply use OPT_Wpointer_arith.
(c_sizeof_or_alignof_type): Likewise.
2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
opts.c: Include diagnostic-color.h. * opts.c: Include diagnostic-color.h. (common_handle_option): Handle OPT_fdiagnostics_color_. * Makefile.in (OBJS-libcommon): Add diagnostic-color.o. (diagnostic.o, opts.o, pretty-print.o): Depend on diagnostic-color.h. (diagnostic-color.o): New. * common.opt (fdiagnostics-color, fdiagnostics-color=): New options. (diagnostic_color_rule): New enum. * dwarf2out.c (gen_producer_string): Don't print -fdiagnostics-color*. * langhooks.c (lhd_print_error_function): Add %r "locus" and %R around the location string. * diagnostic.def: Add 3rd argument to DEFINE_DIAGNOSTIC_KIND macros, either NULL, or color kind. * diagnostic-color.c: New file. * diagnostic-color.h: New file. * diagnostic-core.h (DEFINE_DIAGNOSTIC_KIND): Adjust macro for 3 arguments. * doc/invoke.texi (-fdiagnostics-color): Document. * pretty-print.h (pp_show_color): Define. (struct pretty_print_info): Add show_color field. * diagnostic.c: Include diagnostic-color.h. (diagnostic_build_prefix): Adjust for 3 argument DEFINE_DIAGNOSTIC_KIND macros. Colorize error:, warning: etc. strings and also the location string. (diagnostic_show_locus): Colorize the caret line. * pretty-print.c: Include diagnostic-color.h. (pp_base_format): Handle %r and %R format specifiers. Colorize strings inside of %< %> quotes or quoted through q format modifier. c-family/ * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table, gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format specifiers. cp/ * error.c (cp_print_error_function, print_instantiation_partial_context_line, maybe_print_constexpr_context): Colorize locus strings. From-SVN: r197841
2013-04-12 08:19:58 +02:00
2013-04-12 Jakub Jelinek <jakub@redhat.com>
* c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
specifiers.
2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
* c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
* c-common.c (pointer_int_sum): Remove dead code.
2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
PR middle-end/56524
* c-common.c (handle_optimize_attribute): Don't call
save_optabs_if_changed.
2013-03-05 Jakub Jelinek <jakub@redhat.com>
PR middle-end/56461
* c-pch.c (pch_init): Free target_validity at the end.
2013-03-04 Jakub Jelinek <jakub@redhat.com>
* c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
Jakub Jelinek <jakub@redhat.com>
PR sanitizer/56454
* c-common.c (handle_no_sanitize_address_attribute): New function.
(c_common_attribute_table): Add no_sanitize_address attribute.
(handle_no_address_safety_analysis_attribute): Add
no_sanitize_address attribute, not no_address_safety_analysis
attribute.
2013-02-18 Aldy Hernandez <aldyh@redhat.com>
PR target/52555
* c-common.c (handle_optimize_attribute): Call
save_optabs_if_changed.
2013-02-18 Jakub Jelinek <jakub@redhat.com>
Steven Bosscher <steven@gcc.gnu.org>
PR pch/54117
* c-opts.c (c_common_post_options): If debug info is enabled
and non-dwarf*, refuse to load PCH files and when writing PCH
file warn.
2013-02-05 Jakub Jelinek <jakub@redhat.com>
PR middle-end/56167
* c-common.c (handle_error_attribute): Fix condition.
re PR c++/55742 (__attribute__ in class function declaration cause "prototype does not match" errors.) PR c++/55742 * config/i386/i386.c (ix86_valid_target_attribute_inner_p): Diagnose invalid args instead of ICEing on it. (ix86_valid_target_attribute_tree): Return error_mark_node if ix86_valid_target_attribute_inner_p failed. (ix86_valid_target_attribute_p): Return false only if ix86_valid_target_attribute_tree returned error_mark_node. Allow target("default") attribute. (sorted_attr_string): Change argument from const char * to tree, merge in all target attribute arguments rather than just one. Formatting fix. Use XNEWVEC instead of xmalloc and XDELETEVEC instead of free. Avoid using strcat. (ix86_mangle_function_version_assembler_name): Mangle target("default") as if no target attribute is present. Adjust sorted_attr_string caller. Avoid leaking memory. Use XNEWVEC instead of xmalloc and XDELETEVEC instead of free. (ix86_function_versions): Don't return true if one of the decls doesn't have target attribute. If they don't and one of the decls is DECL_FUNCTION_VERSIONED, report an error. Adjust sorted_attr_string caller. Use XDELETEVEC instead of free. (ix86_supports_function_versions): Remove. (make_name): Fix up formatting. (make_dispatcher_decl): Remove resolver_name and its initialization. Avoid leaking memory. (is_function_default_version): Return true if there is target("default") attribute rather than no target attribute at all. (make_resolver_func): Avoid leaking memory. (ix86_generate_version_dispatcher_body): Likewise. (TARGET_OPTION_SUPPORTS_FUNCTION_VERSIONS): Remove. * target.def (supports_function_versions): Remove. * doc/tm.texi.in (SUPPORTS_FUNCTION_VERSIONS): Remove. * doc/tm.texi: Regenerated. * c-common.c (handle_target_attribute): Revert 2012-12-26 change. * g++.dg/mv1.C: Moved to... * g++.dg/ext/mv1.C: ... here. Adjust test. * g++.dg/mv2.C: Moved to... * g++.dg/ext/mv2.C: ... here. Adjust test. * g++.dg/mv3.C: Moved to... * g++.dg/ext/mv3.C: ... here. * g++.dg/mv4.C: Moved to... * g++.dg/ext/mv4.C: ... here. * g++.dg/mv5.C: Moved to... * g++.dg/ext/mv5.C: ... here. Adjust test. * g++.dg/mv6.C: Moved to... * g++.dg/ext/mv6.C: ... here. Adjust test. * g++.dg/ext/mv7.C: New test. * g++.dg/ext/mv8.C: New test. * g++.dg/ext/mv9.C: New test. * g++.dg/ext/mv10.C: New test. * g++.dg/ext/mv11.C: New test. From-SVN: r195584
2013-01-30 19:04:34 +01:00
2013-01-30 Jakub Jelinek <jakub@redhat.com>
PR c++/55742
* c-common.c (handle_target_attribute): Revert 2012-12-26 change.
2013-01-18 Jason Merrill <jason@redhat.com>
PR target/54908
* c.opt (-fextern-tls-init): New.
* c-opts.c (c_common_post_options): Handle it.
2013-01-09 Jakub Jelinek <jakub@redhat.com>
PR c/48418
* c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
and is either negative or bigger or equal to type precision
of the first operand.
2012-12-03 14:02:04 +01:00
2012-12-03 Marek Polacek <polacek@redhat.com>
PR c/55570
* c-common.c (check_user_alignment): Swap order of tests,
check TREE_CODE first.
2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/52654
* c-common.h (overflow_type): New enum.
(build_userdef_literal): Add overflow_type argument.
(tree_userdef_literal): Add overflow_type.
(USERDEF_LITERAL_OVERFLOW): New access macro.
* c-common.c (build_userdef_literal): Add overflow_type
argument.
* c-lex.c (c_lex_with_flags): Add overflow_type to
build_userdef_literal calls.
(interpret_integer, interpret_float): Add overflow_type argument.
2012-11-28 Richard Biener <rguenther@suse.de>
PR c/35634
* c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
here and use a type with proper overflow behavior for types that would
need to be promoted for the arithmetic.
2012-11-23 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/55435
* c-common.c (handle_no_address_safety_analysis_attribute): New
function.
(c_common_attribute_table): Add no_address_safety_analysis.
2012-11-16 Simon Baldwin <simonb@google.com>
* c.opt: Add f[no-]canonical-system-headers.
* c-opts.c (c_common_handle_option): Handle
OPT_fcanonical_system_headers.
2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/54413
* c-opts.c (c_common_handle_option): Set new flags.
* c.opt: Describe new flags.
2012-11-09 Jason Merrill <jason@redhat.com>
* c.opt (Wabi-tag): New.
2012-11-09 Andi Kleen <ak@linux.intel.com>
PR 55139
* c-common.c (get_atomic_generic_size): Mask with
MEMMODEL_MASK
2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53063
* c.opt (Wformat): Make it Alias Wformat=1.
(Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
Wformat-security,Wformat-y2k,Wformat-zero-length): Use
LangEnabledBy.
(Wformat=): RejectNegative. Use LangEnabledBy.
(Wnonnull): Use LangEnabledBy.
* c-opts.c (c_common_handle_option): Do not handle Wformat here.
* c-format.c (set_Wformat): Delete.
(decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
(maybe_read_dollar_number): Likewise.
(avoid_dollar_number): Likewise.
(finish_dollar_format_checking): Likewise.
(check_format_info): Likewise.
(check_format_info_main): Likewise.
(check_format_types): Likewise.
(format_type_warning): Likewise.
* c-common.c (int): Likewise.
(check_function_sentinel): Likewise.
* c-common.h (warn_format,set_Wformat): Do not declare here.
2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53063
* c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
Use LangEnabledBy.
(Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
common.opt.
(Wvariadic-macros): Init(1).
* c-opts.c (c_common_handle_option): Do not handle them
explicitly.
(c_common_post_options): Likewise.
(sanitize_cpp_opts): warn_unused_macros is now
cpp_warn_unused_macros.
(push_command_line_include): Likewise.
* c-common.c (warn_unknown_pragmas): Do not define.
* c-common.h (warn_unknown_pragmas): Do not declare.
2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/51294
* c-common.c (conversion_warning): Handle conditional expressions.
2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
PR c++/54930
* c.opt (Wreturn_local_addr): Define new option.
2012-10-25 Jason Merrill <jason@redhat.com>
* c.opt (Wvirtual-move-assign): New.
* c.opt (Winherited-variadic-ctor): New.
2012-10-25 Marc Glisse <marc.glisse@inria.fr>
PR c++/54427
* c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
gcc: * config.gcc (*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu): Use glibc-c.o in c_target_objs and cxx_target_objs. Use t-glibc in tmake_file. Set target_has_targetcm. (tilegx-*-linux*, tilepro-*-linux*): Append to c_target_objs and cxx_target_objs rather than overriding previous value. * config/glibc-c.c, config/t-glibc: New. * doc/tm.texi.in (TARGET_C_PREINCLUDE): New @hook. * doc/tm.texi: Regenerate. * hooks.c (hook_constcharptr_void_null): New. * hooks.h (hook_constcharptr_void_null): Declare. gcc/c-family: * c-common.h (pch_cpp_save_state): Declare. * c-target.def (c_preinclude): New hook. * c-opts.c (done_preinclude): New. (push_command_line_include): Handle default preincluded header. (cb_file_change): Call pch_cpp_save_state when calling push_command_line_include. * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved) (pch_cpp_save_state): New. (pch_init): Call pch_cpp_save_state conditionally, instead of calling cpp_save_state. gcc/testsuite: * gcc.dg/c99-predef-1.c: New test. * gcc.dg/cpp/cmdlne-dU-1.c, gcc.dg/cpp/cmdlne-dU-2.c, gcc.dg/cpp/cmdlne-dU-3.c, gcc.dg/cpp/cmdlne-dU-4.c, gcc.dg/cpp/cmdlne-dU-5.c, gcc.dg/cpp/cmdlne-dU-6.c, gcc.dg/cpp/cmdlne-dU-7.c, gcc.dg/cpp/cmdlne-dU-8.c, gcc.dg/cpp/cmdlne-dU-9.c, gcc.dg/cpp/cmdlne-dU-10.c, gcc.dg/cpp/cmdlne-dU-11.c, gcc.dg/cpp/cmdlne-dU-12.c, gcc.dg/cpp/cmdlne-dU-13.c, gcc.dg/cpp/cmdlne-dU-14.c, gcc.dg/cpp/cmdlne-dU-15.c, gcc.dg/cpp/cmdlne-dU-16.c, gcc.dg/cpp/cmdlne-dU-17.c, gcc.dg/cpp/cmdlne-dU-18.c, gcc.dg/cpp/cmdlne-dU-19.c, gcc.dg/cpp/cmdlne-dU-20.c, gcc.dg/cpp/cmdlne-dU-21.c, gcc.dg/cpp/cmdlne-dU-22.c, gcc.dg/cpp/mi5.c, gcc.dg/cpp/multiline.c: Add -nostdinc to dg-options. libcpp: * files.c (struct _cpp_file): Add implicit_preinclude. (pch_open_file): Allow a previously opened implicitly included file. (_cpp_find_file): Add implicit_preinclude argument. Free file and do not call open_file_failed if implicit_preinclude. Store implicit_preinclude value. (_cpp_stack_include, _cpp_fake_include, _cpp_compare_file_date): Update calls to _cpp_find_file. (_cpp_stack_include): Handle IT_DEFAULT. (cpp_push_default_include): New. * include/cpplib.h (cpp_push_default_include): Declare. * init.c (cpp_read_main_file): Update call to _cpp_find_file. * internal.h (enum include_type): Add IT_DEFAULT. (_cpp_find_file): Update prototype. From-SVN: r192715
2012-10-23 16:55:55 +02:00
2012-10-23 Joseph Myers <joseph@codesourcery.com>
* c-common.h (pch_cpp_save_state): Declare.
* c-target.def (c_preinclude): New hook.
* c-opts.c (done_preinclude): New.
(push_command_line_include): Handle default preincluded header.
(cb_file_change): Call pch_cpp_save_state when calling
push_command_line_include.
* c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
(pch_cpp_save_state): New.
(pch_init): Call pch_cpp_save_state conditionally, instead of
calling cpp_save_state.
2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53063
PR c/40989
* c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
* c-opts.c (c_common_handle_option): Remove explicit handling from
here.
(c_common_post_options): Likewise.
2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (LOCATION_COL): Delete.
(compare_location): New function.
(compare_node): Use it.
(compare_comment): Likewise.
2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53063
PR c/40989
* c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
* c-opts.c (c_common_handle_option): Do not set them here. Add
comment.
(c_common_post_options): Likewise.
2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
(dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
Remove POINTER_TYPE handling, add large unsigned handling and use
ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
re PR c/54381 (-Wsizeof-pointer-memaccess refers to "destination" for strncmp) PR c/54381 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype. * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3 locs and array of 3 trees instead of just single loc and single sizeof_arg tree. Handle __builtin___*_chk builtins too, and also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins. For *cmp* builtins that take two sources strings report warnings about first and second source, not about destination and source. * c-parser.c (struct c_tree_loc_pair): Removed. (c_parser_expr_list): Remove struct c_tree_loc_pair * argument, add location_t * and tree * arguments, fill in array of 3 sizeof_arg trees and corresponding locs. (c_parser_attributes, c_parser_objc_keywordexpr): Adjust c_parser_expr_list callers. (c_parser_postfix_expression_after_primary): Likewise. Pass array of 3 sizeof_arg trees and locs (corresponding to first 3 arguments) to sizeof_pointer_memaccess_warning. * semantics.c (finish_call_expr): Pass array of 3 sizeof_arg trees and locs (corresponding to first 3 arguments) to sizeof_pointer_memaccess_warning. * c-c++-common/Wsizeof-pointer-memaccess1.c: New test. * c-c++-common/Wsizeof-pointer-memaccess2.c: New test. * gcc.dg/Wsizeof-pointer-memaccess1.c: New test. * gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Test also stpncpy. Adjust expected wording of warnings for *cmp* builtins. * g++.dg/torture/Wsizeof-pointer-memaccess1.C: Likewise. * g++.dg/torture/Wsizeof-pointer-memaccess2.C: Likewise. From-SVN: r192406
2012-10-12 20:23:03 +02:00
2012-10-12 Jakub Jelinek <jakub@redhat.com>
PR c/54381
* c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
* c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
locs and array of 3 trees instead of just single loc and single
sizeof_arg tree. Handle __builtin___*_chk builtins too, and
also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
For *cmp* builtins that take two sources strings report warnings
about first and second source, not about destination and source.
2012-10-12 Marc Glisse <marc.glisse@inria.fr>
PR c++/53055
* c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_template): Bail out for template declarations
declaring something coming from another file.
2012-10-10 Arnaud Charlet <charlet@adacore.com>
PR ada/54845
* c-ada-spec.c (print_ada_struct_decl): Increase buf size.
2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54194
* c-common.c (warn_about_parentheses): Add location_t parameter;
use EXPR_LOC_OR_LOC.
* c-common.h: Update declaration.
2012-10-09 Marc Glisse <marc.glisse@inria.fr>
PR c++/54427
* c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
more operations. Make error messages optional.
* c-common.h (enum stv_conv): Moved from c-typeck.c.
(scalar_to_vector): Declare.
2012-10-08 Jason Merrill <jason@redhat.com>
* c-common.c (c_common_reswords): Add thread_local.
PR c++/53528 C++11 attribute support This patch implements the c++-11 generalized attributes, described in the N2761 paper[1]. The idea is to modify the front-end to accept the new attribute syntax (including alignas expressions) and to build an internal representation similar to the one we already have for GNU attributes. This lets us re-use our existing GNU attribute mechanisms to support the generalized c++11 attributes. The patch does change the existing internal representation to support scoped attribute (aka attributes with namespaces), which is a concept that doesn't exist in GNU attributes. I have thus put all existing GNU extension attributes into the "gnu" namespace. For instance, in C++-11, the "unused" attribute would be represented as "[[gnu::unused]]". Because there is no syntax for scoped attributes in C, writting "__attribute__((unused))" unconditionnally refers to the "unused" attribute in the "gnu" namespace. Note that this patch follows a conservative understanding of the specification by disallowing attributes appertaining to types, unless they apply to a type definition. Tested on x86_64-unknown-linux-gnu and powerpc64-unknown-linux-gnu. [1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf gcc/ * plugin.h (register_scoped_attributes): Declare new function. * tree.h (enu attribute_flags::ATTR_FLAG_CXX_11): New flag. (lookup_scoped_attribute_spec, cxx_11_attribute_p) (get_attribute_name, get_attribute_namespace): Declare new functions. (struct attribute_spec): Remove const qualifier from the members. * tree.c (comp_type_attributes, private_lookup_attribute) (lookup_ident_attribute, remove_attribute, merge_attribute) (attribute_hash_list, attribute_list_contained): Use get_attribute_name. * attribs.c (decl_attributes): Don't crash on error_mark_node. Forbid c++11 attributes appertaining to type-specifiers. (attribute_hash): Remove global variable. (attributes_table): New global variable. (find_attribute_namespace, register_scoped_attribute): New static functions. (register_scoped_attributes, lookup_scoped_attribute_spec) (cxx11_attribute_p, get_attribute_name, get_attribute_namespace): New public functions. (init_attributes): Register all the GNU attributes into the "gnu" namespace. (register_attribute): Use register_scoped_attribute to register the attribute into the "gnu" namespace. (lookup_attribute_spec): Use lookup_scoped_attribute_spec to lookup the attribute in the "gnu" namespace. (decl_attributes): Use new get_attribute_namespace and lookup_scoped_attribute_spec to consider attribute namespaces when looking up attributes. When operating in c++-11 mode, pass flag ATTR_FLAG_CXX11 to the spec handler. gcc/c-family/ * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare new functions. * c-common.c (check_cxx_fundamental_alignment_constraints): New static function. (handle_aligned_attribute): In choose strictest alignment among many. Use new check_cxx_fundamental_alignment_constraints. (handle_transparent_union_attribute): In c++11 attribute syntax, don't look through typedefs. gcc/cp/ * cp-tree.h (enum cpp0x_warn_str::CPP0X_ATTRIBUTES): New member. (enum cp_decl_spec::ds_std_attribute): New enumerator. (struct cp_decl_specifier_seq::std_attributes): New field. (cxx_alignas_expr, warn_misplaced_attr_for_class_type): Declare new functions. (check_tag_decl): Take an extra parameter for explicit instantiations. * decl.c (warn_misplaced_attr_for_class_type): Extract from ... (check_tag_decl): ... here. Add check for c++11 attributes being applied to an explicit instantiation. Take an extra parameter for explicit instantiations. (grokdeclarator): Make sure a c++11 attribute after an array declarator appertains to the array, an attribute after a function declarator appertains to the function type, an attribute after a declarator-id appertains to the entity being declared, and an attribute after a pointer declarator appertains to the pointer. * decl2.c (is_late_template_attribute): Use get_attribute_name. * error.c (maybe_warn_cpp0x): Support CPP0X_GENERALIZED_ATTRIBUTES. * parser.c (cp_next_tokens_can_be_attribute_p) (cp_next_tokens_can_be_gnu_attribute_p) (cp_next_tokens_can_be_std_attribute_p) (cp_nth_tokens_can_be_attribute_p) (cp_nth_tokens_can_be_gnu_attribute_p) (cp_nth_tokens_can_be_std_attribute_p) (cp_parser_gnu_attribute_list, cp_parser_std_attribute) (cp_parser_std_attribute_spec, cp_parser_std_attribute_spec_seq) (cp_parser_attributes_opt, cp_parser_std_attribute_list): New static functions. (cp_parser_gnu_attributes_opt): Replace cp_parser_attributes_opt. (cp_parser_gnu_attribute_list): Replace cp_parser_attribute_list. (cp_parser_postfix_expression): Disallow "[[" tokens here. (cp_parser_label_for_labeled_statement): Use take an extra parameter for attributes. (cp_parser_block_declaration): Use cp_nth_tokens_can_be_std_attribute_p here. (cp_parser_decl_specifier_seq): Likewise. Store C++11 attributes that appears in in decl specifiers in cp_decl_specifier_seq::std_attributes. declaration. Emit proper warning about misplaced c++11 attributes for class type. (cp_parser_explicit_instantiation): Adjust call to check_tag_decl. (cp_parser_init_declarator): Parsing attributes here is no more a GNU extension in c++-11. (cp_parser_type_specifier_seq): Use cp_next_tokens_can_be_attribute_p. (cp_parser_direct_declarator): Likewise. Hang c++11 attributes following the declarator to its syntactic construct. It'll later be applied to the proper appertaining entity by grokdeclarator. (cp_parser_ptr_operator): Likewise. (make_declarator): Initialize cp_declarator::std_attribute. (make_pointer_declarator, make_reference_declarator) (make_ptrmem_declarator, cp_parser_make_indirect_declarator): Take attributes that appertain to the pointer/reference in argument. (cp_parser_ptr_operator): Take an out parameter for c++11 attributes. Update comments. (cp_parser_new_declarator_opt) (cp_parser_conversion_declarator_opt): Adjust. (cp_parser_declarator): Likewise. Handle C++11 attributes. Rename attributes to gnu_attribute for better legibility. (cp_parser_simple_declaration): Update comment. (cp_parser_class_specifier_1): Parse GNU attributes specifically (cp_parser_enum_specifier): Accept only gnu attributes after the specifier. (cp_parser_member_declaration): Don't clear attributes -- intended for the entity being declared -- too early because check_tag_decl needs them. (cp_parser_statement): Update comment. Parse optional c++11 attributes at the beginning of the relevant kind of statements and ignore them, for now, unless when calling cp_parser_label_for_labeled_statement. (cp_parser_label_for_labeled_statement): Take c++11 attributes in parameter. * semantics.c (potential_constant_expression_1): Likewise. * typeck.c (fundamental_alignment_p, cxx_alignas_expr): New public functions. gcc/testsuite/ * g++.dg/cpp0x/gen-attrs-1.C: New test. * g++.dg/cpp0x/gen-attrs-2.C: Likewise. * g++.dg/cpp0x/gen-attrs-2-1.C: Likewise. * g++.dg/cpp0x/gen-attrs-3.C: Likewise. * g++.dg/cpp0x/gen-attrs-4.C: Likewise. * g++.dg/cpp0x/gen-attrs-5.C: Likewise. * g++.dg/cpp0x/gen-attrs-6.C: Likewise. * g++.dg/cpp0x/gen-attrs-7.C: Likewise. * g++.dg/cpp0x/gen-attrs-8.C: Likewise. * g++.dg/cpp0x/gen-attrs-9.C: Likewise. * g++.dg/cpp0x/gen-attrs-10.C: Likewise. * g++.dg/cpp0x/gen-attrs-11.C: Likewise. * g++.dg/cpp0x/gen-attrs-12.C: Likewise. * g++.dg/cpp0x/gen-attrs-13.C: Likewise. * g++.dg/cpp0x/gen-attrs-14.C: Likewise. * g++.dg/cpp0x/gen-attrs-15.C: Likewise. * g++.dg/cpp0x/gen-attrs-16.C: Likewise. * g++.dg/cpp0x/gen-attrs-17.C: Likewise. * g++.dg/cpp0x/gen-attrs-18.C: Likewise. * g++.dg/cpp0x/gen-attrs-19.C: Likewise. * g++.dg/cpp0x/gen-attrs-20.C: Likewise. * g++.dg/cpp0x/gen-attrs-21.C: Likewise. * g++.dg/cpp0x/gen-attrs-22.C: Likewise. * g++.dg/cpp0x/gen-attrs-23.C: Likewise. * g++.dg/cpp0x/gen-attrs-24.C: Likewise. * g++.dg/cpp0x/gen-attrs-25.C: Likewise. * g++.dg/cpp0x/gen-attrs-26.C: Likewise. * g++.dg/cpp0x/gen-attrs-27.C: Likewise. * g++.dg/cpp0x/gen-attrs-28.C: Likewise. * g++.dg/cpp0x/gen-attrs-29.C: Likewise. * g++.dg/cpp0x/gen-attrs-30.C: Likewise. * g++.dg/cpp0x/gen-attrs-31.C: Likewise. * g++.dg/cpp0x/gen-attrs-32.C: Likewise. * g++.dg/cpp0x/gen-attrs-33.C: Likewise. * g++.dg/cpp0x/gen-attrs-34.C: Likewise. * g++.dg/cpp0x/gen-attrs-35.C: Likewise. * g++.dg/cpp0x/gen-attrs-36.C: Likewise. * g++.dg/cpp0x/gen-attrs-36-1.C: Likewise. * g++.dg/cpp0x/gen-attrs-37.C: Likewise. * g++.dg/cpp0x/gen-attrs-38.C: Likewise. * g++.dg/cpp0x/gen-attrs-39.C: Likewise. * g++.dg/cpp0x/gen-attrs-39-1.C: Likewise. * g++.dg/cpp0x/gen-attrs-40.C: Likewise. * g++.dg/cpp0x/gen-attrs-41.C: Likewise. * g++.dg/cpp0x/gen-attrs-42.C: Likewise. * g++.dg/cpp0x/gen-attrs-43.C: Likewise. * g++.dg/cpp0x/gen-attrs-44.C: Likewise. * g++.dg/cpp0x/gen-attrs-45.C: Likewise. * g++.dg/cpp0x/gen-attrs-46.C: Likewise. * g++.dg/cpp0x/gen-attrs-47.C: Likewise. * g++.dg/cpp0x/gen-attrs-47-1.C: Likewise. * g++.dg/cpp0x/gen-attrs-48.C: Likewise. * g++.dg/cpp0x/gen-attrs-49.C: Likewise. * g++.dg/cpp0x/gen-attrs-50.C: Likewise. * g++.dg/cpp0x/gen-attrs-51.C: Likewise. * g++.dg/cpp0x/gen-attrs-52.C: Likewise. * g++.dg/cpp0x/gen-attrs-53.C: Likewise. From-SVN: r192199
2012-10-08 11:29:05 +02:00
2012-10-08 Dodji Seketeli <dodji@redhat.com>
PR c++/53528 C++11 attribute support
* c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
new functions.
* c-common.c (check_cxx_fundamental_alignment_constraints): New
static function.
(handle_aligned_attribute): In choose strictest alignment
among many. Use new check_cxx_fundamental_alignment_constraints.
(handle_transparent_union_attribute): In c++11 attribute syntax,
don't look through typedefs.
2012-10-04 Arnaud Charlet <charlet@adacore.com>
* c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
* c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
out of dumpfile.h.
2012-09-25 Dehao Chen <dehao@google.com>
PR middle-end/54645
* c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
map when read in the pch.
2012-09-18 Arnaud Charlet <charlet@adacore.com>
* c-ada-spec.c: Style fixes.
2012-09-18 Thomas Quinot <quinot@adacore.com>
* c.opt (-fada-spec-parent): Define new command line switch.
* c-ada-spec.c (get_ada_package): When -fada-spec-parent
is specified, generate binding spec as a child of the specified unit.
2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53210
* c.opt ([Winit-self]): Enabled by -Wall in C++.
2012-08-23 Arnaud Charlet <charlet@adacore.com>
* c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
for pointers, and add missing Convention C pragma.
(print_ada_struct_decl): Add missing aliased keyword.
(dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
2012-08-17 Jakub Jelinek <jakub@redhat.com>
* c-common.c (sizeof_pointer_memaccess_warning): New function.
* c.opt (-Wsizeof-pointer-memaccess): Add new option.
* c-opts.c (c_common_handle_option): Enable it for -Wall.
* c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
* c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
tree.h (SSA_NAME_VAR): Return NULL_TREE if an IDENTIFIER_NODE is recorded as var. 2012-08-10 Richard Guenther <rguenther@suse.de> * tree.h (SSA_NAME_VAR): Return NULL_TREE if an IDENTIFIER_NODE is recorded as var. (SSA_NAME_IDENTIFIER): Return the IDENTIFIER_NODE of the SSA_NAME or its SSA_NAME_VAR. (SET_SSA_NAME_VAR_OR_IDENTIFIER): New setter. * tree-ssanames.c (make_ssa_name_fn): Handle creating anonymous SSA names by passing a type instead of a variable decl. (release_ssa_name): Use SET_SSA_NAME_VAR_OR_IDENTIFIER. (copy_ssa_name_fn): Handle anonymous SSA names. (replace_ssa_name_symbol): Use SET_SSA_NAME_VAR_OR_IDENTIFIER. * tree-flow-inline.h (make_temp_ssa_name): New inline function. * tree-pretty-print.c (dump_generic_node): Use SSA_NAME_IDENTIFIER, dump SSA names without a name as <anon>. * cfgexpand.c (expand_used_vars): Assing anonymous SSA names we are going to expand a decl. (gimple_expand_cfg): Assign all SSA names of a partition the decl we created for its leader. * tree-ssa.c (target_for_debug_bind): Handle SSA_NAMEs. (verify_ssa_name): Handle anonymous SSA names. (verify_def): Likewise. * tree-predcom.c (eliminate_temp_copies): Likewise. * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise. * tree-ssa-live.c (var_map_base_init): Compute conflicts for anonymous SSA names with the same type. (mark_all_vars_used_1): Handle anonymous SSA names. (verify_live_on_entry): Likewise. * tree-ssa-coalesce.c (abnormal_corrupt): Remove. (create_outofssa_var_map): Adjust with respect to conflicts we compute for anonymous SSA names. Do not restrict abnormal coalescing. (coalesce_partitions): Do not restrict abnormal coalescing. Assert we only ever coalesce variables we computed conflicts for. * tree-ssa-ter.c (process_replaceable): Do not restrict TER of anonymous names. * expr.c (expand_expr_real_1): Handle anonymous SSA names expanded from IVOPTs by creating a raw REG here. * tree-cfg.c (replace_ssa_name): Handle anonymous SSA names. (dump_function_to_file): Dump anonymous SSA names alongside with their types in the variable list. (verify_gimple_return): Guard use of SSA_NAME_VAR. * tree-into-ssa.c (mark_for_renaming): Handle a NULL symbol. (rewrite_into_ssa): Make SSA names anonymous. * tree-ssa-structalias.c (alias_get_name): Rewrite. * tree-ssa-uninit.c (ssa_undefined_value_p): Handle anonymous SSA names. (warn_uninitialized_phi): Likewise. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Defer expanding anonymous SSA names to the expander. (determine_iv_cost): Anonymous SSA names are artificial. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle anonymous SSA names. * lto-streamer-out.c (output_ssa_names): Stream SSA_NAME_VAR or if NULL, the type of the SSA name. * tree-inline.c (remap_ssa_name): Handle anonymous SSA names, remap names as anonymous where appropriate. (insert_init_stmt): Pass SSA names down to insert_init_debug_bind. * tree-ssa-uncprop.c (uncprop_into_successor_phis): Adjust according to what we create conflicts for in out-of-SSA coalescing. * tree-parloops.c (separate_decls_in_region_name): Handle anonymous SSA names. (add_field_for_name): Likewise. * tree.c (get_name): Handle SSA names. * tree-ssa-loop-im.c (gen_lsm_tmp_name): Defer to get_name for SSA_NAMEs. * tree-vect-loop-manip.c (adjust_debug_stmts): Use virtual_operand_p. * tree-sra.c (create_access_replacement): Give up generating a DECL_DEBUG_EXPR for SSA names in the memory reference. (replace_removed_params_ssa_names): Guard use of SSA_NAME_VAR. * tree-complex.c (get_component_ssa_name): Handle anonymous SSA names. (set_component_ssa_name): Likewise. * tree-ssa-sccvn.c (visit_reference_op_load): Likewise. * tree-object-size.c (collect_object_sizes_for): Handle uninitialized SSA names properly. * ipa-inline-analysis.c (eliminated_by_inlining_prob): Guard use of SSA_NAME_VAR. * ipa-split.c (test_nonssa_use): Likewise. (consider_split): Likewise. (mark_nonssa_use): Likewise. c-family/ * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names. cp/ * error.c (dump_expr): Likewise. * g++.dg/plugin/selfassign.c: Adjust. * gcc.dg/plugin/selfassign.c: Likewise. * gcc.dg/strlenopt-11.c: Likewise. * gcc.dg/strlenopt-13.c: Likewise. * gcc.dg/no-strict-overflow-4.c: Likewise. * gcc.dg/strict-overflow-4.c: Likewise. * gcc.dg/tree-ssa/alias-11.c: Likewise. * gcc.dg/tree-ssa/alias-6.c: Likewise. * gcc.dg/tree-ssa/asm-3.c: Likewise. * gcc.dg/tree-ssa/pr18908.c: Likewise. * gcc.dg/tree-ssa/pr19431.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-21.c: Likewise. * gcc.dg/tree-ssa/phi-opt-10.c: Likewise. * gcc.dg/tree-ssa/phi-opt-7.c: Likewise. * gcc.dg/tree-ssa/slsr-27.c: Likewise. * gcc.dg/tree-ssa/slsr-28.c: Likewise. * gcc.dg/tree-ssa/slsr-29.c: Likewise. * gcc.dg/pr46309.c: Likewise. * gcc.dg/tree-ssa/loop-5.c: Likewise. From-SVN: r190284
2012-08-10 10:29:29 +02:00
2012-08-10 Richard Guenther <rguenther@suse.de>
* c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
* c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
instead of separate pp_newline and pp_flush.
(print_c_tree): Likewise.
2012-07-26 Richard Henderson <rth@redhat.com>
* c-common.c (handle_hot_attribute): Allow labels.
(handle_cold_attribute): Likewise.
2012-07-20 Jakub Jelinek <jakub@redhat.com>
PR c++/28656
* c-common.c (check_function_nonnull): Handle multiple nonnull
attributes properly.
system.h (dump_file): Do not define. gcc/ * system.h (dump_file): Do not define. * tree-pass.h: Include dumpfile.h, which is a new file containing... (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name, dump_file, dump_flags, dump_file_name, get_dump_file_info, struct dump_file_info): all of this, moved to... * dumpfile.h: Here, new file. * tree-dump.h: Include dumpfile.h, but not tree-pass.h. (dump_stmt): Remove prototype for C++ specific function. (dump_enumerated_decls): Move prototype from here... * tree-flow.h (dump_enumerated_decls): ... to here. (get_ref_base_and_extent) Move prototype from here ... * tree.h (get_ref_base_and_extent) ... to here. * tree-ssa-live.c: Do not inclde tree-pretty-print.h, because gimple-pretty-print.h is enough. Do not include tree-dump.h, include timevar.h and dumpfile.h instead. (struct numbered_tree_d, compare_decls_by_uid, dump_enumerated_decls_push, dump_enumerated_decls): Move from here ... * tree-dfa.c:(struct numbered_tree_d, compare_decls_by_uid, dump_enumerated_decls_push, dump_enumerated_decls):... to here. Do not include timevar.h. * tree.c: Do not include timevar.h. * tree-cfg.c: Do not include langhooks.h, tree-pretty-print.h, and timevar.h. (dump_cfg_stats): Use current_function_name. (gimple_cfg2vcg): Likewise. (dump_function_to_file): Likewise. * df-scan.c: Do not include tree-pass.h and timevar.h. Include dumpfile.h. (df_entry_block_bitmap_verify, df_exit_block_bitmap_verify): Do not use print_current_pass. * df-problems.c: Include dumpfile.h. Always define REG_DEAD_DEBUGGING, avoid #ifdef code, because it leads to errors in the code not selected. (df_note_compute): Do not print_rtl_with_bb here. Fix compilation bug if REG_DEAD_DEBUGGING is not 0, get_insns is not available here. * lcm.c: Include dumpfile.h. Remove obsolete include of insn-attr.h. * dojump.c (do_compare_rtx_and_jump): Remove failure printing for missing probability notes. * stmt.c: Include dumpfile.h. (emit_case_decision_tree): Re-enable printing expand details only if TDF_DETAILS. * alias.c, auto-inc-dec.c, bb-reorder.c, caller-save.c, cfg.c, cfgcleanup.c, cfgexpand.c, cfgloop.c, cfgloopmanip.c, cgraph.c, cgraphclones.c, cgraphunit.c, combine.c, combine-stack-adj.c, coverage.c, cprop.c, cse.c, cselib.c, dbgcnt.c, dce.c, df-core.c, dse.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, final.c, function.c, fwprop.c, gcse.c, gimple-fold.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, graphite-dependences.c, graphite-interchange.c, graphite-optimize-isl.c, graphite-poly.c, graphite-sese-to-poly.c, haifa-sched.c, hw-doloop.c, ifcvt.c, ipa.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline.c, ipa-inline-transform.c, ipa-prop.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ira.c, ira-emit.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, loop-unroll.c, loop-unswitch.c, lower-subreg.c, lto-section-out.c, lto-streamer-in.c, matrix-reorg.c, mcf.c, mode-switching.c, modulo-sched.c, omega.c, omp-low.c, passes.c, plugin.c, postreload.c, postreload-gcse.c, predict.c, print-rtl.c, print-tree.c, profile.c, recog.c, ree.c, regcprop.c, reginfo.c, regmove.c, regrename.c, reg-stack.c, reload1.c, reorg.c, sched-rgn.c, sched-vis.c, sel-sched.c, sel-sched-ir.c, store-motion.c, tracer.c, trans-mem.c, tree-affine.c, tree-call-cdce.c, tree-cfgcleanup.c, tree-chrec.c, tree-data-ref.c, tree-diagnostic.c, tree-dump.c, tree-eh.c, tree-flow-inline.h, tree-if-conv.c, tree-into-ssa.c, tree-mudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-outof-ssa.c, tree-predcom.c, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c,, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-loop.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-loop-niter.c, tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-propagate.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-sink.c, tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-ter.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-loop.c, tree-vect-loop-manip.c, tree-vectorizer.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, value-prof.c, var-tracking.c, web.c: Include tree-pass.h only if needed. If tree-pass.h is included, do not include timevar.h and dumpfile.h. If tree-pass.h is not included but dump_file, or dump_flags, or the TDF_* flags are used, include dumpfile.h. If gimple-pretty-print.h is included, don't include tree-pretty-print.h. Remove assorted unnecessary includes. * config/mn10300/mn10300.c, config/c6x/c6x.c, config/ia64/ia64.c, config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c, config/spu/spu.c, config/mep/mep.c, config/i386/i386.c: Include dumpfile.h. * config/rl78/rl78.c: Include dumpfile.h instead of tree-pass.h. * arm/t-arm, avr/t-avr, i386/t-i386, ia64/t-ia64, mep/t-mep, spu/t-spu-elf: Fix dependencies. c-family/ * c-gimplify.c: Include dumpfile.h instead of tree-dump.h. * c-ada-spec.c: Likewise. * c-dump.c (dump_stmt): Move to cp/dump.c, the only user. c/ * c-decl.c: Include dumpfile.h instead of tree-dump.h. * Make-lang.in: Fix dependencies. cp/ * dump.c (dump_stmt): Moved here from c-dump.c. * optimize.c: Include dumpfile.h instead of tree-dump.h. * class.c: Likewise. * decl2.c: Likewise. * Make-lang.in: Fix dependencies. fortran/ * f95-lang.c: Include dumpfile.h instead of tree-dump.h. * Make-lang.in: Fix dependencies. java/ * java-gimplify.c Include dumpfile.h instead of tree-dump.h * Make-lang.in: Fix dependencies. lto/ * lto.c: Do not include timevar.h. * Make-lang.in: Fix dependencies. ada/ * gcc-interface/utils.c: Include timevar.h. * Make-lang.in: Fix dependencies. From-SVN: r189519
2012-07-16 13:32:42 +02:00
2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
* c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
* c-ada-spec.c: Likewise.
* c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
* c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
Remove code conditional on it.
2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
* c-gimplify.c: Do not include basic-block.h.
* c-common.c: Do not include linfuncs.h.
basic-block.h: Re-group most prototypes per file. gcc/ * basic-block.h: Re-group most prototypes per file. (struct edge_list): Remove num_blocks field. (dump_bb_info): Adjust prototypes. (dump_reg_info): Move prototype to regs.h. * function.h: Do not include tree.h. Include vec.h, vecir.h, input.h and machmode.h to compensate. (function_name): New prototype. * gimple.h: Include tree.h to compensate for basic-block.h change. * langhooks.h: Note that tree.h is only necessary for enum tree_code. * regs.h (dump_reg_info): Prototype here. * regset.h: Adjust file reference in comment. (debug_regset): Remove prototype. * rtl.h: Include flags.h for flag_var_tracking_assignments. (MAY_HAVE_DEBUG_INSNS): Define as flag_var_tracking_assignments instead of no-longer-available tree.h's MAY_HAVE_DEBUG_STMTS. (dump_reg_info, dump_flow_info): Remove prototypes. * bb-reorder.c (set_edge_can_fallthru_flag): Move from cfganal.c to here, the only user. Make static. (reorder_basic_blocks): Call dump_reg_info before dump_flow_info. * cfg.c: Do not include tm.h, tree.h, rtl.h, hard-reg-set.h, regs.h, flags.h, function.h, except.h, diagnostic-core.h, tm_p.h, timevar.h, tree-pass.h, cfgloop.h, and tree-flow.h. Include basic-block.h, the first header I'd expect to be included. (reg_obstack): Move to df-core.c. (free_edge): Remove bogus ATTRIBUTE_UNUSED. (remove_edge_raw): Do not call tree-ssa's redirect_edge_var_map_clear. (redirect_edge_succ_nodup): Move to cfghooks.c. (dump_regset, debug_regset): Move to df-core.c. (dump_bb_info): Move to cfgrtl.c. (dump_reg_info): Move to regstat.c. (dump_flow_info): Move to cfgrtl.c. (debug_flow_info): Likewise. (dump_edge_info): Do not look at cfun, a CFG without cfun is nonsense. * cfganal.c: Do not include tm.h, rtl.h, obstack.h, hard-reg-set.h, insn-config.h, recog.h, diagnostic-core.h, tm_p.h, and cfgloop.h. (flow_active_insn_p, forwarder_block_p, can_fallthru, could_fall_through): Move to cfgrtl.c. (set_edge_can_fallthru_flag): Moved to bb-reorder.c. (create_edge_list): Do not set edge_list's removed num_blocks. (print_edge_list): Look at n_basic_blocks instead of num_blocks. (flow_nodes_print): Remove. (flow_edge_list_print): Remove. (inverted_post_order_compute): Use FOR_ALL_BB. *cfgrtl.c (dump_flow_info): Moved from cfg.c. Do not call dump_reg_info. (debug_flow_info): Moved from cfg.c (dump_bb_info): Moved from cfg.c. Take 'verbose' argument to avoid looking at TDF_* flags from tree-pass.h. (flow_active_insn_p, forwarder_block_p, can_fallthru, could_fall_through): Moved from cfganal.c. (print_rtl_with_bb): Adjust dump_bb_info calls. * cfghooks.c (redirect_edge_succ_nodup): Moved from cfg.c. (remove_edge): Call redirect_edge_var_map_clear if IR_GIMPLE. (cfgcleanup.c): Look at MAY_HAVE_DEBUG_INSNS, not MAY_HAVE_DEBUG_STMTS. * cselib.c: Include tree.h with a FIXME. * df-core.c (reg_obstack): Moved from cfg.c. (dump_regset): Likewise. (debug_regset): Likewise. Make a DEBUG_FUNCTION. * final.c (compute_alignments): Call dump_reg_info before dump_flow_info. * function.c (function_name): New function. (current_function_name): Use it. * ifcvt.c (rest_of_handle_if_conversion): Call dump_reg_info before dump_flow_info. * ira-conflicts.c: Include tree.h with a note. * regstat.c (dump_reg_info): Moved here from cfg.c. * loop-init.c: Include regs.h instead of hard-reg-set.h. (rtl_loop_init): Call dump_reg_info before dump_flow_info. (rtl_loop_done): Likewise. * mcf.c: Include tree.h before langhooks.h. * predict.c (maybe_hot_count_p): Assert we have cfun. (probably_never_executed_bb_p): Likewise. * profile.c (compute_branch_probabilities): Use gimple_dump_cfg instead of dump_flow_info. * sched-deps.c: Include tree.h with a FIXME. (call_may_noreturn_p): Add FIXME note why this function has to look at function decls instead of function decl flags. * sched-vis.c: Include tree.h with a FIXME. (print_rtl_slim): Adjust dump_bb_info uses. * statistics.c (statistics_fini_pass_2): Use current_function_name to avoid including tree.h. (statistics_counter_event): Use function_name for the same reason. (statistics_histogram_event): Likewise. * tracer.c (tracer): Remove bogus gcc_assert. Use brief_dump_cfg instead of dump_flow_info. * var-tracking.c (variable_tracking_main_1): Call dump_reg_info before dump_flow_info. * doc/cfg.texi: Update CFG documentation. * Makefile.in (RTL_H): Depend on FLAGS_H. (GIMPLE_H): Depend on TREE_H. (FUNCTION_H): Depend on VEC_H, vecir.h, INPUT_H and MACHMODE_H, but no longer on TREE_H. (C_COMMON_H): Depend on TREE_H. (cselib.o, cse.o, cfganal.o, loop-init.o, ira-conflicts.o, sched-deps.o, sched-vis.o): Fixup dependencies. c-family/ * c-common.h: Include tree.h. cp/ * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site. From-SVN: r189359
2012-07-08 12:06:14 +02:00
2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
* c-common.h: Include tree.h.
2012-07-02 Jason Merrill <jason@redhat.com>
PR c++/53524
* c-common.c (get_priority): Call default_conversion.
2012-07-01 Uros Bizjak <ubizjak@gmail.com>
* c-pch.c (c_common_write_pch): Remove unused variables.
configure.ac: Skip C if explicitly selected. toplevel/ * configure.ac: Skip C if explicitly selected. * configure: Regenerate. gcc/ * configure.ac: Remove special gtfiles case for C. * configure: Regenerate. * Makefile.in: Remove C front-end hooks and build hooks that will be picked up from c/Make-lang.in now. Add tree-mudflap to C_COMMON_OBJS. * gengtype.c (files_rules): Adjust gt-files for c/c-decl.c. * config/vms/vms.c: Look for c-tree.h in c/. * doc/gty.texi: Remove reference to c-config-lang.in. * doc/sourcebuild.texi: Document the c/ subdirectory. c/ * Make-lang.in: New file, rules migrated from gcc/Makefile.in and add language Makefile hooks. * config-lang.in: New file. * c-config-lang.in: Moved from gcc/config-lang.in to here, and add the required "normal" config-lang.in rules. * c-lang.h: Moved from gcc/ to here. * c-tree.h: Likewise. * c-objc-common.c: Likewise. * c-objc-common.h: Likewise. * c-typeck.c: Likewise. * c-convert.c: Likewise. * c-lang.c: Likewise. * c-aux-info.c: Likewise. * c-errors.c: Likewise. * gccspec.c: Likewise. * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h. * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h. c-family/ * cppspec.c: Moved from gcc/ to here. objc/ * Make-ang.in: Adjust for move of C front-end files. * config-lang.in: Likewise. * objc-encoding.c: Look for cp-tree.h in cp/, and for c-tree.h and c-lang.h in c/. * objc-runtime-shared-support.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-act.c: Likewise. * objc-lang.c: Likewise. cp/ * Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS. From-SVN: r189080
2012-06-29 18:12:35 +02:00
2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
* cppspec.c: Moved from gcc/ to here.
2012-06-27 Kai Tietz <ktietz@redhat.com>
PR preprocessor/37215
* c-ppoutput.c (preprocess_file): Check for nonempty buffer.
2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
* c-common.h (c_common_print_pch_checksum): Remove.
* c-pch.c: Do not include output.h.
(CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
(asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
(asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
(struct c_pch_header): Remove.
(get_ident): Update gpch version.
(pch_init): Do not print executable_checksum to asm_out_file.
Do not fail if there is no asm_out_file to read back from. Set
asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
(c_common_write_pch): Verify that nothing was written to asm_out_file
since pch_init was called. Do not write a c_pch_header, and do not
copy from asm_out_file to the PCH.
(c_common_read_pch): Do not read a c_pch_header, and do not restore
the content of asm_out_file from the PCH.
(c_common_print_pch_checksum): Remove.
* c-opts.c (c_common_init): Print out executable_checksum directly.
2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
* c-target.def (objc_declare_unresolved_class_reference,
objc_declare_class_definition): Add new hooks.
target.def (output_ident): New hook. gcc/ * target.def (output_ident): New hook. * targhooks.h (default_asm_output_ident_directive): Add prototype. * varasm.c (assemble_asm): Only prefix a tab if the string does not already start with one. (default_asm_output_ident_directive): New function to emit .ident as a top-level asm node while parsing, or directly to asm_out_file after parsing. * toplev.c (compile_file): Print a GCC .ident with targetm.asm_out.output_ident. * doc/tm.texi.in (ASM_OUTPUT_IDENT): Remove documentation for macro. (TARGET_ASM_OUTPUT_IDENT): Add @hook for this. * doc/tm.texi: Update. * config/elfos.h (ASM_OUTPUT_IDENT, IDENT_ASM_OP): Remove. (TARGET_ASM_OUTPUT_IDENT): Define. * config/i386/djgpp.h (IDENT_ASM_OP): Remove. * config/i386/gas.h (ASM_OUTPUT_IDENT): Remove. * config/arm/aout.h (ASM_OUTPUT_IDENT): Remove. * config/sparc/sparc.h (IDENT_ASM_OP): Remove. (TARGET_ASM_OUTPUT_IDENT): Define. * config/picochip/picochip.h (IDENT_ASM_OP): Remove. (TARGET_ASM_OUTPUT_IDENT): Define. * config/cris/cris-protos.h (cris_asm_output_ident): Add prototype. * config/cris/cris.c (cris_asm_output_ident): New function. * config/cris/cris.h (ASM_OUTPUT_IDENT, IDENT_ASM_OP): Remove. * config/microblaze/microblaze-protos.h (microblaze_asm_output_ident): Add prototype. * config/microblaze/microblaze.c: Include cgraph.h for add_asm_node. (microblaze_asm_output_ident): Rewrite to work similar to default_asm_output_ident_directive for front-end .idents. * config/microblaze/microblaze.h (ASM_OUTPUT_IDENT): Remove. (TARGET_ASM_OUTPUT_IDENT): Define. * config/mips/mips.h (ASM_OUTPUT_IDENT): Remove. * config/mips/sde.h (IDENT_ASM_OP, ASM_OUTPUT_IDENT): Remove. * config/rx/rx.c: Include cgraph.h for add_asm_node. (rx_asm_output_ident): New function, similar to default_asm_output_ident_directive, but handle AS100 syntax also, so that #ident also works for rx in AS100 syntax. (TARGET_ASM_OUTPUT_IDENT): Define. * config/rx/rx.h (IDENT_ASM_OP): Remove. * Makefile.in: Fix dependencies for c-family/c-lex.o. c-family/ * c-lex.c: Do not include output.h. (cb_ident): Try to put out .ident with targetm.asm_out.output_ident. Remove uses of ASM_OUTPUT_IDENT. ada/ * gcc-interface/trans.c: Include target.h. (gigi): Try to put out .ident with targetm.asm_out.output_ident. Remove uses of ASM_OUTPUT_IDENT. * gcc-interface/Make-lang.in: Fix dependencies. From-SVN: r188791
2012-06-19 21:55:33 +02:00
2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
* c-lex.c: Do not include output.h.
(cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
Remove uses of ASM_OUTPUT_IDENT.
[multiple changes] 2012-06-15 Marc Glisse <marc.glisse@inria.fr> PR c++/51033 * c-typeck.c (c_build_vec_perm_expr): Move to c-family/c-common.c. * c-tree.h (c_build_vec_perm_expr): Move to c-family/c-common.h. cp/ 2012-06-15 Marc Glisse <marc.glisse@inria.fr> PR c++/51033 * semantics.c (literal_type_p): Handle VECTOR_TYPE. (potential_constant_expression_1): Handle VEC_PERM_EXPR. * parser.c (cp_parser_postfix_expression): Handle RID_BUILTIN_SHUFFLE. c-family 2012-06-15 Marc Glisse <marc.glisse@inria.fr> PR c++/51033 * c-common.h (c_build_vec_perm_expr): Move decl here. * c-common.c (c_build_vec_perm_expr): Move definition here. 2012-06-15 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> PR c++/51033 * c-c++-common/torture/vshuf-16.inc: Move from gcc.c-torture/execute/. * c-c++-common/torture/vshuf-2.inc: Likewise. * c-c++-common/torture/vshuf-4.inc: Likewise. * c-c++-common/torture/vshuf-8.inc: Likewise. * c-c++-common/torture/vshuf-main.inc: Likewise. * c-c++-common/torture/vshuf-v16hi.c: Likewise. * c-c++-common/torture/vshuf-v16qi.c: Likewise. * c-c++-common/torture/vshuf-v2df.c: Likewise. * c-c++-common/torture/vshuf-v2di.c: Likewise. * c-c++-common/torture/vshuf-v2sf.c: Likewise. * c-c++-common/torture/vshuf-v2si.c: Likewise. * c-c++-common/torture/vshuf-v4df.c: Likewise. * c-c++-common/torture/vshuf-v4di.c: Likewise. * c-c++-common/torture/vshuf-v4hi.c: Likewise. * c-c++-common/torture/vshuf-v4sf.c: Likewise. * c-c++-common/torture/vshuf-v4si.c: Likewise. * c-c++-common/torture/vshuf-v8hi.c: Likewise. * c-c++-common/torture/vshuf-v8qi.c: Likewise. * c-c++-common/torture/vshuf-v8si.c: Likewise. From-SVN: r188671
2012-06-15 18:43:36 +02:00
2012-06-15 Marc Glisse <marc.glisse@inria.fr>
PR c++/51033
* c-common.h (c_build_vec_perm_expr): Move decl here.
* c-common.c (c_build_vec_perm_expr): Move definition
here.
2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
* c.opt (fconserve-space): Turn into a no-op.
2012-06-04 Sterling Augustine <saugustine@google.com>
* c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
* c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
both the start and end of the function.
2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
* c-common.c: Do not include output.h.
* c-pragma.c: Likewise.
2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
* error.c (dump_decl): Check pp_c_flag_gnu_v3.
(decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
(lang_decl_name): Handle namespace decls.
output.h (__gcc_host_wide_int__): Move to hwint.h. * output.h (__gcc_host_wide_int__): Move to hwint.h. (decl_default_tls_model): Move to tree.h (dump_file): Move to system.h. (default_stabs_asm_out_destructor, default_stabs_asm_out_constructor, dbxout_int, dbxout_stabd, dbxout_begin_stabn, dbxout_begin_stabn_sline, dbxout_begin_empty_stabs, dbxout_begin_simple_stabs, dbxout_begin_simple_stabs_desc, dbxout_stab_value_zero, dbxout_stab_value_zero, dbxout_stab_value_label_diff, dbxout_stab_value_internal_label, dbxout_stab_value_internal_label_diff): Move from here ... * dbxout.h: ... to here. * system.h (dump_file): Moved here from output.h. * hwint.h (__gcc_host_wide_int__): Moved here from output.h. * tree.h (decl_default_tls_model): Moved here from output.h. * varasm.c (default_stabs_asm_out_destructor, default_stabs_asm_out_constructor): Move from here ... * dbxout.c: ... to here. * gcov-dump.c (dump_file): Rename to dump_gcov_file. Update callers. * collect2.h (dump_file): Rename to dump_ld_file. * collect2.c: Likewise. * tlink.c: Likewise. * alias.c: Do not include output.h. * auto-inc-dec.c: Likewise. * bt-load.c: Likewise. * caller-save.c: Likewise. * cfg.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphclones.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dojump.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * graph.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-utils.c: Likewise. * ira-build.c: Likewise. * ira-emit.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * loop-unswitch.c: Likewise. * lto-cgraph.c: Likewise. * lto-section-in.c: Likewise. * lto-streamer-in.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * profile.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * regmove.c: Likewise. * regstat.c: Likewise. * reload1.c: Likewise. * sched-ebb.c: Likewise. * sel-sched-dump.c: Likewise. * simplify-rtx.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-dfa.c: Likewise. * tree-into-ssa.c: Likewise. * tree-nomudflap.c: Likewise. * tree-optimize.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * web.c: Likewise. * config/m32r/m32r.c: Include dbxout.h. * config/pa/pa.c: Likewise. * config/rs6000/rs6000.c: Likewise. * Makefile.in: Fix dependencies. * config/rs6000/t-rs5000: Likewise. c-family/ * c-ada-spec.c: Do not include output.h. * c-semantics.c: Likewise. cp/ * call.c: Do not include output.h. * class.c: Likewise. * except.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lex.c: Likewise. * method.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. objc/ * objc-act.c: Do not include output.h. fortran/ * trans-common.c: Do not include output.h. * trans-decl.c: Likewise. java/ * resource.c: Do not include output.h. From-SVN: r188082
2012-05-31 22:19:00 +02:00
2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
* c-ada-spec.c: Do not include output.h.
* c-semantics.c: Likewise.
2012-05-29 Joseph Myers <joseph@codesourcery.com>
* c-common.c: Fix typo.
2012-05-29 Michael Matz <matz@suse.de>
* c-common.h (c_expand_decl): Remove prototype.
2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
* c-opts.c (c_common_handle_option): Remove code handling
warn_missing_braces.
2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/25137
* c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
-Wmissing_braces.
2012-05-22 Dodji Seketeli <dodji@redhat.com>
PR c++/53322
* c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
* c-opts.c (c_common_handle_option): Do not handle explicitly
Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
PR preprocessor/7263 - Avoid pedantic warnings on system headers macro tokens Now that we track token locations accross macro expansions, it would be cool to be able to fix PR preprocessor/7263 for real. That is, consider this example where we have a system header named header.h like this: #define _Complex __complex__ #define _Complex_I 1.0iF and then a normal C file like this: #include "header.h" static _Complex float c = _Complex_I; If we compile the file with -pedantic, the usages of _Complex or _Complex_I should not trigger any warning, even though __complex__ and the complex literal are extensions to the standard C. They shouldn't trigger any warning because _Complex and _Complex_I are defined in a system header (and expanded in normal user code). To be able to handle this, we must address two separate concerns. First, warnings about non-standard usage of numerical literals are emitted directly from within libcpp. So we must teach libcpp's parser for numerical literals to use virtual locations, instead of the spelling location it uses today. Once we have that, as the diagnostics machinery already knows how to avoid emitting errors happening on tokens that come from system headers, we win. Second, there is the issue of tracking locations for declaration specifiers, like the "_Complex" in the declaration: static _Complex float c; For that, we need to arrange for each possible declaration specifier to have its own location, because otherwise, we'd warn on e.g, on: _Complex float c; but not on: static _Complex float c; So this patch addresses the two concerns above. It's actually a follow-up on an earlier patch[1] I wrote as part of my initial work on virtual locations. We then agreed[2] that the second concern was important to address before the patch could get a chance to go in. [1]: http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00957.html [2]: http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00264.html Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk. libcpp/ PR preprocessor/7263 * include/cpplib.h (cpp_classify_number): Take a location parameter. * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic macros that take a location parameter. (cpp_classify_number): Take a (virtual) location parameter. Use it for diagnostics. Adjust comments. (eval_token): Take a location parameter. Pass it to cpp_classify_number and to diagnostic routines. (_cpp_parse_expr): Use virtual locations of tokens when parsing expressions. Pass a virtual location to eval_token and to diagnostic routines. gcc/c-family/ PR preprocessor/7263 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call to cpp_classify_number. For diagnostics, use the precise location instead of the global input_location. gcc/ PR preprocessor/7263 * c-tree.h (enum c_declspec_word): Declare new enum. (struct c_declspecs::locations): New member. (declspecs_add_qual, declspecs_add_scspec) (declspecs_add_addrspace, declspecs_add_alignas): Take a new location parameter. * c-decl.c (build_null_declspecs): Initialize the new struct c_declspecs::locations member. (declspecs_add_addrspace): Take a location parameter for the address space. Store it onto declaration specifiers. (declspecs_add_qual): Likewise, take a location parameter for the qualifier. (declspecs_add_type): Likewise, take a location parameter for the type specifier. (declspecs_add_scspec): Likewise, take a location parameter for the storage class specifier. (declspecs_add_attrs): Likewise, take a location parameter for the first attribute. (declspecs_add_alignas): Likewise, take a location parameter for the alignas token. (finish_declspecs): For diagnostics, use the location of the relevant declspec, instead of the global input_location. * c-parser.c (c_parser_parameter_declaration): Pass the precise virtual location of the declspec to the declspecs-setters. (c_parser_declspecs): Likewise. Avoid calling c_parser_peek_token repeatedly. gcc/cp/ PR preprocessor/7263 * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all the possible declarator specifiers so far. (struct cp_decl_specifier_seq::locations): Declare new member. (cp_decl_specifier_seq::{specs, type_location}): Remove. (decl_spec_seq_has_spec_p): Declare new function. * parser.c (cp_parser_check_decl_spec): Remove. (set_and_check_decl_spec_loc): Define new static function. (decl_spec_seq_has_spec_p): Define new public function. (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt) (cp_parser_type_specifier, cp_parser_simple_type_specifier) (cp_parser_set_storage_class, cp_parser_set_decl_spec_type) (cp_parser_alias_declaration): Set the locations for each declspec, using set_and_check_decl_spec_loc. (cp_parser_explicit_instantiation, cp_parser_init_declarator) (cp_parser_member_declaration, cp_parser_init_declarator): Use the new declspec location for specifiers. Use the new decl_spec_seq_has_spec_p. (cp_parser_type_specifier_seq): Use the new set_and_check_decl_spec_loc. Stop using cp_parser_check_decl_spec. Use the new decl_spec_seq_has_spec_p. (, cp_parser_init_declarator): Use the new set_and_check_decl_spec_loc. (cp_parser_single_declaration, cp_parser_friend_p) (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration): Use the new decl_spec_seq_has_spec_p. * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p. Use the more precise ds_redefined_builtin_type_spec location for diagnostics about re-declaring C++ built-in types. (start_decl, grokvardecl, grokdeclarator): Use the new decl_spec_seq_has_spec_p. gcc/testsuite/ PR preprocessor/7263 * gcc.dg/binary-constants-2.c: Run without tracking locations accross macro expansion. * gcc.dg/binary-constants-3.c: Likewise. * gcc.dg/cpp/sysmac2.c: Likewise. * testsuite/gcc.dg/nofixed-point-2.c: Adjust for more precise location. * gcc.dg/cpp/syshdr3.c: New test. * gcc.dg/cpp/syshdr3.h: New header for the new test above. * gcc.dg/system-binary-constants-1.c: New test. * gcc.dg/system-binary-constants-1.h: New header for the new test above. * g++.dg/cpp/syshdr3.C: New test. * g++.dg/cpp/syshdr3.h: New header the new test above. * g++.dg/system-binary-constants-1.C: New test. * g++.dg/system-binary-constants-1.h: New header the new test above. From-SVN: r187587
2012-05-16 12:51:15 +02:00
2012-05-16 Dodji Seketeli <dodji@redhat.com>
PR preprocessor/7263
* c-lex.c (c_lex_with_flags): Pass a virtual location to the call
to cpp_classify_number. For diagnostics, use the precise location
instead of the global input_location.
2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/11856
* c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
2012-05-15 12:51:02 +02:00
2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
* c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
2012-05-15 12:51:02 +02:00
2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 53063
* c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
Wreorder): Use LangEnabledBy.
* c-opts.c (c_common_handle_option): Do not enable them
explicitly. Call lang-specific generated functions.
(c_common_post_options): Do not set them here.
2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
Wmissing-field-initializers,Wmissing-parameter-type,
Wold-style-declaration,Woverride-init): Use EnabledBy.
* c-opts.c (c_common_post_options): Do not set here explicitly.
2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 53063
* c-opts.c (c_common_handle_option): Use handle_generated_option
to enable sub-options.
2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53158
* c-common.c (warnings_for_convert_and_check): Use warning_at.
2012-05-10 Richard Guenther <rguenther@suse.de>
* c-common.c (c_sizeof_or_alignof_type): Remove assert and
adjust commentary about TYPE_IS_SIZETYPE types.
2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53261
* c-common.c (warn_logical_operator): Check that argument of
integer_zerop is not NULL.
2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/43772
* c-common.c (warn_logical_operator): Do not warn if either side
is already true or false.
2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/51712
* c-common.c (expr_original_type): New.
(shorten_compare): Do not warn for enumeration types.
2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (fpermissive): Add Var(flag_permissive).
2012-04-30 Marc Glisse <marc.glisse@inria.fr>
PR c++/51033
* c-common.c (convert_vector_to_pointer_for_subscript): New function.
* c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
2012-04-30 Dodji Seketeli <dodji@redhat.com>
Add -Wvarargs option
* c.opt (Wvarargs): Define new option.
2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-common.c (check_function_arguments): Replace
Wmissing-format-attribute with Wsuggest-attribute=format.
2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (Wsuggest-attribute=format): New. Alias of
Wmissing-format-attribute.
* c-format.c (decode_format_type): Replace
Wmissing-format-attribute with Wsuggest-attribute=format.
(check_function_format): Likewise.
2012-04-27 Ollie Wild <aaw@google.com>
* c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
* c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
* c.opt: Add Wliteral-suffix.
re PR c/44774 (-Werror=edantic) 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c/44774 gcc/ * doc/invoke.texi (pedantic): Rename to Wpedantic. * common.opt (Wpedantic): New. (pedantic): Alias Wpedantic. * diagnostic.c (warning_at): Likewise. * c-decl.c (diagnose_mismatched_decls): Likewise. (build_array_declarator): Likewise. (mark_forward_parm_decls): (check_bitfield_type_and_width): Likewise. (grokdeclarator): Likewise. (grokfield): Likewise. (finish_struct): Likewise. (build_enumerator): Likewise. (store_parm_decls_oldstyle): Likewise. (declspecs_add_qual): Likewise. (declspecs_add_type): Likewise. (finish_declspecs): Likewise. * c-typeck.c (composite_type): Likewise. (comp_target_types): Likewise. (build_array_ref): Likewise. (pointer_diff): Likewise. (build_unary_op): Likewise. (build_conditional_expr): Likewise. (build_c_cast): Likewise. (convert_for_assignment): Likewise. (maybe_warn_string_init): Likewise. (digest_init): Likewise. (pop_init_level): Likewise. (set_init_index): Likewise. (c_finish_goto_label): Likewise. (c_finish_return): Likewise. (do_case): Likewise. (build_binary_op): Likewise. * c-parser.c (static): Likewise. (c_parser_external_declaration): Likewise. (c_parser_declaration_or_fndef): Likewise. (c_parser_static_assert_declaration_no_se): Likewise. (c_parser_enum_specifier): Likewise. (c_parser_struct_or_union_specifier): Likewise. (c_parser_struct_declaration): Likewise. (c_parser_alignas_specifier): Likewise. (c_parser_braced_init): Likewise. (c_parser_initelt): Likewise. (c_parser_compound_statement_nostart): Likewise. (c_parser_conditional_expression): Likewise. (c_parser_alignof_expression): Likewise. (c_parser_postfix_expression): Likewise. (c_parser_postfix_expression_after_paren_): Likewise. (c_parser_objc_class_instance_variables): Likewise. (c_parser_objc_method_definition): Likewise. (c_parser_objc_methodprotolist): Likewise. c-family/ * c.opt (Wpedantic): New. (pedantic): Alias Wpedantic. * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic. (c_common_post_options): Likewise. (sanitize_cpp_opts): Likewise. * c-lex.c (interpret_float): Likewise. * c-format.c (check_format_types): Likewise. * c-common.c (pointer_int_sum): Likewise. (c_sizeof_or_alignof_type): Likewise. (c_add_case_label): Likewise. (c_do_switch_warnings): Likewise. * c-pragma.c (handle_pragma_float_const_decimal64): Likewise. cp/ * typeck.c (composite_pointer_type): Likewise. (cxx_sizeof_or_alignof_type): Likewise. (cp_build_array_ref): Likewise. (cp_build_function_call_vec): Likewise. (cp_build_addr_expr_1): Likewise. (convert_member_func_to_ptr): Likewise. * decl.c (check_tag_decl): Likewise. (check_static_variable_definition): Likewise. (compute_array_index_type): Likewise. (create_array_type_for_decl): Likewise. (grokdeclarator): Likewise. (grok_op_properties): Likewise. * error.c (maybe_warn_cpp0x): Likewise. * pt.c (maybe_process_partial_specialization): Likewise. (convert_template_argument): Likewise. (do_decl_instantiation): Likewise. (do_type_instantiation): Likewise. * parser.c (cp_parser_primary_expression): Likewise. (cp_parser_postfix_expression): Likewise. (cp_parser_unary_expression): Likewise. (cp_parser_question_colon_clause): Likewise. (cp_parser_lambda_introducer): Likewise. (cp_parser_lambda_declarator_opt): Likewise. (cp_parser_compound_statement): Likewise. (cp_parser_jump_statement): Likewise. (cp_parser_declaration_seq_opt): Likewise. (cp_parser_enum_specifier): Likewise. (cp_parser_enumerator_list): Likewise. (cp_parser_initializer_list): Likewise. (cp_parser_member_declaration): Likewise. * call.c (build_conditional_expr_1): Likewise. * friend.c (make_friend_class): Likewise. * name-lookup.c (pushdecl_maybe_friend_1): Likewise. From-SVN: r186681
2012-04-22 21:17:47 +02:00
2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/44774
* c.opt (Wpedantic): New.
(pedantic): Alias Wpedantic.
* c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
(c_common_post_options): Likewise.
(sanitize_cpp_opts): Likewise.
* c-lex.c (interpret_float): Likewise.
* c-format.c (check_format_types): Likewise.
* c-common.c (pointer_int_sum): Likewise.
(c_sizeof_or_alignof_type): Likewise.
(c_add_case_label): Likewise.
(c_do_switch_warnings): Likewise.
* c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
2012-04-15 Jason Merrill <jason@redhat.com>
PR c++/52818
* c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
(C_STD_NAME): Distinguish between C++98 and C++11.
2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
PR target/52624
* c-common.h (uint16_type_node): Rename into...
(c_uint16_type_node): ...this.
* c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
* c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-common.c (warn_if_unused_value): Move definition to here.
* c-common.h (warn_if_unused_value): Move declaration to here.
2012-03-23 William Bader <williambader@hotmail.com>
* c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
2012-03-20 Jason Merrill <jason@redhat.com>
* c-common.h (enum cxx_dialect): Add cxx1y.
* c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
test.
* c-cppbuiltin.c (c_cpp_builtins): Likewise.
* c-opts.c (c_common_post_options): Likewise.
(set_std_cxx1y): New.
(c_common_handle_option): Call it.
* c.opt (-std=c++1y, -std=gnu++1y): New flags.
2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/14710
* c.opt ([Wuseless-cast]): Add.
tree.h (TREE_VECTOR_CST_ELTS): Remove. 2012-03-16 Richard Guenther <rguenther@suse.de> * tree.h (TREE_VECTOR_CST_ELTS): Remove. (VECTOR_CST_NELTS, VECTOR_CST_ELTS, VECTOR_CST_ELT): New defines. (struct tree_vector): Remove elements member, add variable size elts array member. (build_vector_stat): Declare. (build_vector): Define in terms of build_vector_stat. * tree.c (build_vector): Rename to ... (build_vector_stat): ... this. Take array of trees as parameter. (build_vector_from_ctor): Adjust. (integer_zerop, integer_onep, integer_all_onesp, iterative_hash_expr, initializer_zerop): Adjust. * cfgexpand.c (expand_debug_expr): Likewise. * expr.c (categorize_ctor_elements_1, expand_expr_real_1, const_vector_from_tree): Likewise. * fold-const.c (const_binop, operand_equal_p, native_encode_vector, native_interpret_vector, fold_unary_loc, vec_cst_ctor_to_array, fold_vec_perm, fold_binary_loc, fold_ternary_loc): Likewise. * tree-streamer-in.c (streamer_alloc_tree): Handle TS_VECTOR. (lto_input_ts_vector_tree_pointers): Adjust. * tree-streamer-out.c (streamer_write_tree_header): Handle TS_VECTOR. (write_ts_vector_tree_pointers): Adjust. * varasm.c (const_hash_1, compare_constant, copy_constant, output_constant): Adjust. * gimple-fold.c (gimple_fold_stmt_to_constant_1): Adjust. * print-tree.c (print_node): Adjust. * tree-pretty-print.c (dump_generic_node): Adjust. * tree-vect-generic.c (uniform_vector_p, vector_element, lower_vec_perm): Adjust. * tree-vect-loop.c (get_initial_def_for_reduction): Adjust. * tree-vect-slp.c (vect_get_constant_vectors, vect_transform_slp_perm_load): Adjust. * tree-vect-stmts.c (vect_gen_perm_mask): Adjust. * expmed.c (make_tree): Adjust. * config/i386/i386.c (ix86_expand_builtin): Adjust. * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Adjust interface and implementation. (sparc_fold_builtin): Adjust. c-family/ * c-pretty-print.c (pp_c_initializer_list): Adjust. From-SVN: r185458
2012-03-16 10:47:09 +01:00
2012-03-16 Richard Guenther <rguenther@suse.de>
* c-pretty-print.c (pp_c_initializer_list): Adjust.
2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/44783
* c.opt (ftemplate-backtrace-limit) Add.
Remove obsolete Tru64 UNIX V5.1B support libstdc++-v3: * configure.host: Remove osf* handling. * config/os/osf: Remove. * doc/xml/manual/using.xml: Remove OSF reference. * testsuite/18_support/pthread_guard.cc: Remove alpha*-*-osf* handling. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/21_strings/basic_string/pthread18185.cc: Likewise. * testsuite/21_strings/basic_string/pthread4.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise. * testsuite/23_containers/list/pthread1.cc: Likewise. * testsuite/23_containers/list/pthread5.cc: Likewise. * testsuite/23_containers/map/pthread6.cc: Likewise. * testsuite/23_containers/vector/debug/multithreaded_swap.cc: Likewise. * testsuite/27_io/basic_ofstream/pthread2.cc: Likewise. * testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise. * testsuite/30_threads/async/42819.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/any.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/async.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/launch.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/sync.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/39909.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/45133.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/get.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/get2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/share.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/swap.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/6.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/7.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/8.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/9.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/swap/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc: Likewise. * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc: Likewise. * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. libobjc: * configure.ac (enable_objc_gc): Remove alpha*-dec-osf* handling. * configure: Regenerate. * thr.c (_XOPEN_SOURCE): Define unconditionally. libjava: * configure.ac (alpha*-dec-osf*): Remove. * configure: Regenerate. * configure.host (alpha*-dec-osf*): Remove. * gnu/java/net/natPlainDatagramSocketImplPosix.cc (setOption): Use IPV6_MULTICAST_IF unconditionally. * gnu/java/net/natPlainDatagramSocketImplWin32.cc (setOption): Likewise. * gnu/java/net/natPlainSocketImplPosix.cc (gnu::java::net::PlainSocketImpl::accept): Use ::accept instead of _Jv_accept. * include/posix-signal.h [__alpha__ && __osf__]: Remove. * include/posix.h (_POSIX_PII_SOCKET): Don't define. (_Jv_accept): Remove. * java/io/File.java (File._access): Rename to access. Change callers. (File._stat): Likewise. * java/io/File.h: Regenerate. * classpath/lib/java/io/File.class: Regenerate. * java/io/natFilePosix.cc (java::io::File::_access): Rename to access. (java::io::File::_stat): Rename to stat. * java/io/natFileWin32.cc: Likewise. * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation): Remove alpha*-dec-osf* handling. * testsuite/libjava.jvmti/jvmti-interp.exp (gcj_jni_compile_c_to_so): Likewise. * testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise. libitm: * configure.tgt (*-*-osf*): Remove. * configure: Regenerate. libgomp: * configure.tgt (alpha*-dec-osf*): Remove. * config/osf/sem.h: Remove. * config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally. libgfortran: * configure.ac: Remove Tru64 reference. * acinclude.m4 (LIBGFOR_GTHREAD_WEAK): Remove alpha*-dec-osf* handling. * configure: Regenerate. * intrinsics/c99_functions.c [__osf__]: Remove. libgcc: * config.host: Remove alpha*-dec-osf5.1* handling. * config/alpha/gthr-posix.c: Remove. * config/alpha/libgcc-osf5.ver: Remove. * config/alpha/osf5-unwind.h: Remove. * config/alpha/t-osf-pthread: Remove. * config/alpha/t-slibgcc-osf: Remove. * config/t-crtfm (crtfastmath.o): Remove -frandom-seed. * gthr-posix.h [!_REENTRANT && __osf__] (_REENTRANT): Don't define. [__osf__ && _PTHREAD_USE_MANGLED_NAMES_]: Remove. * mkmap-flat.awk: Remove osf_export handling. gnattools: * configure.ac: Remove alpha*-dec-osf* handling. * configure: Regenerate. gcc/testsuite: * g++.dg/abi/rtti3.C: Remove alpha*-dec-osf* handling. * g++.dg/abi/thunk4.C: Likewise. * g++.dg/cdce3.C: Don't skip on*-dec-osf5*. Adapt line numbers. * g++.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* handling. * g++.dg/cpp0x/constexpr-rom.C: Likewise. * g++.dg/eh/spbp.C: Likewise. * g++.dg/ext/label13.C: Likewise. * g++.dg/guality/guality.exp: Likewise. * g++.dg/other/anon5.C: Likewise. * g++.dg/other/pragma-ep-1.C: Remove. * g++.dg/warn/miss-format-1.C: Remove alpha*-dec-osf* handling. * g++.dg/warn/pr31246.C: Likewise. * g++.dg/warn/weak1.C: Likewise. * g++.old-deja/g++.eh/badalloc1.C: Likewise. * g++.old-deja/g++.ext/attrib5.C: Likewise. * gcc.c-torture/compile/limits-declparen.c: Likewise. * gcc.c-torture/compile/limits-pointer.c: Likewise. * gcc.c-torture/execute/20001229-1.c: Remove __osf__ handling. * gcc.dg/attr-weakref-1.c: Remove alpha*-dec-osf* handling. * gcc.dg/c99-stdint-6.c: Remove alpha*-dec-osf5* handling. * gcc.dg/c99-tgmath-1.c: Likewise. * gcc.dg/c99-tgmath-2.c: Likewise. * gcc.dg/c99-tgmath-3.c: Likewise. * gcc.dg/c99-tgmath-4.c: Likewise. * gcc.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* handling. * gcc.dg/debug/pr49032.c: Likewise. * gcc.dg/guality/guality.exp: Likewise. * gcc.dg/intmax_t-1.c: Likewise. * gcc.dg/pr48616.c: Likewise. * gcc.dg/pragma-ep-1.c: Remove. * gcc.dg/pragma-ep-2.c: Remove. * gcc.dg/pragma-ep-3.c: Remove. * gcc.dg/torture/pr47917.c: Remove alpha*-dec-osf5* handling. * gcc.dg/tree-ssa/pr42585.c: Remove alpha*-dec-osf* handling. * gcc.misc-tests/gcov-14.c: Likewise. * gfortran.dg/guality/guality.exp: Likewise. * lib/target-supports.exp (check_weak_available): Likewise. (add_options_for_tls): Likewise. (check_ascii_locale_available): Likewise. * obj-c++.dg/dwarf-2.mm: Likewise. * objc.dg/dwarf-1.m: Likewise. * objc.dg/dwarf-2.m: Likewise. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix handling. * c-pragma.c (handle_pragma_extern_prefix): Remove. (init_pragma): Don't register extern_prefix. gcc/po: * EXCLUDES (mips-tdump.c, mips-tfile.c): Remove. gcc: * config.gcc (alpha*-dec-osf5.1*): Remove. * config.host (alpha*-dec-osf*): Remove. * configure.ac (*-*-osf*): Remove. (alpha*-dec-osf*): Remove. * configure: Regenerate. * config/alpha/host-osf.c, config/alpha/osf5.h, config/alpha/osf5.opt, config/alpha/va_list.h, config/alpha/x-osf: Remove. * config/alpha/alpha.h (TARGET_LD_BUGGY_LDGP): Remove. * config/alpha/alpha.c (struct machine_function): Update comment. (alpha_start_function): Remove Tru64 UNIX as handling for max_frame_size. * config/alpha/alpha.md ("exception_receiver"): Remove TARGET_LD_BUGGY_LDGP. ("*exception_receiver_2"): Likewise. * except.c (finish_eh_generation): Remove Tru64 reference. * ginclude/stdarg.h [_HIDDEN_VA_LIST]: Don't undef _VA_LIST. * system.h (TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Poison. * target.def (handle_pragma_extern_prefix): Remove. * Makefile.in (mips-tfile.o-warn): Remove. (ALL_HOST_BACKEND_OBJS): Remove mips-tfile.o, mips-tdump.o. (mips-tfile, mips-tfile.o, mips-tdump, mips-tdump.o): Remove. * mips-tdump.c, mips-tfile.c: Remove. * doc/extend.texi (Symbol-Renaming Pragmas): Remove #pragma extern_prefix. * doc/install.texi (Binaries): Remove Tru64 UNIX reference. (Specific, alpha*-dec-osf5.1): Note removal. * doc/tm.texi.in (Misc, TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Remove. * doc/tm.texi: Regenerate. * doc/trouble.texi (Cross-Compiler Problems): Remove. gcc/ada: * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove. * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb, s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads, s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads, system-tru64.ads: Remove. * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]: Remove. [IS_CROSS] [!(__alpha__ && __osf__)]: Remove. * env.c [__alpha__ && __osf__]: Remove. * gsocket.h (_OSF_SOURCE): Remove. (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove. * init.c [__alpha__ && __osf__]: Remove. * link.c [__osf__]: Remove. * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove. [__osf__ && !_SS_MAXSIZE]: Remove. * sysdep.c [__osf__]: Remove. * terminals.c [__alpha__ && __osf__]: Remove. [OSF1]: Remove. * g-traceb.ads: Remove Tru64 reference. * g-trasym.ads: Likewise. * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise. (Summary of Run-Time Configurations): Likewise. * memtrack.adb: Likewise. fixincludes: * inclhack.def (alpha___extern_prefix): Remove. (alpha___extern_prefix_standards): Remove. (alpha___extern_prefix_sys_stat): Remove. (alpha_bad_lval): Remove. (alpha_pthread): Remove. (alpha_pthread_gcc): Remove. (alpha_pthread_init): Remove. * fixincl.x: Regenerate. * tests/base/pthread.h [ALPHA_PTHREAD_CHECK]: Remove. [ALPHA_PTHREAD_GCC_CHECK]: Remove. [ALPHA_PTHREAD_INIT_CHECK]: Remove. * tests/base/standards.h: Remove. * tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK]: Remove. * tests/base/testing.h [ALPHA___EXTERN_PREFIX_CHECK]: Remove. [ALPHA_BAD_LVAL_CHECK]: Remove. contrib: * config-list.mk (LIST): Remove alpha-dec-osf5.1. config: * weakref.m4 (GCC_CHECK_ELF_STYLE_WEAKREF): Remove alpha*-dec-osf*. toplevel: * MAINTAINERS (OS Port Maintainers): Remove osf. * configure.ac (enable_libgomp): Remove *-*-osf*. (with_stabs): Remove alpha*-*-osf*. * configure: Regenerate. From-SVN: r185240
2012-03-12 16:35:56 +01:00
2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
handling.
* c-pragma.c (handle_pragma_extern_prefix): Remove.
(init_pragma): Don't register extern_prefix.
2012-03-12 Richard Guenther <rguenther@suse.de>
* c-common.c (c_common_get_narrower): Use c_common_type_for_size.
(builtin_type_for_size): Likewise.
2012-02-13 Jakub Jelinek <jakub@redhat.com>
PR c++/52215
* c-common.c (sync_resolve_params): Don't decide whether to convert
or not based on TYPE_SIZE comparison, convert whenever arg_type
is unsigned INTEGER_TYPE.
2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c/52118
* c.opt ([Wunused-local-typedefs]): Fix description.
2012-01-24 Mike Stump <mikestump@comcast.net>
* c-common.c (c_common_type_for_mode): Match signed/unsigned types
exactly.
2012-01-18 Richard Guenther <rguenther@suse.de>
* c-opts.c (c_common_post_options): Reset LTO flags if
we are about to generate a PCH.
2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51777
* c-pretty-print.c (pp_c_integer_constant): For unsigned constants
use pp_unsigned_wide_integer.
2012-01-10 Richard Guenther <rguenther@suse.de>
PR middle-end/51806
* c-opts.c (c_common_handle_option): Move -Werror handling
to language independent code.
2012-01-05 Richard Guenther <rguenther@suse.de>
PR middle-end/51764
* c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
from common.opt.
2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51316
* c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
of array types with an unknown bound.
gcc: * c-decl.c (diagnose_mismatched_decls, grokdeclarator, grokfield) (finish_struct): Refer to C11 in comments. Use flag_isoc11. * c-parser.c (c_parser_static_assert_declaration) (c_parser_static_assert_declaration_no_semi, c_parser_declspecs) (c_parser_alignas_specifier, c_parser_alignof_expression): Refer to C11 in comments. Use flag_isoc11. * c-typeck.c (comptypes_check_different_types): Refer to C11 in comment. * doc/cpp.texi (Overview): Refer to -std=c11 instead of -std=c1x. * doc/cppopts.texi (-std=c11, -std=gnu11): Document in preference to -std=c1x and -std=gnu1x. * doc/extend.texi (Inline, Alternate Keywords, Other Builtins) (__builtin_complex, Unnamed Fields): Refer to -std=c11 and C11 instead of -std=c1x and C1X. * doc/invoke.texi (-std=c11, -std=iso9899:2011): Document in preference to -std=c1x. (-std=gnu11): Document in preference to -std=gnu1x. * doc/standards.texi: Document C11 instead of C1X. Document C11 as actual standard. Document headers required from freestanding C11 implementations. * ginclude/float.h, ginclude/stddef.h: Test __STDC_VERSION__ >= 201112L for C11. Update comments to refer to C11. gcc/c-family: * c-common.c (flag_isoc99): Update comment to refer to C11. (flag_isoc1x): Change to flag_isoc11. * c-common.h (flag_isoc99): Update comment to refer to C11. (flag_isoc1x): Change to flag_isoc11. * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to C11. * c-opts.c (set_std_c1x): Change to set_std_c11. (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11. Call set_std_c11. (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11. (set_std_c1): Use CLK_STDC11 and CLK_GNUC11. * c.opt (std=c1x): Change to std=c11. Document as non-draft standard. (std=c1x, std=iso9899:2011): Add as aliases of std=c11. (std=gnu1x): Change to std=gnu11. Refer to non-draft standard. (std=gnu1x): Make alias of std=gnu11. gcc/testsuite: * gcc.dg/c11-version-1.c, gcc.dg/c11-version-2.c, gcc.dg/c94-version-1.c, gcc.dg/c99-version-1.c, gcc.dg/gnu11-version-1.c: New tests. libcpp: * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11. (CLK_STDC1X): Change to CLK_STDC11. * init.c (lang_defaults): Update comments. (cpp_init_builtins): Update language tests. Use 201112L for C11 __STDC_VERSION__. From-SVN: r182551
2011-12-20 21:44:13 +01:00
2011-12-20 Joseph Myers <joseph@codesourcery.com>
* c-common.c (flag_isoc99): Update comment to refer to C11.
(flag_isoc1x): Change to flag_isoc11.
* c-common.h (flag_isoc99): Update comment to refer to C11.
(flag_isoc1x): Change to flag_isoc11.
* c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
C11.
* c-opts.c (set_std_c1x): Change to set_std_c11.
(c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
Call set_std_c11.
(set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
(set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
* c.opt (std=c1x): Change to std=c11. Document as non-draft
standard.
(std=c1x, std=iso9899:2011): Add as aliases of std=c11.
(std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
(std=gnu1x): Make alias of std=gnu11.
2011-12-19 Jason Merrill <jason@redhat.com>
PR c++/51228
* c-common.c (handle_transparent_union_attribute): Check the first
field if the type is complete.
2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/51365
* c-common.c (RID_IS_FINAL): Add.
* c-common.h (RID_IS_FINAL): Add.
2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
* c.opt (fgnu-runtime): Provide full description.
(fnext-runtime): Likewise.
* c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
2011-11-28 Andrew MacLeod <amacleod@redhat.com>
* c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
predefines in one place. Add LOCK_FREE predefines.
(c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
new func.
2011-11-24 Andrew MacLeod <amacleod@redhat.com>
PR c/51256
* c-common.c (get_atomic_generic_size): Check for various error
conditions
(resolve_overloaded_atomic_exchange,
resolve_overloaded_atomic_compare_exchange,
resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
error_mark_node for error conditions.
2011-11-08 Richard Guenther <rguenther@suse.de>
PR middle-end/51010
c-family/
2011-11-07 Richard Henderson <rth@redhat.com>
Aldy Hernandez <aldyh@redhat.com>
Torvald Riegel <triegel@redhat.com>
Merged from transactional-memory.
* c-common.c (handle_tm_wrap_attribute,
handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
(struct c_common_reswords): Added __transaction* keywords.
(struct c_common_attribute_table): Added transaction* and tm_regparm
attributes.
* c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
masks.
(parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
find_tm_attribute): Declare.
2011-11-07 Jason Merrill <jason@redhat.com>
PR c++/35688
* c-common.c, c-common.h: Revert yesterday's changes.
2011-11-06 Jason Merrill <jason@redhat.com>
PR c++/35688
* c-common.c (decl_has_visibility_attr): Split out from...
(c_determine_visibility): ...here.
* c-common.h: Declare it.
2011-11-06 Joseph Myers <joseph@codesourcery.com>
* c-common.c (c_common_reswords): Add _Alignas and _Alignof.
(c_sizeof_or_alignof_type): Diagnose alignof applied to a function
type.
(check_user_alignment): New. Split out of
handle_aligned_attribute. Disallow integer constants with
noninteger types. Conditionally allow zero.
(handle_aligned_attribute): Use check_user_alignment.
* c-common.h (RID_ALIGNAS, check_user_alignment): New.
2011-11-06 Andrew MacLeod <amacleod@redhat.com>
Richard Henderson <rth@redhat.com>
Merged from cxx-mem-model.
* c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
* c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
parameters that are the same type size.
(get_atomic_generic_size): New. Find size of generic
atomic function parameters and do typechecking.
(add_atomic_size_parameter): New. Insert size into parameter list.
(resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
either __atomic_exchange_n or external library call.
(resolve_overloaded_atomic_compare_exchange): Restructure
__atomic_compare_exchange to either _n variant or external library call.
(resolve_overloaded_atomic_load): Restructure __atomic_load to either
__atomic_load_n or an external library call.
(resolve_overloaded_atomic_store): Restructure __atomic_store to either
__atomic_store_n or an external library call.
(resolve_overloaded_builtin): Handle new __atomic builtins.
2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
PR c++/50608
* c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
(fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
<INDIRECT_REF>: Return the argument.
<ARRAY_REF>: Remove special code for negative offset.
Call fold_build_pointer_plus instead of size_binop.
(fold_offsetof): Remove STOP_REF argument and adjust.
* c-common.h (fold_offsetof_1): Declare.
(fold_offsetof): Remove STOP_REF argument.
2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50810
* c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
Wnarrowing for C++0x and C++98.
* c.opt ([Wnarrowing]): Update.
2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/44277
* c.opt: Add Wzero-as-null-pointer-constant.
2011-10-31 Jason Merrill <jason@redhat.com>
* c.opt (-fdeduce-init-list): Off by default.
PR c++/50920
* c-common.h (cxx_dialect): Add cxx11 and cxx03.
* c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
and -Wc++11-compat.
* c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
PR c++/30066
* c.opt (fvisibility-inlines-hidden): Description change.
Implement C++11 user-defined literals. libcpp/ * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix, cpp_userdef_string_remove_type, cpp_userdef_string_add_type, cpp_userdef_char_remove_type, cpp_userdef_char_add_type, cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New. (cpp_classify_number): Classify unrecognized tokens as user-defined literals. * include/cpplib.h: Add new tokens for user-defined literals. * init.c: Add new preprocessor flag (cxx11). * lex.c: (lex_string, lex_raw_string): Handle user-defined literals including concatenation and promotion with suffixes. c-family/ * c-common.c (build_userdef_literal): New. * c-common.def: New tree code. * c-common.h (tree_userdef_literal): New tree struct and accessors. * c-lex.c (interpret_float): Add suffix parm. (c_lex_with_flags): Build literal tokens. cp/ * cp-objcp-common.c: (cp_tree_size) Return size of USERDEF_LITERAL tree. * cp-tree.h: (UDLIT_OP_*, UDLIT_OPER_P): Literal operator name tools. New tree code for user-defined literals. * cxx-pretty-print.h: (pp_cxx_userdef_literal) New. * cxx-pretty-print.c: (pp_cxx_userdef_literal) New. (pp_cxx_primary_expression, pp_cxx_expression): Use it. * decl.c: (cp_tree_node_structure): Return new tree code. (duplicate_decls): Check for raw vs. template operator conflicts. (grokfndecl, grokdeclarator): New checks for literal operators. * error.c: (dump_expr): Warn about user-defined literals in C++98 mode. (dump_function_name): Pretty printing. * mangle.c: (write_literal_operator_name): New. (write_unqualified_id, write_unqualified_name): Use it. * parser.c: (cp_parser_operator): Handle operator"". (cp_parser_userdef_char_literal, cp_parser_userdef_numeric_literal, cp_parser_userdef_string_literal): New. (cp_parser_primary_expression): Handle new user-defined literal tokens with new functions. * semantics.c: (potential_constant_expression_1): Add user-defined literals. * typeck.c (check_raw_literal_operator, check_literal_operator_args): New. From-SVN: r180536
2011-10-26 21:30:59 +02:00
2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
Implement C++11 user-defined literals.
* c-common.c (build_userdef_literal): New.
* c-common.def: New tree code.
* c-common.h (tree_userdef_literal): New tree struct and accessors.
* c-lex.c (interpret_float): Add suffix parm.
(c_lex_with_flags): Build literal tokens.
2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50841
Revert:
2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50810
* c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
Wnarrowing for C++0x and C++98.
* c.opt ([Wnarrowing]): Update.
2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50810
* c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
Wnarrowing for C++0x and C++98.
* c.opt ([Wnarrowing]): Update.
2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/45385
* c-common.c (conversion_warning): Remove code looking for
artificial operands.
2011-10-18 Dodji Seketeli <dodji@redhat.com>
PR bootstrap/50760
* c-lex.c (fe_file_change): Use LINEMAP_SYSP when
!NO_IMPLICIT_EXTERN_C.
2011-10-17 Michael Spertus <mike_spertus@symantec.com>
* c-common.c (c_common_reswords): Add __bases,
__direct_bases.
* c-common.h: Add RID_BASES and RID_DIRECT_BASES.
2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50757
* c.opt ([Wnonnull]): Add C++ and Objective-C++.
2011-10-15 Tom Tromey <tromey@redhat.com>
Dodji Seketeli <dodji@redhat.com>
* c.opt (fdebug-cpp): New option.
* c-opts.c (c_common_handle_option): Handle the option.
* c-ppoutput.c (maybe_print_line_1): New static function. Takes an
output stream in parameter. Factorized from ...
(maybe_print_line): ... this. Dump location debug information when
-fdebug-cpp is in effect.
(print_line_1): New static function. Takes an output stream in
parameter. Factorized from ...
(print_line): ... here. Dump location information when -fdebug-cpp
is in effect.
(scan_translation_unit): Dump location information when
-fdebug-cpp is in effect.
Generate virtual locations for tokens This second instalment uses the infrastructure of the previous patch to allocate a macro map for each macro expansion and assign a virtual location to each token resulting from the expansion. To date when cpp_get_token comes across a token that happens to be a macro, the macro expander kicks in, expands the macro, pushes the resulting tokens onto a "token context" and returns a dummy padding token. The next call to cpp_get_token goes look into the token context for the next token [which is going to result from the previous macro expansion] and returns it. If the token is a macro, the macro expander kicks in and you know the story. This patch piggy-backs on that macro expansion process, so to speak. First it modifies the macro expander to make it create a macro map for each macro expansion. It then allocates a virtual location for each resulting token. Virtual locations of tokens resulting from macro expansions are then stored on a special kind of context called an "expanded tokens context". In other words, in an expanded tokens context, there are tokens resulting from macro expansion and their associated virtual locations. cpp_get_token_with_location is modified to return the virtual location of tokens resulting from macro expansion. Note that once all tokens from an expanded token context have been consumed and the context and is freed, the memory used to store the virtual locations of the tokens held in that context is freed as well. This helps reducing the overall peak memory consumption. The client code that was getting macro expansion point location from cpp_get_token_with_location now gets virtual location from it. Those virtual locations can in turn be resolved into the different interesting physical locations thanks to the linemap API exposed by the previous patch. Expensive progress. Possibly. So this whole virtual location allocation business is switched off by default. So by default no extended token is created. No extended token context is created either. One has to use -ftrack-macro-expansion to switch this on. This complicates the code but I believe it can be useful as some of our friends found out at http://llvm.org/bugs/show_bug.cgi?id=5610 The patch tries to reduce the memory consumption by freeing some token context memory that was being reused before. I didn't notice any compilation slow down due to this immediate freeing on my GNU/Linux system. As no client code tries to resolve virtual locations to anything but what was being done before, no new test case has been added. Co-Authored-By: Dodji Seketeli <dodji@redhat.com> From-SVN: r180082
2011-10-17 11:59:12 +02:00
2011-10-15 Tom Tromey <tromey@redhat.com>
Dodji Seketeli <dodji@redhat.com>
* c.opt (ftrack-macro-expansion): New option. Handle it with and
without argument.
* c-opts.c (c_common_handle_option)<case
OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
cases. Handle -ftrack-macro-expansion with and without argument.
Linemap infrastructure for virtual locations This is the first instalment of a set which goal is to track locations of tokens across macro expansions. Tom Tromey did the original work and attached the patch to PR preprocessor/7263. This opus is a derivative of that original work. This patch modifies the linemap module of libcpp to add virtual locations support. A virtual location is a mapped location that can resolve to several different physical locations. It can always resolve to the spelling location of a token. For tokens resulting from macro expansion it can resolve to: - either the location of the expansion point of the macro. - or the location of the token in the definition of the macro - or, if the token is an argument of a function-like macro, the location of the use of the matching macro parameter in the definition of the macro The patch creates a new type of line map called a macro map. For every single macro expansion, there is a macro map that generates a virtual location for every single resulting token of the expansion. The good old type of line map we all know is now called an ordinary map. That one still encodes spelling locations as it has always had. As a result linemap_lookup as been extended to return a macro map when given a virtual location resulting from a macro expansion. The layout of structs line_map has changed to support this new type of map. So did the layout of struct line_maps. Accessor macros have been introduced to avoid messing with the implementation details of these datastructures directly. This helped already as we have been testing different ways of arranging these datastructure. Having to constantly adjust client code that is too tied with the internals of line_map and line_maps would have been even more painful. Of course, many new public functions have been added to the linemap module to handle the resolution of virtual locations. This patch introduces the infrastructure but no part of the compiler uses virtual locations yet. However the client code of the linemap data structures has been adjusted as per the changes. E.g, it's not anymore reliable for a client code to manipulate struct line_map directly if it just wants to deal with spelling locations, because struct line_map can now represent a macro map as well. In that case, it's better to use the convenient API to resolve the initial (possibly virtual) location to a spelling location (or to an ordinary map) and use that. This is the reason why the patch adjusts the Java, Ada and Fortran front ends. Also, note that virtual locations are not supposed to be ordered for relations '<' and '>' anymore. To test if a virtual location appears "before" another one, one has to use a new operator exposed by the line map interface. The patch updates the only spot (in the diagnostics module) I have found that was making the assumption that locations were ordered for these relations. This is the only change that introduces a use of the new line map API in this patch, so I am adding a regression test for it only. From-SVN: r180081
2011-10-17 11:58:56 +02:00
2011-10-15 Tom Tromey <tromey@redhat.com>
Dodji Seketeli <dodji@redhat.com>
* c-ppoutput.c (scan_translation_unit, maybe_print_line)
(print_line, cb_define, do_line_change): Adjust to avoid touching
the internals of struct line_map. Use the public API instead.
* c-pch.c (c_common_read_pch): Likewise.
* c-lex.c (fe_file_change): Likewise.
2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/17212
* c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/33067
* c-pretty-print.c (pp_c_floating_constant): Output
max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
* c-common.c (def_builtin_1): Delete old interface with two
parallel arrays to hold standard builtin declarations, and replace
it with a function based interface that can support creating
builtins on the fly in the future. Change all uses, and poison
the old names. Make sure 0 is not a legitimate builtin index.
* c-omp.c (c_finish_omp_barrier): Ditto.
(c_finish_omp_taskwait): Ditto.
(c_finish_omp_flush): Ditto.
2011-10-11 Tristan Gingold <gingold@adacore.com>
* c.opt: (fallow-parameterless-variadic-functions): New.
PR c++/33255 - Support -Wunused-local-typedefs warning gcc/ * c-decl.c (lookup_name): Use the new maybe_record_typedef_use. (pushdecl): Use the new record_locally_defined_typedef. (store_parm_decls): Allocate cfun->language. (finish_function): Use the new maybe_warn_unused_local_typedefs, and free cfun->language. (c_push_function_context): Allocate cfun->language here only if needed. (c_pop_function_context): Likewise, mark cfun->language for collection only when it should be done. * c-common.c (handle_used_attribute): Don't ignore TYPE_DECL nodes. * c-typeck.c (c_expr_sizeof_type, c_cast_expr): Use the new maybe_record_local_typedef_use. gcc/c-family * c-common.h (struct c_language_function::local_typedefs): New field. (record_locally_defined_typedef, maybe_record_typedef_use) (maybe_warn_unused_local_typedefs): Declare new functions. * c-common.c (record_locally_defined_typedef) (maybe_record_typedef_use) (maybe_warn_unused_local_typedefs): Define new functions. * c.opt: Declare new -Wunused-local-typedefs flag. gcc/cp * name-lookup.c (pushdecl_maybe_friend_1): Use the new record_locally_defined_typedef. * decl.c (finish_function): Use the new maybe_warn_unused_local_typedefs. (grokfield): Use the new record_locally_defined_typedef. * parser.c (lookup_name): Use the new maybe_record_typedef_use. gcc/doc/ * invoke.texi: Update documentation for -Wunused-local-typedefs. gcc/testsuite/ * g++.dg/warn/Wunused-local-typedefs.C: New test file. * c-c++-common/Wunused-local-typedefs.c: Likewise. libstdc++-v3/ * include/ext/bitmap_allocator.h (__detail::__mini_vector::__lower_bound): Remove unused typedef. * src/istream.cc (std::operator>>(basic_istream<char>& __in, basic_string<char>& __str)): Likewise. (std::getline): Likewise. * src/valarray.cc (__valarray_product): Likewise. From-SVN: r178692
2011-09-08 15:54:24 +02:00
2011-09-08 Dodji Seketeli <dodji@redhat.com>
PR c++/33255 - Support -Wunused-local-typedefs warning
* c-common.h (struct c_language_function::local_typedefs): New
field.
(record_locally_defined_typedef, maybe_record_typedef_use)
(maybe_warn_unused_local_typedefs): Declare new functions.
PR c++/33255 - Support -Wunused-local-typedefs warning gcc/ * c-decl.c (lookup_name): Use the new maybe_record_typedef_use. (pushdecl): Use the new record_locally_defined_typedef. (store_parm_decls): Allocate cfun->language. (finish_function): Use the new maybe_warn_unused_local_typedefs, and free cfun->language. (c_push_function_context): Allocate cfun->language here only if needed. (c_pop_function_context): Likewise, mark cfun->language for collection only when it should be done. * c-common.c (handle_used_attribute): Don't ignore TYPE_DECL nodes. * c-typeck.c (c_expr_sizeof_type, c_cast_expr): Use the new maybe_record_local_typedef_use. gcc/c-family * c-common.h (struct c_language_function::local_typedefs): New field. (record_locally_defined_typedef, maybe_record_typedef_use) (maybe_warn_unused_local_typedefs): Declare new functions. * c-common.c (record_locally_defined_typedef) (maybe_record_typedef_use) (maybe_warn_unused_local_typedefs): Define new functions. * c.opt: Declare new -Wunused-local-typedefs flag. gcc/cp * name-lookup.c (pushdecl_maybe_friend_1): Use the new record_locally_defined_typedef. * decl.c (finish_function): Use the new maybe_warn_unused_local_typedefs. (grokfield): Use the new record_locally_defined_typedef. * parser.c (lookup_name): Use the new maybe_record_typedef_use. gcc/doc/ * invoke.texi: Update documentation for -Wunused-local-typedefs. gcc/testsuite/ * g++.dg/warn/Wunused-local-typedefs.C: New test file. * c-c++-common/Wunused-local-typedefs.c: Likewise. libstdc++-v3/ * include/ext/bitmap_allocator.h (__detail::__mini_vector::__lower_bound): Remove unused typedef. * src/istream.cc (std::operator>>(basic_istream<char>& __in, basic_string<char>& __str)): Likewise. (std::getline): Likewise. * src/valarray.cc (__valarray_product): Likewise. From-SVN: r178692
2011-09-08 15:54:24 +02:00
* c-common.c (record_locally_defined_typedef)
(maybe_record_typedef_use)
(maybe_warn_unused_local_typedefs): Define new functions.
PR c++/33255 - Support -Wunused-local-typedefs warning gcc/ * c-decl.c (lookup_name): Use the new maybe_record_typedef_use. (pushdecl): Use the new record_locally_defined_typedef. (store_parm_decls): Allocate cfun->language. (finish_function): Use the new maybe_warn_unused_local_typedefs, and free cfun->language. (c_push_function_context): Allocate cfun->language here only if needed. (c_pop_function_context): Likewise, mark cfun->language for collection only when it should be done. * c-common.c (handle_used_attribute): Don't ignore TYPE_DECL nodes. * c-typeck.c (c_expr_sizeof_type, c_cast_expr): Use the new maybe_record_local_typedef_use. gcc/c-family * c-common.h (struct c_language_function::local_typedefs): New field. (record_locally_defined_typedef, maybe_record_typedef_use) (maybe_warn_unused_local_typedefs): Declare new functions. * c-common.c (record_locally_defined_typedef) (maybe_record_typedef_use) (maybe_warn_unused_local_typedefs): Define new functions. * c.opt: Declare new -Wunused-local-typedefs flag. gcc/cp * name-lookup.c (pushdecl_maybe_friend_1): Use the new record_locally_defined_typedef. * decl.c (finish_function): Use the new maybe_warn_unused_local_typedefs. (grokfield): Use the new record_locally_defined_typedef. * parser.c (lookup_name): Use the new maybe_record_typedef_use. gcc/doc/ * invoke.texi: Update documentation for -Wunused-local-typedefs. gcc/testsuite/ * g++.dg/warn/Wunused-local-typedefs.C: New test file. * c-c++-common/Wunused-local-typedefs.c: Likewise. libstdc++-v3/ * include/ext/bitmap_allocator.h (__detail::__mini_vector::__lower_bound): Remove unused typedef. * src/istream.cc (std::operator>>(basic_istream<char>& __in, basic_string<char>& __str)): Likewise. (std::getline): Likewise. * src/valarray.cc (__valarray_product): Likewise. From-SVN: r178692
2011-09-08 15:54:24 +02:00
* c.opt: Declare new -Wunused-local-typedefs flag.
2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/50266
* c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
computations.
2011-09-05 Richard Guenther <rguenther@suse.de>
* c-common.c (complete_array_type): Use ssize_int (-1) instead
of integer_minus_one_node for empty array upper bounds.
2011-08-28 Dodji Seketeli <dodji@redhat.com>
* c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
it's the first time it's being called on this main TU.
2011-08-24 Richard Guenther <rguenther@suse.de>
PR c/49396
* c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
2011-08-22 Gabriel Charette <gchare@google.com>
* c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
defined in cpp_init_builtins and c_cpp_builtins.
2011-08-19 Joseph Myers <joseph@codesourcery.com>
* c-common.c (c_common_reswords): Add __builtin_complex.
* c-common.h (RID_BUILTIN_COMPLEX): New.
2011-08-18 Joseph Myers <joseph@codesourcery.com>
* c-common.c (c_common_reswords): Add _Noreturn.
(keyword_is_function_specifier): Handle RID_NORETURN.
* c-common.h (RID_NORETURN): New.
2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
* c-common.c (unsafe_conversion_p): New function. Check if it is
unsafe to convert an expression to the type.
(conversion_warning): Adjust, use unsafe_conversion_p.
* c-common.h (unsafe_conversion_p): New function declaration.
backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) Merge from gomp-3_1-branch branch: 2011-08-02 Jakub Jelinek <jakub@redhat.com> gcc/ * c-parser.c (enum c_parser_prec): New enum, moved from within c_parser_binary_expression. (c_parser_binary_expression): Add PREC argument. Stop parsing if operator has lower or equal precedence than PREC. (c_parser_conditional_expression, c_parser_omp_for_loop): Adjust callers. (c_parser_omp_atomic): Handle parsing OpenMP 3.1 atomics. Adjust c_finish_omp_atomic caller. (c_parser_omp_taskyield): New function. (c_parser_pragma): Handle PRAGMA_OMP_TASKYIELD. (c_parser_omp_clause_name): Handle final and mergeable clauses. (c_parser_omp_clause_final, c_parser_omp_clause_mergeable): New functions. (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FINAL and PRAGMA_OMP_CLAUSE_MERGEABLE. (OMP_TASK_CLAUSE_MASK): Allow final and mergeable clauses. (c_parser_omp_clause_reduction): Handle min and max. * c-typeck.c (c_finish_omp_clauses): Don't complain about const qualified predetermined vars in firstprivate clause. andle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. Handle MIN_EXPR and MAX_EXPR. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. (dump_generic_node): Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and OMP_ATOMIC_CAPTURE_NEW. * tree.c (omp_clause_num_ops): Add OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. (omp_clause_code_name): Likewise. (walk_tree_1): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. * tree.h (enum omp_clause_code): Add OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. (OMP_CLAUSE_FINAL_EXPR): Define. * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. (expand_task_call): Likewise. (expand_omp_atomic_load, expand_omp_atomic_store): New functions. (expand_omp_atomic_fetch_op): Handle cases where old or new value is needed afterwards. (expand_omp_atomic): Call expand_omp_atomic_load resp. expand_omp_atomic_store. * gimplify.c (gimplify_omp_atomic, gimplify_expr): Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and OMP_ATOMIC_CAPTURE_NEW. (gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Likewise. * tree.def (OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD, OMP_ATOMIC_CAPTURE_NEW): New. * gimple.h (GF_OMP_ATOMIC_NEED_VALUE): New. (gimple_omp_atomic_need_value_p, gimple_omp_atomic_set_need_value): New inlines. * omp-builtins.def (BUILT_IN_GOMP_TASKYIELD): New builtin. * doc/generic.texi: Mention OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. gcc/c-family/ * c-common.h (c_finish_omp_atomic): Adjust prototype. (c_finish_omp_taskyield): New prototype. * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1 or RHS1 have side-effects, evaluate those too in the right spot, if it is a decl and LHS is also a decl, error out if they aren't the same. (c_finish_omp_taskyield): New function. * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107. * c-pragma.c (omp_pragmas): Add taskyield. * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD. (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and PRAGMA_OMP_CLAUSE_MERGEABLE. gcc/cp/ * cp-tree.h (finish_omp_atomic): Adjust prototype. (cxx_omp_const_qual_no_mutable): New prototype. (finish_omp_taskyield): New prototype. * parser.c (cp_parser_omp_atomic): (cp_parser_omp_atomic): Handle parsing OpenMP 3.1 atomics. Adjust finish_omp_atomic caller. (cp_parser_omp_clause_name): Handle final and mergeable clauses. (cp_parser_omp_clause_final, cp_parser_omp_clause_mergeable): New functions. (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FINAL and PRAGMA_OMP_CLAUSE_MERGEABLE. (OMP_TASK_CLAUSE_MASK): Allow final and mergeable clauses. (cp_parser_omp_taskyield): New function. (cp_parser_pragma): Handle PRAGMA_OMP_TASKYIELD. (cp_parser_omp_clause_reduction): Handle min and max. * pt.c (tsubst_expr) <case OMP_ATOMIC>: Handle OpenMP 3.1 atomics. (tsubst_omp_clauses): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. * semantics.c (finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1 arguments. Handle OpenMP 3.1 atomics. Adjust c_finish_omp_atomic caller. (finish_omp_clauses): Don't complain about const qualified predetermined vars and static data members in firstprivate clause. Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE. Handle MIN_EXPR and MAX_EXPR. (finish_omp_taskyield): New function. * cp-gimplify.c (cxx_omp_const_qual_no_mutable): New function. (cxx_omp_predetermined_sharing): Use it. gcc/fortran/ PR fortran/46752 * cpp.c (cpp_define_builtins): Change _OPENMP to 201107. * openmp.c (gfc_free_omp_clauses): Free also final_expr. (OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define. (gfc_match_omp_clauses): Handle parsing final and mergeable clauses. (OMP_TASK_CLAUSES): Allow final and mergeable clauses. (gfc_match_omp_taskyield): New function. (resolve_omp_clauses): Resolve final clause. Allow POINTERs and Cray pointers in clauses other than REDUCTION. (gfc_match_omp_atomic): Match optional read/write/update/capture keywords after !$omp atomic. (resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms. * dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD, print final and mergeable clauses. (show_code_node): Handle EXEC_OMP_TASKYIELD. * trans-openmp.c (gfc_trans_omp_clauses): Handle final and mergeable clauses. (gfc_trans_omp_taskyield): New function. (gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD. (gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms. (gfc_omp_clause_copy_ctor): Handle non-allocated allocatable. (gfc_omp_predetermined_sharing): Adjust comment. * gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and ST_OMP_END_ATOMIC. (gfc_omp_clauses): Add final_expr and mergeable fields. (gfc_exec_op): Add EXEC_OMP_TASKYIELD. (gfc_omp_atomic_op): New enum typedef. (struct gfc_code): Add ext.omp_atomic. * trans.c (trans_code): Handle EXEC_OMP_TASKYIELD. * frontend-passes.c (gfc_code_walker): Also walk final_expr. * resolve.c (gfc_resolve_blocks, resolve_code): Handle EXEC_OMP_TASKYIELD. * st.c (gfc_free_statement): Likewise. * match.h (gfc_match_omp_taskyield): New prototype. * parse.c (decode_omp_directive): Handle taskyield directive. Handle !$omp end atomic. (case_executable): Add ST_OMP_TASKYIELD case. (gfc_ascii_statement): Handle ST_OMP_TASKYIELD. (parse_omp_atomic): Return gfc_statement instead of void. For !$omp atomic capture parse two assignments instead of just one and require !$omp end atomic afterwards, for other !$omp atomic forms just allow !$omp end atomic at the end. (parse_omp_structured_block, parse_executable): Adjust parse_omp_atomic callers. 2011-08-02 Tobias Burnus <burnus@net-b.de> * intrinsic.c (OMP_LIB): Updated openmp_version's value to 201107. * gfortran.texi (OpenMP): Update ref to OpenMP 3.1. * intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1; remove deleted omp_integer_kind and omp_logical_kind constants. gcc/testsuite/ PR fortran/46752 * gcc.dg/gomp/atomic-5.c: Adjust expected diagnostics. * gcc.dg/gomp/atomic-15.c: New test. * g++.dg/gomp/atomic-5.C: Adjust expected diagnostics. * g++.dg/gomp/atomic-15.C: New test. * g++.dg/gomp/private-1.C: New test. * g++.dg/gomp/sharing-2.C: New test. * gfortran.dg/gomp/crayptr1.f90: Don't expect error about Cray pointer in FIRSTPRIVATE/LASTPRIVATE. * gfortran.dg/gomp/omp_atomic2.f90: New test. libgomp/ PR fortran/42041 PR fortran/46752 * omp.h.in (omp_in_final): New prototype. * omp_lib.f90.in (omp_in_final): New interface. (omp_integer_kind, omp_logical_kind): Remove and replace all its uses in the module with 4. (openmp_version): Change to 201107. * omp_lib.h.in (omp_sched_static, omp_sched_dynamic, omp_sched_guided, omp_sched_auto): Use omp_sched_kind kind for the parameters. (omp_in_final): New external. (openmp_version): Change to 201107. * task.c (omp_in_final): New function. (gomp_init_task): Initialize final_task. (GOMP_task): Remove unused attribute from flags. Handle final tasks. (GOMP_taskyield): New function. (omp_in_final): Return true if if (false) or final (true) task or descendant of final (true). * fortran.c (omp_in_final_): New function. * libgomp.map (OMP_3.1): Export omp_in_final and omp_in_final_. (GOMP_3.0): Export GOMP_taskyield. * env.c (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New variables. (parse_unsigned_long_list): New function. (initialize_env): Use it for OMP_NUM_THREADS. Call parse_boolean with "OMP_PROC_BIND". If OMP_PROC_BIND=true, call gomp_init_affinity even if parse_affinity returned false. * config/linux/affinity.c (gomp_init_affinity): Handle gomp_cpu_affinity_len == 0. * libgomp_g.h (GOMP_taskyield): New prototype. * libgomp.h (struct gomp_task): Add final_task field. (gomp_nthreads_var_list, gomp_nthreads_var_list_len): New externs. * team.c (gomp_team_start): Override new task's nthreads_var icv if list form OMP_NUM_THREADS has been used and it has value for the new nesting level. * testsuite/libgomp.c/atomic-11.c: New test. * testsuite/libgomp.c/atomic-12.c: New test. * testsuite/libgomp.c/atomic-13.c: New test. * testsuite/libgomp.c/atomic-14.c: New test. * testsuite/libgomp.c/reduction-6.c: New test. * testsuite/libgomp.c/task-5.c: New test. * testsuite/libgomp.c++/atomic-2.C: New test. * testsuite/libgomp.c++/atomic-3.C: New test. * testsuite/libgomp.c++/atomic-4.C: New test. * testsuite/libgomp.c++/atomic-5.C: New test. * testsuite/libgomp.c++/atomic-6.C: New test. * testsuite/libgomp.c++/atomic-7.C: New test. * testsuite/libgomp.c++/atomic-8.C: New test. * testsuite/libgomp.c++/atomic-9.C: New test. * testsuite/libgomp.c++/task-8.C: New test. * testsuite/libgomp.c++/reduction-4.C: New test. * testsuite/libgomp.fortran/allocatable7.f90: New test. * testsuite/libgomp.fortran/allocatable8.f90: New test. * testsuite/libgomp.fortran/crayptr3.f90: New test. * testsuite/libgomp.fortran/omp_atomic3.f90: New test. * testsuite/libgomp.fortran/omp_atomic4.f90: New test. * testsuite/libgomp.fortran/pointer1.f90: New test. * testsuite/libgomp.fortran/pointer2.f90: New test. * testsuite/libgomp.fortran/task4.f90: New test. 2011-08-02 Tobias Burnus <burnus@net-b.de> * libgomp.texi: Update OpenMP spec references to 3.1. (omp_in_final,OMP_PROC_BIND): New sections. (OMP_NUM_THREADS): Document that the value can be now a list. (GOMP_STACKSIZE,GOMP_CPU_AFFINITY): Update @ref. From-SVN: r177194
2011-08-02 18:13:29 +02:00
2011-08-02 Jakub Jelinek <jakub@redhat.com>
* c-common.h (c_finish_omp_atomic): Adjust prototype.
(c_finish_omp_taskyield): New prototype.
* c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
or RHS1 have side-effects, evaluate those too in the right spot,
if it is a decl and LHS is also a decl, error out if they
aren't the same.
(c_finish_omp_taskyield): New function.
* c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
* c-pragma.c (omp_pragmas): Add taskyield.
* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
(enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
PRAGMA_OMP_CLAUSE_MERGEABLE.
2011-07-25 Dodji Seketeli <dodji@redhat.com>
* c-common.h (set_underlying_type): Remove parm name from
declaration.
2011-07-25 Romain Geissler <romain.geissler@gmail.com>
* c-pretty-print.h: Search c-common.h in c-family.
2011-07-22 Jason Merrill <jason@redhat.com>
PR c++/49793
* c.opt (Wnarrowing): New.
PR c++/30112
* c-common.h: Declare c_linkage_bindings.
* c-pragma.c (handle_pragma_redefine_extname): Use it.
PR c++/49813
* c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
* c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
as flag_isoc99 for 'restrict'.
(pp_c_specifier_qualifier_list): Likewise for _Complex.
2011-07-21 Ian Lance Taylor <iant@google.com>
PR middle-end/49705
* c-common.c (c_disable_warnings): New static function.
(c_enable_warnings): New static function.
(c_fully_fold_internal): Change local unused_p to bool. Call
c_disable_warnings and c_enable_warnings rather than change
c_inhibit_evaluation_warnings.
2011-07-20 Jason Merrill <jason@redhat.com>
PR c++/6709 (DR 743)
PR c++/42603 (DR 950)
* c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
(CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
(CPP_DECLTYPE): New.
* c-common.c (c_parse_error): Handle CPP_DECLTYPE.
tree.h (fold_build_pointer_plus_loc): New helper function. 2011-07-19 Richard Guenther <rguenther@suse.de> * tree.h (fold_build_pointer_plus_loc): New helper function. (fold_build_pointer_plus_hwi_loc): Likewise. (fold_build_pointer_plus): Define. (fold_build_pointer_plus_hwi): Likewise. * builtins.c (std_gimplify_va_arg_expr): Use fold_build_pointer_plus. (fold_builtin_memory_op): Likewise. (fold_builtin_stpcpy): Likewise. (fold_builtin_memchr): Likewise. (fold_builtin_strstr): Likewise. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (expand_builtin_memory_chk): Likewise. (fold_builtin_memory_chk): Likewise. * c-typeck.c (build_unary_op): Likewise. * cgraphunit.c (thunk_adjust): Likewise. * fold-const.c (build_range_check): Likewise. (fold_binary_loc): Likewise. * omp-low.c (extract_omp_for_data): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_for_static_chunk): Likewise. * tree-affine.c (add_elt_to_tree): Likewise. * tree-data-ref.c (split_constant_offset_1): Likewise. * tree-loop-distribution.c (generate_memset_zero): Likewise. * tree-mudflap.c (mf_xform_derefs_1): Likewise. * tree-predcom.c (ref_at_iteration): Likewise. * tree-ssa-address.c (tree_mem_ref_addr): Likewise. (add_to_parts): Likewise. (create_mem_ref): Likewise. * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Likewise. (number_of_iterations_le): Likewise. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise. * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise. (vect_create_addr_base_for_vector_ref): Likewise. * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Likewise. (vect_create_cond_for_alias_checks): Likewise. * tree-vrp.c (extract_range_from_assert): Likewise. * config/alpha/alpha.c (alpha_va_start): Likewise. (alpha_gimplify_va_arg_1): Likewise. * config/i386/i386.c (ix86_va_start): Likewise. (ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mep/mep.c (mep_expand_va_start): Likewise. (mep_gimplify_va_arg_expr): Likewise. * config/mips/mips.c (mips_va_start): Likewise. (mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start): Likewise. (rs6000_gimplify_va_arg): Likewise. * config/s390/s390.c (s390_va_start): Likewise. (s390_gimplify_va_arg): Likewise. * config/sh/sh.c (sh_va_start): Likewise. (sh_gimplify_va_arg_expr): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise. * config/spu/spu.c (spu_va_start): Likewise. (spu_gimplify_va_arg_expr): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. (xstormy16_gimplify_va_arg_expr): Likewise. * config/xtensa/xtensa.c (xtensa_va_start): Likewise. (xtensa_gimplify_va_arg_expr): Likewise. c-family/ * c-common.c (pointer_int_sum): Use fold_build_pointer_plus. * c-omp.c (c_finish_omp_for): Likewise. cp/ * call.c (build_special_member_call): Use fold_build_pointer_plus. * class.c (build_base_path): Likewise. (convert_to_base_statically): Likewise. (dfs_accumulate_vtbl_inits): Likewise. * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise. * except.c (expand_start_catch_block): Likewise. * init.c (expand_virtual_init): Likewise. (build_new_1): Likewise. (build_vec_delete_1): Likewise. (build_vec_delete): Likewise. * rtti.c (build_headof): Likewise. (tinfo_base_init): Likewise. * typeck.c (get_member_function_from_ptrfunc): Likewise. (cp_build_addr_expr_1): Likewise. * typeck2.c (build_m_component_ref): Likewise. fortran/ * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus. (gfc_trans_string_copy): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise. * trans-types.c (gfc_get_array_descr_info): Likewise. * trans.c (gfc_build_array_ref): Likewise. java/ * builtins.c (static): Use fold_build_pointer_plus. * class.c (make_class_data): Likewise. (build_symbol_entry): Likewise. * except.c (build_exception_object_ref): Likewise. * expr.c (build_java_arrayaccess): Likewise. (build_field_ref): Likewise. (build_known_method_ref): Likewise. (build_invokevirtual): Likewise. objc/ * objc-next-runtime-abi-02.c (objc_v2_build_ivar_ref): Use fold_build_pointer_plus. (objc2_build_ehtype_initializer): Likewise. From-SVN: r176461
2011-07-19 16:01:59 +02:00
2011-07-19 Richard Guenther <rguenther@suse.de>
* c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
* c-omp.c (c_finish_omp_for): Likewise.
2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
body on the next line.
2011-07-08 Jason Merrill <jason@redhat.com>
PR c++/45437
* c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
PR c++/49673
* c-common.c (c_apply_type_quals_to_decl): Don't check
TYPE_NEEDS_CONSTRUCTING.
2011-07-06 Richard Guenther <rguenther@suse.de>
* c-common.c (c_common_nodes_and_builtins):
Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2011-07-05 Richard Guenther <rguenther@suse.de>
* c-common.c (c_common_nodes_and_builtins): Build all common
tree nodes first.
2011-06-27 Jakub Jelinek <jakub@redhat.com>
* c-common.h (c_tree_chain_next): New static inline function.
* c-common.c (check_builtin_function_arguments): Handle
BUILT_IN_ASSUME_ALIGNED.
2011-06-21 Andrew MacLeod <amacleod@redhat.com>
* c-common.c: Add sync_ or SYNC__ to builtin names.
* c-omp.c: Add sync_ or SYNC__ to builtin names.
2011-06-20 Pierre Vittet <piervit@pvittet.com>
* c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
handler.
(gen_pragma_handler): New union.
(internal_pragma_handler): New type.
(c_register_pragma_with_data)
(c_register_pragma_with_expansion_and_data): New functions.
* c-pragma.c (registered_pragmas, c_register_pragma_1)
(c_register_pragma, c_register_pragma_with_expansion)
(c_invoke_pragma_handler): Changed to work with
internal_pragma_handler.
(c_register_pragma_with_data)
(c_register_pragma_with_expansion_and_data): New functions.
target-def.h (TARGET_HAVE_NAMED_SECTIONS): Move to common/common-target-def.h. * target-def.h (TARGET_HAVE_NAMED_SECTIONS): Move to common/common-target-def.h. * target.def (default_target_flags, handle_option, supports_split_stack, optimization_table, init_struct, except_unwind_info, unwind_tables_default, have_named_sections): Move to common/common-target.def. * target.h (enum opt_levels, struct default_options): Move to common/common-target.h. * targhooks.c (default_except_unwind_info, dwarf2_except_unwind_info, sjlj_except_unwind_info, default_target_handle_option, empty_optimization_table): Move to common/common-targhooks.c. * targhooks.h (default_except_unwind_info, dwarf2_except_unwind_info, sjlj_except_unwind_info, default_target_handle_option, empty_optimization_table): Move to common/common-targhooks.h. * common/common-target-def.h: Include common/common-targhooks.h. (TARGET_HAVE_NAMED_SECTIONS): Define if TARGET_ASM_NAMED_SECTION defined. * common/common-target.def (handle_option, option_init_struct, option_optimization_table, default_target_flags, except_unwind_info, supports_split_stack, unwind_tables_default, have_named_sections): Move from target.def. (HOOK_PREFIX): Undefine at end of file. * common/common-target.h: Include input.h. (enum opt_levels, struct default_options): Move from target.h. * common/common-targhooks.c, common/common-targhooks.h: New. * config.gcc (target_has_targetm_common): Default to yes. (moxie*): Set target_has_targetm_common=no. (hppa*-*-*): Don't set target_has_targetm_common=yes. * doc/tm.texi: Regenerate. * Makefile.in (COMMON_TARGET_H): Add $(INPUT_H). (C_TARGET_DEF_H): Add common/common-targhooks.h. (GCC_OBJS): Remove vec.o. (OBJS): Remove hooks.o and vec.o. (OBJS-libcommon-target): Add vec.o, hooks.o and common/common-targhooks.o. (c-family/c-common.o, c-family/c-cppbuiltin.o, lto-opts.o, tree.o, tree-tailcall.o, opts.o, toplev.o, varasm.o, function.o, except.o, expr.o, explow.o, dbxout.o, dwarf2out.o, cfgrtl.o, haifa-sched.o, cfglayout.o, $(out_object_file), $(common_out_object_file)): Update dependencies. (common/common-targhooks.o): New. * common/config/default-common.c: Include tm.h. Add FIXME comment. * common/config/pa/pa-common.c: Include more headers. Take copyright dates from pa.c. (pa_option_optimization_table, pa_handle_option, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Move from pa.c. * common/config/alpha/alpha-common.c, common/config/arm/arm-common.c, common/config/avr/avr-common.c, common/config/bfin/bfin-common.c, common/config/cris/cris-common.c, common/config/fr30/fr30-common.c, common/config/frv/frv-common.c, common/config/h8300/h8300-common.c, common/config/i386/i386-common.c, common/config/ia64/ia64-common.c, common/config/iq2000/iq2000-common.c, common/config/lm32/lm32-common.c, common/config/m32c/m32c-common.c, common/config/m32r/m32r-common.c, common/config/m68k/m68k-common.c, common/config/mcore/mcore-common.c, common/config/mep/mep-common.c, common/config/microblaze/microblaze-common.c, common/config/mips/mips-common.c, common/config/mmix/mmix-common.c, common/config/mn10300/mn10300-common.c, common/config/pdp11/pdp11-common.c, common/config/picochip/picochip-common.c, common/config/rs6000/rs6000-common.c, common/config/rx/rx-common.c, common/config/s390/s390-common.c, common/config/score/score-common.c, common/config/sh/sh-common.c, common/config/sparc/sparc-common.c, common/config/spu/spu-common.c, common/config/v850/v850-common.c, common/config/vax/vax-common.c, common/config/xstormy16/xstormy16-common.c, common/config/xtensa/xtensa-common.c: New. * config/alpha/alpha.c: Include common/common-target.h. (alpha_option_optimization_table, alpha_handle_option, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE): Move to alpha-common.c. * config/arm/arm-protos.h (arm_except_unwind_info): Declare. * config/arm/arm.c (arm_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO, arm_except_unwind_info): Move to arm-common.c. * config/avr/avr.c (avr_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to avr-common.c. * config/bfin/bfin.c (struct bfin_cpu): Move to bfin.h. (bfin_cpus, bfin_handle_option, TARGET_HANDLE_OPTION, TARGET_DEFAULT_TARGET_FLAGS): Move to bfin-common.c. * config/bfin/bfin.h struct bfin_cpu): Move from bfin.c. * config/cris/cris.c (cris_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, cris_handle_option): Move to cris-common.c. * config/fr30/fr30.c (fr30_option_optimization_table, TARGET_EXCEPT_UNWIND_INFO, TARGET_OPTION_OPTIMIZATION_TABLE): Move to fr30-common.c. * config/frv/frv.c (frv_option_optimization_table, MASK_DEFAULT_ALLOC_CC, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE): Move to frv-common.c. * config/h8300/h8300.c (h8300_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to h8300-common.c. * config/i386/i386-protos.h (ix86_handle_option): Declare. * config/i386/i386.c: Include common/common-target.h. (OPTION_MASK_ISA_MMX_SET, OPTION_MASK_ISA_3DNOW_SET, OPTION_MASK_ISA_SSE_SET, OPTION_MASK_ISA_SSE2_SET, OPTION_MASK_ISA_SSE3_SET, OPTION_MASK_ISA_SSSE3_SET, OPTION_MASK_ISA_SSE4_1_SET, OPTION_MASK_ISA_SSE4_2_SET, OPTION_MASK_ISA_AVX_SET, OPTION_MASK_ISA_FMA_SET, OPTION_MASK_ISA_SSE4_SET, OPTION_MASK_ISA_SSE4A_SET, OPTION_MASK_ISA_FMA4_SET, OPTION_MASK_ISA_XOP_SET, OPTION_MASK_ISA_LWP_SET, OPTION_MASK_ISA_AES_SET, OPTION_MASK_ISA_PCLMUL_SET, OPTION_MASK_ISA_ABM_SET, OPTION_MASK_ISA_BMI_SET, OPTION_MASK_ISA_TBM_SET, OPTION_MASK_ISA_POPCNT_SET, OPTION_MASK_ISA_CX16_SET, OPTION_MASK_ISA_SAHF_SET, OPTION_MASK_ISA_MOVBE_SET, OPTION_MASK_ISA_CRC32_SET, OPTION_MASK_ISA_FSGSBASE_SET, OPTION_MASK_ISA_RDRND_SET, OPTION_MASK_ISA_F16C_SET, OPTION_MASK_ISA_MMX_UNSET, OPTION_MASK_ISA_3DNOW_UNSET, OPTION_MASK_ISA_3DNOW_A_UNSET, OPTION_MASK_ISA_SSE_UNSET, OPTION_MASK_ISA_SSE2_UNSET, OPTION_MASK_ISA_SSE3_UNSET, OPTION_MASK_ISA_SSSE3_UNSET, OPTION_MASK_ISA_SSE4_1_UNSET, OPTION_MASK_ISA_SSE4_2_UNSET, OPTION_MASK_ISA_AVX_UNSET, OPTION_MASK_ISA_FMA_UNSET, OPTION_MASK_ISA_SSE4_UNSET, OPTION_MASK_ISA_SSE4A_UNSET, OPTION_MASK_ISA_FMA4_UNSET, OPTION_MASK_ISA_XOP_UNSET, OPTION_MASK_ISA_LWP_UNSET, OPTION_MASK_ISA_AES_UNSET, OPTION_MASK_ISA_PCLMUL_UNSET, OPTION_MASK_ISA_ABM_UNSET, OPTION_MASK_ISA_BMI_UNSET, OPTION_MASK_ISA_TBM_UNSET, OPTION_MASK_ISA_POPCNT_UNSET, OPTION_MASK_ISA_CX16_UNSET, OPTION_MASK_ISA_SAHF_UNSET, OPTION_MASK_ISA_MOVBE_UNSET, OPTION_MASK_ISA_CRC32_UNSET, OPTION_MASK_ISA_FSGSBASE_UNSET, OPTION_MASK_ISA_RDRND_UNSET, OPTION_MASK_ISA_F16C_UNSET, ix86_handle_option, ix86_option_optimization_table, ix86_option_init_struct, ix86_supports_split_stack, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT, TARGET_SUPPORTS_SPLIT_STACK): Move to i386-common.c. * config/i386/t-i386 (i386.o): Update dependencies. * config/ia64/ia64-protos.h (ia64_except_unwind_info): Declare. * config/ia64/ia64.c (ia64_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, ia64_handle_option): Move to ia64-common.c. * config/iq2000/iq2000.c (iq2000_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): Move to iq2000-common.c. * config/lm32/lm32.c (lm32_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to lm32-common.c. * config/m32c/m32c.c (TARGET_HAVE_NAMED_SECTIONS): Move to m32c-common.c. * config/m32r/m32r.c (m32r_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO, m32r_handle_option): Move to m32r-common.c. (m32r_memory_move_cost): Remove comment referring to TARGET_HANDLE_OPTION. * config/m68k/m68k.c (TARGET_HANDLE_OPTION, m68k_handle_option): Move to m68k-common.c. * config/mcore/mcore.c (mcore_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to mcore-common.c. * config/mep/mep.c (mep_option_optimization_table, mep_handle_option, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS): Move to mep-common.c. * config/microblaze/microblaze.c (microblaze_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to microblaze-common.c. * config/mips/mips.c (mips_handle_option, mips_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Move to mips-common.c. * config/mmix/mmix.c (mmix_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE): Move to mmix-common.c. * config/mn10300/mn10300.c (mn10300_option_optimization_table, mn10300_handle_option, TARGET_EXCEPT_UNWIND_INFO, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE): Move to mn10300-common.c. * config/pa/pa.c: Include common/common-target.h. (pa_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, pa_handle_option): Move to pa-common.c. (pa_option_override): Use targetm_common.except_unwind_info. (pa_asm_output_mi_thunk, pa_function_section): Use targetm_common.have_named_sections. * config/pdp11/pdp11.c (pdp11_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT, pdp11_handle_option, pdp11_option_init_struct): Move to pdp11-common.c. * config/picochip/picochip.c (picochip_option_optimization_table, TARGET_HAVE_NAMED_SECTIONS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to picochip-common.c. * config/rs6000/rs6000.c: Include common/common-target.h. (rs6000_option_optimization_table, TARGET_HANDLE_OPTION, TARGET_OPTION_INIT_STRUCT, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS, rs6000_option_init_struct, rs6000_handle_option): Move to rs6000-common.c. * config/rs6000/t-rs6000 (rs6000.o): Update dependencies. * config/rx/rx.c (rx_handle_option, rx_option_optimization_table, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to rx-common.c. * config/s390/s390.c (processor_flags_table, s390_option_optimization_table, s390_option_init_struct, s390_handle_option, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT): Move to s390-common.c. * config/s390/s390.h (processor_flags_table): Declare. * config/score/score.c (score_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, MASK_ALL_CPU_BITS, score_handle_option): Move to score-common.c. * config/sh/sh.c (sh_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, sh_handle_option, sh_option_init_struct): Move to sh-common.c. * config/sparc/sparc.c: Include common/common-target.h. (sparc_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE): Move to sparc-common.c. * config/spu/spu.c (TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_INIT_STRUCT, TARGET_EXCEPT_UNWIND_INFO, spu_option_init_struct): Move to spu-common.c. * config/stormy16/stormy16.c (xstorym16_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): Move to xstormy16-common.c. * config/v850/v850.c (small_memory_physical_max, v850_handle_memory_optionn v850_handle_option, v850_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE): Move to v850-common.c. * config/vax/vax.c (TARGET_DEFAULT_TARGET_FLAGS): Move to vax-common.c. * config/xtensa/xtensa.c (xtensa_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE): Move to xtensa-common.c. * cfglayout.c: Include common/common-target.h. (fixup_reorder_chain): Use targetm_common.have_named_sections. * cfgrtl.c: Include common/common-target.h. (force_nonfallthru_and_redirect, commit_one_edge_insertion): Use targetm_common.have_named_sections. * dbxout.c: Include common/common-target.h. (dbxout_function_end): Use targetm_common.have_named_sections. * defaults.h (STACK_OLD_CHECK_PROTECT, STACK_CHECK_PROTECT): Use targetm_common.except_unwind_info. * dwarf2out.c: Include common/common-target.h. (dwarf2out_do_frame, dwarf2out_do_cfi_asm, dwarf2out_begin_prologue, dwarf2out_frame_init, dwarf2out_frame_finish, dwarf2out_assembly_start): Use targetm_common.except_unwind_info. * except.c: Include common/common-target.h. (init_eh, finish_eh_generation, output_one_function_exception_table): Use targetm_common.except_unwind_info. (switch_to_exception_section): Use targetm_common.have_named_sections. * explow.c: Include common/common-target.h. * expr.c: Include common/common-target.h. (build_personality_function): Use targetm_common.except_unwind_info. * function.c: Include common/common-target.h. (expand_function_end): Use targetm_common.except_unwind_info. * haifa-sched.c: Include common/common-target.h. (sched_create_recovery_edges): Use targetm_common.have_named_sections. * lto-opts.c: Include common/common-target.h instead of target.h. (lto_reissue_options): Use targetm_common.handle_option. * opts.c: Include common/common-target.h. (target_handle_option): Use targetm_common.handle_option. (init_options_struct): Update comment referring to targetm.target_option.optimization. Use targetm_common.default_target_flags, targetm_common.unwind_tables_default and targetm_common.option_init_struct. (default_options_optimization): Use targetm_common.option_optimization_table. (finish_options): Use targetm_common.except_unwind_info, targetm_common.unwind_tables_default, targetm_common.have_named_sections and targetm_common.supports_split_stack. * toplev.c: Include common/common-target.h. (process_options): Use targetm_common.have_named_sections. * tree-tailcall.c: Include common/common-target.h. (suitable_for_tail_call_opt_p): Use targetm_common.except_unwind_info. * tree.c: Include common/common-target.h. (build_common_builtin_nodes): Use targetm_common.except_unwind_info. * varasm.c: Include common/common-target.h. (resolve_unique_section, hot_function_section, default_function_section): Use targetm_common.have_named_sections. ada: * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o. (ada/utils.o): Update dependencies. * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add ../../../libcpp/libcpp.a. * gcc-interface/utils.c: Include common/common-target.h. (process_attributes): Use targetm_common.have_named_sections. c-family: * c-common.c: Include common/common-target.h. (handle_section_attribute): Use targetm_common.have_named_sections. * c-cppbuiltin.c: Include common/common-target.h. (c_cpp_builtins): Use targetm_common.except_unwind_info. cp: * Make-lang.in (cp/method.o): Update dependencies. * method.c: Include common/common-target.h. (use_thunk): Use targetm_common.have_named_sections. go: * Make-lang.in (go/go-lang.o, go/go-backend.o): Update dependencies. * go-backend.c: Include common/common-target.h. (go_write_export_data): Use targetm_common.have_named_sections. * go-lang.c: Include common/common-target.h. (go_langhook_init_options_struct): Use targetm_common.supports_split_stack. po: * exgettext: Handle common/ directory and subdirectories. From-SVN: r175064
2011-06-15 01:11:35 +02:00
2011-06-14 Joseph Myers <joseph@codesourcery.com>
* c-common.c: Include common/common-target.h.
(handle_section_attribute): Use
targetm_common.have_named_sections.
* c-cppbuiltin.c: Include common/common-target.h.
(c_cpp_builtins): Use targetm_common.except_unwind_info.
2011-06-10 Richard Guenther <rguenther@suse.de>
* c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
to print a IDENTIFIER_NODE.
netbsd.h (ENABLE_EXECUTE_STACK): Remove. 2011-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Joseph Myers <joseph@codesourcery.com> gcc: * config/alpha/netbsd.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/alpha/osf5.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/darwin.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/i386/mingw32.h (MINGW_ENABLE_EXECUTE_STACK): Remove. (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. [IN_LIBGCC2]: Don't include <windows.h>. * config/i386/netbsd-elf.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/i386/netbsd64.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/netbsd.h (NETBSD_ENABLE_EXECUTE_STACK): Remove. * config/openbsd.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/sol2.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/sparc/freebsd.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/sparc/netbsd-elf.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/alpha/alpha.c (alpha_trampoline_init): Test HAVE_ENABLE_EXECUTE_STACK. * config/i386/i386.c (ix86_trampoline_init): Likewise. * config/sparc/sparc.c (sparc32_initialize_trampoline): Likewise. (sparc64_initialize_trampoline): Likewise. * libgcc2.c [L_enable_execute_stack]: Remove. * system.h (ENABLE_EXECUTE_STACK): Poison. * doc/tm.texi.in (Trampolines, ENABLE_EXECUTE_STACK): Remove. * doc/tm.texi: Regenerate. * Makefile.in (LIBGCC2_CFLAGS): Add -fbuilding-libgcc. gcc/c-family: * c.opt (fbuilding-libgcc): New option. * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc. libgcc: * enable-execute-stack-empty.c: New file. * enable-execute-stack-mprotect.c: New file. * config/i386/enable-execute-stack-mingw32.c: New file. * config.host (enable_execute_stack): New variable. Select appropriate variants. * configure.ac: Link enable-execute-stack.c to $enable_execute_stack. * configure: Regenerate. * Makefile.in (LIB2ADD): Add enable-execute-stack.c. (lib2funcs): Remove _enable_execute_stack. Co-Authored-By: Joseph Myers <joseph@codesourcery.com> From-SVN: r174843
2011-06-09 14:30:46 +02:00
2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Joseph Myers <joseph@codesourcery.com>
* c.opt (fbuilding-libgcc): New option.
* c-cppbuiltin.c (c_cpp_builtins): Define
__LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
2011-06-07 Jason Merrill <jason@redhat.com>
* c-common.c (max_tinst_depth): Lower default to 900.
* c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
2011-06-07 Richard Guenther <rguenther@suse.de>
* c-common.c (c_common_nodes_and_builtins): Do not set
size_type_node or call set_sizetype.
2011-06-07 Dodji Seketeli <dodji@redhat.com>
PR debug/49130
* c-pretty-print.c (pp_c_integer_constant): Consider the canonical
type when using pointer comparison to compare types.
2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
* c.opt: Add -Wdelete-non-virtual-dtor.
* c-opts.c (c_common_handle_option): Include it in -Wall.
2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
PR bootstrap/49190
Revert:
2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
* c-common.h (struct c_common_identifier): Inherit from tree_typed,
not tree_common.
2011-05-27 Jakub Jelinek <jakub@redhat.com>
PR c++/49165
* c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
C++ don't call c_common_truthvalue_conversion on void type arms.
move TS_STATEMENT_LIST to be a substructure of TS_TYPED move TS_STATEMENT_LIST to be a substructure of TS_TYPED gcc/ * c-decl.c (c_push_function_context): Copy the current statement list stack. (add_stmt): Check building_stmt_list_p and push_stmt if necessary. (finish_struct): Call building_stmt_list_p instead of checking cur_stmt_list. * c-parser.c (c_parser_postfix_expression): Likewise. * c-typeck.c (c_end_compound_stmt): Likewise. * print-tree.c (print_node) [STATEMENT_LIST]: Don't print TREE_CHAIN. * tree-iterator.c (stmt_list_cache): Change to a VEC. (alloc_stmt_list): Adjust for stmt_list_cache's new type. (free_stmt_list): Likewise. * tree.h (struct tree_statement_list): Include typed_tree instead of tree_common. * tree.c (initialize_tree_contains_struct): Mark TS_STATEMENT_LIST as TS_TYPED instead of TS_COMMON. gcc/c-family/ * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC. (stmt_list_stack): Define. (cur_stmt_list): Adjust for new type of x_cur_stmt_list. * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise. gcc/cp/ * cp-tree.h (building_stmt_tree): Delete. * decl.c (save_function_data): Tweak initializer for x_cur_stmt_list. (build_aggr_init_full_exprs): Call building_stmt_list_p instead of building_stmt_tree. (initialize_local_var): Likewise. (finish_function): Likewise. * decl2.c (finish_anon_union): Likewise. * init.c (begin_init_stmts): Likewise. (finish_init_stmts): Likewise. (expand_aggr_init_1): Likewise. * name-lookup.c (do_local_using_decl): Likewise. (do_namespace_alias): Likewise. (do_using_directive): Likewise. (cp_emit_debug_info_for_using): Likewise. * semantics.c (add_stmt): Assert that stmt_list_stack is non-empty. From-SVN: r174343
2011-05-27 19:43:44 +02:00
2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
* c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
(stmt_list_stack): Define.
(cur_stmt_list): Adjust for new type of x_cur_stmt_list.
* c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
* c-common.c (warning_candidate_p): Check for BLOCKs.
2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
* c-common.h (struct c_common_identifier): Inherit from tree_typed,
not tree_common.
2011-05-25 Jakub Jelinek <jakub@redhat.com>
* c-common.c (def_fn_type): Remove extra va_end.
2011-05-23 Jason Merrill <jason@redhat.com>
PR c++/48106
* c-common.c (c_common_get_narrower): New.
(shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
* c-common.h (check_function_arguments): Tweak prototype of
check_function_arguments.
* c-common.c (check_function_arguments): Likewise. Adjust
calls to check_function_nonnull, check_function_format, and
check_function_sentinel.
(check_function_sentinel): Take a FUNCTION_TYPE rather than
separate attributes and typelist arguments. Use
FOREACH_FUNCTION_ARGS to iterate over argument types.
2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
* c-common.c (c_common_reswords): Reorder.
* c-common.h (rid): Likewise.
2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
* c-common.c (def_fn_type): Don't call build_function_type, call
build_function_type_array or build_varargs_function_type_array
instead.
(c_common_nodes_and_builtins): Likewise.
2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
* c-common.c (c_add_case_label): Omit the loc argument to
build_case_label.
* c-common.h (build_case_label): Remove.
* c-semantics.c (build_case_label): Remove.
c-decl.c (finish_decl): Don't call get_pending_sizes. * c-decl.c (finish_decl): Don't call get_pending_sizes. (grokparm): Add parameter expr. Pass it to grokdeclarator. (push_parm_decl): Add parameter expr. Pass it to grokdeclarator. (c_variable_size): Remove. (grokdeclarator): Use save_expr instead of c_variable_size. Don't call put_pending_sizes. (get_parm_info): Add parameter expr. Use it to set arg_info->pending_sizes. (store_parm_decls): Use arg_info->pending_sizes instead or calling get_pending_sizes. * c-parser.c (c_parser_parms_declarator): Update call to c_parser_parms_list_declarator. (c_parser_parms_list_declarator): Take parameter expr. Update call to push_parm_decl. Update recursive call. Don't call get_pending_sizes. Update calls to get_parm_info. (c_parser_objc_method_definition): Update calls to c_parser_objc_method_decl and objc_start_method_definition. (c_parser_objc_methodproto): Update call to c_parser_objc_method_decl. (c_parser_objc_method_decl): Add parameter expr. Update call to grokparm. (c_parser_objc_try_catch_finally_statement): Update call to grokparm. * c-tree.h (struct c_arg_info.pending_sizes): Change to a tree. (get_parm_info, grokparm, push_parm_decl): Update prototypes. c-family: * c-objc.h (objc_start_method_definition): Update prototype. * stub-objc.c (objc_start_method_definition): Add extra parameter. cp: * parser.c (cp_parser_objc_method_definition_list): Update call to objc_start_method_definition. objc: * objc-act.c (objc_start_method_definition): Add parameter expr. Update call to start_method_def. (objc_generate_cxx_ctor_or_dtor, objc_synthesize_getter, objc_synthesize_setter) Update calls to objc_start_method_definition. (objc_get_parm_info): Add parameter expr. Update call to get_parm_info. (start_method_def): Add parameter expr. Update call to objc_get_parm_info. * objc-gnu-runtime-abi-01.c (build_module_initializer_routine): Update call to objc_get_parm_info. * objc-runtime-shared-support.h (objc_get_parm_info): Add extra parameter. From-SVN: r173422
2011-05-05 12:20:31 +02:00
2011-05-05 Joseph Myers <joseph@codesourcery.com>
* c-objc.h (objc_start_method_definition): Update prototype.
* stub-objc.c (objc_start_method_definition): Add extra parameter.
2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
* c-common.c (check_main_parameter_types): Reindent. Don't use
TYPE_ARG_TYPES directly.
(handle_nonnull_attribute): Likewise.
(sync_resolve_params): Likewise.
* c-format.c (handle_format_arg_attribute): Likewise. Adjust call
to check_format_string.
(handle_format_attribute): Likewise.
(check_format_string): Take a function type to examine instead of
a type list. Use a function_arg_iterator to step through argument
types.
2011-05-04 Richard Guenther <rguenther@suse.de>
* c-common.c (fix_string_type): Use size_int for index type bounds.
(start_fname_decls): Do not pass NULL to build_int_cst.
(c_init_attributes): Likewise.
* c-lex.c (c_lex_with_flags): Likewise.
2011-04-27 Jason Merrill <jason@redhat.com>
* c-common.c (make_tree_vector_from_list): New.
* c-common.h: Declare it.
2011-04-26 Richard Guenther <rguenther@suse.de>
PR preprocessor/48248
* c-ppoutput.c (maybe_print_line): Always optimize newlines
for output size with -P.
2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
* c-common.c (struct c_common_resword): Add __underlying_type.
* c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
2011-04-20 Jim Meyering <meyering@redhat.com>
* c-format.c (init_dollar_format_checking): Remove useless
if-before-free.
2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
* c-objc.h (objc_get_interface_ivars): Removed.
(objc_detect_field_duplicates): New.
* stub-objc.c: Likewise.
2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
* stub-objc.c (objc_declare_protocols): Renamed to
objc_declare_protocol.
* c-objc.h: Likewise.
2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
* stub-objc.c (objc_declare_class): Updated argument name.
ada-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/ada/ * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * gcc-interface/misc.c (gnat_init_ts): New function. (LANG_HOOKS_INIT_TS): Define. gcc/ * c-decl.c (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * print-tree.c (print_node): Likewise. * tree-inline.c (copy_tree_r): Likewise. * c-lang.c (LANG_HOOKS_INIT_TS): Define. * lto-streamer-in.c (lto_input_tree_pointers): Check for TS_TYPED instead of TS_COMMON. * lto-streamer-out.c (lto_output_tree_pointers): Likewise. * tree.c (initialize_tree_contains_struct): Handle TS_TYPED. (copy_node_stat): Zero TREE_CHAIN only if necessary. (MARK_TS_BASE, MARK_TS_TYPED, MARK_TS_COMMON): Move these... (MARK_TS_DECL_COMMON, MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL): ...and these... (MARK_TS_DECL_WITH_VIS, MARK_TS_DECL_NON_COMMON): ...and these... * tree.h: ...here. (TREE_CHAIN): Check for a TS_COMMON structure. (TREE_TYPE): Check for a TS_TYPED structure. gcc/c-family/ * c-common.h (c_common_init_ts): Declare. * c-common.c (c_common_init_ts): Define. gcc/cp/ * cp-lang.c (cp_init_ts): Call cp_common_init_ts. Move tree_contains_struct initialization to... * cp-objcp-common.c (cp_common_init_ts): ...here. Use MARK_* macros. * cp-objcp-common.h (cp_common_init_ts): Declare. * cp-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/fortran/ * f95-lang.c (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/go/ * go-lang.c (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/java/ * java-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/lto/ * lto-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * lto.c (lto_fixup_common): Likewise. gcc/objc/ * objc-lang.c (objc_init_ts): Move code for this function... * objc-act.c (objc_common_init_ts): ...here. Define. * objc-act.h (objc_common_init_ts): Declare. gcc/objcp/ * objcp-lang.c (objcxx_init_ts): Call objc_common_init_ts and cp_common_init_ts. From-SVN: r172359
2011-04-13 05:09:53 +02:00
2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
* c-common.h (c_common_init_ts): Declare.
* c-common.c (c_common_init_ts): Define.
2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
* c-objc.h (objc_build_message_expr): Updated prototype.
* stub-objc.c (objc_build_message_expr): Likewise.
cgraph.h (cgraph_node): Remove function declaration. 2011-04-12 Martin Jambor <mjambor@suse.cz> * cgraph.h (cgraph_node): Remove function declaration. (cgraph_create_node): Declare. (cgraph_get_create_node): Likewise. * cgraph.c (cgraph_create_node): Renamed to cgraph_create_node_1. Updated all callers. (cgraph_node): Renamed to cgraph_create_node, assert that a node for the decl does not already exist. Call cgraph_get_create_node instead of cgraph_node. (cgraph_get_create_node): New function. (cgraph_same_body_alias): Update comment. (cgraph_set_call_stmt): Call cgraph_get_node instead of cgraph_node, assert it does not return NULL. (cgraph_update_edges_for_call_stmt): Likewise. (cgraph_clone_edge): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_update_edges_for_call_stmt_node): Call cgraph_get_create_node instead of cgraph_node. (cgraph_add_new_function): Call cgraph_create_node or cgraph_get_create_node instead of cgraph_node. * cgraphbuild.c (record_reference): Call cgraph_get_create_node instead of cgraph_node. (record_eh_tables): Likewise. (mark_address): Likewise. (mark_load): Likewise. (build_cgraph_edges): Call cgraph_get_create_node instead of cgraph_node. (rebuild_cgraph_edges): Likewise. * cgraphunit.c (cgraph_finalize_function): Call cgraph_get_create_node instead of cgraph_node. (cgraph_copy_node_for_versioning): Call cgraph_create_node instead of cgraph_node. * lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Call cgraph_create_node instead of cgraph_node. * c-decl.c (finish_function): Call cgraph_get_create_node instead of cgraph_node. * lto-cgraph.c (input_node): Likewise. * lto-streamer-in.c (input_function): Likewise. * varasm.c (mark_decl_referenced): Likewise. (assemble_alias): Likewise. gcc/c-family/ * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead of cgraph_node. gcc/cp/ * cp/class.c (cp_fold_obj_type_ref): Call cgraph_get_create_node instead of cgraph_node. * cp/decl2.c (cxx_callgraph_analyze_expr): Likewise. (cp_write_global_declarations): Likewise. * cp/optimize.c (maybe_clone_body): Likewise. * cp/semantics.c (maybe_add_lambda_conv_op): Likewise. * cp/mangle.c (mangle_decl): Likewise. * cp/method.c (make_alias_for_thunk): Likewise. (use_thunk): Likewise. gcc/ada/ * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node instead of cgraph_node. gcc/fortran/ * trans-decl.c (gfc_generate_function_code): Call cgraph_get_create_node instead of cgraph_node. gcc/objc/ * objc-act.c (mark_referenced_methods): Call cgraph_get_create_node instead of cgraph_node. From-SVN: r172307
2011-04-12 11:27:18 +02:00
2011-04-12 Martin Jambor <mjambor@suse.cz>
* c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
of cgraph_node.
2011-04-11 Richard Guenther <rguenther@suse.de>
* c-common.c (complete_array_type): Build a range type of
proper type.
2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
* c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
(handle_type_generic_attribute): Likewise.
2011-04-07 Jason Merrill <jason@redhat.com>
PR c++/48450
* c-common.c (c_common_truthvalue_conversion): Don't ignore
conversion from C++0x scoped enum.
tm.texi.in: Document C target hooks as separate from general target hooks. * doc/tm.texi.in: Document C target hooks as separate from general target hooks. * doc/tm.texi: Regenerate. * genhooks.c (struct hook_desc): Add docname field. (HOOK_VECTOR_1, DEFHOOKPOD, DEFHOOK, DEFHOOK_UNDOC). Initialize docname field. (hook_array): Include c-target.def. (emit_documentation): Use docname field in output. (emit_init_macros): Take docname argument. Only emit definitions for hooks matching docname. (main): Expect additional arguments in all cases. Pass argument to emit_init_macros. * target.def: Move initial macro definitions and comments to target-hooks-macros.h. (gcc_targetcm): Move to c-family/c-target.def. * target.h (targetcm): Move declaration to c-family/c-target.h. * targhooks.c (default_handle_c_option): Move to c-family/c-opts.c. * targhooks.h (default_handle_c_option): Move declaration to c-family/c-common.h. * target-hooks-macros.h: New file. * config.gcc (target_has_targetcm): Define and use to add to c_target_objs and cxx_target_objs. * config/default-c.c: New file. * config/darwin-c.c: Include c-target.h and c-target-def.h instead of target.h and target-def.h. (TARGET_HANDLE_C_OPTION, targetcm): Define later in file. (darwin_objc_construct_string, darwin_cfstring_ref_p, darwin_check_cfstring_format_arg): Make static. (TARGET_OBJC_CONSTRUCT_STRING_OBJECT, TARGET_STRING_OBJECT_REF_TYPE_P, TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): Define here. * config/darwin-protos.h (darwin_objc_construct_string, darwin_cfstring_ref_p, darwin_check_cfstring_format_arg): Don't declare. * config/darwin.h (TARGET_OBJC_CONSTRUCT_STRING_OBJECT, TARGET_STRING_OBJECT_REF_TYPE_P, TARGET_CHECK_STRING_OBJECT_FORMAT_ARG, TARGET_HAS_TARGETCM): Remove. * config/t-darwin (darwin-c.o): Update dependencies. * system.h (TARGET_HAS_TARGETCM): Poison. * Makefile.in (TARGET_H): Update. (TARGET_DEF, C_TARGET_DEF, C_TARGET_H, C_TARGET_DEF_H): Define. (c-family/c-format.o, c-family/c-opts.o): Update dependencies. (default-c.o): New target. (s-target-hooks-def-h): Pass "Target Hook" string to genhooks. (c-family/c-target-hooks-def.h, s-c-target-hooks-def-h): New targets. (s-tm-texi): Pass -d option to genhooks. Also test timestamp on c-target.def. (build/genhooks.o): Update dependencies. c-family: * c-target-def.h: New file. * c-target.def: New file. * c-target.h: New file. * c-common.c (targetcm): Don't define here. * c-common.h (default_handle_c_option): Declare. * c-format.c: Include c-target.h instead of target.h. * c-opts.c: Include c-target.h instead of target.h. Explicitly include tm.h. (default_handle_c_option): Move from targhooks.c. objc: * objc-act.c: Include c-target.h instead of target.h. * Make-lang.in (objc/objc-act.o): Update dependencies. From-SVN: r172035
2011-04-06 13:08:17 +02:00
2011-04-06 Joseph Myers <joseph@codesourcery.com>
* c-target-def.h: New file.
* c-target.def: New file.
* c-target.h: New file.
* c-common.c (targetcm): Don't define here.
* c-common.h (default_handle_c_option): Declare.
* c-format.c: Include c-target.h instead of target.h.
* c-opts.c: Include c-target.h instead of target.h. Explicitly
include tm.h.
(default_handle_c_option): Move from targhooks.c.
2011-03-29 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/48248
* c-ppoutput.c (print): Add src_file field.
(init_pp_output): Initialize it.
(maybe_print_line): Don't optimize by adding up to 8 newlines
if map->to_file and print.src_file are different file.
(print_line): Update print.src_file.
Changelog c-family/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * c-ada-spec.c (compare_comment): Use filename_cmp instead of strcmp for filename. Changelog fortran/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * scanner.c (preprocessor_line): Use filename_cmp instead of strcmp. Changelog gcc/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * collect2.c (write_c_file_stat): Handle backslash as right-hand directory separator. (resolve_lib_name): Use IS_DIR_SEPARATOR instead of checking just for slash. * coverage.c (coverage_init): Use IS_ABSOLUTE_PATH instead of checking for trailing slash. * gcc.c (record_temp_file): Use filename_cmp instead of strcmp. (do_spec_1): Likewise. (replace_outfile_spec_function): Likewise. (is_directory): Use filename_ncmp instead of strncmp. (print_multilib_info): Likewise. * gcov.c (find_source): Use filename_cmp instead instead of strcmp. (make_gcov_file_name): Fix order of slash/backslash checks. * incpath.c (DIRS_EQ): Use filename_cmp instead of strcmp. (add_standard_paths): Likewise. * mips-tfile.c (saber_stop): Handle backslash. * prefix.c (update_path): Use filename_ncmp instead of strncmp. * profile.c (output_location): Use filename_cmp instead of strcmp. * read-md.c (handle_toplevel_file): Handle backslash. * tlink.c (frob_extension): Likewise. * tree-cfg.c (same_line_p): Use filename_cmp instead of strcmp. * tree-dump.c (dequeue_and_dump): Handle backslash. * tree.c (get_file_function_name): Likewise. * gengtype.c (read_input_list): Likewise. (get_file_realbasename): Likewise. (get_output_file_with_visibility): Use filename_cmp instead of strcmp. ChangeLog java/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp instead of strcmp. (set_source_filename): Likewise. * win32-host.c (jcf_open_exact_case): Likewise. ChangeLog lto/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * lto.c (lto_resolution_read): Use filename_cmp instead of strcmp. (lto_read_section_data): Likewise. ChangeLog cp/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * lex.c (interface_strcmp): Handle dos-paths. (handle_pragma_implementation): Use filename_cmp instead of strcmp. (in_main_input_context): Likewise. From-SVN: r171522
2011-03-25 20:20:52 +01:00
2011-03-25 Kai Tietz <ktietz@redhat.com>
* c-ada-spec.c (compare_comment): Use filename_cmp
instead of strcmp for filename.
2011-03-25 Jeff Law <law@redhat.com>
* c-common.c (def_fn_type): Add missing va_end.
2011-03-25 Jason Merrill <jason@redhat.com>
* c.opt: Add -std=c++03.
2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_template): Skip non-class instances.
2011-03-17 Kai Tietz <ktietz@redhat.com>
ChangeLog gcc/ 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * doc/plugins.texi: Adjust documentation for plugin register_callback. * tree.h (attribute_spec): Add new member affects_type_identity. - Zitierten Text anzeigen - * attribs.c (empty_attribute_table): Adjust attribute_spec initializers. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/crx/crx.c: Likewise. * config/darwin.h: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/cygming.h: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/sh/sh.c: Likewise. * config/sol2.h: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850.c: Likewise. ChangeLog gcc/cp 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * tree.c (cxx_attribute_table): Adjust table. ChangeLog gcc/testsuite 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * g++.dg/plugin/attribute_plugin.c: Adjust test. ChangeLog gcc/java 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * lang.c (java_attribute_table): Adjust table. ChangeLog gcc/lto 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * lto-lang.c (lto_attribute_table): Adjust table. ChangeLog gcc/ada 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * gcc-interface/utils.c (gnat_internal_attribute_table): Add new element. ChangeLog gcc/c-family 2011-03-17 Kai Tietz PR target/12171 * c-common.c (c_common_attribute_table): Add new element. (c_common_format_attribute_table): Likewise. From-SVN: r171209
2011-03-21 09:29:36 +01:00
PR target/12171
* c-pretty-print.c (pp_c_specifier_qualifier_list):
Display allowed attributes for function pointer types.
(pp_c_attributes_display): New function to display
attributes having affects_type_identity flag set to true.
* c-pretty-print.h (pp_c_attributes_display): New prototype.
ChangeLog gcc/ 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * doc/plugins.texi: Adjust documentation for plugin register_callback. * tree.h (attribute_spec): Add new member affects_type_identity. - Zitierten Text anzeigen - * attribs.c (empty_attribute_table): Adjust attribute_spec initializers. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/crx/crx.c: Likewise. * config/darwin.h: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/cygming.h: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/sh/sh.c: Likewise. * config/sol2.h: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850.c: Likewise. ChangeLog gcc/cp 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * tree.c (cxx_attribute_table): Adjust table. ChangeLog gcc/testsuite 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * g++.dg/plugin/attribute_plugin.c: Adjust test. ChangeLog gcc/java 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * lang.c (java_attribute_table): Adjust table. ChangeLog gcc/lto 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * lto-lang.c (lto_attribute_table): Adjust table. ChangeLog gcc/ada 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * gcc-interface/utils.c (gnat_internal_attribute_table): Add new element. ChangeLog gcc/c-family 2011-03-17 Kai Tietz PR target/12171 * c-common.c (c_common_attribute_table): Add new element. (c_common_format_attribute_table): Likewise. From-SVN: r171209
2011-03-21 09:29:36 +01:00
* c-common.c (c_common_attribute_table):
Add new element.
(c_common_format_attribute_table): Likewise.
2011-03-18 Jason Merrill <jason@redhat.com>
* c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
* c-common.h: Don't declare it here.
* c-common.c: Or define it here.
* c-opts.c (c_common_handle_option): Or set it here.
PR c++/35315
* c-common.c (handle_transparent_union_attribute): Don't
make a duplicate type in C++.
2011-03-15 Jason Merrill <jason@redhat.com>
* c-common.c (max_constexpr_depth): New.
* c-common.h: Declare it.
* c-opts.c (c_common_handle_option): Set it.
* c.opt (fconstexpr-depth): New option.
2011-03-11 Jason Merrill <jason@redhat.com>
* c-common.c (attribute_takes_identifier_p): Add missing const.
PR c++/46803
* c-common.c (attribute_takes_identifier_p): Assume that an
unknown attribute takes an identifier.
2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
PR c/47786
* c-common.c (c_type_hash): Call list_length instead of iterating
through DECL_CHAIN. Rename 'i' to 'n_elements'.
2011-02-19 Jakub Jelinek <jakub@redhat.com>
PR c/47809
* c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
* c.opt (fobjc-abi-version=) New.
(fobjc-nilcheck): New.
2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
PR c++/46890
* c-common.h (keyword_is_decl_specifier): Declare.
* c-common.c (keyword_is_decl_specifier): Define.
(keyword_is_function_specifier): New function.
2011-01-26 Jakub Jelinek <jakub@redhat.com>
PR c/47473
* c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
REAL_TYPE.
2011-01-26 Arnaud Charlet <charlet@adacore.com>
* c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
2011-01-26 Jakub Jelinek <jakub@redhat.com>
PR pch/47430
* c-opts.c (c_common_post_options): Call c_common_no_more_pch
after init_c_lex if pch_file is set.
2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
PR c++/43601
* c.opt (-fkeep-inline-dllexport): New switch.
2011-01-12 Richard Guenther <rguenther@suse.de>
PR middle-end/32511
* c-common.c (handle_weak_attribute): Warn instead of error
on declaring an inline function weak.
2011-01-05 Tom Tromey <tromey@redhat.com>
* c-common.h (lvalue_error): Update.
* c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
not error.
2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/c-family/: 2010-12-29 Nicola Pero <nicola@nicola.brainstorm.co.uk> In gcc/c-family/: 2010-12-29 Nicola Pero <nicola@nicola.brainstorm.co.uk> PR objc/47075 * c-objc.h (objc_finish_message_expr): Added argument to prototype. In gcc/objc/: 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47075 * objc-act.h (PROPERTY_REF_DEPRECATED_GETTER): New. * objc-tree.def (PROPERTY_REF): Increased the number of operands from 3 to 4. * objc-act.c (objc_finish_message_expr): Added optional argument allowing to return the deprecated method prototype for deprecated methods, instead of immediately emitting the deprecation warning. (objc_maybe_build_component_ref): Do not warn for a deprecated property. When building the getter call, get the deprecated method prototype from objc_finish_message_expr() and put it into the PROPERTY_REF. (objc_build_class_component_ref): Same change. (finish_class): Mark the getter and setter as deprecated if they are generated from a deprecated property. (objc_gimplify_property_ref): If the getter is deprecated, emit a deprecation warning. (objc_build_setter_call, objc_build_message_expr, objc_finish_foreach_loop): Updated call to objc_finish_message_expr. In gcc/objcp/: 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com> * objcp-lang.c (objcp_tsubst_copy_and_build): Update call to objc_finish_message_expr. In gcc/testsuite/: 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47075 * objc.dg/property/at-property-deprecated-1.m: Updated. * objc.dg/property/at-property-deprecated-2.m: New. * objc.dg/property/dotsyntax-deprecated-1.m: New. * obj-c++.dg/property/at-property-deprecated-1.mm: Updated. * obj-c++.dg/property/at-property-deprecated-2.mm: New. * obj-c++.dg/property/dotsyntax-deprecated-1.mm: New. From-SVN: r168315
2010-12-29 13:22:09 +01:00
PR objc/47075
* c-objc.h (objc_finish_message_expr): Added argument to
prototype.
2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
* c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
Use prototype_p.
2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
* c-objc.h (objc_maybe_warn_exceptions): New.
* stub-objc.c (objc_maybe_warn_exceptions): New.
2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
* c-common.h (readonly_error): Declare.
* c-common.c (readonly_error): Define.
2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
* c-common.h (invalid_indirection_error): Declare.
* c-common.c (invalid_indirection_error): Define.
2010-12-03 Richard Guenther <rguenther@suse.de>
PR c/46745
* c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
(pp_c_unary_expression): Likewise.
(pp_c_expression): Likewise.
2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (objc_finish_function): New.
(objc_non_volatilized_type): Removed.
(objc_type_quals_match): Removed.
* stub-objc.c (objc_finish_function): New.
(objc_non_volatilized_type): Removed.
(objc_type_quals_match): Removed.
diagnostic-core.h: Include bversion.h. * diagnostic-core.h: Include bversion.h. * toplev.h: Don't include input.h or bversion.h. (parse_optimize_options): Don't declare here. * alias.c, auto-inc-dec.c, c-aux-info.c, c-convert.c, c-parser.c, caller-save.c, cfg.c, cfganal.c, cfgbuild.c, cfgcleanup.c, combine-stack-adj.c, config/arm/pe.c, config/darwin-c.c, config/host-darwin.c, config/i386/host-cygwin.c, config/i386/host-mingw32.c, config/i386/msformat-c.c, config/i386/netware.c, config/i386/nwld.c, config/i386/winnt-cxx.c, config/i386/winnt-stubs.c, config/ia64/ia64-c.c, config/m32c/m32c-pragma.c, config/mep/mep-pragma.c, config/microblaze/microblaze-c.c, config/rs6000/host-darwin.c, config/rs6000/rs6000-c.c, config/score/score3.c, config/score/score7.c, config/sh/symbian-base.c, config/sh/symbian-c.c, config/sh/symbian-cxx.c, config/sol2-c.c, config/sol2.c, config/v850/v850-c.c, config/vxworks.c, convert.c, cppbuiltin.c, cselib.c, dbgcnt.c, ddg.c, dfp.c, dominance.c, emit-rtl.c, fixed-value.c, fwprop.c, ggc-common.c, gimple.c, gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, graphite-dependences.c, graphite-flattening.c, graphite-interchange.c, graphite-poly.c, graphite-scop-detection.c, graphite.c, haifa-sched.c, implicit-zee.c, integrate.c, ipa-pure-const.c, ipa-reference.c, ira-build.c, ira-conflicts.c, ira-costs.c, ira-lives.c, jump.c, lists.c, loop-doloop.c, loop-iv.c, lto-cgraph.c, lto-compress.c, lto-opts.c, lto-section-in.c, lto-section-out.c, lto-streamer-out.c, lto-symtab.c, modulo-sched.c, optabs.c, params.c, postreload-gcse.c, postreload.c, predict.c, profile.c, regcprop.c, reginfo.c, regmove.c, reorg.c, resource.c, sched-deps.c, sched-ebb.c, sched-rgn.c, sdbout.c, sel-sched-dump.c, sel-sched-ir.c, sese.c, stmt.c, targhooks.c, tree-cfgcleanup.c, tree-mudflap.c, tree-nomudflap.c, tree-object-size.c, tree-outof-ssa.c, tree-phinodes.c, tree-profile.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-live.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-operands.c, tree-ssa-structalias.c, tree-ssa-uninit.c, tree-vect-patterns.c, value-prof.c, var-tracking.c, web.c: Don't include toplev.h. * Makefile.in (TOPLEV_H): Remove. All uses changed to use toplev.h. Dependencies for above files and c-family files changed to remove $(TOPLEV_H) or toplev.h. (C_TREE_H): Don't include $(TOPLEV_H). (DIAGNOSTIC_CORE_H): Use $(INPUT_H) instead of input.h. Add bversion.h. * config/arm/t-pe, config/arm/t-wince-pe, config/i386/t-cygming, config/ia64/t-ia64, config/mep/t-mep, config/score/t-score-elf, config/t-darwin, config/t-sol2, config/t-vxworks, config/v850/t-v850, config/v850/t-v850e: Dependencies for above files changed to remove $(TOPLEV_H) or toplev.h. c-family: * c-common.h (parse_optimize_options): Declare. * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c, c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h. cp: * cp-gimplify.c, cp-lang.c, cvt.c, cxx-pretty-print.c, error.c, except.c, expr.c, friend.c, init.c, mangle.c, name-lookup.c, optimize.c, parser.c, rtti.c, tree.c, typeck2.c: Don't include toplev.h. * Make-lang.in: Dependencies for above files changed to remove toplev.h. java: * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c, verify-glue.c: Don't include toplev.h. * Make-lang.in: Dependencies for above files changed to remove toplev.h. lto: * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of $(TOPLEV_H). From-SVN: r167293
2010-11-30 12:41:24 +01:00
2010-11-30 Joseph Myers <joseph@codesourcery.com>
* c-common.h (parse_optimize_options): Declare.
* c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
system.h: Include "safe-ctype.h" instead of <safe-ctype.h>. * system.h: Include "safe-ctype.h" instead of <safe-ctype.h>. Include <signal.h>, <sys/mman.h>, <sys/resource.h> and <sys/times.h>. (O_BINARY, SIGCHLD, MAP_FAILED, MAP_ANONYMOUS, kill): Conditionally define. (GET_ENVIRONMENT): Poison. * configure.ac: Don't test for mincore. * configure: Regenerate. * config.in: Regenerate. * collect2-aix.c: Don't include <sys/mman.h>. * collect2.c: Don't include <signal.h>. (SIGCHLD): Don't define. (prefix_from_env): Use getenv instead of GET_ENVIRONMENT. * config/alpha/alpha.c: Include "splay-tree.h" instead of <splay-tree.h>. * config/arm/arm.c (arm_target_help): Use getenv instead of GET_ENVIRONMENT. * config/avr/driver-avr.c: Don't include <stdlib.h>. * config/frv/frv.c: Don't include <ctype.h>. * config/host-darwin.c: Don't include <sys/mman.h>. * config/host-hpux.c: Don't include <sys/mman.h> or <unistd.h>. (MAP_FAILED): Don't define. * config/host-linux.c: Don't include <sys/mman.h> or <limits.h>. * config/host-solaris.c: Don't include <sys/mman.h>. * config/i386/cygming.h: Don't include <stdio.h>. * config/i386/driver-i386.c: Don't include <stdlib.h>. * config/i386/host-cygwin.c: Don't include <sys/mman.h>. * config/iq2000/iq2000.c: Don't include <signal.h>. * config/m32c/m32c-pragma.c: Don't include <stdio.h>. * config/m68hc11/m68hc11.c: Don't include <stdio.h>. * config/mep/mep-pragma.c: Don't include <stdio.h>. * config/microblaze/microblaze.c: Don't include <signal.h>. * config/mips/mips.c: Don't include <signal.h>. * config/rs6000/host-darwin.c: Don't include <signal.h>. * cppdefault.c (cpp_relocated): Use getenv instead of GET_ENVIRONMENT. * defaults.h (GET_ENVIRONMENT): Don't define. * et-forest.h: Don't include <ansidecl.h> or <stddef.h>. * gcc.c: Don't include <signal.h>, <sys/mman.h> or <sys/types.h>. (SIGCHLD, MAP_FAILED, kill): Don't define. (process_command): Use getenv instead of GET_ENVIRONMENT. * genhooks.c: Don't include <string.h>. * ggc-common.c: Don't include <sys/resource.h>, <sys/mman.h> or <sys/types.h>. (MAP_FAILED): Don't define. * ggc-page.c Don't include <sys/mman.h>. (MAP_ANONYMOUS, MAP_FAILED): Don't define. * ggc-zone.c: Don't include <sys/mman.h>. (MAP_ANONYMOUS, MAP_FAILED): Don't define. * graph.c: Include "config.h" instead of <config.h>. * incpath.c (add_env_var_paths): Use getenv instead of GET_ENVIRONMENT. * lto-wrapper.c: Don't include <errno.h>, <signal.h> or "libiberty.h". (SIGCHLD, kill): Don't define. * mips-tfile.c: Don't include <signal.h>. * opts.c: Don't include <signal.h> or <sys/resource.h>. (print_specific_help): Use getenv instead of GET_ENVIRONMENT. * passes.c: Don't include <signal.h>, <sys/resource.h> or <sys/times.h>. * sparseset.h: Don't include <assert.h>. * timevar.c: Don't include <sys/times.h> or <sys/resource.h>. * tlink.c: Don't include "libiberty.h". * toplev.c: Don't include <signal.h> or <sys/times.h>. * tree-mudflap.c: Include "demangle.h" instead of <demangle.h>. * tree-switch-conversion.c: Don't include <signal.h>. * vmsdbgout.c: Don't include <errno.h> or <string.h>. c-family: * c-opts.c (check_deps_environment_vars): Use getenv instead of GET_ENVIRONMENT. * c-pch.c (O_BINARY): Don't define here. * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>. fortran: * gfortran.h (alloca): Don't include definitions. (NULL): Don't define. java: * boehm.c: Include "config.h" instead of <config.h>. * builtins.c: Don't include <stdarg.h>. * class.c: Don't include "stdio.h". (O_BINARY): Don't define here. * jcf-depend.c: Don't include <assert.h>. (jcf_dependency_set_dep_file, jcf_dependency_init, jcf_dependency_write): Use gcc_assert. * jcf-io.c (O_BINARY): Don't define here. * jcf-path.c: Don't include "tm.h". (jcf_path_init): Use getenv instead of GET_ENVIRONMENT. * resource.c: Don't include "stdio.h". (O_BINARY): Don't define here. * verify-impl.c: Don't include <stdio.h>. lto: * lto-endian.h: Delete. * lto-object.c: Don't include "libiberty.h". (O_BINARY): Don't define. * lto.c: Don't include "libiberty.h" or <sys/mman.h>. (O_BINARY): Don't define. From-SVN: r167241
2010-11-29 15:09:41 +01:00
2010-11-29 Joseph Myers <joseph@codesourcery.com>
* c-opts.c (check_deps_environment_vars): Use getenv instead of
GET_ENVIRONMENT.
* c-pch.c (O_BINARY): Don't define here.
* c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
target.def (supports_split_stack, [...]): Take gcc_options parameters. * target.def (supports_split_stack, except_unwind_info): Take gcc_options parameters. * targhooks.c (default_except_unwind_info, dwarf2_except_unwind_info, sjlj_except_unwind_info): Take gcc_options parameters. * targhooks.h (default_except_unwind_info, dwarf2_except_unwind_info, sjlj_except_unwind_info): Update prototypes. * doc/tm.texi.in (TARGET_IRA_COVER_CLASSES, TARGET_HAVE_NAMED_SECTIONS, TARGET_UNWIND_TABLES_DEFAULT): Document that hooks must not be modified. (TARGET_EXCEPT_UNWIND_INFO): Refer to opts argument. * doc/tm.texi: Regenerate. * defaults.h (STACK_OLD_CHECK_PROTECT, STACK_CHECK_PROTECT): Pass &global_options to targetm.except_unwind_info. * dwarf2out.c (dwarf2out_do_frame, dwarf2out_do_cfi_asm, dwarf2out_begin_prologue, dwarf2out_frame_init, dwarf2out_frame_finish, dwarf2out_assembly_start): Pass &global_options to targetm.except_unwind_info. * except.c (init_eh, finish_eh_generation, gate_convert_to_eh_region_ranges, output_one_function_exception_table): Pass &global_options to targetm.except_unwind_info. * expr.c (build_personality_function): Pass &global_options to targetm.except_unwind_info. * function.c (expand_function_end): Pass &global_options to targetm.except_unwind_info. * hooks.c (hook_bool_bool_gcc_optionsp_false): New. * hooks.h (hook_bool_bool_gcc_optionsp_false): Declare. * opts.c (finish_options): Pass opts to targetm.except_unwind_info and targetm.supports_split_stack. Remove assertions about opts and opts_set. (common_handle_option): Remove assertions about opts, opts_set and dc. * tree-tailcall.c (suitable_for_tail_call_opt_p): Pass &global_options to targetm.except_unwind_info. * tree.c (build_common_builtin_nodes: Pass &global_options to targetm.except_unwind_info. * config/arm/arm.c (arm_except_unwind_info): Add gcc_options parameter. (arm_compute_func_type, arm_expand_prologue, thumb_pushpop, thumb1_expand_prologue, thumb1_output_function_prologue, arm_unwind_emit, arm_output_fn_unwind): Update calls to arm_except_unwind_info. * config/i386/i386.c (ix86_supports_split_stack): Add gcc_options parameter. * config/ia64/ia64.c (ia64_except_unwind_info): Add gcc_options parameter. (ia64_output_function_prologue, ia64_add_bundle_selector_before, ia64_reorg, ia64_asm_unwind_emit): Update calls to ia64_except_unwind_info. * config/pa/pa.c (pa_option_override): Pass &global_options to targetm.except_unwind_info. * config/picochip/picochip-protos.h (picochip_except_unwind_info): Remove prototype. c-family: * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to targetm.except_unwind_info. From-SVN: r167145
2010-11-25 14:16:03 +01:00
2010-11-25 Joseph Myers <joseph@codesourcery.com>
* c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
targetm.except_unwind_info.
common.opt (initial_max_fld_align, [...]): New Variable entries. * common.opt (initial_max_fld_align, flag_debug_asm, flag_dump_rtl_in_asm, flag_dump_all_passed, rtl_dump_and_exit, flag_print_asm_name, graph_dump_format, help_printed, help_columns, flag_opts_finished): New Variable entries. (fdbg-cnt-list, fdbg-cnt=, fdebug-prefix-map=, frandom-seed, frandom-seed=): Mark deferred. (fsched-verbose=): Use UInteger and Var. * flags.h (set_struct_debug_option, flag_print_asm_name, rtl_dump_and_exit, flag_debug_asm, flag_dump_rtl_in_asm, graph_dump_format): Don't declare here. * haifa-sched.c (sched_verbose_param, fix_sched_param): Remove. * opts-global.c: Include dbgcnt.h and debug.h. (decode_options): Pass location to finish_options. (handle_common_deferred_options): Check flag_dump_all_passed. Handle OPT_fdbg_cnt_, OPT_fdbg_cnt_list, OPT_fdebug_prefix_map_, OPT_frandom_seed and OPT_frandom_seed_. Don't assert on OPT_fstack_limit. * opts.c: Don't include toplev.h, dbgcnt.h or debug.h. (set_struct_debug_option): Add location_t parameter. Update recursive call. Use error_at. (default_options_optimization): Use error_at. (finish_options): Add location_t parameter. Use opts->x_flag_opts_finished instead of first_time_p. Use opts->x_optimize instead of optimize. Use error_at. Pass location to inform. (print_filtered_help): Use opts->x_help_printed to track what options have been printed. (print_specific_help): Use opts->x_help_columns to track number of columns. (common_handle_option): Pass locations and gcc_options pointers to more functions. Use warning_at instead of fnotice and warning. Don't handle OPT_fdbg_cnt_, OPT_fdbg_cnt_list or OPT_fdebug_prefix_map_. Use error_at. Set opts->x_initial_max_fld_align; don't set maximum_field_alignment. Don't handle OPT_frandom_seed or OPT_frandom_seed_. Don't handle OPT_fsched_verbose_. (handle_param): Add location_r parameter. Use error_at. (set_debug_level): Add location_r parameter. Use error_at and warning_at. (setup_core_dumping): Add diagnostic_context parameter. (decode_d_option): Add gcc_options, location_t and diagnostic_context parameters and use them instead of global state. Use warning_at. (enable_warning_as_error): Use error_at. * opts.h (finish_options): Update prototype. (set_struct_debug_option): Declare here. * rtl.h (fix_sched_param): Remove. * stor-layout.c (initial_max_fld_align): Remove. * toplev.c (rtl_dump_and_exit, flag_print_asm_name, graph_dump_format, flag_debug_asm, flag_dump_rtl_in_asm): Remove. (process_options): Set maximum_field_alignment. * tree.h (initial_max_fld_align) Don't declare here. * Makefile.in (opts.o, opts-global.o): Update dependencies. c-family: * c-opts.c (c_common_handle_option): Pass location to set_struct_debug_option. testsuite: * gcc.dg/opts-5.c: New test. From-SVN: r167106
2010-11-24 01:54:26 +01:00
2010-11-23 Joseph Myers <joseph@codesourcery.com>
* c-opts.c (c_common_handle_option): Pass location to
set_struct_debug_option.
flag-types.h (struct visibility_flags): Don't declare here. * flag-types.h (struct visibility_flags): Don't declare here. * flags.h (strip_off_ending, fast_math_flags_set_p, fast_math_flags_struct_set_p): Declare here. (visibility_options): Don't declare here. * opts-common.c (option_enabled, get_option_state): Move from opts.c. * opts-global.c: Include diagnostic.h instead of diagnostic-core.h. Include tree.h, langhooks.h, lto-streamer.h and toplev.h. (const_char_p, ignored_options, in_fnames, num_in_fnames, write_langs, complain_wrong_lang, postpone_unknown_option_warning, print_ignored_options, unknown_option_callback, post_handling_callback, lang_handle_option, add_input_filename, read_cmdline_options, initial_lang_mask, init_options_once, decode_cmdline_options_to_array_default_mask, set_default_handlers, decode_options): Move from opts.c. (print_ignored_options): Use warning_at instead of saving and restoring input_location. * opts.c: Include <signal.h> and <sys/resource.h>. Include rtl.h instead of expr.h. Don't include langhooks.h, except.h or lto-streamer.h. Add more comments on includes. (strip_off_ending, setup_core_dumping, decode_d_option): Move from toplev.c. (visibility_options): Move to c-family/c-common.c. (const_char_p, ignored_options, in_fnames, num_in_fnames, write_langs, complain_wrong_lang, postpone_unknown_option_warning, print_ignored_options, unknown_option_callback, post_handling_callback, lang_handle_option, add_input_filename, read_cmdline_options, initial_lang_mask, init_options_once, decode_cmdline_options_to_array_default_mask, set_default_handlers, decode_options): Move to opts-global.c. (target_handle_option, default_options_optimization, finish_options, common_handle_option): Remove static. (option_enabled, get_option_state): Move to opts-common.c. * opts.h (common_handle_option, target_handle_option, finish_options, default_options_optimization): Declare. * toplev.c: Don't include <signal.h> or <sys/resource.h>. (setup_core_dumping, strip_off_ending, decode_d_option): Move to opts.c. * toplev.h (strip_off_ending, decode_d_option, fast_math_flags_set_p, fast_math_flags_struct_set_p): Don't declare here. * Makefile.in (opts.o, opts-global.o): Update dependencies. c-family: * c-common.c (visibility_options): Move from ../opts.c. * c-common.h (struct visibility_flags, visibility_options): Declare here. * c-opts.c (finish_options): Rename to c_finish_options. (c_common_init): Update call to finish_options. From-SVN: r167105
2010-11-24 01:51:48 +01:00
2010-11-23 Joseph Myers <joseph@codesourcery.com>
* c-common.c (visibility_options): Move from ../opts.c.
* c-common.h (struct visibility_flags, visibility_options):
Declare here.
* c-opts.c (finish_options): Rename to c_finish_options.
(c_common_init): Update call to finish_options.
2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/34033
* c-lex.c (lex_string): Check that each string in an Objective-C
string concat sequence starts with either one or zero '@', and
that there are no spurious '@' signs at the end.
tm.texi.in (HANDLE_SYSV_PRAGMA, [...]): Remove. * doc/tm.texi.in (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Remove. (HANDLE_PRAGMA_PACK_WITH_EXPANSION): Don't refer to HANDLE_SYSV_PRAGMA. * doc/tm.texi: Regenerate. * system.h (HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_WEAK): Poison. * config/alpha/elf.h (HANDLE_SYSV_PRAGMA): Don't define. * config/alpha/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/alpha/osf5.h (HANDLE_SYSV_PRAGMA): Don't define. * config/alpha/vms.h (HANDLE_SYSV_PRAGMA): Don't define. * config/arm/arm.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/arm/netbsd.h (HANDLE_SYSV_PRAGMA): Don't define. * config/cris/cris.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/darwin.h (HANDLE_SYSV_PRAGMA): Don't define. (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/elfos.h (HANDLE_SYSV_PRAGMA): Don't define. * config/freebsd.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/frv/frv.h (HANDLE_SYSV_PRAGMA): Don't define. * config/i386/cygming.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/i386/djgpp.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/i386/i386-interix.h (HANDLE_SYSV_PRAGMA): Don't define. (HANDLE_PRAGMA_WEAK): Don't undefine. * config/i386/netware.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/i386/vxworks.h (HANDLE_SYSV_PRAGMA): Don't define. * config/ia64/hpux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/ia64/ia64.h (HANDLE_SYSV_PRAGMA): Don't define. * config/interix.h (HANDLE_SYSV_PRAGMA): Don't define. (HANDLE_PRAGMA_WEAK): Don't undefine. * config/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/m32r/linux.h (HANDLE_SYSV_PRAGMA): Don't define. (HANDLE_PRAGMA_PACK): Don't undefine. * config/m32r/m32r.h (HANDLE_SYSV_PRAGMA): Don't undefine. * config/mep/mep.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/mips/elf.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/mips/sde.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/mmix/mmix.h (HANDLE_SYSV_PRAGMA): Don't define. * config/netbsd.h (HANDLE_SYSV_PRAGMA): Don't define. (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/openbsd.h (HANDLE_SYSV_PRAGMA): Don't define. * config/pa/pa-hpux.h (HANDLE_SYSV_PRAGMA): Don't define. (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/rs6000/aix.h (HANDLE_SYSV_PRAGMA): Don't define. * config/rs6000/sysv4.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/rx/rx.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/score/elf.h (HANDLE_SYSV_PRAGMA): Don't define. * config/spu/spu.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/stormy16/stormy16.h (HANDLE_SYSV_PRAGMA): Don't define. * config/xtensa/elf.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. c-family: * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK, HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and HANDLE_PRAGMA_VISIBILITY. * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK, HANDLE_PRAGMA_VISIBILITY): Don't define. (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test. cp: * name-lookup.c (handle_namespace_attrs): Don't check HANDLE_PRAGMA_VISIBILITY. * parser.c (cp_parser_namespace_definition): Don't check HANDLE_PRAGMA_VISIBILITY. testsuite: * g++.dg/cpp/_Pragma1.C: Test for all non-Solaris targets. * gcc.dg/cpp/_Pragma6.c: Test for all non-Solaris targets. * gcc.dg/pack-test-1.c: Test for all non-default_packed targets. * gcc.dg/pack-test-2.c: Test for all targets. * gcc.dg/pragma-align.c: Test for all targets. * gcc.dg/pragma-pack-4.c: Do not skip for AVR. * gcc.dg/ucnid-10.c: Test for all targets. From-SVN: r166992
2010-11-21 01:54:14 +01:00
2010-11-20 Joseph Myers <joseph@codesourcery.com>
* c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
HANDLE_PRAGMA_VISIBILITY.
* c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
HANDLE_PRAGMA_VISIBILITY): Don't define.
(HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
PR c++/16189
PR c++/36888
PR c++/45331
* c-common.h (keyword_begins_type_specifier): Declare.
(keyword_is_storage_class_specifier): Declare.
(keyword_is_type_qualifier): Declare.
* c-common.c (keyword_begins_type_specifier): New function.
(keyword_is_storage_class_specifier): New function.
(keyword_is_type_qualifier): Declare.
2010-11-19 Joseph Myers <joseph@codesourcery.com>
PR c/46547
* c-common.c (in_late_binary_op): Define.
(c_common_truthvalue_conversion): Check in_late_binary_op before
calling c_save_expr.
* c-common.h (in_late_binary_op): Declare.
2010-11-19 Joseph Myers <joseph@codesourcery.com>
* c-opts.c (c_common_handle_option): Update calls to
set_struct_debug_option.
In gcc/: 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com> * c-parser.c (c_parser_objc_protocol_definition): Pass attributes to objc_declare_protocols. In gcc/c-family/: 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com> * c-common.h (objc_declare_protocols): Added additional argument. * stub-objc.c (objc_declare_protocol): Same change. In gcc/cp/: 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_protocol_declaration): Pass attributes to objc_declare_protocols. In gcc/objc/: 2010-11-19 Nicola Pero <nicola@nicola.brainstorm.co.uk> * objc-act.c (lookup_protocol): Added 'warn_if_deprecated' argument. If it is 'true' and the protocol is deprecated, emit a deprecation warning. (objc_start_protocol): Do not warn that protocol attributes are unimplemented. Pass the attributes to start_protocol. (start_protocol): Added attributes argument. Recognize the 'deprecated' attribute and mark the protocols with TREE_DEPRECATED if present. Store attributes in the protocol. (objc_declare_protocols): Added 'attributes' argument. Recognize the 'deprecated' attribute and mark the protocols with TREE_DEPRECATED if present. Store attributes in the protocol. Updated call to lookup_protocol. (objc_build_protocol_expr): Updated call to lookup_protocol. (check_protocol_recursively): Same change. (lookup_and_install_protocols): Same change. * objc-act.h: Updated comments. In gcc/testsuite/: 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/attributes/proto-attribute-1.m: Updated. * objc.dg/attributes/proto-attribute-2.m: New. * objc.dg/attributes/proto-attribute-3.m: New. * obj-c++.dg/attributes/proto-attribute-1.mm: Updated. * obj-c++.dg/attributes/proto-attribute-2.mm: New. * obj-c++.dg/attributes/proto-attribute-3.mm: New. From-SVN: r166938
2010-11-19 13:29:45 +01:00
2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (objc_declare_protocols): Added additional argument.
* stub-objc.c (objc_declare_protocol): Same change.
2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
PR c/33193
* c-common.h (build_real_imag_expr): Declare.
* c-semantics.c (build_real_imag_expr): Define.
2010-11-17 Joseph Myers <joseph@codesourcery.com>
* c-opts.c (c_common_parse_file): Take no arguments.
* c-common.h (c_common_parse_file): Update prototype.
2010-11-16 Jakub Jelinek <jakub@redhat.com>
PR c++/46401
* c-common.c (warning_candidate_p): Don't track non-const calls
or STRING_CSTs.
2010-11-15 Ian Lance Taylor <iant@google.com>
* c-lex.c (init_c_lex): Set macro debug callbacks if
flag_dump_go_spec is set.
2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (objc_build_incr_expr_for_property_ref): New.
* stub-objc.c (objc_build_incr_expr_for_property_ref): New.
2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
PR preprocessor/45038
* c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
dialects.
2010-11-12 Joseph Myers <joseph@codesourcery.com>
* c-common.h (c_family_lang_mask): Declare.
* c-opts.c (c_family_lang_mask): Make extern.
* c-pragma.c (handle_pragma_diagnostic): Use
control_warning_option.
Makefile.in (OPTS_H): Define. * Makefile.in (OPTS_H): Define. (c-decl.o, c-family/c-common.o, c-family/c-opts.o, c-family/c-pch.o, c-family/c-pragma.o, gcc.o, gccspec.o, cppspec.o, options.o, gcc-options.o, lto-opts.o, opts.o, opts-common.o, toplev.o, passes.o, matrix-reorg.o, ipa-struct-reorg.o, PLUGIN_HEADERS): Use $(OPTS_H). * gcc.c (driver_handle_option): Take location_t parameter. (process_command, do_self_spec): Update calls to read_cmdline_option. * langhooks-def.h (lhd_handle_option): Take location_t parameter. * langhooks.c (lhd_handle_option): Take location_t parameter. * langhooks.h (handle_option): Take location_t parameter. * lto-opts.c (lto_reissue_options): Update call to set_option. * opts-common.c (handle_option): Make static. Take location_t parameter and pass it to other functions. (handle_generated_option): Take location_t parameter and pass it to other functions. (read_cmdline_option): Take location_t parameter and pass it to other functions. Use warning_at and error_at. (set_option): Take location_t parameter and pass it to other functions. * opts.c (common_handle_option): Take location_t parameter and pass it to other functions. (enable_warning_as_error): Make static. Take location_t parameter and pass it to other functions. (lang_handle_option): Take location_t parameter and pass it to other functions. (target_handle_option): Take location_t parameter. (read_cmdline_options, maybe_default_option, maybe_default_options, default_options_optimization, decode_options): Take location_t parameter and pass it to other functions. * opts.h: Include input.h. (struct cl_option_handler_func, decode_options, set_option, handle_generated_option, read_cmdline_option): Take location_t parameters. (handle_option, enable_warning_as_error): Remove. * toplev.c (toplev_main): Update call to decode_options. ada: * gcc-interface/Make-lang.in (ada/misc.o): Use $(OPTS_H). * gcc-interface/misc.c (gnat_handle_option): Take location_t parameter. c-family: * c-common.c (parse_optimize_options): Update call to decode_options. * c-common.h (c_common_handle_option): Update prototype. * c-opts.c (c_common_handle_option): Take location_t parameter and pass it to other functions. cp: * Make-lang.in (g++spec.o): Use $(OPTS_H). fortran: * Make-lang.in (gfortranspec.o): Use $(OPTS_H). * gfortran.h (gfc_handle_option): Take location_t parameter. * options.c (gfc_handle_option): Take location_t parameter. java: * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H). * lang.c (java_handle_option): Take location_t parameter. lto: * Make-lang.in (lto/lto.o): Use $(OPTS_H). * lto-lang.c (lto_handle_option): Take location_t parameter. From-SVN: r166688
2010-11-13 00:26:56 +01:00
2010-11-12 Joseph Myers <joseph@codesourcery.com>
* c-common.c (parse_optimize_options): Update call to
decode_options.
* c-common.h (c_common_handle_option): Update prototype.
* c-opts.c (c_common_handle_option): Take location_t parameter and
pass it to other functions.
2010-11-11 Joseph Myers <joseph@codesourcery.com>
* c-opts.c (warning_as_error_callback): Remove.
(c_common_initialize_diagnostics): Don't call
register_warning_as_error_callback.
(c_common_handle_option): Handle -Werror=normalized= here.
cfgloop.c (verify_loop_structure): Use %' in diagnostics. * cfgloop.c (verify_loop_structure): Use %' in diagnostics. Start diagnostics with lowercase letters. * cgraphunit.c (verify_cgraph_node): Start diagnostics with lowercase letters. * collect2.c (maybe_run_lto_and_relink): Remove trailing '.' from diagnostic. * config/alpha/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic. * config/arm/arm.c (arm_get_pcs_model): Start diagnostics with lowercase letters. * config/arm/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic. Remove trailing ' ' from diagnostic. * config/avr/avr.c (print_operand_address): Start diagnostic with a lowercase letter and remove trailing '.'. * config/avr/avr.opt (mpmem-wrap-around): Fix typo in help text. * config/bfin/bfin.c (bfin_option_override): Start diagnostics with lowercase letters. Use %' in diagnostics. Remove trailing '.' from diagnostics. (bfin_handle_longcall_attribute): Use %' in diagnostic. * config/cris/cris.c (cris_split_movdx, cris_expand_pic_call_address): Start diagnostics with lowercase letters. (cris_asm_output_label_ref): Use %' in diagnostic. * config/cris/cris.h (ASM_SPEC): Start diagnostic with a lowercase letter. * config/crx/crx.h (FUNCTION_PROFILER): Start diagnostic with a lowercase letter. * config/darwin-c.c (version_as_macro): Start diagnostic with a lowercase letter. * config/darwin-driver.c (darwin_default_min_version): Use %' in diagnostic. * config/host-darwin.c (darwin_gt_pch_use_address): Use %' in diagnostic. * config/i386/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic. * config/i386/host-cygwin.c (cygwin_gt_pch_get_address): Use %' in diagnostics. * config/i386/i386.c (ix86_option_override_internal): Write diagnostic as a single sentence without trailing '.'. Use %' in diagnostics. (ix86_function_sseregparm, classify_argument): Start diagnostics with lowercase letters. (ix86_expand_prologue): Use %' in diagnostic. * config/i386/i386.h (CC1_CPU_SPEC_1): Remove trailing '.' from diagnostic. * config/i386/nwld.h (LINK_SPEC): Start diagnostic with a lowercase letter. * config/i386/winnt.c (i386_pe_determine_dllimport_p): Use %' in diagnostic. * config/ia64/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic. * config/ia64/ia64.opt (msched-max-memory-insns-hard-limit): Avoid '`' in help text. * config/lm32/lm32.c (lm32_print_operand): Start diagnostic with a lowercase letter. * config/mep/mep.c (mep_validate_vliw): Start diagnostics with lowercase letters. * config/microblaze/microblaze.c (microblaze_handle_option): Remove trailing '.' from diagnostic. (print_operand): Start diagnostic with a lowercase letter. * config/pa/pa-hpux10.h (LINK_SPEC): Start diagnostics with lowercase letters. Avoid '`' in diagnostics. * config/pa/pa-hpux11.h (LINK_SPEC): Start diagnostics with lowercase letters. Avoid '`' in diagnostics. * config/pa/pa64-hpux.h (LINK_SPEC): Start diagnostics with lowercase letters. Avoid '`' in diagnostics. * config/picochip/picochip.c (picochip_option_override, picochip_emit_save_register, picochip_function_arg, picochip_output_label, picochip_output_internal_label, picochip_asm_output_opcode, picochip_output_cbranch, picochip_output_compare, picochip_output_branch, picochip_get_vliw_alu_id): Remove trailing '.' and '\n' from diagnostics. Start diagnostics with lowercase letters. Use %' in diagnostics. * config/rs6000/rs6000.c (rs6000_option_override_internal): Use "SPE" capitalization. Start diagnostic with a lowercase letter. (rs6000_handle_option): Start diagnostics with lowercase letters. (def_builtin): Remove trailing '.' from diagnostic. (rs6000_savres_routine_name): Start diagnostic with a lowercase letter. * config/rs6000/sysv4.h (LINK_OS_FREEBSD_SPEC): Avoid '`' in diagnostic. * config/rx/rx.c (rx_handle_option): Start diagnostic with a lowercase letter. * config/s390/s390.c (s390_option_override) Start diagnostics with lowercase letters. Use %' in diagnostic. * config/sh/sh.c (sh_output_mi_thunk): Start diagnostics with lowercase letters. * config/sh/symbian-base.c (sh_symbian_mark_dllimport): Use %' in diagnostic. * config/sh/symbian-c.c (sh_symbian_is_dllimported): Use %' in diagnostic. * config/sh/symbian-cxx.c (sh_symbian_is_dllimported): Use %' in diagnostic. * config/sparc/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic. * config/spu/spu.c (spu_option_override): Start diagnostics with lowercase letters. Use %qs for quoting in diagnostics. (spu_check_builtin_parm): Remove trailing '.' from diagnostics. Use %wd instead of HOST_WIDE_INT_PRINT_DEC in diagnostic . * config/v850/v850.c (construct_save_jarl): Remove trailing '\n' from diagnostic. * convert.c (convert_to_integer, convert_to_vector): Use %' in diagnostics. * dbgcnt.c (dbg_cnt_process_opt): Start diagnostic with lowercase letter and use "cannot" spelling. * expmed.c (extract_fixed_bit_field): Start diagnostic with lowercase letter and format as a single sentence without '.'. * ggc-common.c (write_pch_globals, gt_pch_save, gt_pch_restore): Use %' in diagnostics. * ggc-page.c (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read): Use %' in diagnostics. * ggc-zone.c (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read): Use %' in diagnostics. * graph.c (clean_graph_dump_file): Use %' in diagnostic. * graphite-poly.c (graphite_read_scop_file): Start diagnostics with lowercase letters and remove tailing '.' and '\n'. * lto-cgraph.c (input_profile_summary): Start diagnostic with lowercase letter and remove trailing '.'. (input_cgraph): Start diagnostics with lowercase letters and remove trailing '\n'. * opts.c (finish_options, common_handle_option): Start diagnostics with lowercase letters and remove trailing '.'. Fix typo in diagnostic. * passes.c (position_pass): Start diagnostic with lowercase letter. * plugin.c (add_new_plugin, parse_plugin_arg_opt, register_callback, try_init_one_plugin): Start diagnostics with lowercase letters. * reload1.c (spill_failure): Use %' in diagnostic. (gen_reload): Start diagnostic with a lowercase letter. * stor-layout.c (place_field): Start diagnostic with a lowercase letter. * toplev.c (open_auxiliary_file): Use %' in diagnostic. * tree-cfg.c (verify_expr, verify_types_in_gimple_reference, verify_gimple_call, verify_gimple_phi, verify_eh_throw_stmt_node): Start diagnostics with lowercase letters, remove trailing '.' and use %' in diagnostics. * tree-ssa.c (verify_def): Remove trailing '.' from diagnostic. (verify_ssa): Don't split diagnostic across two error calls. Spell out "number" and use %' in diagnostic. * value-prof.c (visit_hist, check_counter): Start diagnostics with lowercase letters. c-family: * c-common.c (handle_mode_attribute): Use %' and word "signedness" in diagnostic. * c-opts.c (c_common_parse_file): Start diagnostics with lowercase letter. * c-pragma.c (handle_pragma_target, handle_pragma_optimize): Remove trailing '.' from diagnostics. * c.opt (Wwrite-strings_: Avoid '`' in help text. cp: * cvt.c (cp_convert_to_pointer): Use %' in diagnostic. * decl.c (layout_var_decl, maybe_commonize_var, grokdeclarator): Use %' in diagnostics. * decl2.c (check_classfn): Use %' in diagnostic. * init.c (build_java_class_ref): Use %' in diagnostic. (build_delete): Remove trailing '.' from diagnostic. * method.c (do_build_copy_assign, walk_field_subobs): Use %' in diagnostics. * name-lookup.c (pushdecl_maybe_friend): Use %' in diagnostic. * parser.c (cp_parser_exception_specification_opt): Remove trailing '.' from diagnostic. (cp_parser_objc_interstitial_code): Use %qs for quoting in diagnostic. * pt.c (check_valid_ptrmem_cst_expr): Use %< and %> for quoting in diagnostic. * repo.c (reopen_repo_file_for_write): Use %' in diagnostic. fortran: * trans-array.c (gfc_trans_deferred_array): Use "front-end" spelling in diagnostic. * trans.c (gfc_allocate_array_with_status): Add missing space in diagnostic. java: * expr.c (expand_java_field_op): Use %' in diagnostic. * jcf-parse.c (java_parse_file): Use %' in diagnostics. * jvspec.c (lang_specific_driver): Use %' in diagnostic. * lang.c (java_post_options): Use %' in diagnostics. lto: * lto.c (lto_resolution_read): Start diagnostics with lowercase letters and remove trailing '.'. (lto_file_finalize): Start diagnostic with a lowercase letter. objc: * objc-act.c (objc_init): Use %' in diagnostic. (objc_set_method_opt): Remove trailing '.' from diagnostic. From-SVN: r166570
2010-11-11 00:23:15 +01:00
2010-11-10 Joseph Myers <joseph@codesourcery.com>
* c-common.c (handle_mode_attribute): Use %' and word "signedness"
in diagnostic.
* c-opts.c (c_common_parse_file): Start diagnostics with lowercase
letter.
* c-pragma.c (handle_pragma_target, handle_pragma_optimize):
Remove trailing '.' from diagnostics.
* c.opt (Wwrite-strings_: Avoid '`' in help text.
common.opt (flag_excess_precision_cmdline, [...]): New Variable declarations. * common.opt (flag_excess_precision_cmdline, flag_generate_lto, warn_larger_than, larger_than_size, warn_frame_larger_than, frame_larger_than_size, flag_gen_aux_info, flag_shlib, default_visibility, flag_tls_default): New Variable declarations. (aux-info, auxbase, dumpbase, dumpdir, falign-functions=, falign-jumps=, falign-labels=, falign-loops=, o, v): Use Var. (v): Declare as Common and document here. * flags.h (default_visibility, flag_generate_lto, warn_larger_than, larger_than_size, warn_frame_larger_than, frame_larger_than_size, flag_gen_aux_info, flag_pedantic_errors, flag_shlib, flag_excess_precision_cmdline): Remove. (set_Wstrict_aliasing): Update prototype. * gcc.c (verbose_flag): Remove. (driver_handle_option): Add diagnostic_context parameter. Don't handle OPT_v explicitly here. Set verbose_flag to 1 rather than incrementing it. * opts-common.c (handle_option): Pass dc to handler. * opts.c (warn_larger_than, larger_than_size, warn_frame_larger_than, frame_larger_than_size, default_visibility): Remove. (common_handle_option): Add diagnostic_context parameter. (set_fast_math_flags, set_unsafe_math_optimizations_flags): Add gcc_options parameters. (lang_handle_option, target_handle_option, read_cmdline_options, decode_options): Add diagnostic_context parameters. (finish_options): Access option state through opts pointer where possible. (common_handle_option): Access option state through opts pointer where possible. Do not set local static variable verbose. Do not explicitly handle OPT_v, OPT_Wstrict_aliasing_, OPT_Wstrict_overflow_, OPT_Wunused, OPT_auxbase, OPT_dumpbase, OPT_dumpdir, OPT_falign_functions_, OPT_falign_jumps_, OPT_falign_labels_, OPT_falign_loops_, OPT_fira_verbose_, OPT_o or OPT_fwhopr_. Do not explicitly set .opt file variables for OPT_aux_info or OPT_pedantic_errors. Use dc for diagnostic context. (set_Wstrict_aliasing): Add gcc_options parameter. * opts.h (struct cl_option_handler_func): Add diagnostic_context parameter to handler. (decode_options): Add diagnostic_context parameter. * toplev.c (dump_base_name, dump_dir_name, aux_base_name, asm_file_name, flag_generate_lto, flag_gen_aux_info, aux_info_file_name, flag_shlib, flag_tls_default, flag_excess_precision_cmdline, flag_pedantic_errors): Remove. (toplev_main): Pass global_dc to decode_options. * toplev.h (dump_base_name, dump_dir_name, aux_base_name, aux_info_file_name, asm_file_name): Remove. * tree.h (flag_tls_default): Remove. c-family: * c-common.c (parse_optimize_options): Pass global_dc to decode_options. * c-opts.c (c_common_handle_option): Pass &global_options to set_Wstrict_aliasing. * c.opt (v): Don't mark Common or document here. fortran: * cpp.c (asm_file_name): Don't declare here. objc: * objc-act.c (dump_base_name): Don't declare here. From-SVN: r166565
2010-11-10 23:35:13 +01:00
2010-11-10 Joseph Myers <joseph@codesourcery.com>
* c-common.c (parse_optimize_options): Pass global_dc to
decode_options.
* c-opts.c (c_common_handle_option): Pass &global_options to
set_Wstrict_aliasing.
* c.opt (v): Don't mark Common or document here.
NS/CF String format syntax parsing. gcc: PR target/44981 * doc/extend.tex (format): Document NSString extension. (format_arg): Likewise. (Darwin Format Checks): New section. * doc/tm.texi: Document string object hooks (generated). * doc/tm.texi.in (TARGET_OBJC_CONSTRUCT_STRING_OBJECT) Rename. (TARGET_STRING_OBJECT_REF_TYPE_P): New. (TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): New. * target.def (objc_construct_string_object): Rename, amend documentation. (string_object_ref_type_p): New hook. (check_string_object_format_arg): New hook. * c-parser.c (c_parser_attributes): Allow objective-c class names as attribute identifiers. * config/darwin-c.c (darwin_cfstring_ref_p): New. (darwin_check_cfstring_format_arg): New. (darwin_additional_format_types): New. * config/darwin-protos.h (darwin_cfstring_ref_p) New. (darwin_check_cfstring_format_arg): New. * config/darwin.h (TARGET_OBJC_CONSTRUCT_STRING_OBJECT) Renamed. (TARGET_STRING_OBJECT_REF_TYPE_P): New. (TARGET_N_FORMAT_TYPES): New. (TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): New. gcc/c-family: PR target/44981 * c-format.c (format_type): New type gcc_objc_string_format_type. (valid_stringptr_type_p): New. (handle_format_arg_attribute): Use valid_stringptr_type_p (). (check_format_string): Pass expected type, use valid_stringptr_type_p (), check that the format string types are consistent with the format specification. (decode_format_attr): Warn if NSString is used outside objective-c. (format_types_orig): Add NSString. (format_name): New. (format_flags): New. (check_format_arg): Handle format strings requiring an external parser. first_target_format_type: New variable. (handle_format_attribute): Set up first_target_format_type, pass the expected format arg string type to check_format_string(). * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag. * stub-objc.c (objc_string_ref_type_p): New. (objc_check_format_arg): New. gcc/objc: PR target/44981 * objc-act.c (objc_build_string_object): Amend for renamed hook. (objc_string_ref_type_p): New. (objc_check_format_arg): New. gcc/testsuite: PR target/44981 * gcc.dg/darwin-cfstring-format-1.c: New. * gcc.dg/warn-nsstring.c: New. * objc.dg/fsf-nsstring-format-1.m: New. * obj-c++.dg/fsf-nsstring-format-1.mm: New. * obj-c++.dg/torture/strings/const-cfstring-1.mm: Update for darwin10 linker warning. From-SVN: r166398
2010-11-06 11:48:18 +01:00
2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
PR target/44981
* c-format.c (format_type): New type gcc_objc_string_format_type.
(valid_stringptr_type_p): New.
(handle_format_arg_attribute): Use valid_stringptr_type_p ().
(check_format_string): Pass expected type, use
NS/CF String format syntax parsing. gcc: PR target/44981 * doc/extend.tex (format): Document NSString extension. (format_arg): Likewise. (Darwin Format Checks): New section. * doc/tm.texi: Document string object hooks (generated). * doc/tm.texi.in (TARGET_OBJC_CONSTRUCT_STRING_OBJECT) Rename. (TARGET_STRING_OBJECT_REF_TYPE_P): New. (TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): New. * target.def (objc_construct_string_object): Rename, amend documentation. (string_object_ref_type_p): New hook. (check_string_object_format_arg): New hook. * c-parser.c (c_parser_attributes): Allow objective-c class names as attribute identifiers. * config/darwin-c.c (darwin_cfstring_ref_p): New. (darwin_check_cfstring_format_arg): New. (darwin_additional_format_types): New. * config/darwin-protos.h (darwin_cfstring_ref_p) New. (darwin_check_cfstring_format_arg): New. * config/darwin.h (TARGET_OBJC_CONSTRUCT_STRING_OBJECT) Renamed. (TARGET_STRING_OBJECT_REF_TYPE_P): New. (TARGET_N_FORMAT_TYPES): New. (TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): New. gcc/c-family: PR target/44981 * c-format.c (format_type): New type gcc_objc_string_format_type. (valid_stringptr_type_p): New. (handle_format_arg_attribute): Use valid_stringptr_type_p (). (check_format_string): Pass expected type, use valid_stringptr_type_p (), check that the format string types are consistent with the format specification. (decode_format_attr): Warn if NSString is used outside objective-c. (format_types_orig): Add NSString. (format_name): New. (format_flags): New. (check_format_arg): Handle format strings requiring an external parser. first_target_format_type: New variable. (handle_format_attribute): Set up first_target_format_type, pass the expected format arg string type to check_format_string(). * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag. * stub-objc.c (objc_string_ref_type_p): New. (objc_check_format_arg): New. gcc/objc: PR target/44981 * objc-act.c (objc_build_string_object): Amend for renamed hook. (objc_string_ref_type_p): New. (objc_check_format_arg): New. gcc/testsuite: PR target/44981 * gcc.dg/darwin-cfstring-format-1.c: New. * gcc.dg/warn-nsstring.c: New. * objc.dg/fsf-nsstring-format-1.m: New. * obj-c++.dg/fsf-nsstring-format-1.mm: New. * obj-c++.dg/torture/strings/const-cfstring-1.mm: Update for darwin10 linker warning. From-SVN: r166398
2010-11-06 11:48:18 +01:00
valid_stringptr_type_p (), check that the format string types are
consistent with the format specification.
(decode_format_attr): Warn if NSString is used outside objective-c.
(format_types_orig): Add NSString.
(format_name): New.
(format_flags): New.
(check_format_arg): Handle format strings requiring an external parser.
first_target_format_type: New variable.
(handle_format_attribute): Set up first_target_format_type, pass the
expected format arg string type to check_format_string().
* c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
* stub-objc.c (objc_string_ref_type_p): New.
(objc_check_format_arg): New.
In gcc/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> Fixed using the Objective-C 2.0 dot-syntax with class names. * c-parser.c (c_parser_next_token_starts_declspecs): In Objective-C, detect Objective-C 2.0 dot-syntax with a class name. (c_parser_next_token_starts_declaration): Same. (c_parser_postfix_expression): Parse the Objective-C 2.0 dot-syntax with a class name. In gcc/cp/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> Fixed using the Objective-C 2.0 dot-syntax with class names. * parser.c (cp_parser_primary_expression): Recognize Objective-C 2.0 dot-syntax with class names and process it. (cp_parser_nonclass_name): Recognize Objective-C 2.0 dot-syntax with class names. (cp_parser_class_name): Same change. (cp_parser_simple_type_specifier): Tidied comments. In gcc/c-family/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> Fixed using the Objective-C 2.0 dot-syntax with class names. * c-common.h (objc_build_class_component_ref): New. * stub-objc.c (objc_build_class_component_ref): New. In gcc/objc/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> Fixed using the Objective-C 2.0 dot-syntax with class names. * objc-act.c (objc_build_class_component_ref): New. In gcc/testsuite/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> Fixed using the Objective-C 2.0 dot-syntax with class names. * objc.dg/property/dotsyntax-3.m: New. * objc.dg/property/dotsyntax-4.m: New. * obj-c++.dg/property/dotsyntax-3.mm: New. * obj-c++.dg/property/dotsyntax-4.mm: New. * objc.dg/fobjc-std-1.m: Added test for warnings when the Objective-C 2.0 dot-syntax is used with class names. * obj-c++.dg/fobjc-std-1.mm: Same change. From-SVN: r166333
2010-11-04 21:59:47 +01:00
2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed using the Objective-C 2.0 dot-syntax with class names.
In gcc/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> Fixed using the Objective-C 2.0 dot-syntax with class names. * c-parser.c (c_parser_next_token_starts_declspecs): In Objective-C, detect Objective-C 2.0 dot-syntax with a class name. (c_parser_next_token_starts_declaration): Same. (c_parser_postfix_expression): Parse the Objective-C 2.0 dot-syntax with a class name. In gcc/cp/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> Fixed using the Objective-C 2.0 dot-syntax with class names. * parser.c (cp_parser_primary_expression): Recognize Objective-C 2.0 dot-syntax with class names and process it. (cp_parser_nonclass_name): Recognize Objective-C 2.0 dot-syntax with class names. (cp_parser_class_name): Same change. (cp_parser_simple_type_specifier): Tidied comments. In gcc/c-family/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> Fixed using the Objective-C 2.0 dot-syntax with class names. * c-common.h (objc_build_class_component_ref): New. * stub-objc.c (objc_build_class_component_ref): New. In gcc/objc/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> Fixed using the Objective-C 2.0 dot-syntax with class names. * objc-act.c (objc_build_class_component_ref): New. In gcc/testsuite/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> Fixed using the Objective-C 2.0 dot-syntax with class names. * objc.dg/property/dotsyntax-3.m: New. * objc.dg/property/dotsyntax-4.m: New. * obj-c++.dg/property/dotsyntax-3.mm: New. * obj-c++.dg/property/dotsyntax-4.mm: New. * objc.dg/fobjc-std-1.m: Added test for warnings when the Objective-C 2.0 dot-syntax is used with class names. * obj-c++.dg/fobjc-std-1.mm: Same change. From-SVN: r166333
2010-11-04 21:59:47 +01:00
* c-common.h (objc_build_class_component_ref): New.
* stub-objc.c (objc_build_class_component_ref): New.
2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
* c.opt (Wproperty-assign-default): New option.
In gcc/: 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com> Implemented -fobjc-std=objc1 flag. * doc/invoke.texi (Option Summary): Document -fobjc-std=objc1 option. * doc/standards.texi (Standards): Updated the section on Objective-C; mention support for Objective-C 2.0 features and the new -fstd-objc=objc1 flag to disable them. In gcc/c-family/: 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com> Implemented -fobjc-std=objc1 flag. * c.opt (fobjc-std=objc1): New option. In gcc/objc/: 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com> Implemented -fobjc-std=objc1 flag. * objc-act.c (objc_start_class_interface): If attributes are specified when flag_objc1_only is set, print an error. (objc_start_category_interface): Same change. (objc_start_protocol): Same change. (objc_add_method_declaration): Same change. (objc_start_method_definition): Same change. (objc_build_keyword_decl): Same change. (objc_set_method_opt): If flag_objc1_only is set, print an error. (objc_add_property_declaration): Same change. (objc_add_synthesize_declaration): Same change. (objc_add_dynamic_declaration): Same change. (objc_finish_foreach_loop): Same change. (objc_maybe_build_component_ref): If flag_objc1_only is set, return immediately. In gcc/testsuite/: 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com> Implemented -fobjc-std=objc1 flag. * objc.dg/fobjc-std-1.m: New. * obj-c++.dg/fobjc-std-1.mm: New. From-SVN: r166246
2010-11-03 14:39:39 +01:00
2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented -fobjc-std=objc1 flag.
* c.opt (fobjc-std=objc1): New option.
In gcc/c-family/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/c-family/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com> Implemented format and noreturn attributes for Objective-C methods. * c-common.c (handle_noreturn_attribute): Recognize 'noreturn' attribute for Objective-C methods. In gcc/objc/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com> Implemented format and noreturn attributes for Objective-C methods. * objc-act.c (objc_start_method_definition): If method attributes are specified emit a warning and ignore them. (build_objc_method_call): Moved deprecation warnings from here ... (objc_finish_message_expr): to here. Do not emit deprecation warnings if the receiver is of type 'id'. (really_start_method): Install 'deprecation' and 'noreturn' attributes. (objc_decl_method_attributes): Carefully filter out the list of attributes, allowing only "noreturn", "format", "sentinel" and "deprecated". In the case of "format", adjust the arguments. Always process the attributes in the same way no matter if "sentinel" is in the list or not. In gcc/testsuite/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com> Implemented format and noreturn attributes for Objective-C methods. * objc.dg/attributes/method-attribute-2.m: Updated warnings. * objc.dg/attributes/method-deprecated-1.m: New. * objc.dg/attributes/method-deprecated-2.m: New. * objc.dg/attributes/method-deprecated-3.m: New. * objc.dg/attributes/method-noreturn-1.m: New. * objc.dg/attributes/method-sentinel-1.m: New. * objc.dg/attributes/method-format-1.m: New. * obj-c++.dg/attributes/method-attribute-2.mm: Updated warnings. * obj-c++.dg/attributes/method-deprecated-1.mm: New. * obj-c++.dg/attributes/method-deprecated-2.mm: New. * obj-c++.dg/attributes/method-deprecated-3.mm: New. * obj-c++.dg/attributes/method-noreturn-1.mm: New. * obj-c++.dg/attributes/method-sentinel-1.mm: New. * obj-c++.dg/attributes/method-format-1.mm: New. From-SVN: r166153
2010-11-01 23:54:35 +01:00
2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented format and noreturn attributes for Objective-C methods.
* c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
attribute for Objective-C methods.
2010-10-31 Jason Merrill <jason@redhat.com>
* c-common.c (conversion_warning, warn_for_collisions_1): Use
EXPR_LOC_OR_HERE.
In gcc/: 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com> Implemented Objective-C 2.0 @property, @synthesize and @dynamic. * c-parser.c (c_parser_objc_at_property_declaration): Removed parsing of RID_COPIES and RID_IVAR. Updated call to objc_add_property_declaration. * c-typecheck.c (build_component_ref): Call objc_maybe_build_component_ref instead of objc_build_setter_call. Use objc_is_property_ref to improve Objective-C checks. (cp_build_modify_expr): Call objc_maybe_build_modify_expr instead of objc_build_getter_call. In gcc/c-family/: 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com> Implemented Objective-C 2.0 @property, @synthesize and @dynamic. * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR. (objc_add_property_declaration): Removed arguments for copies and ivar. (objc_build_getter_call): Renamed to objc_maybe_build_component_ref. (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr. (objc_is_property_ref): New. * c-common.c (c_common_reswords): Removed copies and ivar. * stub-objc.c (objc_add_property_declaration): Removed arguments for copies and ivar. (objc_build_getter_call): Renamed to objc_maybe_build_component_ref. (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr. (objc_is_property_ref): New. In gcc/cp/: 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com> Implemented Objective-C 2.0 @property, @synthesize and @dynamic. * parser.c (cp_parser_objc_at_property_declaration): Removed parsing of RID_COPIES and RID_IVAR. Updated call to objc_add_property_declaration. * typecheck.c (finish_class_member_access_expr): Call objc_maybe_build_component_ref instead of objc_build_setter_call. (cp_build_modify_expr): Call objc_maybe_build_modify_expr instead of objc_build_getter_call. In gcc/objc/: 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com> Implemented Objective-C 2.0 @property, @synthesize and @dynamic. * objc-tree.def (PROPERTY_REF): New. * objc-act.h: Added comments for all the PROPERTY_ macros. (PROPERTY_NAME): Use DECL_NAME. (PROPERTY_COPIES): Removed. (PROPERTY_READONLY): Use DECL_LANG_FLAG_0 for it. (PROPERTY_NONATOMIC): New. (objc_property_assign_semantics): Make it a typedef. (PROPERTY_ASSIGN_SEMANTICS): New. (PROPERTY_DYNAMIC): New. (PROPERTY_REF_OBJECT): New. (PROPERTY_REF_PROPERTY_DECL): New. * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): Removed. (in_objc_property_setter_name_context): Removed. (objc_add_property_declaration): Removed copies and ivar arguments and code supporting them. Fixed recovering when readonly and setter attributes are specified. Removed support for @property in @implementation context. Updated error message. Double-check that a property does not have a DECL_INITIAL. Validate the property assign semantics and emit appropriate errors and warnings. Check for duplicate property declarations. Set DECL_SOURCE_LOCATION, TREE_DEPRECATED, PROPERTY_NONATOMIC, PROPERTY_ASSIGN_SEMANTICS and PROPERTY_DYNAMIC of the new PROPERTY_DECL. Do not set PROPERTY_COPIES. Set PROPERTY_IVAR_NAME to NULL_TREE. (objc_build_getter_call): Renamed to objc_maybe_build_component_ref. If the property is not found in the interface, search in the protocol list. Do not generate the getter call; instead, build and return a PROPERTY_REF. (objc_is_property_ref): New. (objc_setter_func_call): Removed. (get_selector_from_reference): Removed. (is_property): Removed. (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr. Updated to work on a PROPERTY_REF and use the PROPERTY_DECL from the PROPERTY_REF. Generate an error if the property is read-only. (build_property_reference): Removed. (objc_finish_message_expr): Removed check to produce "readonly property can not be set" error when in_objc_property_setter_name_context. We now generate the error earlier, in objc_maybe_build_modify_expr, which will only generate the setter call if the property is readwrite. (check_methods): Recognize dynamic properties. (check_methods_accessible): Same change. (objc_build_property_ivar_name): Removed. (objc_build_property_setter_name): Dropped bool argument. Always add the ':' at the end. (objc_gen_one_property_datum): Removed. (objc_process_getter_setter): Removed. (objc_synthesize_getter): Mark 'klass' argument as unused. Use PROPERTY_GETTER_NAME instead of PROPERTY_NAME. Set the DECL_SOURCE_LOCATION of the new method to be the same as the one for the @synthesize. Always use PROPERTY_IVAR_NAME as it is instead of trying to guess what it should be. Removed use of CLASS_IVARS. Use the location of @synthesize for c_finish_return and c_end_compound_statement. (objc_synthesize_setter): Mark 'klass' argument as unused. Use PROPERTY_SETTER_NAME instead of trying to guess what it should be. Set the DECL_SOURCE_LOCATION of the new method to be the same as the one for the @synthesize. Always use PROPERTY_IVAR_NAME as it is instead of trying to guess what it should be. Removed use of CLASS_IVARS. Use the location of @synthesize for c_finish_return and c_end_compound_statement. Emit an error and keep going, instead of aborting, if the setter prototype does not have the expected argument. (objc_add_synthesize_declaration_for_property): New. (objc_add_synthesize_declaration): Removed ATTRIBUTE_UNUSED from all arguments. Improved error message. Filled in the rest of the function, which used to be a placeholder, with an actual implementation. (objc_add_dynamic_declaration_for_property): New. (objc_add_dynamic_declaration): Removed ATTRIBUTE_UNUSED from all arguments. Improved error message. Filled in the rest of the function, which used to be a placeholder, with an actual implementation. (objc_gen_property_data): Rewritten. (finish_class): Added explicit switch cases for CLASS_INTERFACE_TYPE, CATEGORY_INTERFACE_TYPE and PROTOCOL_INTERFACE_TYPE. Added a default switch case which is gcc_unreachable. Rewritten the processing of properties, in particular to not synthesize prototypes for getters and setters if they already exist and to install the getter and setter names into PROPERTY_GETTER_NAME and PROPERTY_SETTER_NAME. Do not generate warnings about setter, getter and ivar property attributes. (objc_lookup_ivar): Removed support for properties. (objc_gimplify_property_ref): New. (objc_gimplify_expr): Use a switch. In case of a PROPERTY_REF, call objc_gimplify_property_ref. In gcc/testsuite/: 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com> Implemented Objective-C 2.0 @property, @synthesize and @dynamic. * objc.dg/property/property-neg-1.m: Updated for changes in the syntax of @property and the implementation of @synthesize/@dynamic. * objc.dg/property/property-neg-2.m: Same change. * objc.dg/property/property-neg-3.m: Same change. * objc.dg/property/property-neg-4.m: Same change. * objc.dg/property/property-neg-5.m: Same change. * objc.dg/property/property-neg-7.m: Same change. * objc.dg/property/property-1.m: Same change. * objc.dg/property/synthesize-1.m: Same change. * objc.dg/property/at-property-2.m: Same change. * objc.dg/property/at-property-4.m: Same change. * objc.dg/property/fsf-property-method-acces.m: Updated for changes in the syntax of @property and the implementation of @synthesize/@dynamic. Use the same code for GNU and NeXT runtime. * objc.dg/property/fsf-property-basic.m: Same change. * objc.dg/property/fsf-property-named-ivar.m: Same change. * objc.dg/property/at-property-5.m: New. * objc.dg/property/at-property-6.m: New. * objc.dg/property/at-property-7.m: New. * objc.dg/property/at-property-8.m: New. * objc.dg/property/at-property-9.m: New. * objc.dg/property/at-property-10.m: New. * objc.dg/property/at-property-11.m: New. * objc.dg/property/synthesize-2.m: New. * objc.dg/property/dynamic-2.m: New. * obj-c++.dg/property/property-neg-1.mm: Updated for changes in the syntax of @property and the implementation of @synthesize/@dynamic. * obj-c++.dg/property/property-neg-2.mm: Same change. * obj-c++.dg/property/property-neg-3.mm: Same change. * obj-c++.dg/property/property-neg-4.mm: Same change. * obj-c++.dg/property/property-neg-5.mm: Same change. * obj-c++.dg/property/property-neg-7.mm: Same change. * obj-c++.dg/property/property-1.mm: Same change. * obj-c++.dg/property/synthesize-1.mm: Same change. * obj-c++.dg/property/at-property-2.mm: Same change. * obj-c++.dg/property/at-property-4.mm: Same change. * obj-c++.dg/property/fsf-property-method-acces.mm: Updated for changes in the syntax of @property and the implementation of @synthesize/@dynamic. Use the same code for GNU and NeXT runtime. * obj-c++.dg/property/fsf-property-basic.mm: Same change. * obj-c++.dg/property/fsf-property-named-ivar.mm: Same change. * obj-c++.dg/property/at-property-5.mm: New. * obj-c++.dg/property/at-property-6.mm: New. * obj-c++.dg/property/at-property-7.mm: New. * obj-c++.dg/property/at-property-8.mm: New. * obj-c++.dg/property/at-property-9.mm: New. * obj-c++.dg/property/at-property-10.mm: New. * obj-c++.dg/property/at-property-11.mm: New. * obj-c++.dg/property/synthesize-2.mm: New. * obj-c++.dg/property/dynamic-2.mm: New. From-SVN: r166087
2010-10-30 13:22:46 +02:00
2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
* c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
(objc_add_property_declaration): Removed arguments for copies and
ivar.
(objc_build_getter_call): Renamed to
objc_maybe_build_component_ref.
(objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
(objc_is_property_ref): New.
* c-common.c (c_common_reswords): Removed copies and ivar.
* stub-objc.c (objc_add_property_declaration): Removed arguments
for copies and ivar.
(objc_build_getter_call): Renamed to
objc_maybe_build_component_ref.
(objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
(objc_is_property_ref): New.
2010-10-29 Arnaud Charlet <charlet@adacore.com>
Matthew Gingell <gingell@adacore.com>
* c-ada-spec.c (separate_class_package): New function.
(pp_ada_tree_identifier): Prefix references to C++ classes with the
name of their enclosing package.
(print_ada_declaration): Use separate_class_package.
2010-10-27 Jason Merrill <jason@redhat.com>
* c-common.c (c_common_reswords): Add __is_literal_type.
* c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
* c-common.c (check_case_value): Remove special C++ code.
In gcc/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> * c-parser.c (c_parser_objc_at_property_declaration): Recognize RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC. Do not use objc_set_property_attr, but use local variables instead. Detect repeated usage of setter, getter and ivar attributes. Improved error processing when a setter name does not end in ':'. Do not check for CPP_CLOSE_PAREN after we determined that the token is a keyword. Updated call to objc_add_property_declaration. In gcc/cp/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_at_property_declaration): Recognize RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC. Do not use objc_set_property_attr, but use local variables instead. Detect repeated usage of setter, getter and ivar attributes. Improved error processing when a setter name does not end in ':'. Do not check for CPP_CLOSE_PAREN after we determined that the token is a keyword. Updated call to objc_add_property_declaration. In gcc/c-family/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN, RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR and RID_LAST_PATTR. (objc_add_property_declaration): Added additional arguments. (objc_property_attribute_kind): Removed. (objc_set_property_attr): Removed. * c-common.c (c_common_reswords): Added readwrite, assign, retain, copy and nonatomic. * stub-objc.c (objc_add_property_declaration): Added additional arguments. (objc_set_property_attr): Removed. In gcc/objc/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_add_property_declaration): Added arguments to pass the various property attributes that were parsed with the property declaration. Process arguments to determine the final property attributes and produce error messages as appropriate. Added temporary code to keep the compiler silent about variables set but not used - for new attributes that are only checked but have no effect yet. (property_readonly): Removed. (property_setter): Removed. (property_getter): Removed. (property_ivar): Removed. (property_copies): Removed. (objc_set_property_attr): Removed. * objc-act.h (enum property_assign_semantics): New. In gcc/testsuite/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> * obj-c.dg/property/at-property-4.m: New. * obj-c++.dg/property/at-property-4.mm: New. * obj-c++.dg/property/property-neg-5.m: Updated testcase for updates in warning. * obj-c++.dg/property/property-neg-5.mm: Updated testcase for updates in warning. From-SVN: r165997
2010-10-27 07:23:08 +02:00
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
and RID_LAST_PATTR.
(objc_add_property_declaration): Added additional arguments.
(objc_property_attribute_kind): Removed.
(objc_set_property_attr): Removed.
* c-common.c (c_common_reswords): Added readwrite, assign, retain,
copy and nonatomic.
* stub-objc.c (objc_add_property_declaration): Added additional
arguments.
(objc_set_property_attr): Removed.
In gcc/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> * c-parser.c (c_parser_objc_at_property): Renamed to c_parser_objc_at_property_declaration. Updated calls to objc_add_property_variable, now objc_add_property_declaration. Code rewritten to be much more robust in recovering from syntax errors. Added comments. (c_parser_objc_property_attrlist): Removed. (c_parser_external_declaration): Updated calls to c_parser_objc_at_property, now c_parser_objc_at_property_declaration. (c_parser_objc_methodprotolist): Same change. In gcc/c-family/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> * c-common.h (objc_add_property_variable): Renamed to objc_add_property_declaration. Added location argument. * stub-objc.c (objc_add_property_variable): Same change. In gcc/cp/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_property_decl): Renamed to cp_parser_objc_struct_declaration. Return the parsed trees instead of calling objc_add_property_variable directly. Detect missing or invalid declspecs. Implemented attributes. Do not eat the ';' at the end. Exit loop whenever a non-comma is parsed, not just EOF. (cp_parser_objc_at_property): Renamed to cp_parser_objc_at_property_declaration. Updated calls to objc_add_property_variable, now objc_add_property_declaration, and to cp_parser_objc_property_decl, now cp_parser_objc_struct_declaration. Rewritten all code to be more robust in dealing with syntax errors, and almost identical to the one in c_parser_objc_at_property_declaration. (cp_parser_objc_property_attrlist): Removed. (cp_parser_objc_method_prototype_list): Updated call to cp_parser_objc_at_property. (cp_parser_objc_method_definition_list): Same change. (cp_parser_objc_class_ivars): Detect a number of invalid declarations of instance variables and produce errors when they are found. In gcc/objc/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_add_property_variable): Renamed to objc_add_property_declaration. Added location argument. Updated warnings and errors to use it. Use error, not fatal_error, if a property declaration is found outside an interface or implementation context. In gcc/testsuite/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/property/at-property-1.m: New. * objc.dg/property/at-property-2.m: New. * objc.dg/property/at-property-3.m: New. * objc.dg/ivar-invalid-type-1.m: New. * obj-c++.dg/property/at-property-1.mm: New. * obj-c++.dg/property/at-property-2.mm: New. * obj-c++.dg/property/at-property-3.mm: New. * obj-c++.dg/ivar-invalid-type-1.mm: New. * objc.dg/property/property-neg-6.m: Updated testcase for updates in error reporting. From-SVN: r165996
2010-10-27 06:37:47 +02:00
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (objc_add_property_variable): Renamed to
objc_add_property_declaration. Added location argument.
* stub-objc.c (objc_add_property_variable): Same change.
2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (objc_maybe_printable_name): New.
* stub-objc.c (objc_maybe_printable_name): New.
2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
Andrew Pinski <pinskia@gmail.com>
* c-common.h (c_common_mark_addressable_vec): Declare.
* c-common.c (c_common_mark_addressable_vec): New function.
In gcc/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (c_parser_objc_method_type): Mark inline. Return a bool instead of a tree. (c_parser_objc_method_decl): Added bool argument. Updated call to objc_build_method_signature. (c_parser_objc_method_definition): Do not call objc_set_method_type. Updated calls to c_parser_objc_method_type, c_parser_objc_method_decl and objc_start_method_definition. (c_parser_objc_methodproto): Do not call objc_set_method_type. Updated calls to c_parser_objc_method_type, c_parser_objc_method_decl and objc_add_method_declaration. In gcc/c-family/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> * c-common.h (objc_set_method_type): Removed. (objc_add_method_declaration): Added boolean argument. (objc_start_method_definition): Same change. (objc_build_method_signature): Same change. * stub-objc.c (objc_set_method_type): Removed. (objc_add_method_declaration): Added boolean argument. (objc_start_method_definition): Same change. (objc_build_method_signature): Same change. In gcc/cp/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_method_type): Mark inline. Return a bool instead of calling objc_set_method_type. (cp_parser_objc_method_signature): Updated calls to cp_parser_objc_method_type and to objc_build_method_signature. (cp_parser_objc_method_prototype_list): Updated calls to objc_add_method_declaration. Use token->type to determine if it is a class method or not. (cp_parser_objc_method_definition_list): Same change. In gcc/objc/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.h (objc_inherit_code): Removed. * objc-act.c (objc_inherit_code): Removed. (objc_set_method_type): Removed. (objc_build_method_signature): Added is_class_method argument. Use it instead of the global objc_inherit_code variable. (objc_add_method_declaration): Same change. (objc_start_method_definition): Same change. (objc_generate_cxx_ctor_or_dtor): Updated call to objc_start_method_definition. Do not call objc_set_method_type. (adjust_type_for_id_default): Mark as inline. (objc_synthesize_getter): Updated call to objc_start_method_definition. Do not set objc_inherit_code. (objc_synthesize_setter): Updated call to objc_start_method_definition. Do not set objc_inherit_code. From-SVN: r165741
2010-10-21 00:41:53 +02:00
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (objc_set_method_type): Removed.
(objc_add_method_declaration): Added boolean argument.
(objc_start_method_definition): Same change.
(objc_build_method_signature): Same change.
* stub-objc.c (objc_set_method_type): Removed.
(objc_add_method_declaration): Added boolean argument.
(objc_start_method_definition): Same change.
(objc_build_method_signature): Same change.
In gcc/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> * c-decl.c (c_write_global_declarations): Call objc_write_global_declarations when compiling Objective-C. * c-lang.c (finish_file): Removed. In gcc/c-family/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> * c-common.h (finish_file): Removed. (objc_write_global_declarations): New. * c-opts.c (c_common_parse_file): Do not call finish_file. * stub-objc.c (objc_write_global_declarations): New. In gcc/cp/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> * cp-lang.c (finish_file): Removed. * decl2.c (cp_write_global_declarations): Call objc_write_global_declarations when compiling Objective-C++. In gcc/objc/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> * objc-lang.c (finish_file): Removed. * objc-act.c (objc_finish_file): Renamed to objc_write_global_declarations. Do not try to instantiate C++ templates when compiling Objective-C++ as this is now automatically done before this function is called. Do not check for syntax-only run or PCH generation as this is done by the callers. * objc-act.h (objc_finish_file): Removed. In gcc/objcp/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> * objcp-lang.c (finish_file): Removed. In gcc/testsuite/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. Test adapted to not require Foundation and run with the GNU runtime as well. 2006-03-13 Fariborz Jahanian <fjahanian@apple.com> Radar 4439126 * obj-c++.dg/template-8.mm: New. From-SVN: r165714
2010-10-20 11:08:57 +02:00
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (finish_file): Removed.
(objc_write_global_declarations): New.
* c-opts.c (c_common_parse_file): Do not call finish_file.
* stub-objc.c (objc_write_global_declarations): New.
In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Implemented parsing @synthesize and @dynamic for Objective-C. * c-parser.c (c_parser_external_declaration): Recognize RID_AT_SYNTHESIZE and RID_AT_DYNAMIC. (c_parser_objc_at_synthesize_declaration): New. (c_parser_objc_at_dynamic_declaration): New. 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> * c-parser.c (c_parser_objc_class_declaration): After finding an error, parse the whole declaration then reset parser->error. In gcc/cp/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Implemented parsing @synthesize and @dynamic for Objective-C++. * parser.c (cp_parser_objc_method_definition_list): Recognize RID_AT_SYNTHESIZE and RID_AT_DYNAMIC. (cp_parser_objc_at_dynamic_declaration): New. (cp_parser_objc_at_synthesize_declaration): New. 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_identifier_list): Check the return value of cp_parser_identifier and react if it is error_mark_node. In gcc/objc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Implemented parsing @synthesize and @dynamic for Objective-C/Objective-C++. * objc-act.c (objc_add_synthesize_declaration): New. (objc_add_dynamic_declaration): New. 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (lookup_and_install_protocols): Return NULL if passed error_mark_node. In gcc/testsuite/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Implemented parsing @synthesize and @dynamic for Objective-C/Objective-C++. * objc.dg/property/dynamic-1.m: New. * objc.dg/property/synthesize-1.m: New. * obj-c++.dg/property/dynamic-1.mm: New. * obj-c++.dg/property/synthesize-1.mm: New. 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/at-class-1.m: New. * objc.dg/at-class-1.mm: New. From-SVN: r165667
2010-10-19 01:28:20 +02:00
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented parsing @synthesize and @dynamic for
Objective-C/Objective-C++.
* c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
(objc_add_synthesize_declaration): New.
(objc_add_dynamic_declaration): New.
* c-common.c (c_common_reswords): Add synthesize and dynamic.
* stub-objc.c (objc_add_synthesize_declaration): New.
(objc_add_dynamic_declaration): New.
2010-10-19 00:37:32 +02:00
2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/46041
* c-cppbuiltin.c (mode_has_fma): Move function here from
builtins.c. Don't use the fma optab, instead just use the
HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
using -save-temps.
In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. * c-parser.c (c_parser_typeof_specifier): Adapted to new parser the following Objective-C change: 2005-10-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4204796 * c-parse.in (typespec_nonreserved_nonattr): Remove volatile from 'volatilized' type used in a typeof operator. In gcc/c-family/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * c-common.h (objc_non_volatilized_type): New declaration * stub-objc.c (objc_non_volatilized_type): New stub. In gcc/cp/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from apple/trunk branch on FSF servers. 2005-03-01 Fariborz Jahanian <fjahanian@apple.com> Radar 4451818 * call.c (standard_conversion, implicit_conversion): Ignore 'volatile' attribute of artificially volatized type in objc when evaluating various conversion weights. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the artiificially 'volatized' type before doing pointer comparison. In gcc/objc/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * objc/objc-act.c (objc_non_volatilized_type): New 2005-10-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4204796 * objc-act.c (objc_build_volatilized_type): Build 'volatilzed' types with proper attribute set and correctly. (objc_volatilize_decl): Remove unneeded code. (objc_type_quals_match): Use the new attribute to check on 'volatilzed' type. (hash_init): removed unneeded code. In gcc/testsuite/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-03-01 Fariborz Jahanian <fjahanian@apple.com> Radar 4451818 * obj-c++.dg/try-catch-16.mm: New. * obj-c++.dg/try-catch-17.mm: New. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * obj-c++.dg/try-catch-15.mm: New 2005-10-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4204796 * obj-c++.dg/try-catch-12.mm: New * obj-c++.dg/try-catch-13.mm: New * obj-c++.dg/try-catch-14.mm: New * objc.dg/try-catch-11.m: New * objc.dg/try-catch-12.m: New * objc.dg/try-catch-13.m: New From-SVN: r165654
2010-10-18 20:06:03 +02:00
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2010-10-19 00:37:32 +02:00
2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. * c-parser.c (c_parser_typeof_specifier): Adapted to new parser the following Objective-C change: 2005-10-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4204796 * c-parse.in (typespec_nonreserved_nonattr): Remove volatile from 'volatilized' type used in a typeof operator. In gcc/c-family/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * c-common.h (objc_non_volatilized_type): New declaration * stub-objc.c (objc_non_volatilized_type): New stub. In gcc/cp/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from apple/trunk branch on FSF servers. 2005-03-01 Fariborz Jahanian <fjahanian@apple.com> Radar 4451818 * call.c (standard_conversion, implicit_conversion): Ignore 'volatile' attribute of artificially volatized type in objc when evaluating various conversion weights. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the artiificially 'volatized' type before doing pointer comparison. In gcc/objc/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * objc/objc-act.c (objc_non_volatilized_type): New 2005-10-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4204796 * objc-act.c (objc_build_volatilized_type): Build 'volatilzed' types with proper attribute set and correctly. (objc_volatilize_decl): Remove unneeded code. (objc_type_quals_match): Use the new attribute to check on 'volatilzed' type. (hash_init): removed unneeded code. In gcc/testsuite/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-03-01 Fariborz Jahanian <fjahanian@apple.com> Radar 4451818 * obj-c++.dg/try-catch-16.mm: New. * obj-c++.dg/try-catch-17.mm: New. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * obj-c++.dg/try-catch-15.mm: New 2005-10-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4204796 * obj-c++.dg/try-catch-12.mm: New * obj-c++.dg/try-catch-13.mm: New * obj-c++.dg/try-catch-14.mm: New * objc.dg/try-catch-11.m: New * objc.dg/try-catch-12.m: New * objc.dg/try-catch-13.m: New From-SVN: r165654
2010-10-18 20:06:03 +02:00
Radar 4330422
In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. * c-parser.c (c_parser_typeof_specifier): Adapted to new parser the following Objective-C change: 2005-10-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4204796 * c-parse.in (typespec_nonreserved_nonattr): Remove volatile from 'volatilized' type used in a typeof operator. In gcc/c-family/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * c-common.h (objc_non_volatilized_type): New declaration * stub-objc.c (objc_non_volatilized_type): New stub. In gcc/cp/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from apple/trunk branch on FSF servers. 2005-03-01 Fariborz Jahanian <fjahanian@apple.com> Radar 4451818 * call.c (standard_conversion, implicit_conversion): Ignore 'volatile' attribute of artificially volatized type in objc when evaluating various conversion weights. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the artiificially 'volatized' type before doing pointer comparison. In gcc/objc/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * objc/objc-act.c (objc_non_volatilized_type): New 2005-10-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4204796 * objc-act.c (objc_build_volatilized_type): Build 'volatilzed' types with proper attribute set and correctly. (objc_volatilize_decl): Remove unneeded code. (objc_type_quals_match): Use the new attribute to check on 'volatilzed' type. (hash_init): removed unneeded code. In gcc/testsuite/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-03-01 Fariborz Jahanian <fjahanian@apple.com> Radar 4451818 * obj-c++.dg/try-catch-16.mm: New. * obj-c++.dg/try-catch-17.mm: New. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * obj-c++.dg/try-catch-15.mm: New 2005-10-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4204796 * obj-c++.dg/try-catch-12.mm: New * obj-c++.dg/try-catch-13.mm: New * obj-c++.dg/try-catch-14.mm: New * objc.dg/try-catch-11.m: New * objc.dg/try-catch-12.m: New * objc.dg/try-catch-13.m: New From-SVN: r165654
2010-10-18 20:06:03 +02:00
* c-common.h (objc_non_volatilized_type): New declaration
* stub-objc.c (objc_non_volatilized_type): New stub.
2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. * c-parser.c (c_parser_typeof_specifier): Adapted to new parser the following Objective-C change: 2005-10-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4204796 * c-parse.in (typespec_nonreserved_nonattr): Remove volatile from 'volatilized' type used in a typeof operator. In gcc/c-family/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * c-common.h (objc_non_volatilized_type): New declaration * stub-objc.c (objc_non_volatilized_type): New stub. In gcc/cp/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from apple/trunk branch on FSF servers. 2005-03-01 Fariborz Jahanian <fjahanian@apple.com> Radar 4451818 * call.c (standard_conversion, implicit_conversion): Ignore 'volatile' attribute of artificially volatized type in objc when evaluating various conversion weights. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the artiificially 'volatized' type before doing pointer comparison. In gcc/objc/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * objc/objc-act.c (objc_non_volatilized_type): New 2005-10-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4204796 * objc-act.c (objc_build_volatilized_type): Build 'volatilzed' types with proper attribute set and correctly. (objc_volatilize_decl): Remove unneeded code. (objc_type_quals_match): Use the new attribute to check on 'volatilzed' type. (hash_init): removed unneeded code. In gcc/testsuite/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-03-01 Fariborz Jahanian <fjahanian@apple.com> Radar 4451818 * obj-c++.dg/try-catch-16.mm: New. * obj-c++.dg/try-catch-17.mm: New. 2005-11-08 Fariborz Jahanian <fjahanian@apple.com> Radar 4330422 * obj-c++.dg/try-catch-15.mm: New 2005-10-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4204796 * obj-c++.dg/try-catch-12.mm: New * obj-c++.dg/try-catch-13.mm: New * obj-c++.dg/try-catch-14.mm: New * objc.dg/try-catch-11.m: New * objc.dg/try-catch-12.m: New * objc.dg/try-catch-13.m: New From-SVN: r165654
2010-10-18 20:06:03 +02:00
Merge from 'apple/trunk' branch on FSF servers.
2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
Radar 4133425
* c-common.h (objc_diagnose_private_ivar): New decl.
2010-10-19 00:37:32 +02:00
* stub-objc.c (objc_diagnose_private_ivar): New stub.
2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
* c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
* c-common.h (enum rid): Add RID_AT_PACKAGE.
(objc_ivar_visibility_kind): New enum.
(objc_set_visibility): Adjust prototype to use visibility enum.
2010-10-19 00:37:32 +02:00
* stub-objc.c (objc_set_visibility): Adjust stub to use
visibility enum.
2010-10-15 19:42:05 +02:00
2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
* c-cppbuiltin.c (builtin_define_float_constants): Emit
__FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
has the appropriate fma builtins.
(c_cpp_builtins): Adjust call to builtin_define_float_constants.
add @property to ObjC* merge from FSF apple 'trunk' branch. 2006 Fariborz Jahanian <fjahanian@apple.com> Radars 4436866, 4505126, 4506903, 4517826 gcc/c-family: * c-common.c (c_common_resword): Define @property and its attributes. * c-common.h: Define property attribute enum entries. (OBJC_IS_PATTR_KEYWORD): New. (objc_property_attribute_kind): New enum. Declare objc_set_property_attr (), objc_add_property_variable (), objc_build_getter_call () and objc_build_setter_call (). * stub-objc.c (objc_set_property_attr): New stub. (objc_add_property_variable): Likewise. (objc_build_getter_call): Likewise. (objc_build_setter_call) Likewise. gcc: * c-parser.c (c_parser, objc_property_attr_context) New flag. (c_lex_one_token): Handle property attributes. (c_parser_external_declaration): Handle @property. (c_parser_declaration_or_fndef): Warn on invalid attributes before @alias, @class, @end and @property objc keywords. (c_parser_objc_methodprotolist): Handle @property. (c_parser_objc_property_attrlist): New. (c_parser_objc_at_property): New. * c-typeck.c (build_component_ref): Handle CLASS.property syntax. (build_modify_expr): Likewise. gcc/cp: * typeck.c (finish_class_member_access_expr): Handle CLASS.property syntax. (cp_build_modify_expr): Likewise. * parser.c (cp_parser_objc_method_prototype_list): Handle @property. (cp_parser_objc_method_definition_list): Likewise. (cp_parser_objc_property_decl): New. (cp_parser_objc_property_attrlist): New. (cp_parser_objc_at_property): New. gcc/objc: * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): New. property_readonly, property_getter, property_setter, property_ivar, property_copies, in_objc_property_setter_name_context: New vars. (objc_set_property_attr): New. (objc_add_property_variable): New. (lookup_property_in_list): New. (lookup_property): New. (objc_build_getter_call): New. (objc_setter_func_call): New. (get_selector_from_reference): New. (objc_build_setter_call): New. (is_property): New. (build_property_reference): New. (objc_finish_message_expr): Detect readonly property and warn. (objc_build_property_ivar_name): New. (objc_build_property_setter_name): New. (objc_gen_one_property_datum): New. (objc_process_getter_setter): New. (objc_synthesize_getter): New. (objc_synthesize_setter): New. (objc_gen_property_data): New. (finish_class): Generate property data. (comp_proto_with_proto): Separated from ... (match_proto_with_proto): ... New. (objc_lookup_ivar): Handle properties. * objc-tree.def (PROPERTY_DECL): New tree code. * objc-act.h: CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS update size. (METHOD_PROPERTY_CONTEXT): New. (PROPERTY_NAME): New. (PROPERTY_GETTER_NAME): New. (PROPERTY_SETTER_NAME): New. (PROPERTY_IVAR_NAME): New. (PROPERTY_READONLY): New. (PROPERTY_COPIES): New. (TOTAL_CLASS_RAW_IVARS): New. (CLASS_PROPERTY_DECL): New. (IMPL_PROPERTY_DECL): New. * objc-lang.c (objc_init_ts): Update fields for property_decl. gcc/objcp: * objcp-lang.c (objcxx_init_ts): Update for property_decl. From-SVN: r165479
2010-10-14 22:09:41 +02:00
2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
2010-10-15 19:42:05 +02:00
merge from FSF apple 'trunk' branch.
2006 Fariborz Jahanian <fjahanian@apple.com>
2010-10-15 19:42:05 +02:00
add @property to ObjC* merge from FSF apple 'trunk' branch. 2006 Fariborz Jahanian <fjahanian@apple.com> Radars 4436866, 4505126, 4506903, 4517826 gcc/c-family: * c-common.c (c_common_resword): Define @property and its attributes. * c-common.h: Define property attribute enum entries. (OBJC_IS_PATTR_KEYWORD): New. (objc_property_attribute_kind): New enum. Declare objc_set_property_attr (), objc_add_property_variable (), objc_build_getter_call () and objc_build_setter_call (). * stub-objc.c (objc_set_property_attr): New stub. (objc_add_property_variable): Likewise. (objc_build_getter_call): Likewise. (objc_build_setter_call) Likewise. gcc: * c-parser.c (c_parser, objc_property_attr_context) New flag. (c_lex_one_token): Handle property attributes. (c_parser_external_declaration): Handle @property. (c_parser_declaration_or_fndef): Warn on invalid attributes before @alias, @class, @end and @property objc keywords. (c_parser_objc_methodprotolist): Handle @property. (c_parser_objc_property_attrlist): New. (c_parser_objc_at_property): New. * c-typeck.c (build_component_ref): Handle CLASS.property syntax. (build_modify_expr): Likewise. gcc/cp: * typeck.c (finish_class_member_access_expr): Handle CLASS.property syntax. (cp_build_modify_expr): Likewise. * parser.c (cp_parser_objc_method_prototype_list): Handle @property. (cp_parser_objc_method_definition_list): Likewise. (cp_parser_objc_property_decl): New. (cp_parser_objc_property_attrlist): New. (cp_parser_objc_at_property): New. gcc/objc: * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): New. property_readonly, property_getter, property_setter, property_ivar, property_copies, in_objc_property_setter_name_context: New vars. (objc_set_property_attr): New. (objc_add_property_variable): New. (lookup_property_in_list): New. (lookup_property): New. (objc_build_getter_call): New. (objc_setter_func_call): New. (get_selector_from_reference): New. (objc_build_setter_call): New. (is_property): New. (build_property_reference): New. (objc_finish_message_expr): Detect readonly property and warn. (objc_build_property_ivar_name): New. (objc_build_property_setter_name): New. (objc_gen_one_property_datum): New. (objc_process_getter_setter): New. (objc_synthesize_getter): New. (objc_synthesize_setter): New. (objc_gen_property_data): New. (finish_class): Generate property data. (comp_proto_with_proto): Separated from ... (match_proto_with_proto): ... New. (objc_lookup_ivar): Handle properties. * objc-tree.def (PROPERTY_DECL): New tree code. * objc-act.h: CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS update size. (METHOD_PROPERTY_CONTEXT): New. (PROPERTY_NAME): New. (PROPERTY_GETTER_NAME): New. (PROPERTY_SETTER_NAME): New. (PROPERTY_IVAR_NAME): New. (PROPERTY_READONLY): New. (PROPERTY_COPIES): New. (TOTAL_CLASS_RAW_IVARS): New. (CLASS_PROPERTY_DECL): New. (IMPL_PROPERTY_DECL): New. * objc-lang.c (objc_init_ts): Update fields for property_decl. gcc/objcp: * objcp-lang.c (objcxx_init_ts): Update for property_decl. From-SVN: r165479
2010-10-14 22:09:41 +02:00
Radars 4436866, 4505126, 4506903, 4517826
* c-common.c (c_common_resword): Define @property and its attributes.
* c-common.h: Define property attribute enum entries.
(OBJC_IS_PATTR_KEYWORD): New.
(objc_property_attribute_kind): New enum.
Declare objc_set_property_attr (), objc_add_property_variable (),
objc_build_getter_call () and objc_build_setter_call ().
* stub-objc.c (objc_set_property_attr): New stub.
(objc_add_property_variable): Likewise.
(objc_build_getter_call): Likewise.
(objc_build_setter_call) Likewise.
2010-10-15 19:42:05 +02:00
2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
2010-10-15 19:42:05 +02:00
merge from FSF apple 'trunk' branch.
2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
Radar 3803157 (method attributes)
* c-common.c (handle_deprecated_attribute): Recognize
objc methods as valid declarations.
* c-common.h: Declare objc_method_decl ().
2010-10-15 19:42:05 +02:00
* stub-objc.c (objc_method_decl): New stub.
Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h. * Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h. (TREE_H): Include $(FLAGS_H) instead of options.h. (opts-common.o): Depend on $(FLAGS_H) instead of options.h. * c-objc-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. * common.opt (flag_complex_method, flag_evaluation_order, flag_ira_algorithm, flag_ira_region, flag_warn_unused_result): New Variable declarations. * configure.ac (tm_include_list): Include flags.h instead of options.h. * configure: Regenerate. * flags.h: Condition out contents for target libraries. Include options.h at end of file. (flag_complex_method, flag_ira_algorithm, flag_ira_region, flag_evaluation_order, flag_warn_unused_result): Remove. * gcc.c (main): Intialize global_options with global_options_init. * langhooks-def.h (lhd_init_options_struct): Declare. (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. (LANG_HOOKS_INITIALIZER): Include LANG_HOOKS_INIT_OPTIONS_STRUCT. * langhooks.c (lhd_init_options_struct): New. * langhooks.h (struct lang_hooks): Add init_options_struct. Update comment on init_options. * optc-gen.awk: Generate initializer for global_options_init, not global_options. * opth-gen.awk: Condition out structure declarations for target libraries. Declare global_options_init. * opts-common.c: Include flags.h instead of options.h. * opts.c (flag_warn_unused_result): Remove. (read_cmdline_options): Take gcc_options parameters. Pass them to read_cmdline_option. (initial_lang_mask, initial_min_crossjump_insns, initial_max_fields_for_field_sensitive, initial_loop_invariant_max_bbs_in_loop): Define at file scope. (init_options_once): New. Split out of decode_options. (init_options_struct): New. Split out of decode_options. (decode_cmdline_options_to_array_default_mask): New. (default_options_optimization): New. Split out of decode_options. (decode_options): Move most code to other functions. Update call to read_cmdline_options. (finish_options): New. Split out of decode_options. * opts.h (decode_options): Add gcc_options parameters. (init_options_once, init_options_struct, decode_cmdline_options_to_array_default_mask): New. * toplev.c (flag_complex_method, flag_ira_algorithm, flag_ira_region, flag_evaluation_order): Remove. (general_init): Use global_options_init for initial flag values for global_dc. (toplev_main): Call init_options_once, init_options_struct, lang_hooks.init_options_struct, decode_cmdline_options_to_array_default_mask and lang_hooks.init_option before decode_options. Update arguments to decode_options. * tree.h: Include flags.h instead of options.h. ada: * gcc-interface/misc.c (gnat_init_options_struct): New. Split out from gnat_init_options. (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. c-family: * c-common.c (parse_optimize_options): Call decode_cmdline_options_to_array_default_mask before decode_options. Update arguments to decode_options. * c-common.h (c_common_init_options_struct): Declare. * c-opts.c (c_common_init_options_struct): New. Split out from c_common_init_options. cp: * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. fortran: * f95-lang.c (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. * gfortran.h (gfc_init_options_struct): Declare. * options.c (gfc_init_options_struct): New. Split out from gfc_init_options. java: * lang.c (java_init_options_struct): New. Split out from java_init_options. (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. lto: * lto-lang.c (lto_init_options): Change to lto_init_options_struct. Update parameters. (LANG_HOOKS_INIT_OPTIONS): Don't define. (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. From-SVN: r165189
2010-10-08 17:17:32 +02:00
2010-10-08 Joseph Myers <joseph@codesourcery.com>
* c-common.c (parse_optimize_options): Call
decode_cmdline_options_to_array_default_mask before
decode_options. Update arguments to decode_options.
* c-common.h (c_common_init_options_struct): Declare.
* c-opts.c (c_common_init_options_struct): New. Split out from
c_common_init_options.
In gcc/: 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com> Implemented fast enumeration for Objective-C. * c-parser.c (objc_could_be_foreach_context): New. (c_lex_one_token): Recognize RID_IN keyword in a potential Objective-C foreach context. (c_parser_declaration_or_fndef): Added parameter. Accept Objective-C RID_IN keyword as terminating a declaration; in that case, return the declaration in the new parameter. (c_parser_extenral_declaration): Updated calls to c_parser_declaration_or_fndef. (c_parser_declaration_or_fndef): Same change. (c_parser_compound_statement_nostart): Same change. (c_parser_label): Same change. (c_parser_objc_methodprotolist): Same change. (c_parser_omp_for_loop): Same change. (c_parser_for_statement): Detect and parse Objective-C foreach statements. (c_parser_omp_for_loop): Updated call to check_for_loop_decls(). * c-decl.c (check_for_loop_decls): Added parameter to allow ObjC fast enumeration parsing code to turn off the c99 error but still perform checks on the loop declarations. * c-tree.h (check_for_loop_decls): Updated declaration. * doc/objc.texi: Document fast enumeration. In gcc/c-family/: 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com> Implemented fast enumeration for Objective-C. * c-common.h (objc_finish_foreach_loop): New. * stub-objc.c (objc_finish_foreach_loop): New. In gcc/objc/: 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com> Implemented fast enumeration for Objective-C. * objc-act.c (build_fast_enumeration_state_template): New. (TAG_ENUMERATION_MUTATION): New. (TAG_FAST_ENUMERATION_STATE): New. (synth_module_prologue): Call build_fast_enumeration_state_template() and set up objc_enumeration_mutation_decl. (objc_create_temporary_var): Allow providing a name to temporary variables. (objc_build_exc_ptr): Updated calls to objc_create_temporary_var(). (next_sjlj_build_try_catch_finally): Same change. (objc_finish_foreach_loop): New. * objc-act.h: Added OCTI_FAST_ENUM_STATE_TEMP, OCTI_ENUM_MUTATION_DECL, objc_fast_enumeration_state_template, objc_enumeration_mutation_decl. Merge from 'apple/trunk' branch on FSF servers. 2006-04-12 Fariborz Jahanian <fjahanian@apple.com> Radar 4507230 * objc-act.c (objc_type_valid_for_messaging): New routine to check for valid objc object types. (objc_finish_foreach_loop): Check for invalid objc objects in foreach header. In gcc/testsuite/: 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com> Implemented fast enumeration for Objective-C. * objc.dg/foreach-1.m: New. * objc.dg/foreach-2.m: New. * objc.dg/foreach-3.m: New. * objc.dg/foreach-4.m: New. * objc.dg/foreach-5.m: New. * objc.dg/foreach-6.m: New. * objc.dg/foreach-7.m: New. Merge from 'apple/trunk' branch on FSF servers: 2006-04-13 Fariborz Jahanian <fjahanian@apple.com> Radar 4502236 * objc.dg/objc-foreach-5.m: New. 2006-04-12 Fariborz Jahanian <fjahanian@apple.com> Radar 4507230 * objc.dg/objc-foreach-4.m: New. 2006-03-13 Fariborz Jahanian <fjahanian@apple.com> Radar 4472881 * objc.dg/objc-foreach-3.m: New. 2005-03-07 Fariborz Jahanian <fjahanian@apple.com> Radar 4468498 * objc.dg/objc-foreach-2.m: New. 2006-02-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4294910 * objc.dg/objc-foreach-1.m: New In libobjc/: 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com> Implemented fast enumeration for Objective-C. * Makefile.in (C_SOURCE_FILES): Added objc-foreach.c. (OBJC_H): Added runtime.h * objc-foreach.c: New file. * objc/runtime.h: New file. From-SVN: r165019
2010-10-06 12:10:14 +02:00
2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented fast enumeration for Objective-C.
* c-common.h (objc_finish_foreach_loop): New.
* stub-objc.c (objc_finish_foreach_loop): New.
opts-common.c (handle_option, [...]): Add diagnostic_context parameter. * opts-common.c (handle_option, handle_generated_option, read_cmdline_option, set_option): Add diagnostic_context parameter. Update calls among these functions. (set_option): Don't use global_dc. * opts.c (read_cmdline_options): Pass global_dc to read_cmdline_option. (decode_options): Pass global_dc to enable_warning_as_error. (common_handle_option): Pass global_dc to enable_warning_as_error. (enable_warning_as_error): Add diagnostic_context parameter. Document parameters. Don't use global_dc. Pass diagnostic_context parameter to handle_generated_option. * opts.h (set_option, handle_option, handle_generated_option, read_cmdline_option, enable_warning_as_error): Add diagnostic_context parameter. * Makefile.in (lto-opts.o): Update dependencies. * coretypes.h (struct diagnostic_context, diagnostic_context): Declare here. * diagnostic.h (diagnostic_context): Don't declare typedef here. * gcc.c (process_command): Pass global_dc to read_cmdline_option. * langhooks-def.h (struct diagnostic_context): Don't declare here. (lhd_print_error_function, lhd_initialize_diagnostics): Declare using diagnostic_context typedef. * langhooks.c (lhd_initialize_diagnostics): Declare using diagnostic_context typedef. * langhooks.h (struct diagnostic_context): Don't declare here. (initialize_diagnostics, print_error_function): Declare using diagnostic_context typedef. * lto-opts.c: Include diagnostic.h. (lto_reissue_options): Pass global_dc to set_option. Pass DK_UNSPECIFIED not 0. * plugin.c (plugins_internal_error_function): Declare using diagnostic_context typedef. * plugin.h (struct diagnostic_context): Don't declare here. (plugins_internal_error_function): Declare using diagnostic_context typedef. c-family: * c-common.h (struct diagnostic_context): Don't declare here. (c_common_initialize_diagnostics): Declare using diagnostic_context typedef. * c-opts.c (c_common_handle_option): Pass global_dc to handle_generated_option. cp: * cp-tree.h (cxx_print_error_function, cxx_initialize_diagnostics): Declare using diagnostic_context typedef. From-SVN: r164991
2010-10-05 16:28:39 +02:00
2010-10-05 Joseph Myers <joseph@codesourcery.com>
* c-common.h (struct diagnostic_context): Don't declare here.
(c_common_initialize_diagnostics): Declare using
diagnostic_context typedef.
* c-opts.c (c_common_handle_option): Pass global_dc to
handle_generated_option.
optc-gen.awk: Define global_options_set. * optc-gen.awk: Define global_options_set. Don't define target_flags_explicit. * opth-gen.awk: Declare global_options_set. Define target_flags_explicit as macro. * opts-common.c (handle_option): Take opts_set and generated_p parameters. (handle_generated_option, read_cmdline_option, set_option): Take opts_set parameter. (set_option): Use opts_set instead of hardcoding target_flags and target_flags_explicit. * opts.c (sel_sched_switch_set, profile_arc_flag_set, flag_profile_values_set, flag_unroll_loops_set, flag_tracer_set, flag_value_profile_transformations_set, flag_peel_loops_set, flag_branch_probabilities_set, flag_inline_functions_set, flag_ipa_cp_set, flag_ipa_cp_clone_set, flag_predictive_commoning_set, flag_unswitch_loops_set, flag_gcse_after_reload_set): Remove. (common_handle_option, lang_handle_option, target_handle_option): Take opts_set parameter. Assert that it is &global_options_set. (common_handle_option): Don't set _set variables. Check opts_set instead of such variables. (enable_warning_as_error): Pass &global_options_set to handle_generated_option. * opts.h (cl_option_handler_func.handler, set_option, handle_option, handle_generated_option, read_cmdline_option): Add opts_set parameters. (handle_option): Add generated_p parameter. * config/i386/i386.c (ix86_function_specific_save, ix86_function_specific_restore): Updat for renaming of target_flags_explicit field. * config/i386/i386.opt (target_flags_explicit): Rename to ix86_target_flags_explicit. * config/ia64/ia64.c (ia64_override_options_after_change): Check global_options_set.x_flag_selective_scheduling and global_options_set.x_flag_selective_scheduling2, not sel_sched_switch_set. * flags.h (sel_sched_switch_set, flag_speculative_prefetching_set): Remove. * gcc.c (driver_handle_option): Take opts_set parameter. Assert that it is &global_options_set. (process_command): Pass &global_options_set to read_cmdline_option. * lto-opts.c (lto_reissue_options): Pass &global_options_set to set_option. * toplev.c (target_flags_explicit): Remove. c-family: * c-opts.c (c_common_handle_option): Pass &global_options_set to handle_generated_option. From-SVN: r164932
2010-10-04 13:51:00 +02:00
2010-10-04 Joseph Myers <joseph@codesourcery.com>
* c-opts.c (c_common_handle_option): Pass &global_options_set to
handle_generated_option.
2010-10-03 Ian Lance Taylor <iant@google.com>
* c.opt (-fplan9-extensions): New option.
2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
Remove.
(c_cpp_builtins): Call functions from cppbuiltin.c instead
of duplicating code.
add @optional/@required to prto lists add @optional/@required to prto lists gcc: * c-parser.c (c_parser_objc_methodprotolist): Amend preceding comment, parse @optional/@required and set the flags as appropriate. gcc/c-family: * c-common.c: Add two new entries for @optional and @required keywords. merge from FSF 'apple/trunk' branch. 2006-01-30 Fariborz Jahanian <fjahanian@apple.com> Radar 4386773 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new objective-c keywords. (objc_set_method_opt): New declaration. * stub-objc.c (objc_set_method_opt): New stub. gcc/cp: merge from FSF 'apple/trunk' branch. 2006-01-30 Fariborz Jahanian <fjahanian@apple.com> Radar 4386773 * cp/parser.c (cp_parser_objc_interstitial_code): For @optional/@required set the optional/required flag. gcc/objc: merge from FSF 'apple/trunk' branch. 2006-01-30 Fariborz Jahanian <fjahanian@apple.com> Radar 4386773 * objc/objc-act.c (objc_set_method_opt): New function. (objc_start_protocol, objc_finish_interface): Reset objc_method_optional_flag flag. (objc_add_method_declaration): Pass on the new flag to objc_add_method. (objc_add_method): Add optional methods to new chain in the protocol class. * objc/objc-act.h (CLASS_OPTIONAL_CLS_METHODS, CLASS_OPTIONAL_NST_METHODS): New macros accessing a protocol class's optional method chains. testsuite: merge from FSF 'apple/trunk' branch. 2006-01-30 Fariborz Jahanian <fjahanian@apple.com> Radar 4386773 * objc.dg/enhanced-proto-1.m: New. * objc.dg/enhanced-proto-2.m: New. * obj-c++.dg/enhanced-proto-1.mm: New * obj-c++.dg/enhanced-proto-2.mm: New. From-SVN: r164754
2010-09-30 18:51:00 +02:00
2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
* c-common.c: Add two new entries for @optional
and @required keywords.
merge from FSF 'apple/trunk' branch.
2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
add @optional/@required to prto lists add @optional/@required to prto lists gcc: * c-parser.c (c_parser_objc_methodprotolist): Amend preceding comment, parse @optional/@required and set the flags as appropriate. gcc/c-family: * c-common.c: Add two new entries for @optional and @required keywords. merge from FSF 'apple/trunk' branch. 2006-01-30 Fariborz Jahanian <fjahanian@apple.com> Radar 4386773 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new objective-c keywords. (objc_set_method_opt): New declaration. * stub-objc.c (objc_set_method_opt): New stub. gcc/cp: merge from FSF 'apple/trunk' branch. 2006-01-30 Fariborz Jahanian <fjahanian@apple.com> Radar 4386773 * cp/parser.c (cp_parser_objc_interstitial_code): For @optional/@required set the optional/required flag. gcc/objc: merge from FSF 'apple/trunk' branch. 2006-01-30 Fariborz Jahanian <fjahanian@apple.com> Radar 4386773 * objc/objc-act.c (objc_set_method_opt): New function. (objc_start_protocol, objc_finish_interface): Reset objc_method_optional_flag flag. (objc_add_method_declaration): Pass on the new flag to objc_add_method. (objc_add_method): Add optional methods to new chain in the protocol class. * objc/objc-act.h (CLASS_OPTIONAL_CLS_METHODS, CLASS_OPTIONAL_NST_METHODS): New macros accessing a protocol class's optional method chains. testsuite: merge from FSF 'apple/trunk' branch. 2006-01-30 Fariborz Jahanian <fjahanian@apple.com> Radar 4386773 * objc.dg/enhanced-proto-1.m: New. * objc.dg/enhanced-proto-2.m: New. * obj-c++.dg/enhanced-proto-1.mm: New * obj-c++.dg/enhanced-proto-2.mm: New. From-SVN: r164754
2010-09-30 18:51:00 +02:00
Radar 4386773
* c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
objective-c keywords.
(objc_set_method_opt): New declaration.
* stub-objc.c (objc_set_method_opt): New stub.
opt-functions.awk (static_var): Update comment. * opt-functions.awk (static_var): Update comment. (var_ref): Return offsetof expression or -1, not variable address. * optc-gen.awk: Generate structure field initializers instead of static variables. Expect -1 for missing variables instead of null pointer. Add gcc_options parameters to generated functions. * opth-gen.awk: Generate structure fields for static variables. Add gcc_options parameters to generated functions. * common.opt (optimize, optimize_size): Add variables. * config/i386/i386-c.c (ix86_pragma_target_parse): Pass &global_options to cl_target_option_restore. * config/i386/i386.c (ix86_valid_target_attribute_p): Pass &global_options to cl_optimization_restore, cl_target_option_save and cl_target_option_restore. (ix86_set_current_function): Pass &global_options to cl_target_option_restore. * config/pdp11/pdp11.h (optimize): Remove. * config/rs6000/rs6000.h (optimize): Remove. * config/sh/sh.h (optimize): Remove. * config/xtensa/xtensa.h (optimize): Remove. * coretypes.h (struct gcc_options): Declare. * diagnostic.c (diagnostic_initialize): Initialize context->option_state. (diagnostic_report_diagnostic): Pass option_state to option_enabled hook. * diagnostic.h (diagnostic_context.option_enabled): Add void * parameter. (diagnostic_context.option_state): New field. * final.c (final_start_function, final, final_scan_insn): Rename optimize parameter to optimize_p. * flags.h (optimize, optimize_size): Remove. * function.c (invoke_set_current_function_hook): Pass &global_options to cl_optimization_restore. * gcc.c (driver_handle_option): Take gcc_options parameter. Assert that it is &global_options. (process_command): Pass &global_options to read_cmdline_option. * ipa-pure-const.c (suggest_attribute): Pass &global_options to option_enabled. * lto-opts.c (lto_reissue_options): Use option_flag_var. Pass &global_options to set_option. * opts-common.c (handle_option, handle_generated_option, read_cmdline_option, set_option): Take explicit gcc_options parameters. Use option_flag_var. (option_flag_var): New. * opts.c (common_handle_option, lang_handle_option, target_handle_option): Take gcc_options parameter. Assert that it is &global_options. (read_cmdline_options): Pass &global_options to read_cmdline_option. (print_filtered_help): Use option_flag_var. Pass &global_options to option_enabled. (common_handle_option): Use option_flag_var. (option_enabled): Take opts parameter. Use option_flag_var. (get_option_state): Take gcc_options parameter. Use option_flag_var. Pass gcc_options parameter to option_enabled. (enable_warning_as_error): Pass &global_options to handle_generated_option. * opts.h (struct cl_option): Change flag_var to flag_var_offset. (cl_option_handler_func.handler): Take gcc_options parameter. (option_enabled, get_option_state, set_option, handle_option, handle_generated_option, read_cmdline_option): Take gcc_options parameters. * toplev.c (optimize, optimize_size): Remove. (print_switch_values): Pass &global_options to option_enabled. (option_affects_pch_p): Use option_flag_var. Pass &global_options to get_option_state. (general_init): Initialize global_dc->option_state. * tree.c (build_optimization_node): Pass &global_options to cl_optimization_save. (build_target_option_node): Pass &global_options to cl_target_option_save. c-family: * c-common.c (handle_optimize_attribute): Pass &global_options to cl_optimization_save and cl_optimization_restore. * c-opts.c (c_common_handle_option): Pass &global_options to handle_generated_option. * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var. (handle_pragma_pop_options, handle_pragma_reset_options): Pass &global_options to cl_optimization_restore. From-SVN: r164751
2010-09-30 15:53:12 +02:00
2010-09-30 Joseph Myers <joseph@codesourcery.com>
* c-common.c (handle_optimize_attribute): Pass &global_options to
cl_optimization_save and cl_optimization_restore.
* c-opts.c (c_common_handle_option): Pass &global_options to
handle_generated_option.
* c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
(handle_pragma_pop_options, handle_pragma_reset_options): Pass
&global_options to cl_optimization_restore.
2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
* c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
Objective-C/Objective-C++ keywords.
2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
Radar 4281748
* c-common.h (objc_check_global_decl): New declaration.
* stub-objc.c (objc_check_global_decl): New stub.
2010-09-29 Joseph Myers <joseph@codesourcery.com>
* c.opt: Don't use VarExists.
optc-gen.awk: Generate global_options initializer instead of individual variables. gcc: * optc-gen.awk: Generate global_options initializer instead of individual variables. Add x_ prefix to names of structure members. * opth-gen.awk: Generate gcc_options structure. Add x_ prefix to names of structure members. * doc/tm.texi.in (HARD_FRAME_POINTER_IS_FRAME_POINTER, HARD_FRAME_POINTER_IS_ARG_POINTER): Document. * doc/tm.texi: Regenerate. * alias.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER * builtins.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER. * c-parser.c (disable_extension_diagnostics, restore_extension_diagnostics): Update names of cpp_options members. * combine.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER * common.opt (fcompare-debug-second): Don't use Var. * config/alpha/alpha.h (target_flags): Remove. * config/arm/arm.h (HARD_FRAME_POINTER_IS_FRAME_POINTER, HARD_FRAME_POINTER_IS_ARG_POINTER): Define. * config/bfin/bfin.h (target_flags): Remove. * config/cris/cris.h (target_flags): Remove. * config/i386/i386-c.c (ix86_pragma_target_parse): Update names of cl_target_option members. * config/i386/i386.c (ix86_force_align_arg_pointer): Remove. (ix86_function_specific_print, ix86_valid_target_attribute_tree, ix86_can_inline_p): Update names of cl_target_option members. * config/i386/i386.h (ix86_isa_flags): Remove. * config/lm32/lm32.h (target_flags): Remove. * config/mcore/mcore.h (mcore_stack_increment): Remove. * config/mcore/mcore.md (addsi3): Remove extern declaration of flag_omit_frame_pointer. * config/mep/mep.h (target_flags): Remove. * config/mips/mips.h (HARD_FRAME_POINTER_IS_FRAME_POINTER, HARD_FRAME_POINTER_IS_ARG_POINTER): Define. * config/mmix/mmix.h (target_flags): Remove. * config/rs6000/rs6000.h (rs6000_xilinx_fpu, flag_pic, flag_expensive_optimizations): Remove. * config/s390/s390.h (flag_pic): Remove. * config/score/score-conv.h (target_flags): Remove. * config/sh/sh.h (sh_fixed_range_str): Remove. * config/spu/spu.h (target_flags, spu_fixed_range_string): Remove. * dbxout.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER * df-scan.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. * diagnostic.c (diagnostic_initialize): Update names of diagnostic_context members. * diagnostic.h (diagnostic_context): Rename inhibit_warnings and warn_system_headers. (diagnostic_report_warnings_p): Update for new names. * dwarf2out.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER * emit-rtl.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER and HARD_FRAME_POINTER_IS_ARG_POINTER. * flags.h (flag_compare_debug): Declare. * ira.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER * opts.c (flag_compare_debug): Define. (common_handle_option): Update names of diagnostic_context members. Handle -fcompare-debug-second. (fast_math_flags_struct_set_p): Update names of cl_optimization members. * reginfo.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. * regrename.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. * reload.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. * reload1.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. * resource.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. * rtl.h (HARD_FRAME_POINTER_IS_FRAME_POINTER, HARD_FRAME_POINTER_IS_ARG_POINTER): Define and use. * sel-sched.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER * stmt.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER. gcc/c-family: * c-common.c (c_cpp_error): Update names of diagnostic_context members. * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of cl_optimization members. * c-opts.c (warning_as_error_callback, c_common_handle_option, sanitize_cpp_opts, finish_options): Update names of cpp_options members. gcc/fortran: * cpp.c (cpp_define_builtins): Update names of gfc_option_t members. (gfc_cpp_post_options): Update names of cpp_options members. (cb_cpp_error): Update names of diagnostic_context members. * f95-lang.c (gfc_init_builtin_functions): Update names of gfc_option_t members. * gfortran.h (gfc_option_t): Rename warn_conversion and flag_openmp. * intrinsic.c (gfc_convert_type_warn): Update names of gfc_option_t members. * options.c (gfc_init_options, gfc_post_options, set_Wall, gfc_handle_option): Update names of gfc_option_t members. * parse.c (next_free, next_fixed): Update names of gfc_option_t members. * scanner.c (pedantic): Remove extern declaration. (skip_free_comments, skip_fixed_comments, include_line): Update names of gfc_option_t members. * trans-decl.c (gfc_generate_function_code): Update names of gfc_option_t members. gcc/java: * java-tree.h (flag_filelist_file, flag_assert, flag_jni, flag_force_classes_archive_check, flag_redundant, flag_newer, flag_use_divide_subroutine, flag_use_atomic_builtins, flag_use_boehm_gc, flag_hash_synchronization, flag_check_references, flag_optimize_sci, flag_indirect_classes, flag_indirect_dispatch, flag_store_check, flag_reduced_reflection): Remove. * jcf-dump.c (flag_newer): Remove. * jcf.h (quiet_flag): Remove. * parse.h (quiet_flag): Remove. libcpp: * include/cpplib.h (cpp_options): Rename warn_deprecated, warn_traditional, warn_long_long and pedantic. * directives.c (directive_diagnostics, _cpp_handle_directive): Update names of cpp_options members. * expr.c (cpp_classify_number, eval_token): Update names of cpp_options members. * init.c (cpp_create_reader, post_options): Update names of cpp_options members. * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of cpp_options members. * macro.c (parse_params): Update names of cpp_options members. From-SVN: r164723
2010-09-29 16:49:14 +02:00
2010-09-29 Joseph Myers <joseph@codesourcery.com>
* c-common.c (c_cpp_error): Update names of diagnostic_context
members.
* c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
cl_optimization members.
* c-opts.c (warning_as_error_callback, c_common_handle_option,
sanitize_cpp_opts, finish_options): Update names of cpp_options
members.
2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
(objc_is_reserved_word): Removed.
* c-common.c: Updated comments.
* c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
objc_is_reserved_word.
* stub-objc.c (objc_is_reserved_word): Removed.
2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
* c-common.h (objc_add_method_declaration): Adjust prototype to
include attributes.
(objc_start_method_definition): Likewise.
(objc_build_keyword_decl): Likewise.
* stub-objc.c:(objc_add_method_declaration): Handle attributes.
(objc_start_method_definition): Likewise.
(objc_build_keyword_decl): Likewise.
add ObjC* class, category and protocol attribute parsers gcc/c-family: * c-common.h (objc_start_class_interface): Adjust prototype. (objc_start_category_interface): Likewise. (objc_start_protocol): Likewise. * stub-objc.c (objc_start_protocol): Adjust for extra argument. (objc_start_class_interface): Likewise. (objc_start_category_interface): Likewise. gcc/objc: * objc-act.c (objc_start_class_interface): Handle and ignore attributes. (objc_start_category_interface): Likewise. (objc_start_protocol): Likewise. gcc/cp: * parser.c (cp_parser_objc_valid_prefix_attributes): New. (cp_parser_declaration): Parse prefix attributes for ObjC++. (cp_parser_objc_protocol_declaration): Handle attributes. (cp_parser_objc_class_interface): Likewise. (cp_parser_objc_declaration): Likewise. gcc: * c-parser.c (c_parser_objc_class_definition): Adjust prototype. (c_parser_objc_protocol_definition): Likewise. (c_parser_external_declaration): Provide dummy attribute arguments. (c_parser_declaration_or_fndef): Parse prefix attributes for ObjC. (c_parser_objc_class_definition): Handle attributes. (c_parser_objc_protocol_definition): Likewise. gcc/testsuite: * objc.dg/attributes: New. * objc.dg/attributes/attributes.exp: New. * objc.dg/attributes/class-attribute-1.m: New. * objc.dg/attributes/class-attribute-2.m: New * objc.dg/attributes/categ-attribute-1.m: New * objc.dg/attributes/categ-attribute-2.m: New * objc.dg/attributes/proto-attribute-1.m: New * obj-c++.dg/attributes: New. * obj-c++.dg/attributes/attributes.exp: New * obj-c++.dg/attributes/class-attribute-1.mm: New * obj-c++.dg/attributes/class-attribute-2.mm: New * obj-c++.dg/attributes/categ-attribute-1.mm: New * obj-c++.dg/attributes/categ-attribute-2.mm: New * obj-c++.dg/attributes/proto-attribute-1.mm: New From-SVN: r164700
2010-09-28 22:08:38 +02:00
2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
* c-common.h (objc_start_class_interface): Adjust prototype.
(objc_start_category_interface): Likewise.
(objc_start_protocol): Likewise.
* stub-objc.c (objc_start_protocol): Adjust for extra argument.
(objc_start_class_interface): Likewise.
(objc_start_category_interface): Likewise.
common.opt (fsplit-stack): New option. gcc/: * common.opt (fsplit-stack): New option. * opts.c (decode_options): Set flag_split_stack to final value. * target.def (supports_split_stack): New hook. * gcc.c (STACK_SPLIT_SPEC): Define. (LINK_COMMAND_SPEC): Use STACK_SPLIT_SPEC. * doc/invoke.texi (Option Summary): Mention -fsplit-stack. (Code Gen Options): Document -fsplit-stack. * doc/extend.texi (Function Attributes): Mention no_split_stack. (Function Attributes): Document no_split_stack. * doc/tm.texi.in (Stack Smashing Protection): Add @hook TARGET_SUPPORTS_SPLIT_STACK. * doc/tm.texi: Rebuild. * function.c (thread_prologue_and_epilogue_insns): If flag_split_stack, add split stack prologue. * explow.c (allocate_dynamic_stack_space): Support -fsplit-stack. * varasm.c (saw_no_split_stack): New static variable. (assemble_start_function): Set saw_no_split_stack if the function has the no_split_stack attribute. (file_end_indicate_split_stack): New function. * output.h (file_end_indicate_split_stack): Declare. * libgcc-std.ver (GCC_4.6.0): Add -fsplit-stack support variables and function. * doc/libgcc.texi (Miscellaneous routines): Document -fsplit-stack routines. * config/i386/i386.c (ix86_option_override_internal): Don't set expand_builtin_va_start to NULL if -fsplit-stack. (ix86_function_regparm): Reduce local regparm by 1 for 32-bit -fsplit-stack. (ix86_va_start): If -fsplit-stack, get overflow pointer from scratch register set by prologue. (ix86_code_end): If -fsplit-stack, call file_end_indicate_split_stack. (ix86_supports_split_stack): New static function. (SPLIT_STACK_AVAILABLE): Define. (split_stack_prologue_scratch_regno): New static function. (split_stack_fn): New static variable. (ix86_expand_split_stack_prologue): New function. (ix86_live_on_entry): New static function. (ix86_legitimate_address_p): Handle UNSPEC_STACK_CHECK. (output_pic_addr_const): Likewise. (i386_asm_output_addr_const_extra): Likewise. (ix86_expand_call): Change return type to rtx. Return the new call instruction. (TARGET_SUPPORTS_SPLIT_STACK): Define. (TARGET_EXTRA_LIVE_ON_ENTRY): Define. * config/i386/i386.md (UNSPEC_STACK_CHECK): Define. (split_stack_prologue, split_stack_return): New insns. (split_stack_space_check): New insn. * config/i386/i386.h (struct machine_function): Add split_stack_varargs_pointer field. * config/i386/linux.h (TARGET_CAN_SPLIT_STACK): Define. (TARGET_THREAD_SPLIT_STACK_OFFSET): Define. * config/i386/linux64.h (TARGET_CAN_SPLIT_STACK): Define. (TARGET_THREAD_SPLIT_STACK_OFFSET): Define. * config/i386/i386-protos.h (ix86_expand_split_stack_prologue): Declare. (ix86_expand_call): Update declaration. gcc/c-family/: * c-common.c (c_common_attribute_table): Add no_split_stack. (handle_no_split_stack_attribute): New static function. gcc/testsuite/: * lib/target-supports.exp (check_effective_target_split_stack): New procedure. * gcc.dg/split-1.c: New test. * gcc.dg/split-2.c: New test. * gcc.dg/split-3.c: New test. * gcc.dg/split-4.c: New test. libgcc/: * generic-morestack.h: New file. * generic-morestack.c: New file. * generic-morestack-thread.c: New file. * config/i386/morestack.S: New file. * config/t-stack: New file. * config/i386/t-stack-i386: New file. * config.host (i[34567]86-*-linux* and friends): Add t-stack and i386/t-stack-i386 to tmake_file. From-SVN: r164661
2010-09-27 21:48:20 +02:00
2010-09-27 Ian Lance Taylor <iant@google.com>
* c-common.c (c_common_attribute_table): Add no_split_stack.
(handle_no_split_stack_attribute): New static function.
In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. Removed small change in build_conditional_expr that had been added when fixing PR objc/27377 and which did the same check in a less complete way. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * c-typeck.c (build_conditional_expr): Call objc_have_common_type when looking for objective-c common pointer types. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * c-typeck.c (build_conditional_expr): For two ObjC pointer types, use their ObjC common type. In gcc/c-family: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * c-common.h (objc_have_common_type): New declaration. * stub-objc.c (objc_have_common_type): New stub. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * c-common.h (objc_common_type): New prototype. * stub-objc.c (objc_common_type): New stub. In gcc/objc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * objc-act.c (objc_have_common_types): New function. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * objc-act.c (objc_common_type): New function. In gcc/cp/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from apple/trunk branch on FSF servers: 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * typeck.c (composite_pointer_type): Call objc_have_common_type when comparing two objective-c pointer types. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * call.c (standard_conversion): Allow for a pointer conversion between any two ObjC pointer types. * typeck.c (composite_pointer_type): Determine common type for two ObjC pointer types. In gcc/testsuite/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. Renamed const-str-12.m to constr-str-12b.m to avoid conflicts. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * obj-c++.dg/warn5.mm: New 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * obj-c++.dg/const-str-12.mm: New. * objc.dg/const-str-12.m: New. From-SVN: r164655
2010-09-27 20:04:09 +02:00
2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. Removed small change in build_conditional_expr that had been added when fixing PR objc/27377 and which did the same check in a less complete way. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * c-typeck.c (build_conditional_expr): Call objc_have_common_type when looking for objective-c common pointer types. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * c-typeck.c (build_conditional_expr): For two ObjC pointer types, use their ObjC common type. In gcc/c-family: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * c-common.h (objc_have_common_type): New declaration. * stub-objc.c (objc_have_common_type): New stub. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * c-common.h (objc_common_type): New prototype. * stub-objc.c (objc_common_type): New stub. In gcc/objc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * objc-act.c (objc_have_common_types): New function. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * objc-act.c (objc_common_type): New function. In gcc/cp/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from apple/trunk branch on FSF servers: 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * typeck.c (composite_pointer_type): Call objc_have_common_type when comparing two objective-c pointer types. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * call.c (standard_conversion): Allow for a pointer conversion between any two ObjC pointer types. * typeck.c (composite_pointer_type): Determine common type for two ObjC pointer types. In gcc/testsuite/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. Renamed const-str-12.m to constr-str-12b.m to avoid conflicts. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * obj-c++.dg/warn5.mm: New 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * obj-c++.dg/const-str-12.mm: New. * objc.dg/const-str-12.m: New. From-SVN: r164655
2010-09-27 20:04:09 +02:00
2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. Removed small change in build_conditional_expr that had been added when fixing PR objc/27377 and which did the same check in a less complete way. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * c-typeck.c (build_conditional_expr): Call objc_have_common_type when looking for objective-c common pointer types. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * c-typeck.c (build_conditional_expr): For two ObjC pointer types, use their ObjC common type. In gcc/c-family: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * c-common.h (objc_have_common_type): New declaration. * stub-objc.c (objc_have_common_type): New stub. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * c-common.h (objc_common_type): New prototype. * stub-objc.c (objc_common_type): New stub. In gcc/objc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * objc-act.c (objc_have_common_types): New function. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * objc-act.c (objc_common_type): New function. In gcc/cp/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from apple/trunk branch on FSF servers: 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * typeck.c (composite_pointer_type): Call objc_have_common_type when comparing two objective-c pointer types. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * call.c (standard_conversion): Allow for a pointer conversion between any two ObjC pointer types. * typeck.c (composite_pointer_type): Determine common type for two ObjC pointer types. In gcc/testsuite/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. Renamed const-str-12.m to constr-str-12b.m to avoid conflicts. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * obj-c++.dg/warn5.mm: New 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * obj-c++.dg/const-str-12.mm: New. * objc.dg/const-str-12.m: New. From-SVN: r164655
2010-09-27 20:04:09 +02:00
Radar 4229905
In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. Removed small change in build_conditional_expr that had been added when fixing PR objc/27377 and which did the same check in a less complete way. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * c-typeck.c (build_conditional_expr): Call objc_have_common_type when looking for objective-c common pointer types. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * c-typeck.c (build_conditional_expr): For two ObjC pointer types, use their ObjC common type. In gcc/c-family: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * c-common.h (objc_have_common_type): New declaration. * stub-objc.c (objc_have_common_type): New stub. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * c-common.h (objc_common_type): New prototype. * stub-objc.c (objc_common_type): New stub. In gcc/objc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * objc-act.c (objc_have_common_types): New function. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * objc-act.c (objc_common_type): New function. In gcc/cp/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from apple/trunk branch on FSF servers: 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * typeck.c (composite_pointer_type): Call objc_have_common_type when comparing two objective-c pointer types. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * call.c (standard_conversion): Allow for a pointer conversion between any two ObjC pointer types. * typeck.c (composite_pointer_type): Determine common type for two ObjC pointer types. In gcc/testsuite/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. Renamed const-str-12.m to constr-str-12b.m to avoid conflicts. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * obj-c++.dg/warn5.mm: New 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * obj-c++.dg/const-str-12.mm: New. * objc.dg/const-str-12.m: New. From-SVN: r164655
2010-09-27 20:04:09 +02:00
* c-common.h (objc_have_common_type): New declaration.
* stub-objc.c (objc_have_common_type): New stub.
2005-06-22 Ziemowit Laski <zlaski@apple.com>
Radar 4154928
* c-common.h (objc_common_type): New prototype.
* stub-objc.c (objc_common_type): New stub.
In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. Removed small change in build_conditional_expr that had been added when fixing PR objc/27377 and which did the same check in a less complete way. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * c-typeck.c (build_conditional_expr): Call objc_have_common_type when looking for objective-c common pointer types. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * c-typeck.c (build_conditional_expr): For two ObjC pointer types, use their ObjC common type. In gcc/c-family: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * c-common.h (objc_have_common_type): New declaration. * stub-objc.c (objc_have_common_type): New stub. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * c-common.h (objc_common_type): New prototype. * stub-objc.c (objc_common_type): New stub. In gcc/objc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * objc-act.c (objc_have_common_types): New function. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * objc-act.c (objc_common_type): New function. In gcc/cp/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from apple/trunk branch on FSF servers: 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * typeck.c (composite_pointer_type): Call objc_have_common_type when comparing two objective-c pointer types. 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * call.c (standard_conversion): Allow for a pointer conversion between any two ObjC pointer types. * typeck.c (composite_pointer_type): Determine common type for two ObjC pointer types. In gcc/testsuite/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. Renamed const-str-12.m to constr-str-12b.m to avoid conflicts. 2005-12-15 Fariborz Jahanian <fjahanian@apple.com> Radar 4229905 * obj-c++.dg/warn5.mm: New 2005-06-22 Ziemowit Laski <zlaski@apple.com> Radar 4154928 * obj-c++.dg/const-str-12.mm: New. * objc.dg/const-str-12.m: New. From-SVN: r164655
2010-09-27 20:04:09 +02:00
2010-09-24 Jan Hubicka <jh@suse.cz>
* c-common.c (handle_leaf_attribute): New function.
(struct attribute_spec c_common_att): Add leaf.
common.opt (-assemble, [...]): New. * common.opt (-assemble, -compile, -coverage, -debug, -dump, -dump=, -dumpbase, -dumpdir, -entry, -entry=, -extra-warnings, -for-assembler, -for-assembler=, -for-linker, -for-linker=, -force-link, -force-link=, -language, -language=, -library-directory, -library-directory=, -no-canonical-prefixes, -no-standard-libraries, -no-warnings, -optimize, -output, -output=, -pass-exit-codes, -pedantic, -pedantic-errors, -pie, -pipe, -prefix, -prefix=, -preprocess, -print-file-name, -print-file-name=, -print-libgcc-file-name, -print-multi-directory, -print-multi-lib, -print-multi-os-directory, -print-prog-name, -print-prog-name=, -print-search-dirs, -print-sysroot, -print-sysroot-headers-suffix, -profile, -save-temps, -shared, -specs, -specs=, -static, -symbolic, -time, -verbose, -param=, -sysroot, coverage, e, u, symbolic): New. (fhelp, fhelp=, ftarget-help, fversion): Make into aliases. * gcc.c (A Short Introduction to Adding a Command-Line Option): Remove comment. (cc1_options): Correct specs for passing down --help, --target-help and --help=*. Add spec for passing down --version. (struct option_map, option_map, target_option_translations, translate_options): Remove. (driver_handle_option): Handle OPT__version, OPT__help, OPT__help_ and OPT__target_help instead of OPT_fversion, OPT_fhelp, OPT_fhelp_ and OPT_ftarget_help. (process_command): Don't call translate_options. Call decode_cmdline_options_to_array before checking for -no-canonical-prefixes using decoded options. * opts-common.c (tm.h): Update comment on #include. (find_opt): Allow abbreviations of long options. (struct option_map, option_map): New. (decode_cmdline_option): Use them instead of hardcoding -Wno, -fno and -mno handling. (target_option_translations): New. (decode_cmdline_options_to_array): Handle TARGET_OPTION_TRANSLATE_TABLE in driver. * opts.c (common_handle_option): Don't handle OPT_fhelp, OPT_ftarget_help, OPT_fhelp_ or OPT_fversion. ada: * gcc-interface/lang.opt (-all-warnings, -include-barrier, -include-directory, -include-directory=, -no-standard-includes, -no-standard-libraries): New. c-family: * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments, -comments-in-macros, -define-macro, -define-macro=, -dependencies, -dump, -dump=, -imacros, -imacros=, -include, -include=, -include-barrier, -include-directory, -include-directory=, -include-directory-after, -include-directory-after=, -include-prefix, -include-prefix=, -include-with-prefix, -include-with-prefix=, -include-with-prefix-after, -include-with-prefix-after=, -include-with-prefix-before, -include-with-prefix-before=, -no-integrated-cpp, -no-line-commands, -no-standard-includes, -no-warnings, -output, -output=, -pedantic, -pedantic-errors, -preprocess, -print-missing-file-dependencies, -trace-includes, -traditional, -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=, -user-dependencies, -verbose, -write-dependencies, -write-user-dependencies, no-integrated-cpp, traditional): New. fortran: * gfortranspec.c (lang_specific_driver): Handle OPT__version and OPT__help instead of OPT_fversion and OPT_fhelp. * lang.opt (-all-warnings, -assert, -assert=, -comments, -comments-in-macros, -define-macro, -define-macro=, -dependencies, -dump, -dump=, -include-barrier, -include-directory, -include-directory=, -include-directory-after, -include-directory-after=, -include-prefix, -include-prefix=, -no-line-commands, -no-standard-includes, -output, -output=, -preprocess, -print-missing-file-dependencies, -trace-includes, -undefine-macro, -undefine-macro=, -user-dependencies, -verbose, -write-dependencies, -write-user-dependencies): New. java: * jvspec.c (lang_specific_driver): Handle OPT__help instead of OPT_fhelp. * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath, -dependencies, -encoding, -extdirs, -include-directory, -include-directory=, -output-class-directory, -output-class-directory=, -resource, -resource=, -user-dependencies): New. From-SVN: r164531
2010-09-22 22:12:06 +02:00
2010-09-22 Joseph Myers <joseph@codesourcery.com>
* c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
-comments-in-macros, -define-macro, -define-macro=, -dependencies,
-dump, -dump=, -imacros, -imacros=, -include, -include=,
-include-barrier, -include-directory, -include-directory=,
-include-directory-after, -include-directory-after=,
-include-prefix, -include-prefix=, -include-with-prefix,
-include-with-prefix=, -include-with-prefix-after,
-include-with-prefix-after=, -include-with-prefix-before,
-include-with-prefix-before=, -no-integrated-cpp,
-no-line-commands, -no-standard-includes, -no-warnings, -output,
-output=, -pedantic, -pedantic-errors, -preprocess,
-print-missing-file-dependencies, -trace-includes, -traditional,
-traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
-user-dependencies, -verbose, -write-dependencies,
-write-user-dependencies, no-integrated-cpp, traditional): New.
2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/23710
* c-common.h (objc_start_method_definition): Return bool instead
of void.
* stub-objc.c (objc_start_method_definition): Return bool instead
of void.
2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/25965
* c-common.h (objc_get_interface_ivars): New declaration.
* stub-objc.c (objc_get_interface_ivars): New stub.
2010-09-15 Ian Lance Taylor <iant@google.com>
* c-common.c (parse_optimize_options): Do not capitalize warning
messages. Remove period at end of warning message.
2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
* c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
(handle_alias_attribute): ... here.
(handle_ifunc_attribute): New.
2010-09-06 Mark Mitchell <mark@codesourcery.com>
* c-common.h (do_warn_double_promotion): Declare.
* c-common.c (do_warn_double_promotion): Define.
2010-09-05 Mark Mitchell <mark@codesourcery.com>
* c.opt (Wdouble-promotion): New.
2010-09-02 Joseph Myers <joseph@codesourcery.com>
* c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
fvtable-thunks, fxref): Mark no longer supported in help text.
opts.h (struct cl_option): Add warn_message field. * opts.h (struct cl_option): Add warn_message field. (struct cl_decoded_option): Add warn_message field. * doc/options.texi (Ignore, Warn): Document. * opt-functions.awk (needs_state_p): Don't consider aliases or ignored options to need state saved. * optc-gen.awk: Handle Warn and Ignore. * opth-gen.awk: Output OPT_SPECIAL_ignore. * opts-common.c (decode_cmdline_option): Set warn_message field. Handle ignored options. (decode_cmdline_options_to_array, generate_option, generate_option_input_file): Set warn_message field. (read_cmdline_option): Generate warnings from warn_message field. Handle ignored options. * common.opt (Wunreachable-code, fargument-alias, fargument-noalias, fargument-noalias-global, fargument-noalias-anything, fcse-skip-blocks, fforce-addr, floop-optimize, frerun-loop-opt, fsched2-use-traces, fsee, fstrength-reduce, ftree-store-ccp, ftree-store-copy-prop, ftree-salias): Mark Ignore. * config/i386/i386.h (CC1_CPU_SPEC_1): Don't handle -mcpu, -mintel-syntax and -mno-intel-syntax here. * config/i386/i386.opt (mcpu=, mintel-syntax): Define as aliases using Warn. * opts.c (common_handle_option): Don't handle options marked as ignored. (enable_warning_as_error): Handle ignored options. c-family: * c.opt (Wimport, fall-virtual, falt-external-templates, fdefault-inline, fenum-int-equiv, fexternal-templates, fguiding-decls, fhonor-std, fhuge-objects, flabels-ok, fname-mangling-version-, fnew-abi, fnonnull-objects, foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable, fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as applicable. (fhandle-exceptions): Mark with Alias and Warn. * c-opts.c (c_common_handle_option): Don't handle options marked as ignored. po: * exgettext: Handle {} in operand of MissingArgError. Handle Warn. From-SVN: r163771
2010-09-02 13:43:19 +02:00
2010-09-02 Joseph Myers <joseph@codesourcery.com>
* c.opt (Wimport, fall-virtual, falt-external-templates,
fdefault-inline, fenum-int-equiv, fexternal-templates,
fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
fname-mangling-version-, fnew-abi, fnonnull-objects,
foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
applicable.
(fhandle-exceptions): Mark with Alias and Warn.
* c-opts.c (c_common_handle_option): Don't handle options marked
as ignored.
re PR driver/44076 (-MT <target> behaves different as -MT<target> (w/o space)) PR driver/44076 * opts.h (struct cl_option): Add alias_arg, neg_alias_arg and alias_target fields. * opt-functions.awk (opt_sanitized_name): Don't handle finline-limit=, Wlarger-than= and ftemplate-depth= specially. * optc-gen.awk: Generate alias fields. * opth-gen.awk: Explicitly give values for OPT_* enum constants. Don't generate such constants for aliases. * opts-common.c (generate_canonical_option): New. (decode_cmdline_option): Handle aliases. Use generate_canonical_option for known options instead of copying the input option text. * doc/options.texi (Alias): Document. * common.opt (W, Wlarger-than-, aux-info=, finline-limit-, fstack-check, specs): Mark as aliases. * gcc.c (driver_handle_option): Canonicalize -L options to joined arguments. (driver_handle_option): Don't handle OPT_specs. * opts.c (common_handle_option): Don't handle options marked as aliases. (enable_warning_as_error): Handle aliases. * stor-layout.c (layout_decl): Use OPT_Wlarger_than_ instead of OPT_Wlarger_than_eq. * tree-optimize.c (tree_rest_of_compilation): Use OPT_Wlarger_than_ instead of OPT_Wlarger_than_eq. c-family: * c.opt (Wcomments, Werror-implicit-function-declaration, ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x, std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as aliases. * c-common.c (option_codes): Use OPT_Wcomment instead of OPT_Wcomments. * c-opts.c (warning_as_error_callback, c_common_handle_option): Don't handle options marked as aliases. java: * lang.opt (CLASSPATH, bootclasspath, classpath, encoding, fCLASSPATH=): Mark as Java options and as aliases. * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*. (lang_specific_driver): Don't handle options marked as aliases. * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_. testsuite: * gcc.dg/cpp/warn-comments-3.c: New. Based on warn-comments-2.c but using -Werror=comment. * gcc.dg/cpp/warn-comments.c, gcc.dg/cpp/warn-comments-2.c: Adjust expected error messages. From-SVN: r163770
2010-09-02 13:41:22 +02:00
2010-09-02 Joseph Myers <joseph@codesourcery.com>
* c.opt (Wcomments, Werror-implicit-function-declaration,
ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
aliases.
* c-common.c (option_codes): Use OPT_Wcomment instead of
OPT_Wcomments.
* c-opts.c (warning_as_error_callback, c_common_handle_option):
Don't handle options marked as aliases.
2010-08-25 Richard Guenther <rguenther@suse.de>
* c-common.c (c_common_get_alias_set): Remove special
handling for pointers.
vec.h (FOR_EACH_VEC_ELT): Define. gcc/ * vec.h (FOR_EACH_VEC_ELT): Define. * c-decl.c: Use it. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/bfin/bfin.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * dbxout.c: Likewise. * df-scan.c: Likewise. * dominance.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * ggc-common.c: Likewise. * gimplify.c: Likewise. * graphite-blocking.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * ipa-prop.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-emit.c: Likewise. * lambda-code.c: Likewise. * loop-invariant.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-opts.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-symtab.c: Likewise. * matrix-reorg.c: Likewise. * opts.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-data-ref.c: Likewise. * tree-emutls.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * vmsdbgout.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Use FOR_EACH_VEC_ELT. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. gcc/c-family/ * c-common.c: Use FOR_EACH_VEC_ELT. * c-gimplify.c: Likewise. * c-pragma.c: Likewise. gcc/cp/ * call.c: Use FOR_EACH_VEC_ELT. * class.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * error.c: Likewise. * except.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * repo.c: Likewise. * semantics.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * trans-openmp.c: Use FOR_EACH_VEC_ELT. gcc/java/ * class.c: Use FOR_EACH_VEC_ELT. * expr.c: Likewise. * jcf-parse.c: Likewise. * resource.c: Likewise. gcc/lto/ * lto.c: Use FOR_EACH_VEC_ELT. From-SVN: r163401
2010-08-20 14:48:59 +02:00
2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
* c-common.c: Use FOR_EACH_VEC_ELT.
* c-gimplify.c: Likewise.
* c-pragma.c: Likewise.
2010-08-16 Joseph Myers <joseph@codesourcery.com>
* c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
RejectDriver.
(MMDX): Change back to MMD. Mark NoDriverArg instead of
RejectDriver.
* c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
instead of OPT_MDX and OPT_MMDX.
common.opt: Add driver options. * common.opt: Add driver options. (auxbase, auxbase-strip, quiet, version): Mark RejectDriver. * doc/options.texi (Driver, RejectDriver): Document. * gcc.c (pass_exit_codes, print_search_dirs, print_file_name, print_prog_name, print_multi_directory, print_sysroot, print_multi_os_directory, print_multi_lib, print_sysroot_headers_suffix, report_times, combine_flag, use_pipes, wrapper_string): Remove. (save_switch, driver_unknown_option_callback, driver_wrong_lang_callback, driver_post_handling_callback, driver_handle_option): New. (spec_lang, last_language_n_infiles): Make file-scope static instead of local to process_command. (process_command): Use decode_cmdline_options_to_array and read_cmdline_option for option processing. Compute have_c in prescan of decoded options. * opt-functions.awk (switch_flags): Handle Driver and RejectDriver. (var_type, var_type_struct): Handle Separate options as generating const char * variables. * opts-common.c (decode_cmdline_option): Expect CL_COMMON and CL_TARGET to be passed by caller if required. (decode_cmdline_options_to_array): Update comment. * opts.c (complain_wrong_lang): Handle options only valid for the driver. (decode_options): Update call to decode_cmdline_options_to_array. (print_filtered_help): Ignore driver-only options. (print_specific_help): Ignore CL_DRIVER. (common_handle_option): Don't call print_specific_help for CL_DRIVER. * opts.h (CL_DRIVER, CL_REJECT_DRIVER): Define. (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_TARGET, CL_COMMON): Update values. c-family: * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver. fortran: * lang.opt (MDX, MMDX): Mark RejectDriver. java: * lang.opt (MD_, MMD_, version): Mark RejectDriver. From-SVN: r163279
2010-08-16 12:15:15 +02:00
2010-08-16 Joseph Myers <joseph@codesourcery.com>
* c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
2010-08-12 Joseph Myers <joseph@codesourcery.com>
* c.opt (MD, MMD): Change to MDX and MMDX.
* c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
2010-08-11 Joseph Myers <joseph@codesourcery.com>
* c-opts.c (c_common_handle_option): Call handle_generated_option
instead of handle_option.
2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
* c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
(maybe_apply_renaming_pragma): Delete unneeded declarations.
2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
* c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
(pending_redefine_extname): Change type to a VEC.
(add_to_renaming_pragma_list): Update for new type of
pending_redefine_extname.
(maybe_apply_renaming_pragma): Likewise.
2010-08-04 Arnaud Charlet <charlet@adacore.com>
* c-ada-spec.c (dump_ada_template): Mark underlying instance type as
visited.
(dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
decide whether a type has already been declared/seen.
Do not go to the original type.
(dump_nested_types): New parameter forward.
Generate forward declaration if needed and mark type as visited.
(print_ada_declaration): Call dump_nested_types if not already done.
Mark types as visited.
2010-08-03 Joseph Myers <joseph@codesourcery.com>
* c.opt (-print-pch-checksum): Remove option.
* c-opts.c (c_common_handle_option): Don't handle
OPT_print_pch_checksum.
coretypes.h (struct cl_option_handlers): Declare. * coretypes.h (struct cl_option_handlers): Declare. * hooks.c (hook_int_size_t_constcharptr_int_0): Remove. * hooks.h (hook_int_size_t_constcharptr_int_0): Remove. * langhooks-def.h (lhd_handle_option): Declare. (LANG_HOOKS_HANDLE_OPTION): Use lhd_handle_option. * langhooks.c (lhd_handle_option): New. * langhooks.h (struct lang_hooks): Update prototype and return value type of handle_option hook. * optc-gen.awk: Generate target_flags_explicit definition for the driver. * opts-common.c: Include diagnostic.h. (handle_option): Move from opts.c. Update prototype and return value type. Use handlers structure. (read_cmdline_option): Move from opts.c. Update prototype. Use handlers structure. (set_option): Move from opts.c. * opts.c (common_handle_option): Update prototype and return value type. Update calls to handle_option and enable_warning_as_error. (unknown_option_callback, post_handling_callback, lang_handle_option, target_handle_option): New. (handle_option, read_cmdline_option): Move to opts-common.c. (read_cmdline_options): Update prototype. Update call to read_cmdline_option. (decode_options): Initialize and use handlers structure. (set_option): Move to opts-common.c. (enable_warning_as_error): Update prototype. Update call to handle_option. * opts.h (struct cl_option_handler_func, struct cl_option_handlers): New. (handle_option, enable_warning_as_error): Update prototypes. (read_cmdline_option): Declare. * Makefile.in (opts-common.o): Update dependencies. ada: * gcc-interface/misc.c (gnat_handle_option): Update prototype and return value type. Don't check for missing arguments here. c-family: * c-common.h (c_common_handle_option): Update prototype and return value type. * c-opts.c (c_common_handle_option): Update prototype and return value type. Update calls to handle_option and enable_warning_as_error. fortran: * gfortran.h (gfc_handle_option): Update prototype and return value type. * options.c (gfc_handle_option): Update prototype and return value type. java: * lang.c (java_handle_option): Update prototype and return value type. lto: * lto-lang.c (lto_handle_option): Update prototype and return value type. Remove duplicate assignment to result. From-SVN: r162601
2010-07-27 23:23:53 +02:00
2010-07-27 Joseph Myers <joseph@codesourcery.com>
* c-common.h (c_common_handle_option): Update prototype and return
value type.
* c-opts.c (c_common_handle_option): Update prototype and return
value type. Update calls to handle_option and
enable_warning_as_error.
2010-07-27 Jakub Jelinek <jakub@redhat.com>
PR c/45079
* c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
2010-07-27 Joseph Myers <joseph@codesourcery.com>
* c-common.h (c_common_missing_argument): Remove.
* c-opts.c (c_common_missing_argument): Remove.
* c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
idirafter, imacros, include, isysroot, isystem, iquote): Add
MissingArgError.
* c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
langhooks-def.h (lhd_init_options, [...]): New. * langhooks-def.h (lhd_init_options, LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P): New. (LANG_HOOKS_INIT_OPTIONS): Update default definition. (LANG_HOOKS_INITIALIZER): Add new hooks. * langhooks.c (lhd_init_options, lhd_complain_wrong_lang_p): New. * langhooks.h (struct lang_hooks): Add new hooks option_lang_mask and complain_wrong_lang_p. Update init_options prototype. * c-objc-common.c (c_initialize_diagnostics): First call c_common_initialize_diagnostics. * c-objc-common.h (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define. * coretypes.h (struct cl_option, struct cl_decoded_option): Declare. * hooks.c (hook_uint_uint_constcharptrptr_0): Remove. (hook_uint_void_0): New. * hooks.h (hook_uint_uint_constcharptrptr_0): Remove. (hook_uint_void_0): New. * opts-common.c (decode_cmdline_option, decode_cmdline_options_to_array): Also fill in canonical_option field. * opts.c (complain_wrong_lang): Use langhook to determine whether to complain instead of special-casing LTO. (decode_options): Separate lang_mask determination with option_lang_mask hook from call of init_options hook. * opts.h (struct cl_decoded_option): Add canonical_option. ada: * gcc-interface/misc.c (gnat_option_lang_mask): New. (gnat_init_options): Update prototype. Reconstruct argv array from decoded options. c-family: * c-common.h (c_common_option_lang_mask, c_common_initialize_diagnostics, c_common_complain_wrong_lang_p): New. (c_common_init_options): Update prototype. * c-opts.c (c_common_option_lang_mask): New. (c_common_initialize_diagnostics): Split out of c_common_init_options. (accept_all_c_family_options, c_common_complain_wrong_lang_p): New. (c_common_init_options): Update prototype. Use decoded options in search for -lang-asm. cp: * cp-objcp-common.c (cxx_initialize_diagnostics): First call c_common_initialize_diagnostics. * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define. fortran: * cpp.c (gfc_cpp_init_options): Update prototype. Use number of decoded options in allocating deferred_opt. * cpp.h (gfc_cpp_init_options): Update prototype. * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define. * gfortran.h (gfc_option_lang_mask): New. (gfc_init_options): Update prototype. * options.c (gfc_option_lang_mask): New. (gfc_init_options): Update prototype. Pass new arguments to gfc_cpp_init_options. java: * lang.c (java_option_lang_mask): New. (java_init_options): Update prototype. (LANG_HOOKS_OPTION_LANG_MASK): Define. lto: * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p): New. (lto_init_options): Update prototype. (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define. From-SVN: r162560
2010-07-27 11:59:51 +02:00
2010-07-27 Joseph Myers <joseph@codesourcery.com>
* c-common.h (c_common_option_lang_mask,
c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
New.
(c_common_init_options): Update prototype.
* c-opts.c (c_common_option_lang_mask): New.
(c_common_initialize_diagnostics): Split out of
c_common_init_options.
(accept_all_c_family_options, c_common_complain_wrong_lang_p):
New.
(c_common_init_options): Update prototype. Use decoded options in
search for -lang-asm.
tree.h (DECL_CHAIN): Define. gcc/ * tree.h (DECL_CHAIN): Define. * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-decl.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/frv/frv.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/som.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimplify.c: Likewise. * integrate.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * omp-low.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-inline.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-object-size.c: Likewise. * tree-pretty-print.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-tailcall.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. gcc/c-family/ * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-format.c: Likewise. gcc/cp/ * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * call.c: Likewise. * class.c: Likewise. * cp-gimplify.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * init.c: Likewise. * mangle.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. gcc/java/ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * boehm.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. gcc/objc/ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN. gcc/testsuite/ * g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN with DECL_CHAIN. From-SVN: r162223
2010-07-15 16:31:28 +02:00
2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
* c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
* c-format.c: Likewise.
toplev.h: Do not include diagnostic-core.h. 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org> * toplev.h: Do not include diagnostic-core.h. Include diagnostic-core.h in every file that includes toplev.h. * c-tree.h: Do not include toplev.h. * pretty-print.h: Update comment. * Makefile.in: Update dependencies. * alias.c: Include diagnostic-core.h in every file that includes toplev.h. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/pe.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/cris/cris.c: Likewise. * config/crx/crx.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/h8300/h8300.c: Likewise. * config/host-darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/netware.c: Likewise. * config/i386/nwld.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/picochip/picochip.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/score/score.c: Likewise. * config/score/score3.c: Likewise. * config/score/score7.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-base.c: Likewise. * config/sh/symbian-c.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sol2-c.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * convert.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbxout.c: Likewise. * ddg.c: Likewise. * dominance.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * gimple-low.c: Likewise. * gimplify.c: Likewise. * graph.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * integrate.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-iv.c: Likewise. * lto-opts.c: Likewise. * lto-symtab.c: Likewise. * main.c: Likewise. * modulo-sched.c: Likewise. * optabs.c: Likewise. * params.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * simplify-rtx.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * targhooks.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-inline.c: Likewise. * tree-nomudflap.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-phinodes.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. * varasm.c: Likewise. * vec.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. c-family/ * c-common.h: Include diagnostic-core.h. Error if already included. * c-semantics.c: Do not define GCC_DIAG_STYLE here. cp/ * cp-tree.h: Do not include toplev.h. java/ * boehm.c: Include diagnostic-core.h in every file that includes toplev.h. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. ada/ * gcc-interface/utils.c: Include diagnostic-core.h in every file that includes toplev.h. lto/ * lto-coff.c: Include diagnostic-core.h in every file that includes toplev.h. * lto-elf.c: Likewise. * lto-lang.c: Likewise. * lto-macho.c: Likewise. From-SVN: r161943
2010-07-08 06:22:54 +02:00
2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-common.h: Include diagnostic-core.h. Error if already
included.
* c-semantics.c: Do not define GCC_DIAG_STYLE here.
2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-common.c (IN_GCC_FRONTEND): Do not undef.
Do not include expr.h
(vector_mode_valid_p): Move here.
2010-06-21 DJ Delorie <dj@redhat.com>
* c-pragma.c (handle_pragma_diagnostic): Add push/pop,
allow these pragmas anywhere.
2010-06-14 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/44509
* c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
(lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
(lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
ggc_strdup instead of xstrdup.
2010-06-10 Jakub Jelinek <jakub@redhat.com>
* c-cppbuiltin.c: Include cpp-id-data.h.
(lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
(lazy_hex_fp_value): New function.
(builtin_define_with_hex_fp_value): Provide definitions lazily.
2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-gimplify.c: Do not include tree-flow.h
re PR other/44034 (target hooks are hard to maintain) gcc: PR other/44034 * target.def, doc/tm.texi.in, genhooks.c: New files. * target.h: Instead of defining individual hook members, define DEFHOOKPOD / DEFHOOK / DEFHOOK_UNDOC / HOOKSTRUCT and include target.def. * target-def.h: Instead of defining individual hook initializers, include target-hooks-def.h. * df-scan.c, haifa-sched.c, sel-sched.c: Rename targetm members: targetm.live_on_entry -> targetm.extra_live_on_entry targetm.sched.md_finish ->targetm.sched.finish targetm.sched.md_init -> targetm.sched.init targetm.sched.md_init_global -> targetm.sched.init_global targetm.asm_out.unwind_label -> targetm.asm_out.emit_unwind_label targetm.asm_out.except_table_label -> targetm.asm_out.emit_except_table_label targetm.asm_out.visibility -> targetm.asm_out.assemble_visibility targetm.target_help -> targetm.help targetm.vectorize.builtin_support_vector_misalignment -> targetm.vectorize.support_vector_misalignment targetm.file_start_app_off -> targetm.asm_file_start_app_off targetm.file_start_file_directive -> targetm.asm_file_start_file_directive * dwarf2out.c, opts.c, tree-vect-data-refs.c, except.c: Likewise. * varasm.c, config/alpha/alpha.c, config/cris/cris.c: Likewise. * gcc/config/spu/spu.c, config/ia64/ia64.c: Rename target macros: TARGET_VECTOR_ALIGNMENT_REACHABLE -> TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE TARGET_SUPPORT_VECTOR_MISALIGNMENT -> TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT TARGET_UNWIND_EMIT -> TARGET_ASM_UNWIND_EMIT * config/rs6000/rs6000.c, config/arm/arm.c: Likewise. * Makefile.in (TARGET_H): Depend on target.def. (TARGET_DEF_H): Depend on target-hooks-def.h. (target-hooks-def.h, tm.texi, s-target-hooks-def-h): New rules. (s-tm-texi, build/genhooks.o, build/genhooks): Likewise. * doc/tm.texi: Regenerate. gcc/c-family: * c-common.c: Rename targetm member: targetm.enum_va_list -> targetm.enum_va_list_p gcc/po: * EXCLUDES: Add genhooks.c. Index: gcc/doc/tm.texi From-SVN: r161547
2010-06-29 20:22:00 +02:00
2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
PR other/44034
* c-common.c: Rename targetm member:
targetm.enum_va_list -> targetm.enum_va_list_p
2010-06-28 Anatoly Sokolov <aesok@post.ru>
* c-common.c (shorten_compare): Adjust call to force_fit_type_double.
system.h: Poison GCC_EXCEPT_H for front-end files. gcc/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * system.h: Poison GCC_EXCEPT_H for front-end files. * langhooks.h (struct lang_hooks): Add eh_protect_cleanup_actions langhook. * langhooks-def.h (LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS) New. Define to NULL by default. * except.h: Define GCC_EXCEPT_H. (doing_eh): Remove prototype. (init_eh, init_eh_for_function): Move prototypes to toplev.h. (lang_protect_cleanup_actions): Remove. * except.c (lang_protect_cleanup_actions): Remove. (doing_eh): Remove. (gen_eh_region): Don't check doing_eh here. * toplev.h (init_eh, init_eh_for_function_): Moved from except.h. * tree-eh.c (honor_protect_cleanup_actions): Use new langhook instead of lang_protect_cleanup_actions. * omp-low.c (maybe_catch_exception): Likewise. * Makefile.in: Update dependencies. gcc/c-family/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * c-cppbuiltin.c: Do not include except.h. gcc/objc/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * objc-act.c: Do not include except.h. gcc/cp/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * init.c: Do not include except.h. * decl.c: Likewise. * expr.c: Likewise. * cp-lang.c: Likewise. * pt.c: Likewise. * semantics.c: Likewise. * decl2.c: Likewise. * except.c: Likewise. (init_exception_processing): Do not set the removed lang_protect_cleanup_actions here. (cp_protect_cleanup_actions): Make non-static and remove prototype. (doing_eh): New, moved from except.c but removed the do_warning flag. (expand_start_catch_block): Update doing_eh call. (expand_end_catch_block): Likewise. (build_throw): Likewise. * cp-tree.h: Prototype cp_protect_cleanup_actions. * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to cp_protect_cleanup_actions. * Make-lang.in: Update dependencies. gcc/objcp/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * objcp-lang.c: Do not include except.h. * Make-lang.in: Update dependencies. gcc/java/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * lang.c: Do not include except.h * except.c: Likewise. (doing_eh): New, moved from except.c (in gcc/) but removed the do_warning flag. (maybe_start_try): Update doing_eh call. * Make-lang.in: Update dependencies. gcc/ada/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * gcc-interface/misc.c: Do not include except.h. * gcc-interface/Make-lang.in: Update dependencies. gcc/fortran/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * Make-lang.in: Update dependencies. From-SVN: r161484
2010-06-28 12:52:46 +02:00
2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
* c-cppbuiltin.c: Do not include except.h.
2010-06-24 Andi Kleen <ak@linux.intel.com>
* c-common.c (warn_for_omitted_condop): New.
* c-common.h (warn_for_omitted_condop): Add prototype.
2010-06-21 Joseph Myers <joseph@codesourcery.com>
* c.opt (lang-objc): Remove.
* c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
* c-opts.c: Include "tm_p.h".
re PR other/32998 (-frecord-gcc-switches issues) PR other/32998 * opth-gen.awk: Generate definitions of OPT_SPECIAL_unknown, OPT_SPECIAL_program_name and OPT_SPECIAL_input_file. * opts-common.c (find_opt): Return OPT_SPECIAL_unknown on failure. (decode_cmdline_option): Update for this return value. Set orig_option_with_args_text field. Set arg field for unknown options. Make static. (decode_cmdline_options_to_array): New. (prune_options): Update handling of find_opt return value. * opts.c (read_cmdline_option): Take decoded option. Return void. (read_cmdline_options): Take decoded options. (decode_options): Add parameters for decoded options. Use decode_cmdline_options_to_array. Use decoded options for -O scan. Use integral_argument for -O parameters. Update call to read_cmdline_options. (enable_warning_as_error): Update handling of find_opt return value. * opts.h: Update comment on unknown options. (struct cl_decoded_option): Update comments on opt_index and arg. Add orig_option_with_args_text. (decode_cmdline_option): Remove. (decode_cmdline_options_to_array): Declare. (decode_options): Update prototype. * toplev.c (save_argv): Remove. (save_decoded_options, save_decoded_options_count): New. (read_integral_parameter): Remove. (print_switch_values): Use decoded options. (toplev_main): Don't set save_argv. Update call to decode_options. * toplev.h (read_integral_parameter): Remove. * varasm.c (elf_record_gcc_switches): Don't handle holding back names. c-family: * c-common.c (parse_optimize_options): Update call to decode_options. fortran: * options.c (gfc_handle_option): Don't handle N_OPTS. testsuite: * gcc.dg/opts-2.c: New test. From-SVN: r161053
2010-06-20 23:02:46 +02:00
2010-06-20 Joseph Myers <joseph@codesourcery.com>
* c-common.c (parse_optimize_options): Update call to
decode_options.
2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
* c-common.c (record_types_used_by_current_var_decl): Adjust for
new type of types_used_by_cur_var_decl.
2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
PR bootstrap/44512
* c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
for C++ standard compliance.
2010-06-16 Jason Merrill <jason@redhat.com>
* c.opt: Add -Wnoexcept.
2010-06-16 Richard Guenther <rguenther@suse.de>
PR c/44555
* c-common.c (c_common_truthvalue_conversion): Remove
premature and wrong optimization concering ADDR_EXPRs.
2010-06-15 Arnaud Charlet <charlet@adacore.com>
* c-ada-spec.c (dump_sloc): Remove column info.
(is_simple_enum): New function.
(dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
enum types when relevant.
2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-common.c (conversion_warning): Warn at expression
location.
2010-06-10 Joseph Myers <joseph@codesourcery.com>
* c-opts.c (c_common_handle_option): Don't handle
OPT_fshow_column.
utils.c (init_gnat_to_gnu): Use typed GC allocation. gcc/ada: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC allocation. (init_dummy_type): Likewise. (gnat_pushlevel): Likewise. * gcc-interface/trans.c (Attribute_to_gnu): Likewise. (Subprogram_Body_to_gnu): Likewise. (Compilation_Unit_to_gnu): Likewise. (start_stmt_group): Likewise. (extract_encoding): Likewise. (decode_name): Likewise. * gcc-interface/misc.c (gnat_printable_name): Likewise. * gcc-interface/decl.c (annotate_value): Likewise. * gcc-interface/ada-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. (SET_TYPE_LANG_SPECIFIC): Use typed GC allocation. (SET_DECL_LANG_SPECIFIC): Likewise. gcc/c-family: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * c-pragma.c (push_alignment): Use typed GC allocation. (handle_pragma_push_options): Likewise. * c-common.c (parse_optimize_options): Likewise. * c-common.h (struct sorted_fields_type): Add variable_size GTY option. gcc/cp: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * typeck2.c (abstract_virtuals_error): Likewise. * pt.c (maybe_process_partial_specialization): Likewise. (register_specialization): Likewise. (add_pending_template): Likewise. (lookup_template_class): Likewise. (push_tinst_level): Likewise. * parser.c (cp_lexer_new_main): Likewise. (cp_lexer_new_from_tokens): Likewise. (cp_token_cache_new): Likewise. (cp_parser_context_new): Likewise. (cp_parser_new): Likewise. (cp_parser_nested_name_specifier_opt): Likewise. (cp_parser_template_id): Likewise. * name-lookup.c (binding_entry_make): Likewise. (binding_table_construct): Likewise. (binding_table_new): Likewise. (cxx_binding_make): Likewise. (pushdecl_maybe_friend): Likewise. (begin_scope): Likewise. (push_to_top_level): Likewise. * lex.c (init_reswords): Likewise. (retrofit_lang_decl): Likewise. (cxx_dup_lang_specific_decl): Likewise. (copy_lang_type): Likewise. (cxx_make_type): Likewise. * decl.c (make_label_decl): Likewise. (check_goto): Likewise. (start_preparsed_function): Likewise. (save_function_data): Likewise. * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise. * class.c (finish_struct_1): Likewise. * cp-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * parser.c (cp_parser_new): Update comment to not reference ggc_alloc. gcc/fortran: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * trans-types.c (gfc_get_nodesc_array_type): Use typed GC allocation. (gfc_get_array_type_bounds): Likewise. * trans-decl.c (gfc_allocate_lang_decl): Likewise. (gfc_find_module): Likewise. * f95-lang.c (pushlevel): Likewise. * trans.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. gcc/java: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation. * jcf-parse.c (java_parse_file): Likewise. (process_zip_dir): Likewise. * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise. (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise. * expr.c (add_type_assertion): Likewise. * decl.c (make_binding_level): Likewise. (java_dup_lang_specific_decl): Likewise. * constants.c (set_constant_entry): Likewise. (cpool_for_class): Likewise. * class.c (add_method_1): Likewise. (java_treetreehash_new): Likewise. * java-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * jch.h (struct cpool_entry): Likewise. * java-tree.h (java_treetreehash_create): Remove parameter ggc. * except.c (prepare_eh_table_type): Update java_treetreehash_create call. * class.c (add_method_1): Update java_treetreehash_create call. (java_treetreehash_create): Remove parameter gc. Use htab_create_ggc. gcc/lto: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * lto.c (lto_read_in_decl_state): Use typed GC allocation. (lto_file_read): Likewise. (new_partition): Likewise. (read_cgraph_and_symbols): Likewise. gcc/objc: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. * objc-act.c (objc_volatilize_decl): Likewise. (objc_build_string_object): Likewise. (hash_init): Likewise. (hash_enter): Likewise. (hash_add_attr): Likewise. (add_class): Likewise. (start_class): Likewise. gcc/objcp: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * objcp-decl.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. gcc: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * doc/tm.texi (Per-Function Data): Do not reference ggc_alloc. * doc/gty.texi (GTY Options): Document typed GC allocation and variable_size GTY option. * ggc-internal.h: New. * ggc.h: Update copyright year. (digit_string): Move to stringpool.c. (ggc_mark_stringpool, ggc_purge_stringpool, ggc_mark_roots) (gt_pch_save_stringpool, gt_pch_fixup_stringpool) (gt_pach_restore_stringpool, gt_pch_p_S, gt_pch_note_object) (init_ggc_pch, ggc_pch_count_object, ggc_pch_total_size) (ggc_pch_this_base, ggc_pch_alloc_object, ggc_pch_prepare_write) (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read) (ggc_force_collect, ggc_get_size, ggc_statistics) (ggc_print_common_statistics): Move to ggc-internal.h. (digit_vector, new_ggc_zone, destroy_ggc_zone, ggc_alloc_stat) (ggc_alloc, ggc_alloc_cleared, ggc_realloc, ggc_calloc, GGC_NEW) (GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, ggc_alloc_rtvec) (ggc_alloc_tree, gt_pch_save, ggc_min_expand_heuristic) (ggc_min_heapsize_heuristic, ggc_alloc_zone) (ggc_alloc_zone_pass_stat): Remove. (ggc_internal_alloc_stat, ggc_internal_alloc) (ggc_internal_cleared_alloc_stat): New. (GGC_RESIZEVEC, GGC_RESIZEVAR): Redefine. (ggc_internal_vec_alloc_stat) (ggc_internal_cleared_vec_alloc_stat) (ggc_internal_vec_alloc_stat, ggc_internal_cleared_vec_alloc) (ggc_alloc_atomic_stat, ggc_alloc_atomic) (ggc_alloc_cleared_atomic, ggc_cleared_alloc_htab_ignore_args) (ggc_cleared_alloc_ptr_array_two_args): New. (htab_create_ggc, splay_tree_new_ggc): Redefine. (ggc_splay_alloc): Change the type of the first argument to enum gt_types_enum. (ggc_alloc_string): Make macro. (ggc_alloc_string_stat): New. (ggc_strdup): Redefine. (rtl_zone, tree_zone, tree_id_zone): Declare unconditionally. (ggc_alloc_rtvec_sized): New. (ggc_alloc_zone_stat): Rename to ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat, ggc_internal_alloc_zone_stat) (ggc_internal_cleared_alloc_zone_stat) (ggc_internal_zone_alloc_stat) (ggc_internal_zone_cleared_alloc_stat) (ggc_internal_zone_vec_alloc_stat) (ggc_alloc_zone_rtx_def_stat) (ggc_alloc_zone_tree_node_stat) (ggc_alloc_zone_cleared_tree_node_stat) (ggc_alloc_cleared_gimple_statement_d_stat): New. * ggc-common.c: Include ggc-internal.h. (ggc_internal_cleared_alloc_stat): Rename from ggc_alloc_cleared_stat. (ggc_realloc_stat): Use ggc_internal_alloc_stat. (ggc_calloc): Remove. (ggc_cleared_alloc_htab_ignore_args): New. (ggc_cleared_alloc_ptr_array_two_args): New. (ggc_splay_alloc): Add obj_type parameter. (init_ggc_heuristics): Formatting fixes. * ggc-none.c: Update copyright year. (ggc_alloc_stat): Rename to ggc_alloc_stat. (ggc_alloc_cleared_stat): Rename to ggc_internal_cleared_alloc_stat. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-page.c: Update copyright year. Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_typed_stat): Call ggc_internal_alloc_stat. (ggc_alloc_stat): Rename to ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-zone.c: Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_zone_stat): ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat): New. (ggc_internal_cleared_alloc_zone_stat): New. (ggc_alloc_typed_stat): Use ggc_internal_alloc_zone_pass_stat. (ggc_alloc_stat): Rename ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. * stringpool.c: Update copyright year. Include ggc-internal.h (digit_vector): Make static. (digit_string): Moved from ggc.h. (stringpool_ggc_alloc): Use ggc_alloc_atomic. (ggc_alloc_string): Rename to ggc_alloc_string_stat. * Makefile.in (GGC_INTERNAL_H): New. (ggc_common.o, ggc-page.o, ggc-zone.o, stringpool.o): Add $(GGC_INTERNAL_H) to dependencies. * gentype.c: Update copyright year. (walk_type): Accept variable_size GTY option. (USED_BY_TYPED_GC_P): New macro. (write_enum_defn): Use USED_BY_TYPED_GC_P. Do not output whitespace at the end of strings. (get_type_specifier, variable_size_p): New functions. (alloc_quantity, alloc_zone): New enums. (write_typed_alloc_def): New function. (write_typed_struct_alloc_def): Likewise. (write_typed_typed_typedef_alloc_def): Likewise. (write_typed_alloc_defns): Likewise. (output_typename, write_splay_tree_allocator_def): Likewise. (write_splay_tree_allocators): Likewise. (main): Call write_typed_alloc_defns and write_splay_tree_allocators. * lto-streamer.h (lto_file_decl_data_ptr): New. * passes.c (order): Define using cgraph_node_ptr. * strinpool.c (struct string_pool_data): Declare nested_ptr using ht_identifier_ptr. * gimple.h (union gimple_statement_d): Likewise. * rtl.h (struct rtx_def): Likewise. (struct rtvec_def): Likewise. * tree.h (union tree_node): Likewise. * tree-ssa-operands.h (struct ssa_operand_memory_d): Likewise. * cfgloop.c (record_loop_exits): Use htab_create_ggc. * tree-scalar-evolution.c (scev_initialize): Likewise. * alias.c (record_alias_subset): Update splay_tree_new_ggc call. * dwarf2asm.c (dw2_force_const_mem): Likewise. * omp-low.c (lower_omp_critical): Likewise. * bitmap.h (struct bitmap_head_def): Update comment to not reference ggc_alloc. * config/pa/pa.c (get_deferred_label): Use GGC_RESIZEVEC. * ira.c (fix_reg_equiv_init): Use GGC_RESIZEVEC. * ipa-prop.c (duplicate_ggc_array): Rename to duplicate_ipa_jump_func_array. Use typed GC allocation. (ipa_edge_duplication_hook): Call duplicate_ipa_jump_func_array. * gimple.c (gimple_alloc_stat): Use ggc_alloc_cleared_gimple_statement_d_stat. * varasm.c (create_block_symbol): Use ggc_alloc_zone_rtx_def. * tree.c (make_node_stat): Use ggc_alloc_zone_cleared_tree_node_stat. (make_tree_vec_stat): Likewise. (build_vl_exp_stat): Likewise. (copy_node_stat): Use ggc_alloc_zone_tree_node_stat. (make_tree_binfo_stat): Likewise. (tree_cons_stat): Likewise. * rtl.c (rtx_alloc_stat): Use ggc_alloc_zone_rtx_def_stat. (shallow_copy_rtx_stat): Likewise. (make_node_stat): Likewise. * lto-symtab.c: Fix comment. * tree-cfg.c (create_bb): Update comment to not reference ggc_alloc_cleared. * tree-ssa-structalias.c (struct heapvar_for_stmt): Fix param_is value. * varpool.c (varpool_node): Use typed GC allocation. (varpool_extra_name_alias): Likewise. * varasm.c (emutls_decl): Likewise. (get_unnamed_section): Likewise. (get_noswitch_section): Likewise. (get_section): Likewise. (get_block_for_section): Likewise. (build_constant_desc): Likewise. (create_constant_pool): Likewise. (force_const_mem): Likewise. * tree.c (build_vl_exp_stat): Likewise. (build_real): Likewise. (build_string): Likewise. (decl_debug_expr_insert): Likewise. (decl_value_expr_insert): Likewise. (type_hash_add): Likewise. (build_omp_clause): Likewise. * tree-ssanames.c (duplicate_ssa_name_ptr_info): Likewise. * tree-ssa.c (init_tree_ssa): Likewise. * tree-ssa-structalias.c (heapvar_insert): Likewise. * tree-ssa-operands.c (ssa_operand_alloc): Likewise. * tree-ssa-loop-niter.c (record_estimate): Likewise. * tree-ssa-alias.c (get_ptr_info): Likewise. * tree-scalar-evolution.c (new_scev_info_str): Likewise. * tree-phinodes.c (allocate_phi_node): Likewise. * tree-iterator.c (tsi_link_before): Likewise. (tsi_link_after): Likewise. * tree-eh.c (add_stmt_to_eh_lp_fn): Likewise. * tree-dfa.c (create_var_ann): Likewise. * tree-cfg.c (create_bb): Likewise. * toplev.c (alloc_for_identifier_to_locale): Likewise. (general_init): Likewise. * stringpool.c (stringpool_ggc_alloc): Likewise. (gt_pch_save_stringpool): Likewise. * sese.c (if_region_set_false_region): Likewise. * passes.c (do_per_function_toporder): Likewise. * optabs.c (set_optab_libfunc): Likewise. (set_conv_libfunc): Likewise. * lto-symtab.c (lto_symtab_register_decl): Likewise. * lto-streamer-in.c (lto_input_eh_catch_list): Likewise. (input_eh_region): Likewise. (input_eh_lp): Likewise. (make_new_block): Likewise. (unpack_ts_real_cst_value_fields): Likewise. * lto-section-in.c (lto_new_in_decl_state): Likewise. * lto-cgraph.c (input_node_opt_summary): Likewise. * loop-init.c (loop_optimizer_init): Likewise. * lambda.h (lambda_vector_new): Likewise. * lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise. * ira.c (update_equiv_regs): Likewise. * ipa.c (cgraph_node_set_new): Likewise. (cgraph_node_set_add): Likewise. (varpool_node_set_new): Likewise. (varpool_node_set_add): Likewise. * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise. (duplicate_ipa_jump_func_array): Likewise. (ipa_read_node_info): Likewise. * ipa-cp.c (ipcp_create_replace_map): Likewise. * integrate.c (get_hard_reg_initial_val): Likewise. * gimple.c (gimple_alloc_stat): Likewise. (gimple_build_omp_for): Likewise. (gimple_seq_alloc): Likewise. (gimple_copy): Likewise. * gimple-iterator.c (gsi_insert_before_without_update): Likewise. (gsi_insert_after_without_update): Likewise. * function.c (add_frame_space): Likewise. (insert_temp_slot_address): Likewise. (assign_stack_temp_for_type): Likewise. (allocate_struct_function): Likewise. (types_used_by_var_decl_insert): Likewise. * except.c (init_eh_for_function): Likewise. (gen_eh_region): Likewise. (gen_eh_region_catch): Likewise. (gen_eh_landing_pad): Likewise. (add_call_site): Likewise. * emit-rtl.c (get_mem_attrs): Likewise. (get_reg_attrs): Likewise. (start_sequence): Likewise. (init_emit): Likewise. * dwarf2out.c (new_cfi): Likewise. (queue_reg_save): Likewise. (dwarf2out_frame_init): Likewise. (new_loc_descr): Likewise. (find_AT_string): Likewise. (new_die): Likewise. (add_var_loc_to_decl): Likewise. (clone_die): Likewise. (clone_as_declaration): Likewise. (break_out_comdat_types): Likewise. (new_loc_list): Likewise. (loc_descriptor): Likewise. (add_loc_descr_to_each): Likewise. (add_const_value_attribute): Likewise. (tree_add_const_value_attribute): Likewise. (add_comp_dir_attribute): Likewise. (add_name_and_src_coords_attributes): Likewise. (lookup_filename): Likewise. (store_vcall_insn): Likewise. (dwarf2out_init): Likewise. * dbxout.c (dbxout_init): Likewise. * config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise. * config/sparc/sparc.c (sparc_init_machine_status): Likewise. * config/score/score7.c (score7_output_external): Likewise. * config/score/score3.c (score3_output_external): Likewise. * config/s390/s390.c (s390_init_machine_status): Likewise. * config/rs6000/rs6000.c (builtin_function_type): Likewise. (rs6000_init_machine_status): Likewise. (output_toc): Likewise. * config/pa/pa.c (pa_init_machine_status): Likewise. (get_deferred_plabel): Likewise. * config/moxie/moxie.c (moxie_init_machine_status): Likewise. * config/mmix/mmix.c (mmix_init_machine_status): Likewise. * config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise. * config/mep/mep.c (mep_init_machine_status): Likewise. (mep_note_pragma_flag): Likewise. * config/m32c/m32c.c (m32c_init_machine_status): Likewise. * config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise. * config/ia64/ia64.c (ia64_init_machine_status): Likewise. * config/i386/winnt.c (i386_pe_record_external_function): Likewise. (i386_pe_maybe_record_exported_symbol): Likewise. * config/i386/i386.c (get_dllimport_decl): Likewise. (ix86_init_machine_status): Likewise. (assign_386_stack_local): Likewise. * config/frv/frv.c (frv_init_machine_status): Likewise. * config/darwin.c (machopic_indirection_name): Likewise. * config/cris/cris.c (cris_init_machine_status): Likewise. * config/bfin/bfin.c (bfin_init_machine_status): Likewise. * config/avr/avr.c (avr_init_machine_status): Likewise. * config/arm/arm.c (arm_init_machine_status): Likewise. * config/alpha/alpha.c (alpha_init_machine_status): Likewise. (alpha_need_linkage): Likewise. (alpha_use_linkage): Likewise. * cgraph.c (cgraph_allocate_node): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_create_indirect_edge): Likewise. (cgraph_add_asm_node): Likewise. * cfgrtl.c (init_rtl_bb_info): Likewise. * cfgloop.c (alloc_loop): Likewise. (rescan_loop_exit): Likewise. * cfg.c (init_flow): Likewise. (alloc_block): Likewise. (unchecked_make_edge): Likewise. * c-parser.c (c_parse_init): Likewise. (c_parse_file): Likewise. * c-decl.c (bind): Likewise. (record_inline_static): Likewise. (push_scope): Likewise. (make_label): Likewise. (lookup_label_for_goto): Likewise. (finish_struct): Likewise. (finish_enum): Likewise. (c_push_function_context): Likewise. * bitmap.c (bitmap_element_allocate): Likewise. (bitmap_gc_alloc_stat): Likewise. * alias.c (record_alias_subset): Likewise. (init_alias_analysis): Likewise. include: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * splay-tree.h: Update copyright years. (splay_tree_s): Document fields. (splay_tree_new_typed_alloc): New. * hashtab.h: Update copyright years. (htab_create_typed_alloc): New. libcpp: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * include/symtab.h (ht_identifier_ptr): New. libiberty: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * splay-tree.c: Update copyright years. (splay_tree_new_typed_alloc): New. (splay_tree_new_with_allocator): Use it. * hashtab.c: Update copyright years. (htab_create_typed_alloc): New. (htab_create_alloc): Use it. * functions.texi: Regenerate. From-SVN: r160425
2010-06-08 09:25:24 +02:00
2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* c-pragma.c (push_alignment): Use typed GC allocation.
(handle_pragma_push_options): Likewise.
* c-common.c (parse_optimize_options): Likewise.
* c-common.h (struct sorted_fields_type): Add variable_size GTY
option.
common.opt (fira-verbose): Use Var. * common.opt (fira-verbose): Use Var. (fpcc-struct-return): Use Init instead of VarExists. * defaults.h (DEFAULT_PCC_STRUCT_RETURN): Move definition from toplev.c. * flags.h (flag_signed_char, flag_short_enums, flag_pcc_struct_return, flag_ira_verbose, flag_detailed_statistics, flag_remove_unreachable_functions): Remove. * toplev.c (flag_detailed_statistics, flag_signed_char, flag_short_enums, flag_pcc_struct_return, flag_ira_verbose): Remove. (DEFAULT_PCC_STRUCT_RETURN): Move definition to defaults.h. * toplev.h (flag_crossjumping, flag_if_conversion, flag_if_conversion2, flag_keep_static_consts, flag_peel_loops, flag_rerun_cse_after_loop, flag_thread_jumps, flag_tracer, flag_unroll_loops, flag_unroll_all_loops, flag_unswitch_loops, flag_cprop_registers, time_report, flag_ira_loop_pressure, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): Remove. c-family: * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin, flag_no_nonansi_builtin, flag_short_double, flag_short_wchar, flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm, flag_signed_bitfields, warn_strict_null_sentinel, flag_nil_receivers, flag_zero_link, flag_replace_objc_classes, flag_gen_declaration, flag_no_gnu_keywords, flag_implement_inlines, flag_implicit_templates, flag_implicit_inline_templates, flag_optional_diags, flag_elide_constructors, flag_default_inline, flag_rtti, flag_conserve_space, flag_access_control, flag_check_new, flag_new_for_scope, flag_weak, flag_working_directory, flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs, flag_threadsafe_statics, flag_pretty_templates): Remove. * c-common.h (flag_preprocess_only, flag_nil_receivers, flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link, flag_replace_objc_classes, flag_undef, flag_no_builtin, flag_no_nonansi_builtin, flag_short_double, flag_short_wchar, flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm, flag_const_strings, flag_signed_bitfields, flag_gen_declaration, flag_no_gnu_keywords, flag_implement_inlines, flag_implicit_templates, flag_implicit_inline_templates, flag_optional_diags, flag_elide_constructors, flag_default_inline, flag_rtti, flag_conserve_space, flag_access_control, flag_check_new, flag_new_for_scope, flag_weak, flag_working_directory, flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs, flag_threadsafe_statics, flag_pretty_templates, warn_strict_null_sentinel): Remove. * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm, fbuiltin, fcheck-new, fconserve-space, felide-constructors, fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines, fimplicit-inline-templates, fimplicit-templates, flax-vector-conversions, fms-extensions, fnil-receivers, fnonansi-builtins, fpretty-templates, freplace-objc-classes, frtti, fshort-double, fshort-enums, fshort-wchar, fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics, funsigned-bitfields, funsigned-char, fuse-cxa-atexit, fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link, gen-decls, undef): Use Var. (fdefault-inline, foptional-diags): Document as doing nothing. * c-opts.c (c_common_handle_option): Remove cases for options now using Var. Mark ignored options as such. fortran: * lang.opt (fshort-enums): Define using Var and VarExists. * options.c (gfc_handle_option): Don't set flag_short_enums here. lto: * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove. (lto_handle_option): Don't set flag_signed_char here. From-SVN: r160384
2010-06-07 18:46:23 +02:00
2010-06-07 Joseph Myers <joseph@codesourcery.com>
* c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
flag_signed_bitfields, warn_strict_null_sentinel,
flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
flag_gen_declaration, flag_no_gnu_keywords,
flag_implement_inlines, flag_implicit_templates,
flag_implicit_inline_templates, flag_optional_diags,
flag_elide_constructors, flag_default_inline, flag_rtti,
flag_conserve_space, flag_access_control, flag_check_new,
flag_new_for_scope, flag_weak, flag_working_directory,
flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
flag_enforce_eh_specs, flag_threadsafe_statics,
flag_pretty_templates): Remove.
* c-common.h (flag_preprocess_only, flag_nil_receivers,
flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
flag_replace_objc_classes, flag_undef, flag_no_builtin,
flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
flag_no_gnu_keywords, flag_implement_inlines,
flag_implicit_templates, flag_implicit_inline_templates,
flag_optional_diags, flag_elide_constructors, flag_default_inline,
flag_rtti, flag_conserve_space, flag_access_control,
flag_check_new, flag_new_for_scope, flag_weak,
flag_working_directory, flag_use_cxa_atexit,
flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
flag_threadsafe_statics, flag_pretty_templates,
warn_strict_null_sentinel): Remove.
* c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
fbuiltin, fcheck-new, fconserve-space, felide-constructors,
fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
fimplicit-inline-templates, fimplicit-templates,
flax-vector-conversions, fms-extensions, fnil-receivers,
fnonansi-builtins, fpretty-templates, freplace-objc-classes,
frtti, fshort-double, fshort-enums, fshort-wchar,
fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
gen-decls, undef): Use Var.
(fdefault-inline, foptional-diags): Document as doing nothing.
* c-opts.c (c_common_handle_option): Remove cases for options now
using Var. Mark ignored options as such.
c-common.c: Move to c-family/. gcc/ChangeLog: * c-common.c: Move to c-family/. * c-common.def: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-format.h : Likewise. * c-gimplify.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c.opt: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pragma.h: Likewise. * c-pretty-print.c: Likewise. * c-pretty-print.h: Likewise. * c-semantics.c: Likewise. * stub-objc.c: Likewise. * gengtype.c (get_file_langdir): Special-case files in c-family/. (get_output_file_with_visibility): Fix name for c-common.h. * c-config-lang.in: Update paths in gtfiles for files in c-family/. * c-tree.h: Update include path for moved files. * c-lang.c: Likewise. * c-lang.h: Likewise. * c-parser.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-objc-common.c: Likewise. * configure.ac: Make sure c-family/ exists in the build directory. * configure: Regenerate. * Makefile.in: Update paths for moved files. Regroup files per location and update dependencies. Move generated_files down after ALL_GTFILES_H. * config/spu/spu-c.c: Update paths for moved files. * config/mep/mep-pragma.c: Likewise. * config/darwin-c.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/i386-c.c: Likewise. * config/avr/avr-c.c: Likewise. * config/sol2-c.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/arm-c.c: Likewise. * config/h8300/h8300.c: Likewise. * config/v850/v850-c.c: Likewise. * config/t-darwin: Fix dependencies for moved files. * config/t-sol2: Fix dependencies for moved files. * config/mep/t-mep: Fix dependencies for moved files. * config/ia64/t-ia64: Fix dependencies for moved files. * config/rs6000/t-rs6000: Fix dependencies for moved files. * config/v850/t-v850: Fix dependencies for moved files. * config/v850/t-v850e: Fix dependencies for moved files. * config/m32c/m32c-pragma.c * po/exgettext: Look in c-family/ also. c-family/ChangeLog: * c-common.c: Include gt-c-family-c-common.h. * c-pragma.c: Include gt-c-family-c-pragma.h. objc/ChangeLog: * objc-act.c: Update include path for moved files. * objc-lang.c: Likewise. * config-lang.in: Update paths in gtfiles for files in c-family/. objcp/ChangeLog: * objcp-lang.c: Update include path for moved files. * config-lang.in: Update paths in gtfiles for files in c-family/. cp/ChangeLog: * typeck.c: Update include path for moved files. * decl.c: Likewise. * rtti.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * pt.c: Likewise. * semantics.c: Likewise. * cxx-pretty-print.h: Likewise. * decl2.c: Likewise. * parser.c: Likewise. * cp-objcp-common.c: Likewise. * cp-tree.h: Likewise. * name-lookup.c: Likewise. * lex.c: Likewise. * name-lookup.h: Likewise. * config-lang.in: Update paths in gtfiles for files in c-family/. * Make-lang.in: Likewise. From-SVN: r160330
2010-06-05 22:33:22 +02:00
2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
* c-common.c: Moved to here from parent directory.
c-common.c: Move to c-family/. gcc/ChangeLog: * c-common.c: Move to c-family/. * c-common.def: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-format.h : Likewise. * c-gimplify.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c.opt: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pragma.h: Likewise. * c-pretty-print.c: Likewise. * c-pretty-print.h: Likewise. * c-semantics.c: Likewise. * stub-objc.c: Likewise. * gengtype.c (get_file_langdir): Special-case files in c-family/. (get_output_file_with_visibility): Fix name for c-common.h. * c-config-lang.in: Update paths in gtfiles for files in c-family/. * c-tree.h: Update include path for moved files. * c-lang.c: Likewise. * c-lang.h: Likewise. * c-parser.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-objc-common.c: Likewise. * configure.ac: Make sure c-family/ exists in the build directory. * configure: Regenerate. * Makefile.in: Update paths for moved files. Regroup files per location and update dependencies. Move generated_files down after ALL_GTFILES_H. * config/spu/spu-c.c: Update paths for moved files. * config/mep/mep-pragma.c: Likewise. * config/darwin-c.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/i386-c.c: Likewise. * config/avr/avr-c.c: Likewise. * config/sol2-c.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/arm-c.c: Likewise. * config/h8300/h8300.c: Likewise. * config/v850/v850-c.c: Likewise. * config/t-darwin: Fix dependencies for moved files. * config/t-sol2: Fix dependencies for moved files. * config/mep/t-mep: Fix dependencies for moved files. * config/ia64/t-ia64: Fix dependencies for moved files. * config/rs6000/t-rs6000: Fix dependencies for moved files. * config/v850/t-v850: Fix dependencies for moved files. * config/v850/t-v850e: Fix dependencies for moved files. * config/m32c/m32c-pragma.c * po/exgettext: Look in c-family/ also. c-family/ChangeLog: * c-common.c: Include gt-c-family-c-common.h. * c-pragma.c: Include gt-c-family-c-pragma.h. objc/ChangeLog: * objc-act.c: Update include path for moved files. * objc-lang.c: Likewise. * config-lang.in: Update paths in gtfiles for files in c-family/. objcp/ChangeLog: * objcp-lang.c: Update include path for moved files. * config-lang.in: Update paths in gtfiles for files in c-family/. cp/ChangeLog: * typeck.c: Update include path for moved files. * decl.c: Likewise. * rtti.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * pt.c: Likewise. * semantics.c: Likewise. * cxx-pretty-print.h: Likewise. * decl2.c: Likewise. * parser.c: Likewise. * cp-objcp-common.c: Likewise. * cp-tree.h: Likewise. * name-lookup.c: Likewise. * lex.c: Likewise. * name-lookup.h: Likewise. * config-lang.in: Update paths in gtfiles for files in c-family/. * Make-lang.in: Likewise. From-SVN: r160330
2010-06-05 22:33:22 +02:00
* c-common.def: Likewise.
* c-common.h: Likewise.
* c-cppbuiltin.c: Likewise.
* c-dump.c: Likewise.
* c-format.c: Likewise.
* c-format.h : Likewise.
* c-gimplify.c: Likewise.
* c-lex.c: Likewise.
* c-omp.c: Likewise.
* c.opt: Likewise.
* c-opts.c: Likewise.
* c-pch.c: Likewise.
* c-ppoutput.c: Likewise.
* c-pragma.c: Likewise.
* c-pragma.h: Likewise.
* c-pretty-print.c: Likewise.
* c-pretty-print.h: Likewise.
* c-semantics.c: Likewise.
* stub-objc.c: Likewise.
* c-common.c: Include gt-c-family-c-common.h.
* c-pragma.c: Include gt-c-family-c-pragma.h.
Copyright (C) 2010-2017 Free Software Foundation, Inc.
c-common.c: Move to c-family/. gcc/ChangeLog: * c-common.c: Move to c-family/. * c-common.def: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-format.h : Likewise. * c-gimplify.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c.opt: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pragma.h: Likewise. * c-pretty-print.c: Likewise. * c-pretty-print.h: Likewise. * c-semantics.c: Likewise. * stub-objc.c: Likewise. * gengtype.c (get_file_langdir): Special-case files in c-family/. (get_output_file_with_visibility): Fix name for c-common.h. * c-config-lang.in: Update paths in gtfiles for files in c-family/. * c-tree.h: Update include path for moved files. * c-lang.c: Likewise. * c-lang.h: Likewise. * c-parser.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-objc-common.c: Likewise. * configure.ac: Make sure c-family/ exists in the build directory. * configure: Regenerate. * Makefile.in: Update paths for moved files. Regroup files per location and update dependencies. Move generated_files down after ALL_GTFILES_H. * config/spu/spu-c.c: Update paths for moved files. * config/mep/mep-pragma.c: Likewise. * config/darwin-c.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/i386-c.c: Likewise. * config/avr/avr-c.c: Likewise. * config/sol2-c.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/arm-c.c: Likewise. * config/h8300/h8300.c: Likewise. * config/v850/v850-c.c: Likewise. * config/t-darwin: Fix dependencies for moved files. * config/t-sol2: Fix dependencies for moved files. * config/mep/t-mep: Fix dependencies for moved files. * config/ia64/t-ia64: Fix dependencies for moved files. * config/rs6000/t-rs6000: Fix dependencies for moved files. * config/v850/t-v850: Fix dependencies for moved files. * config/v850/t-v850e: Fix dependencies for moved files. * config/m32c/m32c-pragma.c * po/exgettext: Look in c-family/ also. c-family/ChangeLog: * c-common.c: Include gt-c-family-c-common.h. * c-pragma.c: Include gt-c-family-c-pragma.h. objc/ChangeLog: * objc-act.c: Update include path for moved files. * objc-lang.c: Likewise. * config-lang.in: Update paths in gtfiles for files in c-family/. objcp/ChangeLog: * objcp-lang.c: Update include path for moved files. * config-lang.in: Update paths in gtfiles for files in c-family/. cp/ChangeLog: * typeck.c: Update include path for moved files. * decl.c: Likewise. * rtti.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * pt.c: Likewise. * semantics.c: Likewise. * cxx-pretty-print.h: Likewise. * decl2.c: Likewise. * parser.c: Likewise. * cp-objcp-common.c: Likewise. * cp-tree.h: Likewise. * name-lookup.c: Likewise. * lex.c: Likewise. * name-lookup.h: Likewise. * config-lang.in: Update paths in gtfiles for files in c-family/. * Make-lang.in: Likewise. From-SVN: r160330
2010-06-05 22:33:22 +02:00
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.