Commit Graph

1017 Commits

Author SHA1 Message Date
Rafael Espindola 12753674ec really remove signed(_or_unsigned)?_type langhooks
From-SVN: r125621
2007-06-11 15:40:55 +00:00
Tom Tromey 0da300cde3 c-decl.c (grokdeclarator): Added 'deprecated_state' argument.
* c-decl.c (grokdeclarator): Added 'deprecated_state' argument.
	(deprecated_state): Removed.
	(start_decl): Update.
	(enum deprecated_states): Moved earlier.
	(groktypename): Update.
	(push_parm_decl): Likewise.
	(grokfield): Likewise.
	(start_function): Likewise.

From-SVN: r125593
2007-06-09 16:48:47 +00:00
Tom Tromey 7114359fb6 c-tree.h (start_enum): Update.
* c-tree.h (start_enum): Update.
	(build_enumerator): Likewise.
	* c-decl.c (enum_next_value): Removed.
	(enum_overflow): Likewise.
	(start_enum): Add c_enum_contents argument.  Don't use globals.
	(build_enumerator): Likewise.
	* c-tree.h (struct c_enum_contents): New struct.

From-SVN: r125322
2007-06-04 23:19:19 +00:00
Manuel López-Ibáñez ffd5f27613 re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)
2006-05-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR middle-end/7651
	* doc/invoke.texi (Wreturn-type): Complete description.
	(Wextra): Delete item about return-type warning.
	* c-decl.c: Delete redundant Wextra warning.

testsuite/
	* gcc.dg/20030906-1.c: Replace Wextra with Wreturn-type.
	* gcc.dg/20030906-2.c: Likewise.
	* objc.dg/method-17.m: Add -Wreturn-type.
	* obj-c++.dg/method-21.mm: Likewise.

From-SVN: r124866
2007-05-20 00:45:58 +00:00
Rafael Avila de Espindola ca5ba2a3ea c-common.c (warnings_for_convert_and_check): Use unsigned_type_for instead of c_common_unsigned_type.
gcc/
       * c-common.c (warnings_for_convert_and_check): Use unsigned_type_for
       instead of c_common_unsigned_type.
       (c_common_unsigned_type): Remove.
       (shorten_compare): Use c_common_signed_or_unsigned_type instead of
       c_common_unsigned_type.
       (c_common_nodes_and_builtins): Use unsigned_type_for instead of
       c_common_unsigned_type.
       * c-common.h (c_common_unsigned_type): Remove.
       * c-decl.c (grokdeclarator): Use unsigned_type_for instead of
       c_common_unsigned_type.
       * c-format.c (check_format_types): Use unsigned_type_for instead of
       c_common_unsigned_type.
       * c-objc-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * c-typeck.c (convert_for_assignment): Use unsigned_type_for instead of
       c_common_unsigned_type.
       * convert.c (convert_to_integer): Use unsigned_type_for instead of
       lang_hooks.types.unsigned_type.
       * expmed.c (make_tree): Use unsigned_type_for instead of
       lang_hooks.types.unsigned_type.
       * fold-const.c (fold_negate_expr): Use unsigned_type_for instead of
       lang_hooks.types.unsigned_type.
       (build_range_check): Likewise.
       (fold_unary): Likewise.
       (fold_binary): Likewise.
       (fold_ternary): Likewise.
       * langhooks-def.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * langhooks.h (lang_hooks_for_types): Remove unsigned_type.
       * tree.c (get_unsigned_type): New.
       (unsigned_type_for): Use get_unsigned_type instead of
       lang_hooks.types.unsigned_type

gcc/ada
       * misc.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.

gcc/cp
       * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * decl.c (grokdeclarator): Use unsigned_type_for instead of
       c_common_unsigned_type.

gcc/fortran
       * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
       instead of gfc_unsigned_type.
       * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
       gfc_unsigned_type.
       * trans-types.c (gfc_unsigned_type): Remove.
       * trans-types.h (gfc_unsigned_type): Remove.

gcc/java
       * expr.c (build_java_binop): Use unsigned_type_for instead of
       java_unsigned_type.
       * java-tree.h (java_unsigned_type): Remove.
       * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * typeck.c (java_unsigned_type): Remove.

gcc/treelang
       * treetree.c (tree_lang_unsigned_type): Remove.
       (LANG_HOOKS_UNSIGNED_TYPE): Remove.

From-SVN: r124715
2007-05-14 14:37:17 +00:00
Jan Hubicka 7be8227904 semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
* semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
	* decl2.c (start_objects): ctors and dtors are no longer public.
	(cp_write_global_declarations): Do not call c_build_cdtor_fns.

	* cgraphunit.c: Include gt-cgraphunit.h
	(static_ctors, static_dtors): New static vars.
	(record_cdtor_fn, build_cdtor, cgraph_build_cdtor_fns): New functions,
	based on implementation in c-common.c
	(cgraph_finalize_function): Call record_cdtor_fn.
	(cgraph_optimize): Call cgraph_build_cdtor_fns.
	* decl.c (finish_function): Do not call c_record_cdtor_fn.
	(c_write_global_declarations): Do not call c_build_cdtor_fns.
	* c-common.c (static_ctors, static_dtors, c_record_cdtor_fn,
	build_cdtor, c_build_cdtor_fns): Remove.
	* c-common.h (static_ctors, static_dtors, c_record_cdtor_fn,
	c_build_cdtor_fns): Remove prototype.

From-SVN: r124618
2007-05-11 12:18:17 +00:00
Andrew Pinski 3d95caa4af tree.h (GIMPLE_TUPLE_P): Also true for PHI_NODEs.
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * tree.h (GIMPLE_TUPLE_P): Also true for PHI_NODEs.
        (GENERIC_NEXT): New function macro.
        (PHI_CHAIN): Use phi_node's new chain variable.
        (tree_phi_node): Change tree_common to tree_base
        and add the chain field.
        * tree-phinodes.c (make_phi_node): Don't set
        TREE_TYPE on the new node.
        * c-decl.c (lang_tree_node): Use GENERIC_NEXT
        instead of checking GIMPLE_TUPLE_P in chain_next.
        * tree-vect-transform.c
        (get_initial_def_for_induction): Look at
        PHI_RESULT_TREE for the type of the phi node.
        (update_vuses_to_preheader): Use PHI_CHAIN
        instead of TREE_CHAIN on the phi node.
        * tree-ssa-structalias.c (compute_points_to_sets):
        Likewise.
        (ipa_pta_execute): Likewise.
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
        instead of checking GIMPLE_STMT_P in chain_next.
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * ada-tree.h (lang_tree_node): Use GENERIC_NEXT
        instead of checking GIMPLE_STMT_P in chain_next.
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
        instead of checking GIMPLE_STMT_P in chain_next.
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * java-tree.h (lang_tree_node): Use GENERIC_NEXT
        instead of checking GIMPLE_STMT_P in chain_next.

From-SVN: r124021
2007-04-21 13:40:31 -07:00
Andrew Pinski aa24028daf re PR c/31520 (Latent bug in finish_decl causing an errorous "array subscript is above array bounds")
2007-04-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR c/31520
        * c-del.c (finish_decl): Grab the type of the decl after the call
        to store_init_value.
2007-04-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C/31520
        * testsuite/gcc.dg/gnu89-init-4.c: New testcase.

From-SVN: r123835
2007-04-14 17:59:15 -07:00
Seongbae Park 50d50fc7ee invoke.texi (Wvla): New warning.
ChangeLog:

2007-03-12  Seongbae Park <seongbae.park@gmail.com>

	* gcc/doc/invoke.texi (Wvla): New warning.

gcc/ChangeLog:

2007-03-12  Seongbae Park <seongbae.park@gmail.com>

	* c-decl.c (warn_variable_length_array): New function.
	Refactored from grokdeclarator to handle warn_vla
	and handle unnamed array case.
	(grokdeclarator): Refactored VLA warning case.
	* c.opt (Wvla): New flag.

gcc/cp/ChangeLog:

2007-03-12  Seongbae Park <seongbae.park@gmail.com>

	* decl.c (compute_array_index_type): New warning flag warn_vla.

gcc/testsuite/ChangeLog:

2007-03-12  Seongbae Park <seongbae.park@gmail.com>

 	* gcc.dg/wvla-1.c: New test
 	* gcc.dg/wvla-2.c: New test
 	* gcc.dg/wvla-3.c: New test
 	* gcc.dg/wvla-4.c: New test
 	* gcc.dg/wvla-5.c: New test
 	* gcc.dg/wvla-6.c: New test
 	* gcc.dg/wvla-7.c: New test
	* g++.dg/warn/Wvla-1.C: New test
	* g++.dg/warn/Wvla-2.C: New test
	* g++.dg/warn/Wvla-3.C: New test

From-SVN: r122851
2007-03-12 18:31:39 +00:00
Andrew Pinski ee9f69b425 re PR c/31072 ([4.2 Rgression] Wrong code for volatile var with initalization and optimization)
2007-03-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C/31072
        * c-decl.c (merge_decls): Don't call make_var_volatile.
        * varasm.c (make_var_volatile): Remove.
        * output.h (make_var_volatile): Remove.

2007-03-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C/31072
        * gcc.c-torture/execute/pr31072.c: New test.

From-SVN: r122736
2007-03-08 16:32:34 -08:00
Alexandre Oliva ab53bae286 c-decl.c (grokdeclarator): Disable warnings for anonymous bitfields.
gcc/ChangeLog:
* c-decl.c (grokdeclarator): Disable warnings for anonymous
bitfields.
* tree-sra.c (instantiate_element): Propagate disabled warnings
from the element itself to the created variable.
gcc/cp/ChangeLog:
* decl.c (grokdeclarator): Disable warnings for anonymous
bitfields.

From-SVN: r122684
2007-03-08 06:48:21 +00:00
Ian Lance Taylor da1c7394b3 c.opt (fgnu89-inline): New option.
* c.opt (fgnu89-inline): New option.
	* c-opts.c (c_common_post_options): Set default value for
	flag_gnu89_inline.
	* c-decl.c (WANT_C99_INLINE_SEMANTICS): Remove.
	(pop_scope): Check flag_gnu89_inline rather than flag_isoc99 for
	inline functions.
	(diagnose_mismatched_decls, merge_decls, start_decl): Likewise.
	(grokdeclarator, start_function): Likewise.
	* c-cppbuiltin.c (c_cpp_builtins): Define either
	__GNUC_GNU_INLINE__ or __GNUC_STDC_INLINE__.
	* doc/invoke.texi (Option Summary): Mention -fgnu89-inline.
	(C Dialect Options): Document -fgnu89-inline.
	* doc/extend.texi (Function Attributes): Explain what the
	gnu_inline attribute does.
	* doc/cpp.texi (Common Predefined Macros): Document
	__GNUC_GNU_INLINE__ and __GNUC_STDC_INLINE__.

From-SVN: r122565
2007-03-05 19:45:20 +00:00
Mark Mitchell 57a4c089e2 c-decl.c (static_ctors): Move to c-common.c.
* c-decl.c (static_ctors): Move to c-common.c.
	(static_dtors): Likewise.
	(finish_function): Use c_record_cdtor_fn.
	(build_cdtor): Move to c-common.c.
	(c_write_global_declarations): Use c_build_cdtor_fns.
	* c-common.h (static_ctors): Declare.
	(static_dtors): Likewise.
	(c_record_cdtor_fn): Likewise.
	(c_build_cdtor_fns): Likewise.
	* c-common.c (static_ctors): New variable.
	(static_dtors): Likewise.
	(c_record_cdtor_fn): New function.
	(build_cdtor): Move from c-decl.c
	(c_build_cdtor_fns): New function.

	* semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
	* decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.

From-SVN: r122341
2007-02-26 21:14:24 +00:00
Mark Mitchell fc8600f9c1 extend.texi: Document optional priority argument to constructors and destructors.
* doc/extend.texi: Document optional priority argument to
	constructors and destructors.
	* tree.c (init_priority_for_decl): Adjust GTY markers.
	(init_ttree): Use priority-info hash functions for
	init_priority_for_decl.
	(tree_map_eq): Rename to ...
	(tree_map_base_eq): ... this.
	(tree_map_marked_p): Rename to ...
	(tree_map_base_marked_p): ... this.
	(tree_map_base_hash): New function.
	(decl_init_priority_lookup): Rework.
	(decl_fini_priority_lookup): New function.
	(decl_priority_info): New function.
	(decl_init_priority_insert): Use it.
	(decl_fini_priority_insert): Likewise.
	(decl_restrict_base_lookup): Adjust for refactoring of tree_map
	hierarchy.
	(decl_restrict_base_insert): Likewise.
	(decl_debug_expr_insert): Likewise.
	(decl_value_expr_lookup): Likewise.
	(decl_value_expr_insert): Likewise.
	* tree.h (priority_type): New type.
	(decl_init_priority_lookup): Use priority_type.
	(decl_fini_priority_lookup): New function.
	(decl_init_priority_insert): Use priority_type.
	(decl_fini_priority_insert): New function.
	(DECL_HAS_INIT_PRIORITY): Tweak comments.
	(DECL_INIT_PRIORITY): Likewise.
	(SET_DECL_INIT_PRIORITY): Add comment.
	(DECL_FINI_PRIORITY): New macro.
	(SET_DECL_FINI_PRIORITY): Likewise.
	(DEFAULT_INIT_PRIORITY): Document.
	(MAX_INIT_PRIORITY): Likewise.
	(MAX_RESERVED_INIT_PRIORITY): Likewise.
	(tree_map_base): New type.
	(tree_map_base_eq): New function.
	(tree_map_base_hash): Likewise.
	(tree_map_base_marked_p): Likewise.
	(tree_map): Inherit from tree_map_base.
	(tree_map_eq): Make it a macro.
	(tree_map_marked_p): Likewise.
	(tree_int_map): Inherit from tree_map_base.
	(tree_int_map_eq): Make it a macro.
	(tree_int_map_hash): Likewise.
	(tree_int_map_marked_p): Likewise.
	(tree_priority_map): New type.
	(tree_priority_map_eq): New macro.
	(tree_priority_map_hash): Likewise.
	(tree_priority_map_marked_p): Likewise.
	* varasm.c (emults_decl): Adjust for refactoring of tree_map
	hierarchy.
	(emutls_common_1): Likewise.
	* lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise.
	* tree-ssa-structalias.c (heapvar_lookup): Adjust for refactoring
	of tree_map hierarchy.
	* tree-cfg.c (move_stmt_r): Likewise.
	(new_label_mapper): Likewise.
	* c-tree.h (c_expand_body): Move to ...
	* c-common.h (c_expand_body): ... here.
	* c-decl.c (c_expand_body): Move to ...
	* c-common.c (c_expand_body): ... here.
	(c_common_attribute_table): Allow 1 argument for the constructor
	and destructor attributes.
	(get_priority): New function.
	(handle_constructor_attribute): Set DECL_INIT_PRIORITY.
	(handle_destructor_attribute): Set DECL_FINI_PRIORITY.

	* cp-tree.h (static_ctors): Remove.
	* cp-tree.h (static_dtors): Likewise.
	* cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
	refactoring of tree_map hierarchy.
	(decl_shadowed_for_var_insert): Likewise.
	* semantics.c (expand_body): Use c_expand_body.
	(expand_or_defer_fn): Don't update static_ctors or static_dtors.
	* decl2.c (static_ctors): Remove.
	(static_dtors): Likewise.
	(generate_ctor_or_dtor_function): Pass NULL_TREE to
	objc_generate_static_init_call.  Do not call static_[cd]tors.
	(generate_ctor_and_dtor_functions_for_priority): Do not check for
	static_[cd]tors.
	(cp_write_global_declarations): Likewise.

	* decl.c (annotate_value): Adjust for refactoring of tree_map
	hierarchy.

	* gcc.dg/initpri1.c: New test.
	* gcc.dg/initpri2.c: Likewise.
	* g++.dg/special/initpri1.C: New test.
	* g++.dg/special/initpri2.C: Likewise.
	* g++.dg/special/conpr-1.C: Use init_priority effective target.
	* g++.dg/special/conpr-2.C: Likewise.
	* g++.dg/special/conpr-3.C: Likewise.
	* g++.dg/special/conpr-4.C: Likewise.
	* g++.dg/special/initp1.C: Likewise.
	* g++.dg/special/ecos.exp: Remove code to detect availability of
	constructor priorities.
	* lib/target-support.exp (target_init_priority): New function.

From-SVN: r122315
2007-02-25 18:47:05 +00:00
Manuel López-Ibáñez dc90f45b24 re PR c/26494 (-pedantic-errors can be overridden by -W*)
2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c/26494
	* doc/invoke.texi (Warning Options): Remove
	-Werror-implicit-function-declaration.
	(Wimplicit-function-declaration): Update description.
	* opts.c (common_handle_option): Move handling of -Werror=* to...
	(enable_warning_as_error): ...here.
	* opts.h (enable_warning_as_error): Declare.
	* c-decl.c (implicit_decl_warning): Unless
	-Wno-implicit-function-declaration is given, emit a pedwarn if
	-std=c99 or emit a warning if -Wimplicit-function-declaration.
	* c.opt (Wimplicit-function-declaration): Replace
	mesg_implicit_function_declaration with
	warn_implicit_function_declaration.
	* c-opts.c (c_common_handle_option):
	-Werror-implicit-function-declaration is exactly equal as
	-Werror=implicit-function-declaration.
	(set_Wimplicit): Replace mesg_implicit_function_declaration with
	warn_implicit_function_declaration.
	(c_common_post_options): -Wimplict-function-declaration is enabled
	by default by -std=c99, otherwise is disabled by default.
	* c-objc-common.c (c_objc_common_init): Remove flawed logic.
testsuite/
	* gcc.dg/Wimplicit-function-declaration-c89.c: New.
	* gcc.dg/Wimplicit-function-declaration-c89-default.c: New.
	* gcc.dg/Wimplicit-function-declaration-c89-pedantic.c: New.
	* gcc.dg/Wimplicit-function-declaration-c99.c: New.
	* gcc.dg/Wimplicit-function-declaration-c99-pedantic.c: New.
	* gcc.dg/Werror-implicit-function-declaration.c: New.

From-SVN: r122017
2007-02-15 22:31:17 +00:00
Richard Henderson 8893239dc4 Makefile.in (libgcc-support, [...]): Add emutls.c.
gcc/ChangeLog:
* Makefile.in (libgcc-support, libgcc.mvars): Add emutls.c.
* builtin-types.def (BT_WORD): Make unsigned.
(BT_FN_VOID_PTR_WORD_WORD_PTR): New.
* builtins.def (BUILT_IN_EMUTLS_GET_ADDRESS): New.
(BUILT_IN_EMUTLS_REGISTER_COMMON): New.
* c-decl.c (grokdeclarator): Don't error if !have_tls.
* c-parser.c (c_parser_omp_threadprivate): Likewise.
* dwarf2out.c (loc_descriptor_from_tree_1): Don't do anything for
emulated tls.
* expr.c (emutls_var_address): New.
(expand_expr_real_1): Expand emulated tls.
(expand_expr_addr_expr_1): Likewise.
* libgcc-std.ver: Add __emutls_get_address, __emutls_register_common.
* output.h (emutls_finish): Declare.
* toplev.c (compile_file): Call it.
* tree-ssa-address.c (gen_addr_rtx): Check for const-ness of the
address before wrapping in CONST.
* varasm.c (emutls_htab, emutls_object_type): New.
(EMUTLS_VAR_PREFIX, EMUTLS_TMPL_PREFIX): New.
(get_emutls_object_name, get_emutls_object_type): New.
(get_emutls_init_templ_addr, emutls_decl): New.
(emutls_common_1, emutls_finish): New.
(assemble_variable): When emulating tls, swap decls; generate
constructor for the emutls objects.
(do_assemble_alias): When emulating tls, swap decl and target name.
(default_encode_section_info): Don't add SYMBOL_FLAG_TLS_SHIFT
for emulated tls.
* varpool.c (decide_is_variable_needed): Look at force_output.
Recurse for emulated tls.
(cgraph_varpool_remove_unreferenced_decls): Remove checks redundant
with decide_is_variable_needed.
* emutls.c: New file.
* config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Only emit
tls_object for real tls.
gcc/cp/ChangeLog:
* decl.c (grokvardecl): Don't error if !have_tls.
(grokdeclarator): Likewise.
* parser.c (cp_parser_omp_threadprivate): Likewise.
gcc/fortran/ChangeLog:
* f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
and __emutls_register_common.
* openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
* trans-common.c (build_common_decl): Don't check have_tls.
* trans-decl.c (gfc_finish_var_decl): Likewise.
* types.def (BT_WORD, BT_FN_PTR_PTR): New.
(BT_FN_VOID_PTR_WORD_WORD_PTR): New.
gcc/testsuite/ChangeLog:
* lib/target-supports.exp (check_effective_target_tls): Redefine
to mean non-emulated tls.
* gcc.dg/tls/alias-1.c: Remove tls requirement.
* gcc.dg/tls/asm-1.c, gcc.dg/tls/debug-1.c, gcc.dg/tls/diag-1.c,
gcc.dg/tls/diag-2.c, gcc.dg/tls/diag-3.c, gcc.dg/tls/diag-4.c,
gcc.dg/tls/diag-5.c, gcc.dg/tls/init-1.c, gcc.dg/tls/nonpic-1.c,
gcc.dg/tls/opt-10.c, gcc.dg/tls/opt-5.c, gcc.dg/tls/opt-6.c,
gcc.dg/tls/opt-8.c, gcc.dg/tls/opt-9.c, gcc.dg/tls/pic-1.c,
gcc.dg/tls/struct-1.c, gcc.dg/tls/trivial.c: Likewise.

From-SVN: r121800
2007-02-10 19:19:10 +00:00
Kazu Hirata 9f5ed61a80 c-decl.c, [...]: Fix comment typos.
* c-decl.c, config/avr/avr.c, config/avr/avr.h,
	config/m68k/m68k.c, config/m68k/netbsd-elf.h,
	config/mn10300/mn10300.c, config/pdp11/pdp11.h,
	config/rs6000/cell.md, config/rs6000/darwin.h,
	config/sh/sh.md, config/sh/sh4-300.md, config/spu/spu.c,
	config/spu/spu.md, cselib.c, expr.c, haifa-sched.c, hwint.h,
	jump.c, reload.c, sched-deps.c, sched-int.h, tree-inline.c,
	tree-profile.c, tree-ssa-live.h, tree-vrp.c: Fix comment
	typos.  Follow spelling conventions.
	* doc/invoke.texi: Follow spelling conventions.

From-SVN: r121546
2007-02-03 16:47:06 +00:00
Manuel López-Ibáñez c616e51b00 007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* c-decl.c (pop_scope): Replace warnings with call to
	warn_for_unused_label.
	* c-common.h (warn_for_unused_label): Declare.
	* c-common.c (warn_for_unused_label): Define.
cp/
	* decl.c (pop_label): Replace warning with call to
	warn_for_unused_label.

From-SVN: r121310
2007-01-29 21:05:58 +00:00
Manuel López-Ibáñez b1ed4cb43c re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)
2007-01-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR middle-end/7651
	* c.opt (Wold-style-declaration): New.
	* doc/invoke.texi (C-only Warning Options): New.
	(Wold-style-declaration): Document it.
	(Wextra): Enabled by -Wextra.
	* c-opts.c (c_common_post_options): Enabled by -Wextra.
	* c-decl.c (declspecs_add_scspec): Replace -Wextra with
	-Wold-style-declaration.

testsuite/
	* gcc.dg/declspec-3.c: Replace -W with -Wold-style-declaration.
	* gcc.dg/declspec-3-Wextra.c: New.
	* gcc.dg/declspec-3-no.c: New

From-SVN: r120347
2007-01-02 17:33:25 +00:00
Manuel López-Ibáñez cb4af25a80 re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)
2006-12-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR middle-end/7651
	* c.opt (Wmissing-parameter-type): New.
	* doc/invoke.texi (Wmissing-parameter-type): Document it.
	(Wextra): Enabled by -Wextra.
	* c-opts.c (c_common_post_options): Enabled by -Wextra.
	* c-decl.c (store_parm_decls_oldstyle): Replace Wextra with
	Wmissing-parameter-type.
	
testsuite/

	* gcc.dg/Wmissing-parameter-type.c: New.
	* gcc.dg/Wmissing-parameter-type-Wextra.c: New.
	* gcc.dg/Wmissing-parameter-type-no.c: New.

From-SVN: r120173
2006-12-23 17:45:33 +00:00
Aldy Hernandez 07beea0df3 Merge gimple-tuples-branch into mainline.
From-SVN: r119546
2006-12-05 17:26:05 +00:00
Lee Millward f1f66b423f re PR c/27953 (ICE with invalid function definitions)
PR c/27953
	* c-decl.c (store_parm_decls_oldstyle): Robustify
        * gcc.dg/pr27953.c: New test.

From-SVN: r119446
2006-12-02 16:34:26 +00:00
Jakub Jelinek 5c386a95ee re PR c/29955 (ICE with -fopenmp -fexceptions)
PR c/29955
	* c-tree.h (c_maybe_initialize_eh): New prototype.
	* c-decl.c (finish_decl): Move EH initialization...
	(c_maybe_initialize_eh): ... here.  New function.
	* c-parser.c (c_parser_omp_construct): Call c_maybe_initialize_eh
	if not #pragma omp atomic.

	* gcc.dg/gomp/pr29955.c: New test.

From-SVN: r119168
2006-11-24 22:28:38 +01:00
Jakub Jelinek 4eb7fd8398 c-common.c (c_common_attributes): Add gnu_inline attribyte.
* c-common.c (c_common_attributes): Add gnu_inline attribyte.
	(handle_gnu_inline_attribute): New function.
	* c-decl.c (diagnose_mismatched_decls): Handle gnu_inline attribute.
	(merge_decls, start_decl, start_function): Likewise.
	* doc/extend.texi: Document gnu_inline attribute.

	* gcc.dg/inline-17.c: New test.

From-SVN: r118567
2006-11-08 00:01:23 +01:00
Geoffrey Keating c7cc12b01d c-decl.c (WANT_C99_INLINE_SEMANTICS): New, set to 1.
* c-decl.c (WANT_C99_INLINE_SEMANTICS): New, set to 1.
	(merge_decls): Implement WANT_C99_INLINE_SEMANTICS.
	(grokdeclarator): Likewise.

From-SVN: r118474
2006-11-04 02:59:52 +00:00
Geoffrey Keating 71113fcd70 re PR c/16622 ([C99] extern inline is handled wrong in C99 mode)
* c-decl.c (grokdeclarator): Don't set DECL_EXTERNAL on
	inline static functions in c99 mode.

	PR 16622
	* doc/extend.texi (Inline): Update.
	* c-tree.h (struct language_function): Remove field 'extern_inline'.
	* c-decl.c (current_extern_inline): Delete.
	(pop_scope): Adjust test for an undefined nested function.
	Add warning about undeclared inline function.
	(diagnose_mismatched_decls): Update comments.  Disallow overriding
	of inline functions in a translation unit in C99.  Allow inline
	declarations in C99 at any time.
	(merge_decls): Boolize variables.  Handle C99 'extern inline'
	semantics.
	(grokdeclarator): Set DECL_EXTERNAL here for functions.  Handle
	C99 inline semantics.
	(start_function): Don't clear current_extern_inline.  Don't set
	DECL_EXTERNAL.
	(c_push_function_context): Don't push current_extern_inline.
	(c_pop_function_context): Don't restore current_extern_inline.

	PR 11377
	* c-typeck.c (build_external_ref): Warn about static variables
	used in extern inline functions.
	* c-decl.c (start_decl): Warn about static variables declared
	in extern inline functions.

From-SVN: r118356
2006-11-01 04:47:30 +00:00
Dirk Mueller a1e45ff04c re PR c++/6321 (no warning for bad main function declaration)
2006-10-30  Dirk Mueller  <dmueller@suse.de>

        PR c++/6321
        * cp/decl.c (grokfndecl): Use check_main_parameter_types.

        * c-common.h (strict_aliasing_warning): Fix whitespace.
        * c-decl (start_function): Move code for main decl warning ..
        * c-common.c (check_main_parameter_types): .. here.
        * c-common.h (check_main_parameter_types): Declare.

From-SVN: r118206
2006-10-30 23:15:42 +00:00
Rafael Ávila de Espíndola c79efc4d2a decl.c: Include langhooks.h.
* gcc/java/decl.c: Include langhooks.h.
       (builtin_function): Remove.
       (java_init_decl_processing): Replace calls to builtin_function
       with add_builtin_function.

       * gcc/java/Make-lang.in (jc1$(exeext)): Depend on and link with
       attribs.o.
       (java/decl.o): Depend on langhooks.h.

       * gcc/java/java-tree.h (builtin_function): Remove.

       * gcc/tree.c (local_define_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/objc/objc-act.c (synth_module_prologue): Replace calls to
       builtin_function with add_builtin_function.
       (build_next_objc_exception_stuff): Replace calls to
       builtin_function with add_builtin_function.
       (build_objc_exception_stuff): Replace calls to
       builtin_function with add_builtin_function.

       * gcc/objcp/objcp-decl.h (objcp_builtin_function): Remove.

       * gcc/cp/decl.c (builtin_function_1): Move common code to
       add_builtin_function.
       (builtin_function): Rename to cxx_builtin_function.
       Change the signature.

       * gcc/cp/call.c: Include langhooks.h.
       (build_java_interface_fn_ref):  Replace calls to
       builtin_function with add_builtin_function.

       * gcc/cp/Make-lang.in (cp/call.o): Depend on langhooks.h.

       * gcc/cp/cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
       cxx_builtin_function.

       * gcc/cp/cp-tree.h (builtin_function): Rename to cxx_builtin_function.
       Change the signature.

       * gcc/c-objc-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
       c_builtin_function.

       * gcc/c-tree.h (builtin_function): Rename to c_builtin_function. Change
       the signature.

       * gcc/ada/utils.c (builtin_function): Rename to gnat_builtin_function.
       Move common code to add_builtin_function.

       * gcc/ada/misc.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
       gnat_builtin_function.

       * gcc/ada/gigi.h (builtin_function): Rename to gnat_builtin_function.
       Change the signature.

       * gcc/c-decl.c (builtin_function): Rename to c_builtin_function. Move
       common code to add_builtin_function.

       * gcc/fortran/Make-lang.in (f951$(exeext)): Depend on and link with
       attribs.o.

       * gcc/fortran/trans.h (builtin_function): Rename to
       gfc_builtin_function. Change the signature.

       * gcc/fortran/f95-lang.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
       gfc_builtin_function.
       (builtin_function): Rename to gfc_builtin_function. Move common
       code to builtin_function.
       (gfc_define_builtin): Replace calls to builtin_function with
       gfc_define_builtin.

       * gcc/langhooks.c (add_builtin_function): New function.
       (lhd_builtin_function): New function.

       * gcc/langhooks.h (struct lang_hooks): Change the signature of
       builtin_function.
       (add_builtin_function): New function.

       * gcc/treelang/treetree.c (builtin_function): Remove.

       * gcc/tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Replace
       calls to lang_hooks.builtin_function with add_builtin_function.

       * gcc/c-common.c (decl_builtin_1): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/alpha/alpha.c (alpha_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/frv/frv.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/s390/s390.c (s390_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/sparc/sparc.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/i386/i386.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.
       (def_builtin): Replace calls to lang_hooks.builtin_function with
       add_builtin_function.

       * gcc/config/sh/sh.c (sh_media_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/c4x/c4x.c (c4x_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/stormy16/stormy16.c (xstormy16_init_builtins):
       Replace calls to lang_hooks.builtin_function with
       add_builtin_function.

       * gcc/config/iq2000/iq2000.c (def_builtin):
       Replace calls to lang_hooks.builtin_function with
       add_builtin_function.

       * gcc/config/ia64/ia64.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/rs6000/rs6000.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.
       (altivec_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/arm/arm.c (def_mbuiltin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.
       (arm_init_tls_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/mips/mips.c (mips_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/bfin/bfin.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/langhooks-def.h (lhd_builtin_function): New function.
       (LANG_HOOKS_BUILTIN_FUNCTION): Define as lhd_builtin_function.

From-SVN: r117981
2006-10-23 19:47:58 +00:00
Jan Hubicka 1a4259dca6 re PR c/28419 (ICE using __FUNCTION__ in invalid code)
PR c/28419
	* c-decl.c (c_make_fname_decl): Do not segfault in case where
	current_function_decl is set but current_function_scope is not.

	* gcc.dg/pr28319.c: New test.

From-SVN: r117684
2006-10-13 07:41:53 +00:00
Richard Henderson a98d4769d5 Revert emutls patch.
From-SVN: r117578
2006-10-09 09:27:14 -07:00
Olivier Hainque 706c4bb76c gimplify.c (gimplify_type_sizes): Don't recurse on the pointed-to type.
* gimplify.c (gimplify_type_sizes) [POINTER_TYPE, REFERENCE_TYPE]:
	Don't recurse on the pointed-to type.
	* c-decl.c (grokdeclarator) [cdk_pointer]: If we are in a NORMAL or
	DECL context, attach an artificial TYPE_DECL to anonymous pointed-to
	types with components of variable size.

	* testsuite/gcc.dg/typename-vla-1.c: New case.
	* testsuite/gnat.dg/forward_vla.adb: New case.

From-SVN: r117493
2006-10-06 09:12:09 +00:00
Richard Henderson e701a32a98 Makefile.in (libgcc.mk, [...]): Add emutls.c.
gcc/
        * Makefile.in (libgcc.mk, LIBGCC_DEPS): Add emutls.c.
        * builtin-types.def (BT_WORD): Make unsigned.
        (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
        * builtins.def (BUILT_IN_EMUTLS_GET_ADDRESS): New.
        (BUILT_IN_EMUTLS_REGISTER_COMMON): New.
        * c-decl.c (grokdeclarator): Don't error if !have_tls.
        * c-parser.c (c_parser_omp_threadprivate): Likewise.
        * cgraph.c (decide_is_variable_needed): Look at force_output.
        Recurse for emulated tls.
        * cgraphunit.c (cgraph_varpool_remove_unreferenced_decls): Remove
        checks redundant with decide_is_variable_needed.
        (cgraph_build_static_cdtor): Do cgraph_varpool_assemble_pending_decls.
        * dwarf2out.c (loc_descriptor_from_tree_1): Don't do anything for
        emulated tls.
        * expr.c (emutls_var_address): New.
        (expand_expr_real_1): Expand emulated tls.
        (expand_expr_addr_expr_1): Likewise.
        * libgcc-std.ver: Add __emutls_get_address, __emutls_register_common.
        * output.h (emutls_finish): Declare.
        * toplev.c (compile_file): Call it.
        * tree-ssa-address.c (gen_addr_rtx): Check for const-ness of the
        address before wrapping in CONST.
        * varasm.c (emutls_htab, emutls_object_type): New.
        (EMUTLS_VAR_PREFIX, EMUTLS_TMPL_PREFIX): New.
        (get_emutls_object_name, get_emutls_object_type): New.
        (get_emutls_init_templ_addr, emutls_decl): New.
        (emutls_common_1, emutls_finish): New.
        (assemble_variable): When emulating tls, swap decls; generate
        constructor for the emutls objects.
        (do_assemble_alias): When emulating tls, swap decl and target name.
        (default_encode_section_info): Don't add SYMBOL_FLAG_TLS_SHIFT
        for emulated tls.
        * emutls.c: New file.
        * config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Only emit
        tls_object for real tls.

gcc/cp/
        * decl.c (grokvardecl): Don't error if !have_tls.
        (grokdeclarator): Likewise.
        * parser.c (cp_parser_omp_threadprivate): Likewise.

gcc/fortran/
        * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
        and __emutls_register_common.
        * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
        * trans-common.c (build_common_decl): Don't check have_tls.
        * trans-decl.c (gfc_finish_var_decl): Likewise.
        * types.def (BT_WORD, BT_FN_PTR_PTR): New.
        (BT_FN_VOID_PTR_WORD_WORD_PTR): New.

gcc/testsuite/
        * lib/target-supports.exp (check_effective_target_tls): Redefine
        to mean non-emulated tls.
        * gcc.dg/tls/alias-1.c: Remove tls requirement.
        * gcc.dg/tls/asm-1.c, gcc.dg/tls/debug-1.c, gcc.dg/tls/diag-1.c,
        gcc.dg/tls/diag-2.c, gcc.dg/tls/diag-3.c, gcc.dg/tls/diag-4.c,
        gcc.dg/tls/diag-5.c, gcc.dg/tls/init-1.c, gcc.dg/tls/nonpic-1.c,
        gcc.dg/tls/opt-10.c, gcc.dg/tls/opt-5.c, gcc.dg/tls/opt-6.c,
        gcc.dg/tls/opt-8.c, gcc.dg/tls/opt-9.c, gcc.dg/tls/pic-1.c,
        gcc.dg/tls/struct-1.c, gcc.dg/tls/trivial.c: Likewise.

From-SVN: r117440
2006-10-04 14:09:20 -07:00
Joseph Myers 3542a5c0f6 re PR c/28504 (ICE with variable sized array)
PR c/28504
	* c-tree.h (struct c_arg_info): Add pending_sizes.
	* c-parser.c (c_parser_parms_declarator,
	c_parser_parms_list_declarator): Initialize pending_sizes.
	* c-decl.c (get_parm_info): Initialize pending_sizes.
	(get_parm_info): Set pending_sizes.
	(grokdeclarator): Call put_pending_sizes for parameters for
	function definition only.

testsuite:
	* gcc.dg/vla-10.c: New test.

From-SVN: r116789
2006-09-09 00:41:21 +01:00
Joseph Myers d8890adf28 re PR c/28299 (ICE with -Wmissing-prototypes)
PR c/28299
	* c-decl.c (start_function): Don't try to process prototype
	information from old declaration that isn't a function.

testsuite:
	* gcc.dg/funcdef-var-1.c, gcc.dg/funcdef-var-2.c: New tests.
	* gcc.dg/pr20368-1.c, gcc.dg/pr20368-2.c, gcc.dg/pr20368-3.c:
	Expect extra diagnostics.

From-SVN: r116435
2006-08-25 22:11:46 +01:00
Kazu Hirata 96ff6c8cc0 * c-decl.c, var-tracking.c: Fix comment typos.
From-SVN: r116134
2006-08-14 17:55:03 +00:00
Alexandre Oliva 8d9f82d593 re PR c/27184 (Wrong code with pointers to arrays and types and strict aliasing)
2006-08-13  Alexandre Oliva  <aoliva@redhat.com>
            Andrew Pinski  <pinskia@physics.uc.edu>

        PR c/27184
        * tree.c (build_array_type): Unify array types with
        unspecified index_type.
        * c-decl.c (grokdeclarator): Make sure we do not modify a
        unified incomplete array type.
        * c-typeck.c (store_init_value): Create distinct type before
        filling in the index type in an initializer from a compound
        literal.

        * c-decl.c (grokdeclarator): Remove code where we copy the
        array type over.

2006-08-13  Alexandre Oliva  <aoliva@redhat.com>

        PR c/27184
        * gcc.dg/torture/pr27184.c: New test


Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu>

From-SVN: r116116
2006-08-13 13:16:46 -07:00
Volker Reichelt ffc44ab683 re PR c/28502 (ICE with invalid declaration after definition)
PR c/28502
	* c-decl.c (validate_proto_after_old_defn): Return false on invalid
	argument.

	* gcc.dg/proto-1.c: New test.

From-SVN: r115957
2006-08-05 23:41:22 +00:00
Jan Hubicka 386b46cf78 re PR c/25795 (Proccessing the attribute externally_visible too early)
PR c/25795
	PR c++/27369
	* cgraph.c (cgraph_varpool_nodes): Export.
	(decide_is_variable_needed): Ignored "used" attribute in
	unit-at-a-time mode.
	* cgraph.h (cgraph_varpool_nodes): Declare.
	* cgraphunit.c (decide_is_function_needed): Ignored "used" attribute in
	unit-at-a-time mode.

	* gcc.dg/pr25795.c: New test.
	* gcc.dg/pr25795-1.c: New test.

From-SVN: r115693
2006-07-24 00:16:16 +00:00
Jason Merrill 1937f93932 re PR c++/13983 (no warning on some non-POD struct with packed attribute)
PR c++/13983
        PR c++/17519
        * stor-layout.c (finish_record_layout): Copy TYPE_PACKED to variants.
        * c-common.c (handle_packed_attribute): So don't copy it here.
        * c-decl.c (finish_struct): Don't copy TYPE_ALIGN.
        * cp/class.c (check_field_decls): Check TYPE_PACKED after
        stripping array types.
        (finish_struct_bits): Don't copy TYPE_SIZE here.

From-SVN: r115217
2006-07-05 22:09:02 -04:00
Jason Merrill b9e7569630 re PR c++/26905 (default-visibility class symbol improperly resolved as hidden-visibility)
PR c++/26905
        PR c++/26612
        PR c++/27000
        PR c++/26984
        PR c++/19134
        * tree.c (build_decl_stat): Don't hande #pragma visibility here.
        * c-common.c (c_determine_visibility): Handle it here.
        * c-decl.c (finish_decl): Call c_determine_visibility for
        functions, too.
        * flags.h (enum symbol_visibility): Sort from most to least visibility.
        * tree.h: Likewise.
        * varasm.c (default_assemble_visibility): Likewise.
        * c-common.c (handle_visibility_attribute): Complain about trying
        to give visibility to an already defined class, or trying to change
        declared visibility. Always attach the attribute.
        * cp/decl2.c (determine_visibility): Overhaul.
        (determine_visibility_from_class): Likewise.
        (min_vis_r, type_visibility, constrain_visibility): New fns.
        (constrain_visibility_for_template): Likewise.
        (constrain_class_visibility): Likewise.
        * cp/decl.c (cp_finish_decl): Call determine_visibility for function
        decls, too.
        * cp/name-lookup.c (pushtag): Call determine_visibility.
        * cp/decl.c (duplicate_decls): Don't copy visibility from template to
        specialization.
        * cp/pt.c (check_explicit_specialization): Likewise.
        (lookup_template_class, tsubst_decl): Call determine_visibility.
        * cp/class.c (finish_struct_1): Call constrain_class_visibility.

        PR c++/26905
        PR c++/21675
        PR c++/17470
        * cp/parser.c (cp_parser_explicit_instantiation): Pass the attributes
        to grokdeclarator.
        (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
        (cp_parser_enum_specifier): Likewise.
        (cp_parser_elaborated_type_specifier): Apply attributes if this
        declares only the class.
        (cp_parser_class_specifier): Apply leading attributes immediately.
        * cp/semantics.c (begin_class_definition): Add attributes parameter,
        apply them to the type.
        * attribs.c (decl_attributes): Ignore type-in-place attributes
        once the type has been defined.

        PR c++/21581
        PR c++/25915
        * cp/tree.c (decl_anon_ns_mem_p): New function.
        * cp/cp-tree.h: Declare it.
        * cp/decl2.c (determine_visibility): Make anonymous namespace
        members static.
        (min_vis_r, constrain_visibility): Likewise.
        * cp/rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
        pseudo-types.
        * cp/decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
        global_namespace.
        * cp/name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
        on anonymous namespaces.

From-SVN: r115086
2006-06-29 21:15:56 -04:00
Joseph Myers 5c076987a4 re PR c/25161 (Internal compiler error (segfault) instead of error message)
PR c/25161
	PR c/27020
	* c-decl.c (grokdeclarator): Disallow variably modified types at
	file scope.  Avoid marking shared array type of constant size as
	VLA.

testsuite:
	* gcc.dg/array-10.c: New test.

From-SVN: r114378
2006-06-05 01:51:45 +01:00
Mike Stump fbbc17c78c Fix whitespacing
From-SVN: r114143
2006-05-26 23:09:14 +00:00
Volker Reichelt 4271a6f368 re PR c/26818 (tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in finish_struct, at c-decl.c:5350 (time.c))
PR c/26818
	* c-decl.c (finish_struct): Skip erroneous fields.

	* gcc.dg/struct-incompl-1.c: New test.

From-SVN: r113975
2006-05-22 12:20:41 +00:00
Mike Stump c22cacf346 Whitespace fixups
From-SVN: r113893
2006-05-18 22:16:23 +00:00
Mike Stump 52ffd86eb6 Fix up vla, vm and [*] sematics.
PR c/18740
	PR c/7948
	PR c/25802
	* c-tree.h (struct c_arg_info): Add had_vla_unspec.
	(c_vla_unspec_p): Add.
	(c_vla_type_p): Add.
	* c-decl.c (struct c_scope): Add had_vla_unspec.
	(build_array_declarator): Add support for [*].
	(grokdeclarator): Likewise.
	(grokparms): Likewise.
	(get_parm_info): Likewise.
	* c-objc-common.c (c_vla_unspec_p): Likewise.
	* c-objc-common.h (LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P): Likewise.
	* c-parser.c (c_parser_typeof_specifier): Evaluate arguments to
	typeof when argument is a variably modified type not inside sizeof or alignof.
	(c_parser_direct_declarator_inner): Propagate errors.
	(c_parser_sizeof_expression): Add support for [*].
	* c-typeck.c (c_vla_type_p): Add.
	(composite_type): Add support for vla compositing.
	(comptypes_internal): Add support for vla compatibility.
	(c_expr_sizeof_expr): Evaluate vla arguments.
	* tree.c (variably_modified_type_p): Update comment for [*].

testsuite:
	* gcc.dg/c90-arraydecl-1.c: Update for vla, vm [*] fixups.
	* gcc.dg/vla-4.c: Add.
	* gcc.dg/vla-5.c: Add.
	* gcc.dg/vla-6.c: Add.

From-SVN: r113888
2006-05-18 18:22:12 +00:00
Mark Mitchell 38a4afeecd re PR c++/26534 ([4.1] bitfield wrong optimize)
2006-04-23  Mark Mitchell  <mark@codesourcery.com>

	PR c++/26534
	* c-common.h (c_build_bitfield_integer_type): Declare.
	* c-decl.c (c_build_bitfield_integer_type): Move to ...
	* c-common.c (c_build_bitfield_integer_type): ... here.

2006-04-23  Mark Mitchell  <mark@codesourcery.com>

	PR c++/26534
	* cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
	* typeck.c (is_bitfield_expr_with_lowered_type): New function.
	(decay_conversion): Convert bitfield expressions to the correct
	type.
	(build_modify_expr): Remove spurious conversions.
	* class.c (layout_class_type): Modify the type of bitfields to
	indicate a limited range. 
	* call.c (standard_conversion): Adjust the type of bitfield
	expressions used in an rvalue context.
	(build_conditional_expr): Likewise.
	
2006-04-23  Mark Mitchell  <mark@codesourcery.com>

	PR c++/26534
	* g++.dg/opt/bitfield1.C: New test.
	* g++.dg/compat/abi/bitfield1_main.C: Add -w.
	* g++.dg/compat/abi/bitfield1_x.C: Likewise.
	* g++.dg/compat/abi/bitfield1_y.C: Likewise.
	* g++.dg/compat/abi/bitfield2_main.C: Likewise.
	* g++.dg/compat/abi/bitfield2_x.C: Likewise.
	* g++.dg/compat/abi/bitfield2_y.C: Likewise.
	* g++.dg/abi/bitfield1.C: Add dg-warning markers.
	* g++.dg/abi/bitfield2.C: Likewise.
	* g++.dg/init/bitfield1.C: Likewise.

From-SVN: r113199
2006-04-23 18:04:33 +00:00
John David Anglin 1dc80d7a9d re PR testsuite/25171 (FAIL: gfortran.dg/mixed_io_1.f90)
PR testsuite/25171
	* c-decl.c (check_bitfield_type_and_width): Don't issue pedwarn "type
	of bit-field" when in system header.

From-SVN: r109990
2006-01-19 23:45:49 +00:00
Richard Sandiford 2fa6ddddfe * c-decl.c (add_flexible_array_elts_to_size): Simplify vector accesses.
From-SVN: r109966
2006-01-19 16:28:31 +00:00
Richard Sandiford 1f0f7cebf9 re PR c/25805 (Incorrect handling of zero-initialized flexible arrays)
PR c/25805
	* c-decl.c (add_flexible_array_elts_to_size): New function.
	(finish_decl): Use it.

testsuite/
	PR c/25805
	* gcc.dg/pr25805.c: New file.

From-SVN: r109946
2006-01-19 07:35:47 +00:00
Diego Novillo 953ff28998 [multiple changes]
2006-01-18  Richard Henderson  <rth@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* libgomp: New directory.
	* Makefile.def: Add target_module libgomp.
	* Makefile.in: Regenerate.
	* configure.in (target_libraries): Add target-libgomp.
	* configure: Regenerate.


contrib/

2006-01-18  Richard Henderson  <rth@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* gcc_update (files_and_dependencies): Add libgomp files.


gcc/

2006-01-18  Richard Henderson  <rth@redhat.com>
            Aldy Hernandez  <aldyh@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* omp-low.c: New file.
	* c-omp.c: New file.

2006-01-18  Richard Henderson  <rth@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* doc/invoke.texi: Document -fopenmp.
	* tree-dump.h (debug_function): Declare.

	* hooks.c (hook_bool_tree_bool_false): New function.
	(hook_tree_tree_null): Remove.
	(hook_tree_tree_tree_null): New.
	* hooks.h: Update to match.

	* tree-pretty-print.c (debug_tree_chain): New.
	(print_generic_expr): Handle TDF_CHAIN.
	(dump_generic_node): Handle BLOCK.
	Do not abort with incomplete SWITCH_EXPRs.
	Do not dump body of an OpenMP directive if TDF_SLIM is given.
	<case OMP_PARALLEL, OMP_FOR, OMP_SECTIONS>: Don't
	print space after directive name.
	<OMP_FOR>: Handle printing OMP_FOR_PRE_BODY.
	Handle OMP_MASTER and OMP_ORDERED.
	Handle printing of OMP_BODY just in one place, goto
	dump_omp_body in the rest of OMP_* nodes that have
	OMP_BODY.
	Don't handle clause nodes here.  Update omp statements to
	use dump_omp_clauses.
	Handle OMP_SINGLE, OMP_SECTIONS, OMP_SECTION,
	OMP_CLAUSE_ORDERED, OMP_CLAUSE_SCHEDULE, OMP_ATOMIC,
	OMP_CRITICAL, OMP_CLAUSE_NOWAIT, GOMP_CLAUSE_IF,
	GOMP_CLAUSE_NUM_THREADS, GOMP_FOR, GOMP_CLAUSE_SHARED,
	GOMP_CLAUSE_FIRSTPRIVATE, GOMP_CLAUSE_LASTPRIVATE,
	GOMP_CLAUSE_COPYIN and GOMP_CLAUSE_COPYPRIVATE.
	Adjust output for GOMP_PARALLEL.
	(dump_omp_clauses): New.
	(print_declaration): Dump DECL_VALUE_EXPR.
	(op_symbol_1): Split out of op_symbol.
	(dumping_stmts): Remove.  Update all users.

	* cgraph.c (cgraph_analyze_queue): New.
	(cgraph_add_new_function): New.
	* cgraph.h (cgraph_analyze_queue): Declare.
	(cgraph_add_new_function): Declare.
	(cgraph_lower_function): Remove.

	* tree.c (walk_tree): Walk OMP_CLAUSE_CHAIN of OMP_CLAUSE_*
	nodes.  Use switch for all nodes, handle most of IS_EXPR_CODE_CLASS
	and TYPE_P nodes in its default clause.
	(empty_body_p): New.
	(tree_range_check_failed): New.
	(build5_stat): New.

	* tree.h (OMP_CLAUSE_REDUCTION_INIT,
	OMP_CLAUSE_REDUCTION_MERGE,
	OMP_CLAUSE_REDUCTION_PLACEHOLDER,
	OMP_CLAUSE_PRIVATE_DEBUG,
	OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_FOR_PRE_BODY,
	OMP_MASTER_BODY, OMP_ORDERED_BODY OMP_BODY,
	OMP_CLAUSES, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT_KIND,
	OMP_CLAUSE_CHAIN, OMP_CLAUSE_OUTER_DECL,
	OMP_CLAUSE_INNER_DECL, OMP_CLAUSE_NUM_THREADS_EXPR,
	OMP_CLAUSE_IF_EXPR, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR,
	OMP_CLAUSE_SCHEDULE_CHUNK_SIZE. OMP_PARALLEL_VAR_INIT,
	OMP_PARALLEL_VAR_REDUC, OMP_FOR_VAR_INIT,
	OMP_FOR_VAR_LAST, OMP_FOR_VAR_REDUC,
	OMP_SECTIONS_VAR_INIT, OMP_SECTIONS_VAR_LAST,
	OMP_SECTIONS_VAR_REDUC, OMP_CLAUSE_REDUCTION_CODE
	OMP_SINGLE_CLAUSES, OMP_SINGLE_BODY,
	OMP_CLAUSE_SCHEDULE_CHUNK_SIZE, OMP_SECTION_BODY,
	OMP_CRITICAL_NAME, OMP_CRITICAL_BODY): New.
	(TREE_RANGE_CHECK): New.
	(empty_body_p): Declare.
	(enum omp_clause_default_kind): New.
	(build_string_literal): Declare.
	(enum omp_clause_schedule_kind, OMP_CLAUSE_SCHEDULE_KIND): New.
	(build5_stat, build5): Declare.

	* tree-pass.h (TDF_CHAIN): Define.
	* tree-pass.h (PROP_gimple_lomp): Define.
	(pass_lower_omp): Declare.

	* diagnostic.h (debug_tree_chain): Declare.

	* builtins.c (get_builtin_sync_mode): Use 0 as last argument to
	mode_for_size.
	(expand_builtin): Handle sync BUILT_IN_*_16 builtins.
	* builtins.c (build_string_literal): Make extern.

	* gcc.c (include_spec_function): New.
	(static_spec_functions): Add it.
	(main): Move load of libgomp.spec ...
	(LINK_COMMAND_SPEC): ... here.
	(link_gomp_spec): New.
	(static_specs): Include it.
	(LINK_COMMAND_SPEC): Add link_gomp.
	(GOMP_SELF_SPECS): New.
	(driver_self_specs): Include it.
	(switch_matches): Don't mark inline.
	(main): Load libgomp.spec.

	* tree-gimple.c (is_gimple_stmt): True for OMP_MASTER,
	OMP_ORDERED, OMP_CRITICAL, OMP_SECTIONS, OMP_SECTION,
	and OMP_SINGLE, OMP_FOR and OMP_PARALLEL.

	* tree-gimple.h (enum omp_parallel): Declare.
	(determine_parallel_type): Declare.
	(omp_firstprivatize_variable): Declare.
	(omp_reduction_init): Declare.
	(diagnose_omp_structured_block_errors): Declare.
	(struct walk_stmt_info): Add want_return_expr.
	(struct walk_stmt_info): Add want_bind_expr, want_locations.
	(find_omp_clause): Declare.
	(insert_field_into_struct): Declare.
	(struct walk_stmt_info): Move from tree-nested.c
	(walk_stmts): Declare.

	* c-cppbuiltin.c (c_cpp_builtins): If -fopenmp, #define _OPENMP
	to 200505.

	* cgraphunit.c (cgraph_lower_function): Make static.
	(cgraph_finalize_pending_functions): New.
	(cgraph_finalize_function): Call it.
	(cgraph_finalize_compilation_unit): Likewise.

	* builtin-types.def (BT_I16, BT_FN_I16_VPTR_I16,
	BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
	(BT_FN_UINT_UINT): New.
	(DEF_FUNCTION_TYPE_6, DEF_FUNCTION_TYPE_7,
	DEF_FUNCTION_TYPE_VAR_4): Document.
	(BT_PTR_LONG, BT_PTR_PTR, BT_FN_BOOL, BT_FN_INT,
	BT_FN_VOID_PTRPTR, BT_PTR_FN_VOID_PTR,
	BT_FN_BOOL_LONGPTR_LONGPTR, BT_FN_VOID_OMPFN_PTR_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_UINT,
	BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
	BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): New.

	* builtins.def: Update DEF_BUILTIN comment to include COND argument.
	Move all DEF_SYNC_BUILTIN () and DEF_GOMP_BUILTIN () builtins
	into separate files.
	(DEF_GOMP_BUILTIN): New.
	(BUILT_IN_OMP_GET_THREAD_NUM, BUILT_IN_GOMP_BARRIER,
	BUILT_IN_GOMP_CRITICAL_START, BUILT_IN_GOMP_CRITICAL_END,
	BUILT_IN_GOMP_CRITICAL_NAME_START, BUILT_IN_GOMP_CRITICAL_NAME_END,
	BUILT_IN_GOMP_LOOP_STATIC_START, BUILT_IN_GOMP_LOOP_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_GUIDED_START, BUILT_IN_GOMP_LOOP_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START,
	BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START,
	BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_STATIC_NEXT, BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_RUNTIME_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT,
	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_LOOP_END, BUILT_IN_GOMP_LOOP_END_NOWAIT,
	BUILT_IN_GOMP_ORDERED_START, BUILT_IN_GOMP_ORDERED_END,
	BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END,
	BUILT_IN_GOMP_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_NEXT,
	BUILT_IN_GOMP_PARALLEL_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_END,
	BUILT_IN_GOMP_SECTIONS_END_NOWAIT, BUILT_IN_GOMP_SINGLE_START,
	BUILT_IN_GOMP_SINGLE_COPY_START, BUILT_IN_GOMP_SINGLE_COPY_END): New.
	* sync-builtins.def: New file, moved from builtins.def.
	* omp-builtins.def: New file, moved from builtins.def.

	* c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.

	* gimple-low.c (lower_function_body): Clear data.
	(lower_stmt): Do not handle COMPOUND_EXPR.
	Remove call to print_node_brief.

	* c-tree.h (c_finish_omp_clauses): New prototype.
	(C_DECL_THREADPRIVATE_P): Define.
	(lookup_name_no_remap, c_omp_remap_private): Remove
	(c_begin_omp_parallel, c_finish_omp_parallel): Update.
	(check_for_loop_decls): Update decl.
	(lookup_name_no_remap, c_omp_remap_private): Declare.
	(build_indirect_ref, build_modify_expr, pushdecl,
	pushdecl_top_level): Move to c-common.h.

	* dwarf2out.c (loc_descriptor_from_tree_1): Don't set unsignedp
	before the switch, but just in the 2 places that need it.

	* c-decl.c (diagnose_mismatched_decls): Do not check for
	mismatched thread-local attributes when OLDDECL is marked
	threadprivate and NEWDECL has no thread-local attributes.
	(merge_decls): Merge C_DECL_THREADPRIVATE_P.
	(c_gimple_diagnostics_recursively): Rename from
	c_warn_unused_result_recursively.  Invoke
	diagnose_omp_structured_block_errors.
	(check_for_loop_decls): Return a singular decl found.

	* langhooks.c (lhd_omp_predetermined_sharing): Return
	OMP_CLAUSE_DEFAULT_SHARED for DECL_ARTIFICIAL decls.
	(lhd_omp_firstprivatize_type_sizes): New.
	(lhd_omp_assignment): New.
	(lhd_omp_predetermined_sharing): New.

	* langhooks.h (struct gimplify_omp_ctx): Forward declare.
	(struct lang_hooks_for_types): Add
	omp_firstprivatize_type_sizes, omp_privatize_by_reference,
	omp_predetermined_sharing, omp_disregard_value_expr,
	omp_private_debug_clause, omp_clause_default_ctor,
	omp_clause_copy_ctor, omp_clause_assign_op, omp_clause_dtor.

	(c_finish_omp_clauses): New.
	(c_finish_bc_stmt): Diagnose break within omp for.
	(c_begin_omp_parallel, c_finish_omp_parallel): New.
	(build_unary_op): Return error_mark after reporting
	a readonly_error.
	(build_modify_expr): Likewise.

	* gimplify.c: Include optabs.h and pointer-set.h.
	(enum gimplify_omp_var_data): Declare.
	(struct gimplify_omp_ctx): Declare.
	(struct gimplify_ctx): Add fields prev_context, combined_pre_p
	and combined_ctxp.
	(gimplify_ctxp, gimplify_omp_ctxp): New local variables.
	(push_gimplify_context, pop_gimplify_context): Allow nesting.
	(splay_tree_compare_decl_uid): New.
	(new_omp_context): New.
	(delete_omp_context): New.
	(gimple_add_tmp_var): Call omp_add_variable.
	(gimplify_bind_expr): Likewise.
	(gimplify_var_or_parm_decl): If omp_notice_variable returned
	true, disregard DECL_VALUE_EXPR on the decl if any.
	(gimplify_expr_in_ctx): New.
	(omp_firstprivatize_variable, omp_firstprivatize_type_sizes
	omp_add_variable, omp_notice_variable, omp_is_private
	gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1
	gimplify_adjust_omp_clauses, gimplify_omp_parallel
	gimplify_omp_for, gimplify_omp_workshare, goa_lhs_expr_p
	gimplify_omp_atomic_fetch_op, goa_stabilize_expr
	gimplify_omp_atomic_pipeline, gimplify_omp_atomic_mutex
	gimplify_omp_atomic): New.
	(gimplify_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
	OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
	OMP_CRITICAL and OMP_ATOMIC.
	(gimplify_body): Verify gimplify_ctxp is empty after gimplification.

	* c-pragma.h (enum pragma_kind): Add
	PRAGMA_OMP_ATOMIC, PRAGMA_OMP_BARRIER,
	PRAGMA_OMP_CRITICAL, PRAGMA_OMP_FLUSH, PRAGMA_OMP_FOR,
	PRAGMA_OMP_MASTER, PRAGMA_OMP_ORDERED,
	PRAGMA_OMP_PARALLEL, PRAGMA_OMP_PARALLEL_FOR,
	PRAGMA_OMP_PARALLEL_SECTIONS, PRAGMA_OMP_SECTION,
	PRAGMA_OMP_SECTIONS, PRAGMA_OMP_SINGLE,
	PRAGMA_OMP_THREADPRIVATE.

	* tree.def (OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
	OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
	OMP_CRITICAL, OMP_ATOMIC, OMP_CLAUSE_PRIVATE,
	OMP_CLAUSE_SHARED, OMP_CLAUSE_FIRSTPRIVATE,
	OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_REDUCTION,
	OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE,
	OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
	OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_NOWAIT,
	OMP_CLAUSE_ORDERED, OMP_CLAUSE_DEFAULT): Define.

	* print-tree.c (print_node): Dump DECL_VALUE_EXPR.

	* tree-ssa-dce.c (find_control_dependence): Do not assume that
	ENTRY_BLOCK_PTR->next_bb == single_succ (ENTRY_BLOCK_PTR).

	* tree-nested.c (convert_call_expr): Call walk_body on OMP_BODY for
	OpenMP directives.
	(struct nesting_info): Add field_map,
	suppress_expansion, debug_var_chain.
	(create_nesting_tree): Initialize them.
	(lookup_field_for_decl): Use field_map.
	(get_nonlocal_debug_decl, get_local_debug_decl): New.
	(convert_local_omp_clauses): New.
	(finalize_nesting_tree_1): Add debug_var_chain to toplevel block.
	(walk_body): Split out of walk_function.
	(convert_nonlocal_omp_clauses, convert_local_omp_clauses): New.
	(convert_nonlocal_reference): Handle omp statements.
	(convert_local_reference): Likewise.
	(unnest_nesting_tree_1): Split out of finalize_nesting_tree_1.
	(unnest_nesting_tree): New.
	(lower_nested_functions): Call it.
	(insert_field_into_struct): Make extern.
	(struct walk_stmt_info): Move to tree-gimple.h.
	(walk_stmts): Make extern.

	* omp-builtins.def: New file.

	* tree-iterator.c (expr_only): Clarify comment.

	* c-common.h (pushdecl_top_level, pushdecl,
	build_modify_expr, build_indirect_ref,
	c_finish_omp_master, c_finish_omp_critical,
	c_finish_omp_ordered, c_finish_omp_barrier,
	c_finish_omp_atomic, c_finish_omp_flush,
	c_finish_omp_for, c_split_parallel_clauses,
	omp_clause_default_kind, c_omp_sharing_predetermined,
	c_omp_remap_decl): Declare.

	* Makefile.in (BUILTINS_DEF): Add omp-builtins.def.
	(OBJS-common): Add omp-low.o.
	(c-omp.o, omp-low.o): Add.
	(gimplify.o): Add dependency on $(OPTABS_H).
	(GTFILES): Add omp-low.c.
	(gt-stringpool.h): Add.

	* tree-cfg.c (set_bb_for_stmt): Do not update the
	block-to-labels map if we are currently expanding to RTL.
	(tree_node_can_be_shared): Remove unnecessary CONSTANT_CLASS_P
	checks.
	Handle IDENTIFIER_NODE.
	(tree_verify_flow_info): Do not ICE when emitting error
	messages about invalid labels.
	(dump_function_to_file): Reset CFUN before emitting the body
	of the function.
	(debug_function): New.

	* passes.c (init_optimization_passes): Schedule
	pass_lower_omp.

	* langhooks-def.h (lhd_omp_predetermined_sharing,
	lhd_omp_assignment, lhd_omp_firstprivatize_type_sizes):
	Declare.
	(LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
	(LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE,
	LANG_HOOKS_OMP_PREDETERMINED_SHARING,
	LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
	LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE,
	LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR,
	LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
	LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP,
	LANG_HOOKS_OMP_CLAUSE_DTOR): Define.
	(LANG_HOOK_DECLS): Use them.


2006-01-18  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
	    Richard Henderson  <rth@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* c-parser.c (pragma_omp_clause): Define.
	(c_parser_declaration_or_fndef): Document OpenMP syntax.
	(c_parser_compound_statement): Likewise.
	(c_parser_statement): Likewise.
	(c_parser_pragma): Handle omp pragmas.
	(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
	OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Define.
	(c_parser_omp_clause_name, check_no_duplicate_clause,
	c_parser_omp_variable_list,
	c_parser_omp_var_list_parens, c_parser_omp_clause_copyin,
	c_parser_omp_clause_copyprivate,
	c_parser_omp_clause_default,
	c_parser_omp_clause_firstprivate, c_parser_omp_clause_if,
	c_parser_omp_clause_lastprivate,
	c_parser_omp_clause_nowait,
	c_parser_omp_clause_num_threads,
	c_parser_omp_clause_ordered, c_parser_omp_clause_private,
	c_parser_omp_clause_reduction,
	c_parser_omp_clause_schedule, c_parser_omp_clause_shared,
	c_parser_omp_all_clauses, c_parser_omp_structured_block,
	c_parser_omp_atomic, c_parser_omp_barrier,
	c_parser_omp_critical, c_parser_omp_flush,
	c_parser_omp_for_loop, c_parser_omp_for,
	c_parser_omp_master, c_parser_omp_ordered,
	c_parser_omp_sections_scope, c_parser_omp_sections,
	c_parser_omp_parallel, c_parser_omp_single,
	c_parser_omp_construct, c_parser_omp_threadprivate): New.
	* c-pragma.c (init_pragma): Do omp pragma registration here.
	* c.opt (fopenmp): New flag.


2006-01-18  Eric Christopher  <echristo@apple.com>

	* gcc.c (GOMP_SELF_SPECS): Bracket in #ifndef/#endif.
	* config/darwin.h (GOMP_SELF_SPECS): Define.


testsuite/

2006-01-18  Richard Henderson  <rth@redhat.com>
            Aldy Hernandez  <aldyh@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>
            Uros Bizjak  <uros@kss-loka.si>

	* testsuite/gcc.dg/gomp: New directory.

From-SVN: r109902
2006-01-18 14:21:25 -05:00