1. 08 Apr, 2009 1 commit
    • re PR middle-end/39614 (Internal error compiling CSiBE) · 4d84fe7c
      	PR c/39614
      	PR c/39673
      	* c-common.h (C_MAYBE_CONST_EXPR_PRE, C_MAYBE_CONST_EXPR_EXPR,
      	C_MAYBE_CONST_EXPR_INT_OPERANDS, C_MAYBE_CONST_EXPR_NON_CONST,
      	EXPR_INT_CONST_OPERANDS): Remove duplicate definitions.
      	* c-convert.c (convert): Do not call fold on results of conversion
      	functions when the result is a C_MAYBE_CONST_EXPR.
      	* c-parser.c (c_parser_postfix_expression): Do not fold condition
      	of __builtin_choose_expr.
      	* c-typeck.c (remove_c_maybe_const_expr): New.
      	(build_unary_op, build_conditional_expr, build_compound_expr,
      	build_binary_op, c_objc_common_truthvalue_conversion): Call
      	remove_c_maybe_const_expr on any input C_MAYBE_CONST_EXPR with
      	integer operands.
      
      testsuite:
      	* gcc.c-torture/compile/pr39614-1.c,
      	gcc.c-torture/compile/pr39614-2.c,
      	gcc.c-torture/compile/pr39614-3.c,
      	gcc.c-torture/compile/pr39614-4.c,
      	gcc.c-torture/compile/pr39614-5.c,
      	gcc.c-torture/compile/pr39673-1.c,
      	gcc.c-torture/compile/pr39673-2.c: New tests.
      	* gcc.dg/gnu89-const-expr-2.c, gcc.dg/gnu99-const-expr-2.c: Test
      	more cases.
      	* gcc.dg/overflow-warn-1.c, gcc.dg/overflow-warn-2.c,
      	gcc.dg/overflow-warn-3.c, gcc.dg/overflow-warn-4.c: Update
      	expected errors.
      
      From-SVN: r145737
      Joseph Myers committed
  2. 01 Apr, 2009 1 commit
  3. 30 Mar, 2009 1 commit
    • re PR middle-end/323 (optimized code gives strange floating point results) · 8ce94e44
      	PR rtl-optimization/323
      	* c-common.c (c_fully_fold, convert_and_check,
      	c_common_truthvalue_conversion): Handle EXCESS_PRECISION_EXPR.
      	(c_fully_fold_internal): Disallow EXCESS_PRECISION_EXPR.
      	* c-common.def (EXCESS_PRECISION_EXPR): New.
      	* c-cppbuiltin.c (builtin_define_float_constants): Define
      	constants with enough digits for long double.
      	* c-lex.c (interpret_float): Interpret constant with excess
      	precision where appropriate.
      	* c-opts.c (c_common_post_options): Set
      	flag_excess_precision_cmdline.  Give an error for
      	-fexcess-precision=standard for C++ for processors where the
      	option is significant.
      	* c-parser.c (c_parser_conditional_expression): Handle excess
      	precision in condition.
      	* c-typeck.c (convert_arguments): Handle arguments with excess
      	precision.
      	(build_unary_op): Move excess precision outside operation.
      	(build_conditional_expr): Likewise.
      	(build_compound_expr): Likewise.
      	(build_c_cast): Do cast on operand of EXCESS_PRECISION_EXPR.
      	(build_modify_expr): Handle excess precision in RHS.
      	(convert_for_assignment): Handle excess precision in converted
      	value.
      	(digest_init, output_init_element, process_init_element): Handle
      	excess precision in initializer.
      	(c_finish_return): Handle excess precision in return value.
      	(build_binary_op): Handle excess precision in operands and add
      	excess precision as needed for operation.
      	* common.opt (-fexcess-precision=): New option.
      	* config/i386/i386.h (X87_ENABLE_ARITH, X87_ENABLE_FLOAT): New.
      	* config/i386/i386.md (float<SSEMODEI24:mode><X87MODEF:mode>2):
      	For standard excess precision, output explicit conversion to and
      	truncation from XFmode.
      	(*float<SSEMODEI24:mode><X87MODEF:mode>2_1,
      	*float<SSEMODEI24:mode><X87MODEF:mode>2_i387_with_temp,
      	*float<SSEMODEI24:mode><X87MODEF:mode>2_i387, two unnamed
      	define_splits, floatdi<X87MODEF:mode>2_i387_with_xmm, two unnamed
      	define_splits, *floatunssi<mode>2_1, two unnamed define_splits,
      	floatunssi<mode>2, add<mode>3, sub<mode>3, mul<mode>3, divdf3,
      	divsf3, *fop_<mode>_comm_i387, *fop_<mode>_1_i387,
      	*fop_<MODEF:mode>_2_i387, *fop_<MODEF:mode>_3_i387,
      	*fop_df_4_i387, *fop_df_5_i387, *fop_df_6_i387, two unnamed
      	define_splits, sqrt<mode>2): Disable where appropriate for
      	standard excess precision.
      	* convert.c (convert_to_real): Do not shorten arithmetic to type
      	for which excess precision would be used.
      	* defaults.h (TARGET_FLT_EVAL_METHOD_NON_DEFAULT): Define.
      	* doc/invoke.texi (-fexcess-precision=): Document option.
      	(-mfpmath=): Correct index entry.
      	* flags.h (enum excess_precision, flag_excess_precision_cmdline,
      	flag_excess_precision): New.
      	* langhooks.c (lhd_post_options): Set
      	flag_excess_precision_cmdline.
      	* opts.c (common_handle_option): Handle -fexcess-precision=.
      	* toplev.c (flag_excess_precision_cmdline, flag_excess_precision,
      	init_excess_precision): New.
      	(lang_dependent_init_target): Call init_excess_precision.
      	* tree.c (excess_precision_type): New.
      	* tree.h (excess_precision_type): Declare.
      
      ada:
      	* gcc-interface/misc.c (gnat_post_options): Set
      	flag_excess_precision_cmdline.  Give an error for
      	-fexcess-precision=standard for processors where the option is
      	significant.
      
      fortran:
      	* options.c (gfc_post_options): Set
      	flag_excess_precision_cmdline.  Give an error for
      	-fexcess-precision=standard for processors where the option is
      	significant.
      
      java:
      	* lang.c (java_post_options): Set flag_excess_precision_cmdline.
      	Give an error for -fexcess-precision=standard for processors where
      	the option is significant.
      
      testsuite:
      	* gcc.target/i386/excess-precision-1.c,
      	gcc.target/i386/excess-precision-2.c,
      	gcc.target/i386/excess-precision-3.c,
      	gcc.target/i386/excess-precision-4.c,
      	gcc.target/i386/excess-precision-5.c,
      	gcc.target/i386/excess-precision-6.c: New tests.
      
      From-SVN: r145272
      Joseph Myers committed
  4. 29 Mar, 2009 1 commit
    • re PR c/456 (constant expressions constraints (gcc.dg/c90-const-expr-1)) · 928c19bb
      	PR c/456
      	PR c/5675
      	PR c/19976
      	PR c/29116
      	PR c/31871
      	PR c/35198
      
      fixincludes:
      	* inclhack.def (glibc_tgmath): New fix.
      	* fixincl.x: Regenerate.
      	* tests/base/tgmath.h: New.
      
      gcc:
      	* builtins.c (fold_builtin_sincos): Build COMPOUND_EXPR in
      	void_type_node.
      	(fold_call_expr): Return a NOP_EXPR from folding rather than the
      	contained expression.
      	* c-common.c (c_fully_fold, c_fully_fold_internal, c_save_expr):
      	New.
      	(c_common_truthvalue_conversion): Use c_save_expr.  Do not fold
      	conditional expressions for C.
      	(decl_constant_value_for_optimization): Move from
      	decl_constant_value_for_broken_optimization in c-typeck.c.  Check
      	whether optimizing and that the expression is a VAR_DECL not of
      	array type instead of doing such checks in the caller.  Do not
      	check pedantic.  Call gcc_unreachable for C++.
      	* c-common.def (C_MAYBE_CONST_EXPR): New.
      	* c-common.h (c_fully_fold, c_save_expr,
      	decl_constant_value_for_optimization): New prototypes.
      	(C_MAYBE_CONST_EXPR_PRE, C_MAYBE_CONST_EXPR_EXPR,
      	C_MAYBE_CONST_EXPR_INT_OPERANDS, C_MAYBE_CONST_EXPR_NON_CONST,
      	EXPR_INT_CONST_OPERANDS): Define.
      	* c-convert.c (convert): Strip nops from expression.
      	* c-decl.c (groktypename): Take extra parameters expr and
      	expr_const_operands.  Update call to grokdeclarator.
      	(start_decl): Update call to grokdeclarator.  Add statement for
      	expressions used in type of decl.
      	(grokparm): Update call to grokdeclarator.
      	(push_parm_decl): Update call to grokdeclarator.
      	(build_compound_literal): Add parameter non_const and build a
      	C_MAYBE_COSNT_EXPR if applicable.
      	(grokdeclarator): Take extra parameters expr and
      	expr_const_operands.  Track expressions used in declaration
      	specifiers and declarators.  Fold array sizes and track whether
      	they are constant expressions and whether they are integer
      	constant expressions.
      	(parser_xref_tag): Set expr and expr_const_operands fields in
      	return value.
      	(grokfield): Update call to grokdeclarator.
      	(start_function): Update call to grokdeclarator.
      	(build_null_declspecs): Set expr and expr_const_operands fields in
      	return value.
      	(declspecs_add_type): Handle expressions in typeof specifiers.
      	* c-parser.c (c_parser_declspecs): Set expr and
      	expr_const_operands fields for declaration specifiers.
      	(c_parser_enum_specifier): Likewise.
      	(c_parser_struct_or_union_specifier): Likewise.
      	(c_parser_typeof_specifier): Likewise.  Update call to
      	groktypename.  Fold expression as needed.  Return expressions with
      	type instead of adding statements.
      	(c_parser_attributes): Update calls to c_parser_expr_list.
      	(c_parser_statement_after_labels): Fold expression before passing
      	to objc_build_throw_stmt.
      	(c_parser_condition): Fold expression.
      	(c_parser_asm_operands): Fold expression.
      	(c_parser_conditional_expression): Use c_save_expr.  Update call
      	to build_conditional_expr.
      	(c_parser_alignof_expression): Update call to groktypename.
      	(c_parser_postfix_expression): Preserve C_MAYBE_CONST_EXPR as
      	original_code.  Fold expression argument of va_arg.  Create
      	C_MAYBE_CONST_EXPR to preserve side effects of expressions in type
      	argument to va_arg.  Update calls to groktypename.  Fold array
      	index for offsetof.  Verify that first argument to
      	__builtin_choose_expr has integer type.
      	(c_parser_postfix_expression_after_paren_type): Update calls to
      	groktypename and build_compound_literal.  Handle expressions with
      	side effects in type name.
      	(c_parser_postfix_expression_after_primary): Update call to
      	c_parser_expr_list.  Set original_code for calls to
      	__builtin_constant_p.
      	(c_parser_expr_list): Take extra parameter fold_p.  Fold
      	expressions if requested.
      	(c_parser_objc_type_name): Update call to groktypename.
      	(c_parser_objc_synchronized_statement): Fold expression.
      	(c_parser_objc_receiver): Fold expression.
      	(c_parser_objc_keywordexpr): Update call to c_parser_expr_list.
      	(c_parser_omp_clause_num_threads, c_parser_omp_clause_schedule,
      	c_parser_omp_atomic, c_parser_omp_for_loop): Fold expressions.
      	* c-tree.h (CONSTRUCTOR_NON_CONST): Define.
      	(struct c_typespec): Add elements expr and expr_const_operands.
      	(struct c_declspecs): Add elements expr and expr_const_operands.
      	(groktypename, build_conditional_expr, build_compound_literal):
      	Update prototypes.
      	(in_late_binary_op): Declare.
      	* c-typeck.c (note_integer_operands): New function.
      	(in_late_binary_op): New variable.
      	(decl_constant_value_for_broken_optimization): Move to c-common.c
      	and rename to decl_constant_value_for_optimization.
      	(default_function_array_conversion): Do not strip nops.
      	(default_conversion): Do not call
      	decl_constant_value_for_broken_optimization.
      	(build_array_ref): Do not fold result.
      	(c_expr_sizeof_expr): Fold operand.  Use C_MAYBE_CONST_EXPR for
      	result when operand is a VLA.
      	(c_expr_sizeof_type): Update call to groktypename.  Handle
      	expressions included in type name.  Use C_MAYBE_CONST_EXPR for
      	result when operand names a VLA type.
      	(build_function_call): Update call to build_compound_literal.
      	Only fold result for calls to __builtin_* functions.  Strip
      	NOP_EXPR from INTEGER_CST returned from such functions.  Fold
      	the function designator.
      	(convert_arguments): Fold arguments.  Update call to
      	convert_for_assignment.
      	(build_unary_op): Handle increment and decrement of
      	C_MAYBE_CONST_EXPR.  Move lvalue checks for increment and
      	decrement earlier.  Fold operand of increment and decrement.
      	Handle address of C_MAYBE_CONST_EXPR.  Only fold expression being
      	built for integer operand.  Wrap returns that are INTEGER_CSTs
      	without being integer constant expressions or that have integer
      	constant operands without being INTEGER_CSTs.
      	(lvalue_p): Handle C_MAYBE_CONST_EXPR.
      	(build_conditional_expr): Add operand ifexp_bcp.  Track whether
      	result is an integer constant expression or can be used in
      	unevaluated parts of one and avoid folding and wrap as
      	appropriate.  Fold operands before possibly doing -Wsign-compare
      	warnings.
      	(build_compound_expr): Wrap result for C99 if operands can be used
      	in integer constant expressions.
      	(build_c_cast): Update call to digest_init.  Do not ignore
      	overflow from casting floating-point constants to integers.  Wrap
      	results that could be confused with integer constant expressions,
      	null pointer constants or floating-point constants.
      	(c_cast_expr): Update call to groktypename.  Handle expressions
      	included in type name.
      	(build_modify_expr): Handle modifying a C_MAYBE_CONST_EXPR.  Fold
      	lhs inside possible SAVE_EXPR.  Fold RHS before assignment.
      	Update calls to convert_for_assignment.
      	(convert_for_assignment): Take new parameter
      	null_pointer_constant.  Do not strip nops or call
      	decl_constant_value_for_broken_optimization.  Set
      	in_late_binary_op for conversions to boolean.
      	(store_init_value): Update call to digest_init.
      	(digest_init): Take new parameter null_pointer_constant.  Do not
      	call decl_constant_value_for_broken_optimization.  pedwarn for
      	initializers not constant expressions.  Update calls to
      	convert_for_assignment.
      	(constructor_nonconst): New.
      	(struct constructor_stack): Add nonconst element.
      	(really_start_incremental_init, push_init_level, pop_init_level):
      	Handle constructor_nonconst and nonconst element.
      	(set_init_index): Call constant_expression_warning for array
      	designators.
      	(output_init_element): Fold value.  Set constructor_nonconst as
      	applicable.  pedwarn for initializers not constant expressions.
      	Update call to digest_init.  Call constant_expression_warning
      	where constant initializers are required.
      	(process_init_element): Use c_save_expr.
      	(c_finish_goto_ptr): Fold expression.
      	(c_finish_return): Fold return value.  Update call to
      	convert_for_assignment.
      	(c_start_case): Fold switch expression.
      	(c_process_expr_stmt): Fold expression.
      	(c_finish_stmt_expr): Create C_MAYBE_CONST_EXPR as needed to
      	ensure statement expression is not evaluated in constant
      	expression.
      	(build_binary_op): Track whether results are integer constant
      	expressions or may occur in such, disable folding and wrap results
      	as applicable.  Fold operands for -Wsign-compare warnings unless
      	in_late_binary_op.
      	(c_objc_common_truthvalue_conversion): Handle results folded to
      	integer constants that are not integer constant expressions.
      	* doc/extend.texi: Document when typeof operands are evaluated,
      	that condition of __builtin_choose_expr is an integer constant
      	expression, and more about use of __builtin_constant_p in
      	initializers.
      
      gcc/objc:
      	* objc-act.c (objc_finish_try_stmt): Set in_late_binary_op.
      
      gcc/testsuite:
      	* gcc.c-torture/compile/20081108-1.c,
      	gcc.c-torture/compile/20081108-2.c,
      	gcc.c-torture/compile/20081108-3.c, gcc.dg/bconstp-2.c,
      	gcc.dg/bconstp-3.c, gcc.dg/bconstp-4.c, gcc.dg/c90-const-expr-6.c,
      	gcc.dg/c90-const-expr-7.c, gcc.dg/c90-const-expr-8.c,
      	gcc.dg/c90-const-expr-9.c, gcc.dg/c90-const-expr-10.c,
      	gcc.dg/c90-const-expr-11.c, gcc.dg/c99-const-expr-6.c,
      	gcc.dg/c99-const-expr-7.c, gcc.dg/c99-const-expr-8.c,
      	gcc.dg/c99-const-expr-9.c, gcc.dg/c99-const-expr-10.c,
      	gcc.dg/c99-const-expr-11.c, gcc.dg/c99-const-expr-12.c,
      	gcc.dg/c99-const-expr-13.c, gcc.dg/compare10.c,
      	gcc.dg/gnu89-const-expr-1.c, gcc.dg/gnu89-const-expr-2.c,
      	gcc.dg/gnu99-const-expr-1.c, gcc.dg/gnu99-const-expr-2.c,
      	gcc.dg/gnu99-const-expr-3.c, gcc.dg/vla-12.c, gcc.dg/vla-13.c,
      	gcc.dg/vla-14.c, gcc.dg/vla-15.c, gcc.dg/vla-16.c: New tests.
      	* gcc.dg/c90-const-expr-1.c, gcc.dg/c90-const-expr-2.c,
      	gcc.dg/c90-const-expr-3.c, gcc.dg/c99-const-expr-2.c,
      	gcc.dg/c99-const-expr-3.c, gcc.dg/c99-static-1.c: Remove XFAILs.
      	* gcc.dg/c90-const-expr-2.c: Use ZERO in place of 0 in another
      	case.
      	* gcc.dg/overflow-warn-1.c, gcc.dg/overflow-warn-2.c,
      	gcc.dg/overflow-warn-3.c, gcc.dg/overflow-warn-4.c: Remove
      	XFAILs.  Update expected messages.
      	* gcc.dg/pr14649-1.c, gcc.dg/pr19984.c, gcc.dg/pr25682.c: Update
      	expected messages.
      	* gcc.dg/real-const-1.c: Replace with test from original PR.
      	* gcc.dg/vect/pr32230.c: Use intermediate cast to __PTRDIFF_TYPE__
      	when casting from non-constant integer to pointer.
      
      From-SVN: r145254
      Joseph Myers committed
  5. 28 Mar, 2009 1 commit
    • re PR c++/39554 (-Wdisallowed-function-list fails when #including <algorithm>) · 574872ff
      	PR c++/39554
      	* opts.c (warning_disallowed_functions, warn_disallowed_functions,
      	warn_if_disallowed_function_p): Removed.
      	(common_handle_option): Don't handle OPT_Wdisallowed_function_list_.
      	* c-parser.c (c_parser_postfix_expression_after_primary): Don't call
      	warning_if_disallowed_function_p.
      	* flags.h (warn_if_disallowed_function_p,
      	warn_disallowed_functions): Removed.
      	* common.opt (Wdisallowed-function-list=): Removed.
      	* doc/invoke.texi (-Wdisallowed-function-list=): Removed.
      
      	* parser.c (cp_parser_postfix_expression): Don't call
      	warning_if_disallowed_function_p.
      
      	* gcc.dg/wdisallowed-functions-1.c: Removed.
      	* gcc.dg/wdisallowed-functions-2.c: Removed.
      	* gcc.dg/wdisallowed-functions-3.c: Removed.
      	* g++.dg/warn/Wdisallowed-functions-1.C: Removed.
      	* g++.dg/warn/Wdisallowed-functions-2.C: Removed.
      	* g++.dg/warn/Wdisallowed-functions-3.C: Removed.
      
      From-SVN: r145198
      Jakub Jelinek committed
  6. 23 Mar, 2009 1 commit
    • re PR c/39495 (OMP parallel loop w/ unsigned index var rejected) · c5cdb03f
      	PR c/39495
      	* c-parser.c (c_parser_omp_for_loop): Call c_parser_binary_expression
      	instead of c_parser_expression_conv, if original_code isn't one of the
      	4 allowed comparison codes, fail.
      
      	* semantics.c (handle_omp_for_class_iterator): Swap cond operands and
      	code if iter is the second operand.
      	* parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
      	argument.  If it is set, don't build the toplevel expression with
      	build_x_binary_op, but build2.
      	(cp_parser_assignment_expression,  cp_parser_omp_for_incr): Adjust
      	callers.
      	(cp_parser_omp_for_cond): Don't assume the first operand of the
      	comparison must be decl.
      
      	* gcc.dg/gomp/pr39495-2.c: Remove xfails.
      
      	* testsuite/libgomp.c/loop-12.c: New test.
      	* testsuite/libgomp.c/loop-11.c: New test.
      	* testsuite/libgomp.c++/loop-11.C: New test.
      	* testsuite/libgomp.c++/loop-12.C: New test.
      	* testsuite/libgomp.c++/for-8.C: New test.
      
      From-SVN: r145014
      Jakub Jelinek committed
  7. 18 Feb, 2009 1 commit
  8. 16 Feb, 2009 1 commit
  9. 13 Feb, 2009 1 commit
  10. 04 Feb, 2009 1 commit
    • re PR c/29129 ([DR#341] unnamed parameters using [*]) · 062c4bb3
      	PR c/29129
      	* c-decl.c (grokdeclarator): Mark [*] arrays in field declarators
      	as having variable size.  Do not give an error for unnamed
      	parameters with [*] declarators.  Give a warning for type names
      	with [*] declarators and mark them as variable size.
      	* c-parser.c (c_parser_sizeof_expression): Do not give an error
      	for sizeof applied to [*] type names.
      
      testsuite:
      	* c90-arraydecl-1.c: Do not expect error for [*] in abstract
      	declarator.
      	* vla-6.c: Likewise.  Expect warning not error for [*] lexically
      	inside function prototype but not part of parameter declarator.
      	* vla-11.c: New test.
      
      From-SVN: r143918
      Joseph Myers committed
  11. 03 Feb, 2009 1 commit
    • re PR inline-asm/39059 (ICE with fixed-point type in inline-asm) · 754ccf7c
      	PR inline-asm/39059
      	* c-parser.c (c_parser_postfix_expression): If fixed point is not
      	supported, don't accept FIXED_CSTs.
      	* c-decl.c (finish_declspecs): Error if fixed point is not supported
      	and _Sat is used without _Fract/_Accum.  Set specs->type to
      	integer_type_node for cts_fract/cts_accum if fixed point is not
      	supported.
      
      	* parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
      
      	* gcc.dg/nofixed-point-2.c: New test.
      	* g++.dg/ext/fixed1.C: Adjust expected diagnostics.
      	* g++.dg/ext/fixed2.C: Likewise.
      	* g++.dg/other/error25.C: Likewise.
      	* g++.dg/lookup/crash7.C: Likewise.
      	* g++.dg/cpp0x/decltype-38655.C: Likewise.
      
      From-SVN: r143900
      Jakub Jelinek committed
  12. 12 Jan, 2009 1 commit
    • re PR c/32041 (offsetof buglet) · 634b5df5
      	PR c/32041
      	* c-parser.c (c_parser_postfix_expression): Allow `->' in
      	offsetof member-designator, handle it as `[0].'.
      
      	* parser.c (cp_parser_builtin_offsetof): Allow `->' in
      	offsetof member-designator, handle it as `[0].'.
      
      	* gcc.dg/pr32041.c: New test.
      	* g++.dg/parse/offsetof9.C: New test.
      
      From-SVN: r143305
      Jakub Jelinek committed
  13. 01 Jan, 2009 1 commit
    • re PR c/36489 (Warning "initialized field overwritten" wrongly triggers with… · b295aee2
      re PR c/36489 (Warning "initialized field overwritten" wrongly triggers with multidimensional arrays)
      
      	PR c/36489
      	* c-typeck.c (add_pending_init): Add IMPLICIT argument.  Only
      	warn about overwriting initializer with side-effects or
      	-Woverride-init if !IMPLICIT.
      	(output_init_element): Likewise.  Pass IMPLICIT down to
      	add_pending_init.
      	(process_init_element): Add IMPLICIT argument.  Pass it down
      	to output_init_element.
      	(push_init_element, pop_init_level, set_designator): Adjust
      	process_init_element callers.
      	(set_nonincremental_init, set_nonincremental_init_from_string):
      	Adjust add_pending_init callers.
      	(output_pending_init_elements): Adjust output_init_element callers.
      	* c-tree.h (process_init_element): Adjust prototype.
      	* c-parser.c (c_parser_initelt, c_parser_initval): Adjust
      	process_init_element callers.
      
      	* gcc.dg/pr36489.c: New test.
      
      From-SVN: r142998
      Jakub Jelinek committed
  14. 05 Dec, 2008 1 commit
  15. 04 Dec, 2008 1 commit
  16. 17 Oct, 2008 1 commit
  17. 06 Oct, 2008 1 commit
    • c-decl.c (finish_decl): Pass input_location to build_unary_op. · c9f9eb5d
      	* c-decl.c (finish_decl): Pass input_location to build_unary_op.
      	* c-typeck.c (array_to_pointer_conversion): Pass location to
      	build_unary_op.
      	(function_to_pointer_conversion): Use error_at and warning_at.
      	(build_indirect_ref): Same.
      	(build_array_ref): Pass location to build_binary_op.
      	(parser_build_unary_op): Do not set location after calling
      	build_unary_op.
      	(build_unary_op): Add location argument.  Use it throughout.  Set
      	EXPR_LOCATION before returning new tree.
      	(build_modify_expr): Same.
      	(build_binary_op): Use location throughout.  Set EXPR_LOCATION before
      	returning node.
      	* c-omp.c (c_finish_omp_atomic): Pass location to build_unary_op,
      	build_indirect_ref, build_modify_expr.
      	(c_finish_omp_for): Same.  Use error_at instead of error.
      	* c-common.c (c_common_truthvalue_conversion): Pass location to
      	build_unary_op.
      	(warn_for_div_by_zero): Add location argument.
      	* c-common.h: Add argument to build_modify_expr, build_indirect_ref,
      	build_unary_op, warn_for_div_by_zero.
      	* c-parser.c (c_parser_typeof_specifier): Use
      	protected_set_expr_location.
      	(c_parser_statement_after_labels): Same.
      	(c_parser_condition): Same.
      	(c_parser_expr_no_commas): Pass correct location to build_modify_expr.
      	(c_parser_conditional_expression): Use protected_set_expr_location.
      	(c_parser_unary_expression): Pass location to build_indirect_ref.
      	(c_parser_postfix_expression_after_primary): Pass location to
      	build_indirect_ref, build_unary_op.
      	(c_parser_omp_for_loop): Set the increment expression's EXPR_LOCATION.
      objc/
      	* objc-act.c (objc_build_string_object): Pass location to
      	build_unary_op.
      	(init_def_list): Same.
      	(init_objc_symtab): Same.
      	(init_module_descriptor): Same.
      	(build_module_initializer_routine): Same.
      	(generate_static_references): Same.
      	(build_typed_selector_reference): Same.
      	(add_objc_string): Same.
      	(objc_substitute_decl): Same.
      	(objc_build_ivar_assignment): Same.
      	(objc_build_global_assignment): Same.
      	(objc_build_strong_cast_assignment): Same.
      	(generate_protocols): Same.
      	(build_protocol_initializer): Same.
      	(build_dispatch_table_initializer): Same.
      	(generate_protocol_list): Same.
      	(build_category_initializer): Same.
      	(build_shared_structure_initializer): Same.
      	(generate_shared_structures): Same.
      	(objc_build_protocol_expr): Same.
      	(build_ivar_reference): Same.
      	(get_super_receiver): Same.
      	build_modify_expr.
      testsuite/
      	* gcc.dg/gomp/for-1.c: Test column.
      	* gcc.dg/misc-column.c: Add column tests for unary arguments.
      cp/
      	* typeck.c (build_x_indirect_ref): Add location argument.
      	(cp_build_binary_op): Pass location to warn_for_div_by_zero.
      	(cp_build_unary_op): Add location argument.
      	(cp_build_modify_expr): Same.
      	* class.c (build_base_path): Pass location to build_indirect_ref.
      	* semantics.c (handle_omp_for_class_iterator): Pass elocus to
      	build_modify_expr.
      
      From-SVN: r140914
      Aldy Hernandez committed
  18. 30 Sep, 2008 1 commit
    • c-common.c (empty_if_body_warning): Remove. · 626c34b5
      2008-09-30  Paolo Bonzini  <bonzini@gnu.org>
      
      	* c-common.c (empty_if_body_warning): Remove.
      	* c-common.h (empty_if_body_warning): Remove.
      	* c-parser.c (c_parser_if_body, c_parser_else_body): Implement
      	here the -Wempty-body warning for `if' and `else' statements.
      	* c-typeck.c (c_finish_if_stmt): Do not call empty_body_warning.
      
      cp:
      2008-09-30  Paolo Bonzini  <bonzini@gnu.org>
      
      	* parser.c (cp_parser_selection_statement): Implement here the
      	-Wempty-body warning for `if' and `else' statements.
      	* semantics.c (finish_if_stmt): Do not call empty_body_warning.
      
      testsuite:
      2008-09-30  Paolo Bonzini  <bonzini@gnu.org>
      
      	* g++.dg/warn/if-empty-1.C: Copy from gcc.dg/if-empty-1.c.
      
      From-SVN: r140780
      Paolo Bonzini committed
  19. 24 Sep, 2008 1 commit
    • c-common.c (fname_decl): New location argument. · 3ba09659
              * c-common.c (fname_decl): New location argument.
              * c-common.h (fname_decl): Same.
              * c-parser.c (c_lex_one_token): Use {warning,error}_at instead of
              {warning,error}.
              (c_parser_typeof_specifier): Same.
              (c_parser_parms_list_declarator): Same.
              (c_parser_asm_string_literal): Same.
              (c_parser_compound_statement_nostart): Same.
              (c_parser_label): Same.
              (c_parser_do_statement): Same.
              (c_parser_asm_statement): Same.
              (c_parser_unary_expression): Same.
              (c_parser_sizeof_expression): Same.
              (c_parser_postfix_expression): Same.
              (c_parser_pragma): Same.
              (c_parser_omp_clause_collapse): Same.
              (c_parser_omp_clause_num_threads): Same.
              (c_parser_omp_clause_schedule): Same.
              (c_parser_omp_all_clauses): Same.
              (c_parser_omp_sections_scope): Same.
              (c_parser_omp_for_loop): Same.  Pass condition's location to
              c_objc_common_truthvalue_conversion.
              (c_parser_enum_specifier): Remove comment.
      testsuite/
              * gcc.dg/gomp/for-1.c: Test for columns.
              * gcc.dg/func-outside-1.c: Same.
              * gcc.dg/bitfld-7.c: Same.
      cp/
              * semantics.c (finish_fname): Pass location to fname_decl.
      
      From-SVN: r140642
      Aldy Hernandez committed
  20. 23 Sep, 2008 1 commit
    • c-tree.h: Add argument to c_objc_common_truthvalue_conversion, parser_build_binary_op. · ba47d38d
              * c-tree.h: Add argument to c_objc_common_truthvalue_conversion,
              parser_build_binary_op.
              * c-decl.c (build_enumerator): Pass location to build_binary_op.
              * c-typeck.c (build_array_ref): Same.
              (parser_build_unary_op): New location argument.
              (pointer_diff): Pass location to build_binary_op,
              c_objc_common_truthvalue_conversion.
              (build_modify_expr): Same.
              (build_unary_op): New location argument.
              (build_binary_op): New location argument.
              (c_objc_common_truthvalue_conversion): Pass location to
              c_*common_truthvalue_conversion.
              * c-convert.c (convert): Same.
              * c-common.c (binary_op_error): New location argument.
              (pointer_int_sum): Pass location to build_binary_op.
              (c_common_truthvalue_conversion): New location argument.
              (warn_for_sign_compare): Same.
              * c-common.h: Add location argument to c_common_truthvalue_conversion,
              binary_op_error, build_binary_op, warn_for_sign_compare.
              * c-parser.c (c_parser_condition): Pass location to
              c_*common_truthvalue_conversion.
              (c_parser_conditional_expression): Save condition's location and pass
              it on down.
              (c_parser_binary_expression): Same, but for the binary operator's
              location.
              (c_parser_omp_for_loop): Pass location to
              c_objc_common_truthvalue_conversion.
      objc/
              * objc-act.c (next_sjlj_build_enter_and_setjmp): Call
              c_common_truthvalue_conversion with location.
              (next_sjlj_build_catch_list): Same.
              (next_sjlj_build_try_catch_finally): Same.
      testsuite/
              * gcc.dg/Walways-true-1.c: Test column numbers.
              * gcc.dg/c90-const-expr-5.c: Same.
              * gcc.dg/compare4.c: Same.
              * gcc.dg/Werror-1.c: Same.
      cp/
              * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
              (get_member_function_from_ptrfunc): Same.
              (build_x_binary_op): Same.
              (build_binary_op): Same.
              (cp_build_binary_op): New location argument.
              (pointer_diff): Pass location to cp_build_binary_op.
              (cp_truthvalue_conversion): Pass location to build_binary_op.
              (convert_ptrmem): Pass location to cp_build_binary_op.
              (cp_build_modify_expr): Same.
              (build_ptrmemfunc): Same.
              * init.c (expand_cleanup_for_base): Pass location to
              c_common_truthvalue_conversion.
              (build_new_1): Pass location to cp_build_binary_op.
              (build_vec_delete_1): Pass location to *build_binary_op,
              c_common_truthvalue_conversion.
              (build_vec_init): Same.
              (build_delete): Same.
              * decl.c (compute_array_index_type): Same.
              * call.c (build_new_op): Same.
              * rtti.c (build_dynamic_cast_1): Same.
              * cp-tree.h: Add argument to cp_build_binary_op.
              * semantics.c (handle_omp_for_class_iterator): Pass location to
              *build_binary_op, c_common_truthvalue_conversion.
              * decl2.c (get_guard_cond): Same.
      
      From-SVN: r140598
      Aldy Hernandez committed
  21. 09 Sep, 2008 1 commit
    • function.h (struct function): Add function_start_locus. · 1751ecd6
              * function.h (struct function): Add function_start_locus.
              * cfgexpand.c (gimple_expand_cfg): Use it.
              * c-parser.c (c_parser_declaration_or_fndef): Set it.
      testsuite/
              * gcc.dg/always_inline.c: Place error message on function
              name line.
              * gcc.dg/winline-6.c: Same.
              * gcc.dg/noreturn-1.c: Same.
              * gcc.dg/noreturn-7.c: Same.
              * gcc.dg/inline-14.c: Same.
              * gcc.dg/always_inline3.c: Same.
              * gcc.dg/winline-3.c: Same.
              * gcc.dg/wtr-func-def-1.c: Same.
              * gcc.dg/winline-5.c: Same.
              * gcc.dg/winline-7.c: Same.
              * gcc.dg/winline-9.c: Same.
              * gcc.dg/noreturn-4.c: Same.
              * gcc.dg/20041213-1.c: Use column numbers.
      
      From-SVN: r140144
      Aldy Hernandez committed
  22. 01 Sep, 2008 1 commit
    • tree.c (protected_set_expr_location): New. · 6a3799eb
              * tree.c (protected_set_expr_location): New.
              * tree.h (protected_set_expr_location): New prototype.
              * c-tree.h (build_array_ref): Add argument.
              (parser_build_unary_op): Same.
              * c-typeck.c (build_indirect_ref): Handle new location argument.
              (build_array_ref): Same.
              (parser_build_unary_op): Same.
              * gimplify.c (gimplify_asm_expr): Set input_location before calling
              error.
              * c-omp.c (c_finish_omp_atomic): Pass location when calling
              build_indirect_ref.
              * c-common.c (finish_label_address_expr): Handle new location
              argument.
              * c-common.h (build_indirect_ref): Add argument.
              (finish_label_address_expr): Same.
              * c-parser.c (c_parser_unary_expression): Pass location to build
              functions.
              (c_parser_postfix_expression): Same.
      objc/
              * objc-act.c (build_typed_selector_reference): Pass input_location to
              build_unary_op calls.
              (build_selector_reference): Same, but to build_array_ref.
              (objc_substitute_decl): Same.
              (build_ivar_reference): Same, but to build_indirect_ref.
              (get_super_receiver): Same.
      testsuite/
              * gcc.dg/20010516-1.c: Test for columns.
      cp/
              * typeck.c (build_x_indirect_ref): Add location argument.
              * class.c (build_base_path): Pass location to build_indirect_ref.
              * pt.c (tsubst_copy_and_build): Pass location to
              finish_label_address_expr.
              * parser.c (cp_parser_unary_expression): Same.
      
      From-SVN: r139867
      Aldy Hernandez committed
  23. 21 Aug, 2008 2 commits
    • c-tree.h (grokfield): New argument. · 3d10ed6c
              * c-tree.h (grokfield): New argument.
              * c-decl.c (grokfield): Handle new location argument.
              * c-parser.c (c_parser_struct_declaration): Pass location to
              grokfield.
      testsuite/
              * gcc.dg/20011008-1.c: Test column.
              * gcc.dg/20080820.c: New.
              * gcc.dg/fltconst-1.c: Test column.
              * gcc.dg/cpp/cpp.exp: Add -fno-show-column.
              * gcc.dg/cpp/trad/trad.exp: Same.
              * lib/gcc.exp (gcc_target_compile): Remove -fno-show-column.
              * lib/gcc-dg.exp (process-message): Handle columns.
      
      From-SVN: r139403
      Aldy Hernandez committed
    • diagnostic.c (pedwarn_at): Rename as pedwarn. · 509c9d60
      2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	* diagnostic.c (pedwarn_at): Rename as pedwarn.
      	(pedwarn): Delete.
      	* toplev.h (pedwarn_at): Likewise.
      	* builtins.c: Update all calls to pedwarn.
      	* c-lex.c: Likewise.
      	* toplev.c: Likewise.
      	* c-tree.h: Likewise.
      	* c-decl.c: Likewise.
      	* c-errors.c: Likewise.
      	* c-typeck.c: Likewise.
      	* c-common.c: Likewise.
      	* c-parser.c: Likewise.
      cp/
      	* typeck.c: Update all calls to pedwarn.
      	* decl.c: Likewise.
      	* call.c: Likewise.
      	* error.c: Likewise.
      	* pt.c: Likewise.
      	* name-lookup.c: Likewise.
      	* parser.c: Likewise.
      fortran/	
      	* f95-lang.c: Update all calls to pedwarn.
      
      From-SVN: r139373
      Manuel López-Ibáñez committed
  24. 20 Aug, 2008 1 commit
  25. 18 Aug, 2008 1 commit
  26. 14 Aug, 2008 1 commit
  27. 13 Aug, 2008 1 commit
    • re PR c/15236 (pedantic switch modifies treatment of non-ISO compliant enumerations) · 85790e66
      2008-08-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	PR c/15236
      	* diagnostic.c (pedwarn_at): New.
      	* toplev.h (pedwarn_at): Declare.
      	* c-tree.h (build_enumerator): Update declaration.
      	* c-decl.c (finish_enum): Update comment.
      	(build_enumerator): Take a location parameter. Give a pedwarn but do
      	not perform any conversion.
      	* c-parser.c (c_parser_enum_specifier): Set correct location for
      	enumerator.
      testsuite/
      	* gcc.dg/pr15236.c: New.
      	* gcc.dg/torture/pr25183.c: Update.
      
      From-SVN: r139050
      Manuel López-Ibáñez committed
  28. 09 Aug, 2008 1 commit
    • re PR c++/17880 (-Wsequence-point doesn't warn inside if, while, do conditions,… · ca085fd7
      re PR c++/17880 (-Wsequence-point doesn't warn inside if, while, do conditions, for beg/cond/end expressions etc.)
      
      2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	PR c/17880
      	* c-typeck.c (digest_init): Call verify_sequence_points from here.
      	(c_finish_return): Likewise.
      	(c_start_case): Likewise.
      	* c-common.c (warn_for_collisions_1): Use explicit location in
      	warning.
      	* c-parser.c (c_parser_condition): New. Call
      	verify_sequence_points.
      	(c_parser_paren_condition): Call c_parser_condition.
      	(c_parser_for_statement): Call c_parser_condition.
      testsuite/
      	* gcc.dg/sequence-pt-pr17880.c: New.
      
      From-SVN: r138904
      Manuel López-Ibáñez committed
  29. 23 Jul, 2008 1 commit
    • re PR c/35058 (-Werror= works only with some warnings) · fcf73884
      2008-07-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	PR 35058
      	* diagnostic.c (pedwarn): Add opt parameter.
      	(pedwarn0): New.
      	* c-tree.h (pedwarn_init): Add opt parameter.
      	(pedwarn_c90): Likewise.
      	(pedwarn_c99): Likewise.
      	* c-errors.c (pedwarn_c99): Likewise.
      	(pedwarn_c90): Likewise.
      	* toplev.h (pedwarn): Update declaration.
      	(pedwarn0): Declare.
      	* c-lex.c: All calls to pedwarn changed.
      	* builtins.c: All calls to pedwarn changed.
      	* toplev.c: All calls to pedwarn changed.
      	* c-decl.c: All calls to pedwarn changed.
      	* c-typeck.c: All calls to pedwarn changed.
      	* c-common.c: All calls to pedwarn changed.
      	* c-parser.c: All calls to pedwarn changed.
      cp/
      	* typeck.c: All calls to pedwarn changed.
      	* decl.c: All calls to pedwarn changed.
      	* call.c: All calls to pedwarn changed.
      	* error.c: All calls to pedwarn changed.
      	* typeck2.c: All calls to pedwarn changed.
      	* pt.c: All calls to pedwarn changed.
      	* name-lookup.c: All calls to pedwarn changed.
      	* parser.c: All calls to pedwarn changed.
      fortran/
      	* f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
      testsuite/
      	* gcc.dg/Wdeclaration-after-statement-3.c: New.
      	* gcc/testsuite/gcc.dg/Wpointer-arith.c: New.
      
      From-SVN: r138089
      Manuel López-Ibáñez committed
  30. 21 Jul, 2008 1 commit
    • Makefile.in: Replace toplev.h with TOPLEV_H. · aa14403d
      2007-07-21  Rafael Avila de Espindola  <espindola@google.com>
      
      	* Makefile.in: Replace toplev.h with TOPLEV_H.
      	* c-decl.c (merge_decls): Don't set DECL_IN_SYSTEM_HEADER.
      	* c-lex.c (fe_file_change): Don't set in_system_header.
      	* c-parser.c (c_token): Remove in_system_header.
      	(c_lex_one_token): Don't set in_system_header.
      	(c_parser_set_source_position_from_token): Don't set in_system_header.
      	* diagnostic.c (diagnostic_report_diagnostic): Use location from
      	diagnostic_info.
      	(warning_at): New.
      	* diagnostic.h (diagnostic_report_warnings_p): Add LOC argument.
      	* flags.h (in_system_header): Remove.
      	* function.c (saved_in_system_header): Remove.
      	(push_cfun): Don't set in_system_header.
      	(pop_cfun): Don't set in_system_header.
      	(push_struct_function): Don't set in_system_header.
      	* input.h (expanded_location): Add sysp.
      	(in_system_header_at): New.
      	(in_system_header): New.
      	* toplev.c (in_system_header): Remove.
      	* toplev.h: Include input.h
      	(warning_at): New.
      	* tree-cfg.c (execute_warn_function_return): Call warning_at.
      	* tree-ssa.c (warn_uninit): Call warning_at.
      	(warn_uninitialized_var): Update calls to warn_uninit.
      	(warn_uninitialized_phi): Update calls to warn_uninit.
      	* tree.c (make_node_stat): Don't set DECL_IN_SYSTEM_HEADER.
      	(expand_location): Initialize xloc.sysp.
      	* tree.h (DECL_IN_SYSTEM_HEADER): Use in_system_header_at.
      	(tree_decl_with_vis): Remove in_system_header_flag.
      
      2007-07-21  Rafael Avila de Espindola  <espindola@google.com>
      
      	* parser.c (cp_token): Remove in_system_header.
      	(eof_token): Remove in_system_header.
      	(cp_lexer_get_preprocessor_token): Don't set in_system_header.
      	(cp_lexer_set_source_position_from_token): Don't set in_system_header.
      	(cp_parser_member_declaration):  Use in_system_header_at.
      	* pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
      	(pop_tinst_level): Don't set in_system_header.
      	(instantiate_class_template): Don't set in_system_header.
      	(instantiate_decl): Don't set in_system_header.
      	(instantiate_pending_templates): Don't set in_system_header.
      
      From-SVN: r138031
      Rafael Avila de Espindola committed
  31. 11 Jul, 2008 1 commit
    • c-common.h (enum rid): Add RID_CXX_COMPAT_WARN. · eea1139b
      ./:	* c-common.h (enum rid): Add RID_CXX_COMPAT_WARN.
      	(struct c_common_resword): Define.
      	(D_CONLY, D_CXXONLY, D_C99, D_CXX0X, D_EXT, D_EXT89): Define.
      	(D_ASM, D_OBJC, D_CXX_OBJC, D_CXXWARN): Define.
      	(c_common_reswords, num_c_common_reswords): Declare.
      	* c-common.c (c_common_reswords): New global const array.
      	(num_c_common_reswords): New const int.
      	* c-parser.c (struct resword, reswords): Don't define.
      	(D_C89, D_EXT, D_EXT89, D_OBJC): Don't define.
      	(c_parse_init): Clarify mask code.  Use c_common_reswords rather
      	than reswords.  If warning about C++ keywords, give them a special
      	RID code.
      	(c_lex_one_token): Warn about C++ keywords.  Call
      	objc_is_reserved_word rather than OBJC_IS_AT_KEYWORD.
      	(c_parser_external_declaration): Look for RID_xxx rather than
      	RID_AT_xxx, for ObjC++ keywords which are also C++ keywords.
      	(c_parser_statement_after_labels): Likewise.
      	(c_parser_objc_class_instance_variables): Likewise.
      	(c_parser_objc_class_declaration): Likewise.
      	(c_parser_objc_try_catch_statement): Likewise.
      	* c-decl.c (c_print_identifier): Ignore RID_CXX_COMPAT_WARN.
      	(declspecs_add_type): Likewise.
      cp/:
      	* lex.c (struct resword, reswords): Don't define.
      	(D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
      	(init_reswords): Clarify mask code.  Use c_common_reswords rather
      	than reswords.
      objc/:
      	* objc-act.c (objc_is_reserved_word): Always check for RID_CLASS,
      	etc., not just when OBJCPLUS is defined.
      testsuite/:
      	* gcc.dg/Wcxx-compat-2.c: New test.
      
      From-SVN: r137724
      Ian Lance Taylor committed
  32. 09 Jul, 2008 1 commit
    • invoke.texi (Option Summary): Mention new option -Wdisallowed-function-list=... · 1ebc7e68
      2008-07-09  Raksit Ashok <raksit@google.com>
      
      	* doc/invoke.texi (Option Summary): Mention new option
      	-Wdisallowed-function-list=...
      	(Warning Options): Document -Wdisallowed-function-list=...
      	* common.opt (Wdisallowed-function-list=): New flag.
      	* flags.h (warn_disallowed_functions): External definition of new
      	boolean warning flag.
      	(warn_if_disallowed_function_p): Declare new function.
      	* opts.c (warning_disallowed_functions): New static variable.
      	(warn_disallowed_functions): New boolean warning flag.
      	(warn_if_disallowed_function_p): New function.
      	(add_comma_separated_to_vector): Rename
      	add_instrument_functions_exclude_list to this.
      	(common_handle_option): Handle new option. Rename calls to
      	add_instrument_functions_exclude_list into calls to
      	add_comma_separated_to_vector.
      	* c-parser.c (c_parser_postfix_expression_after_primary): New warning
      	based on flag warn_disallowed_functions.
      
      
      gcc/cp/ChangeLog
      
      2008-07-09  Raksit Ashok <raksit@google.com>
      
      	* parser.c (cp_parser_postfix_expression): New warning based on flag
      	warn_disallowed_functions.
      
      
      gcc/testsuite/ChangeLog
      
      2008-07-09  Raksit Ashok <raksit@google.com>
      
      	* gcc.dg/wdisallowed-functions-1.c: New test.
      	* gcc.dg/wdisallowed-functions-2.c: New test.
      	* g++.dg/warn/Wdisallowed-functions-1.C: New test.
      	* g++.dg/warn/Wdisallowed-functions-2.C: New test.
      
      From-SVN: r137655
      Raksit Ashok committed
  33. 22 Jun, 2008 1 commit
    • c-lex.c (narrowest_unsigned_type): Change itk to int. · d75d71e0
      	* c-lex.c (narrowest_unsigned_type): Change itk to int.
      	(narrowest_signed_type): Likewise.
      	* c-typeck.c (c_common_type): Change local variable mclass to enum
      	mode_class, twice.
      	(parser_build_binary_op): Compare the TREE_CODE_CLASS with
      	tcc_comparison, not the tree code itself.
      	* c-common.c (def_fn_type): Pass int, not an enum, to va_arg.
      	(c_expand_expr): Cast modifier to enum expand_modifier.
      	* c-common.h (C_RID_CODE): Add casts.
      	(C_SET_RID_CODE): Define.
      	* c-parser.c (c_parse_init): Use C_SET_RID_CODE.
      	(c_lex_one_token): Add cast to avoid warning.
      	(c_parser_objc_type_name): Rename local typename to type_name.
      	(check_no_duplicate_clause): Change code parameter to enum
      	omp_clause_code.
      	(c_parser_omp_var_list_parens): Change kind parameter to enum
      	omp_clause_code.
      	(c_parser_omp_flush): Pass OMP_CLAUSE_ERROR, not 0, to
      	c_parser_omp_list_var_parens.
      	(c_parser_omp_threadprivate): Likewise.
      	* cp/lex.c (init_reswords): Use C_SET_RID_CODE.
      	* cp/parser.c (cp_lexer_get_preprocessor_token): Likewise.
      	* c-format.c (NO_FMT): Define.
      	(printf_length_specs): Use NO_FMT.
      	(asm_fprintf_length_specs): Likewise.
      	(gcc_diag_length_specs): Likewise.
      	(scanf_length_specs): Likewise.
      	(strfmon_length_specs): Likewise.
      	(gcc_gfc_length_specs): Likewise.
      	(printf_flag_specs): Change 0 to STD_C89.
      	(asm_fprintf_flag_specs): Likewise.
      	(gcc_diag_flag_specs): Likewise.
      	(gcc_cxxdiag_flag_specs): Likewise.
      	(scanf_flag_specs): Likewise.
      	(strftime_flag_specs): Likewise.
      	(strfmon_flag_specs): Likewise.
      	(print_char_table): Likewise.
      	(asm_fprintf_char_table): Likewise.
      	(gcc_diag_char_table): Likewise.
      	(gcc_tdiag_char_table): Likewise.
      	(gcc_cdiag_char_table): Likewise.
      	(gcc_cxxdiag_char_table): Likewise.
      	(gcc_gfc_char_table): Likewise.
      	(scan_char_table): Likewise.
      	(time_char_table): Likewis.
      	(monetary_char_table): Likewise.
      	* c-format.h (BADLEN): Likewise.
      
      From-SVN: r137019
      Ian Lance Taylor committed
  34. 06 Jun, 2008 2 commits
    • c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. · a68ab351
      	* c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to
      	200805.
      	* langhooks.h (struct lang_hooks_for_decls): Add omp_finish_clause.
      	Add omp_private_outer_ref hook, add another argument to
      	omp_clause_default_ctor hook.
      	* langhooks-def.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
      	(LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
      	(LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): Change to
      	hook_tree_tree_tree_tree_null.
      	(LANG_HOOKS_DECLS): Add LANG_HOOKS_OMP_FINISH_CLAUSE and
      	LANG_HOOKS_OMP_PRIVATE_OUTER_REF.
      	* hooks.c (hook_tree_tree_tree_tree_null): New function.
      	* hooks.h (hook_tree_tree_tree_tree_null): New prototype.
      	* tree.def (OMP_TASK): New tree code.
      	* tree.h (OMP_TASK_COPYFN, OMP_TASK_ARG_SIZE, OMP_TASK_ARG_ALIGN,
      	OMP_CLAUSE_PRIVATE_OUTER_REF, OMP_CLAUSE_LASTPRIVATE_STMT,
      	OMP_CLAUSE_COLLAPSE_ITERVAR, OMP_CLAUSE_COLLAPSE_COUNT,
      	OMP_TASKREG_CHECK, OMP_TASKREG_BODY, OMP_TASKREG_CLAUSES,
      	OMP_TASKREG_FN, OMP_TASKREG_DATA_ARG, OMP_TASK_BODY,
      	OMP_TASK_CLAUSES, OMP_TASK_FN, OMP_TASK_DATA_ARG,
      	OMP_CLAUSE_COLLAPSE_EXPR): Define.
      	(enum omp_clause_default_kind): Add OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.
      	(OMP_DIRECTIVE_P): Add OMP_TASK.
      	(OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): New clause codes.
      	(OMP_CLAUSE_SCHEDULE_AUTO): New schedule kind.
      	* tree.c (omp_clause_code_name): Add OMP_CLAUSE_COLLAPSE
      	and OMP_CLAUSE_UNTIED entries.
      	(omp_clause_num_ops): Likewise.  Increase OMP_CLAUSE_LASTPRIVATE
      	num_ops to 2.
      	(walk_tree_1): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
      	Walk OMP_CLAUSE_LASTPRIVATE_STMT.
      	* tree-pretty-print.c (dump_omp_clause): Handle
      	OMP_CLAUSE_SCHEDULE_AUTO, OMP_CLAUSE_UNTIED, OMP_CLAUSE_COLLAPSE,
      	OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.
      	(dump_generic_node): Handle OMP_TASK and collapsed OMP_FOR loops.
      	* c-omp.c (c_finish_omp_for): Allow pointer iterators.  Remove
      	warning about unsigned iterators.  Change decl/init/cond/incr
      	arguments to TREE_VECs, check arguments for all collapsed loops.
      	(c_finish_omp_taskwait): New function.
      	(c_split_parallel_clauses): Put OMP_CLAUSE_COLLAPSE clause to
      	ws_clauses.
      	* c-parser.c (c_parser_omp_for_loop): Parse collapsed loops.  Call
      	default_function_array_conversion on init.  Add par_clauses argument.
      	If decl is present in parallel's lastprivate clause, change it to
      	shared and add lastprivate clause for decl to OMP_FOR_CLAUSES.
      	Add clauses argument, on success set OMP_FOR_CLAUSES to it.  Look up
      	collapse count in clauses.
      	(c_parser_omp_for, c_parser_omp_parallel): Adjust
      	c_parser_omp_for_loop callers.
      	(OMP_FOR_CLAUSE_MASK): Add 1 << PRAGMA_OMP_CLAUSE_COLLAPSE.
      	(c_parser_pragma): Handle PRAGMA_OMP_TASKWAIT.
      	(c_parser_omp_clause_name): Handle collapse and untied clauses.
      	(c_parser_omp_clause_collapse, c_parser_omp_clause_untied): New
      	functions.
      	(c_parser_omp_clause_schedule): Handle schedule(auto).
      	Include correct location in the error message.
      	(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
      	and PRAGMA_OMP_CLAUSE_UNTIED.
      	(OMP_TASK_CLAUSE_MASK): Define.
      	(c_parser_omp_task, c_parser_omp_taskwait): New functions.
      	(c_parser_omp_construct): Handle PRAGMA_OMP_TASK.
      	* tree-nested.c (convert_nonlocal_omp_clauses,
      	convert_local_omp_clauses): Handle OMP_CLAUSE_LASTPRIVATE_STMT,
      	OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_MERGE,
      	OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
      	Don't handle TREE_STATIC or DECL_EXTERNAL VAR_DECLs in
      	OMP_CLAUSE_DECL.
      	(conver_nonlocal_reference, convert_local_reference,
      	convert_call_expr): Handle OMP_TASK the same as OMP_PARALLEL.  Use
      	OMP_TASKREG_* macros rather than OMP_PARALLEL_*.
      	(walk_omp_for): Adjust for OMP_FOR_{INIT,COND,INCR} changes.
      	* tree-gimple.c (is_gimple_stmt): Handle OMP_TASK.
      	* c-tree.h (c_begin_omp_task, c_finish_omp_task): New prototypes.
      	* c-pragma.h (PRAGMA_OMP_TASK, PRAGMA_OMP_TASKWAIT): New.
      	(PRAGMA_OMP_CLAUSE_COLLAPSE, PRAGMA_OMP_CLAUSE_UNTIED): New.
      	* c-typeck.c (c_begin_omp_task, c_finish_omp_task): New functions.
      	(c_finish_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
      	OMP_CLAUSE_UNTIED.
      	* c-pragma.c (init_pragma): Init omp task and omp taskwait pragmas.
      	* c-common.h (c_finish_omp_taskwait): New prototype.
      	* gimple-low.c (lower_stmt): Handle OMP_TASK.
      	* tree-parloops.c (create_parallel_loop): Create 1 entry
      	vectors for OMP_FOR_{INIT,COND,INCR}.
      	* tree-cfg.c (remove_useless_stmts_1): Handle OMP_* containers.
      	(make_edges): Handle OMP_TASK.
      	* tree-ssa-operands.c (get_expr_operands): Handle collapsed OMP_FOR
      	loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
      	* tree-inline.c (estimate_num_insns_1): Handle OMP_TASK.
      	* builtin-types.def (BT_PTR_ULONGLONG, BT_PTR_FN_VOID_PTR_PTR,
      	BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
      	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
      	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
      	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
      	* omp-builtins.def (BUILT_IN_GOMP_TASK, BUILT_IN_GOMP_TASKWAIT,
      	BUILT_IN_GOMP_LOOP_ULL_STATIC_START,
      	BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_START,
      	BUILT_IN_GOMP_LOOP_ULL_GUIDED_START,
      	BUILT_IN_GOMP_LOOP_ULL_RUNTIME_START,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_START,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_START,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_START,
      	BUILT_IN_GOMP_LOOP_ULL_STATIC_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_GUIDED_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_RUNTIME_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT,
      	BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT): New builtins.
      	* gimplify.c (gimplify_omp_for): Allow pointer type for decl,
      	handle POINTER_PLUS_EXPR.  If loop counter has been replaced and
      	original iterator is present in lastprivate clause or if
      	collapse > 1, set OMP_CLAUSE_LASTPRIVATE_STMT.  Handle collapsed
      	OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
      	(gimplify_expr): Handle OMP_SECTIONS_SWITCH and OMP_TASK.
      	(enum gimplify_omp_var_data): Add GOVD_PRIVATE_OUTER_REF.
      	(omp_notice_variable): Set GOVD_PRIVATE_OUTER_REF if needed,
      	if it is set, lookup var in outer contexts too.  Handle
      	OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.  Handle vars that are supposed
      	to be implicitly determined firstprivate for task regions.
      	(gimplify_scan_omp_clauses): Set GOVD_PRIVATE_OUTER_REF if needed,
      	if it is set, lookup var in outer contexts too.  Set
      	OMP_CLAUSE_PRIVATE_OUTER_REF if GOVD_PRIVATE_OUTER_REF is set.
      	Handle OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_COLLAPSE and
      	OMP_CLAUSE_UNTIED.  Take region_type as last argument
      	instead of in_parallel and in_combined_parallel.
      	(gimplify_omp_parallel, gimplify_omp_for, gimplify_omp_workshare):
      	Adjust callers.
      	(gimplify_adjust_omp_clauses_1): Set OMP_CLAUSE_PRIVATE_OUTER_REF if
      	GOVD_PRIVATE_OUTER_REF is set.  Call omp_finish_clause
      	langhook.
      	(new_omp_context): Set default_kind to
      	OMP_CLAUSE_DEFAULT_UNSPECIFIED for OMP_TASK regions.
      	(omp_region_type): New enum.
      	(struct gimplify_omp_ctx): Remove is_parallel and is_combined_parallel
      	fields, add region_type.
      	(new_omp_context): Take region_type as argument instead of is_parallel
      	and is_combined_parallel.
      	(gimple_add_tmp_var, omp_firstprivatize_variable, omp_notice_variable,
      	omp_is_private, omp_check_private): Adjust ctx->is_parallel and
      	ctx->is_combined_parallel checks.
      	(gimplify_omp_task): New function.
      	(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
      	OMP_CLAUSE_UNTIED.
      	* omp-low.c (extract_omp_for_data): Use schedule(static)
      	for schedule(auto).  Handle pointer and unsigned iterators.
      	Compute fd->iter_type.  Handle POINTER_PLUS_EXPR increments.
      	Add loops argument.  Extract data for collapsed OMP_FOR loops.
      	(expand_parallel_call): Assert sched_kind isn't auto,
      	map runtime schedule to index 3.
      	(struct omp_for_data_loop): New type.
      	(struct omp_for_data): Remove v, n1, n2, step, cond_code fields.
      	Add loop, loops, collapse and iter_type fields.
      	(workshare_safe_to_combine_p): Disallow combined for if
      	iter_type is unsigned long long.  Don't combine collapse > 1 loops
      	unless all bounds and steps are constant.  Adjust extract_omp_for_data
      	caller.
      	(expand_omp_for_generic): Handle pointer, unsigned and long long
      	iterators.  Handle collapsed OMP_FOR loops.  Adjust
      	for struct omp_for_data changes.  If libgomp function doesn't return
      	boolean_type_node, add comparison of the return value with 0.
      	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
      	pointer, unsigned and long long iterators.  Adjust for struct
      	omp_for_data changes.
      	(expand_omp_for): Assert sched_kind isn't auto, map runtime schedule
      	to index 3.  Use GOMP_loop_ull*{start,next} if iter_type is
      	unsigned long long.  Allocate loops array, pass it to
      	extract_omp_for_data.  For collapse > 1 loops use always
      	expand_omp_for_generic.
      	(omp_context): Add sfield_map and srecord_type fields.
      	(is_task_ctx, lookup_sfield): New functions.
      	(use_pointer_for_field): Use is_task_ctx helper.  Change first
      	argument's type from const_tree to tree.  Clarify comment.
      	In OMP_TASK disallow copy-in/out sharing.
      	(build_sender_ref): Call lookup_sfield instead of lookup_field.
      	(install_var_field): Add mask argument.  Populate both record_type
      	and srecord_type if needed.
      	(delete_omp_context): Destroy sfield_map, clear DECL_ABSTRACT_ORIGIN
      	in srecord_type.
      	(fixup_child_record_type): Also remap FIELD_DECL's DECL_SIZE{,_UNIT}
      	and DECL_FIELD_OFFSET.
      	(scan_sharing_clauses): Adjust install_var_field callers.  For
      	firstprivate clauses on explicit tasks allocate the var by value in
      	record_type unconditionally, rather than by reference.
      	Handle OMP_CLAUSE_PRIVATE_OUTER_REF.  Scan OMP_CLAUSE_LASTPRIVATE_STMT.
      	Use is_taskreg_ctx instead of is_parallel_ctx.
      	Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
      	(create_omp_child_function_name): Add task_copy argument, use
      	*_omp_cpyfn* names if it is true.
      	(create_omp_child_function): Add task_copy argument, if true create
      	*_omp_cpyfn* helper function.
      	(scan_omp_parallel): Adjust create_omp_child_function callers.
      	Rename parallel_nesting_level to taskreg_nesting_level.
      	(scan_omp_task): New function.
      	(lower_rec_input_clauses): Don't run constructors for firstprivate
      	explicit task vars which are initialized by *_omp_cpyfn*.  
      	Pass outer var ref to omp_clause_default_ctor hook if
      	OMP_CLAUSE_PRIVATE_OUTER_REF or OMP_CLAUSE_LASTPRIVATE.
      	Replace OMP_CLAUSE_REDUCTION_PLACEHOLDER decls in
      	OMP_CLAUSE_REDUCTION_INIT.
      	(lower_send_clauses): Clear DECL_ABSTRACT_ORIGIN if in task to
      	avoid duplicate setting of fields.  Handle
      	OMP_CLAUSE_PRIVATE_OUTER_REF.
      	(lower_send_shared_vars): Use srecord_type if non-NULL.  Don't
      	copy-out if TREE_READONLY, only copy-in.
      	(expand_task_copyfn): New function.
      	(expand_task_call): New function.
      	(struct omp_taskcopy_context): New type.
      	(task_copyfn_copy_decl, task_copyfn_remap_type, create_task_copyfn):
      	New functions.
      	(lower_omp_parallel): Rename to...
      	(lower_omp_taskreg): ... this.  Use OMP_TASKREG_* macros where needed.
      	Call create_task_copyfn if srecord_type is needed.  Adjust
      	sender_decl type.
      	(task_shared_vars): New variable.
      	(check_omp_nesting_restrictions): Warn if work-sharing,
      	barrier, master or ordered region is closely nested inside OMP_TASK.
      	Add warnings for barrier if closely nested inside of work-sharing,
      	ordered, or master region.
      	(scan_omp_1): Call check_omp_nesting_restrictions even for
      	GOMP_barrier calls.  Rename parallel_nesting_level to
      	taskreg_nesting_level.  Handle OMP_TASK.
      	(lower_lastprivate_clauses): Even if some lastprivate is found on a
      	work-sharing construct, continue looking for them on parent parallel
      	construct.
      	(lower_omp_for_lastprivate): Add lastprivate clauses
      	to the beginning of dlist rather than end.  Adjust for struct
      	omp_for_data changes.
      	(lower_omp_for): Add rec input clauses before OMP_FOR_PRE_BODY,
      	not after it.  Handle collapsed OMP_FOR loops, adjust for
      	OMP_FOR_{INIT,COND,INCR} changes, adjust extract_omp_for_data
      	caller.
      	(get_ws_args_for): Adjust extract_omp_for_data caller.
      	(scan_omp_for): Handle collapsed OMP_FOR
      	loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
      	(lower_omp_single_simple): If libgomp function doesn't return
      	boolean_type_node, add comparison of the return value with 0.
      	(diagnose_sb_1, diagnose_sb_2): Handle collapsed OMP_FOR
      	loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.  Handle OMP_TASK.
      	(parallel_nesting_level): Rename to...
      	(taskreg_nesting_level): ... this.
      	(is_taskreg_ctx): New function.
      	(build_outer_var_ref, omp_copy_decl): Use is_taskreg_ctx instead
      	of is_parallel_ctx.
      	(execute_lower_omp): Rename parallel_nesting_level to
      	taskreg_nesting_level.
      	(expand_omp_parallel): Rename to...
      	(expand_omp_taskreg): ... this.  Use OMP_TASKREG_* macros where needed.
      	Call omp_task_call for OMP_TASK regions.
      	(expand_omp): Adjust caller, handle OMP_TASK.
      	(lower_omp_1): Adjust lower_omp_taskreg caller, handle OMP_TASK.
      
      	* bitmap.c (bitmap_default_obstack_depth): New variable.
      	(bitmap_obstack_initialize, bitmap_obstack_release): Do nothing
      	if argument is NULL and bitmap_default_obstack is already initialized.
      	* ipa-struct-reorg.c (do_reorg_1): Call bitmap_obstack_release
      	at the end.
      	* matrix-reorg.c (matrix_reorg): Likewise.
      cp/
      	* cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
      	dependent_omp_for_p, begin_omp_task, finish_omp_task,
      	finish_omp_taskwait): New prototypes.
      	(cxx_omp_clause_default_ctor): Add outer argument.
      	(finish_omp_for): Add new clauses argument.
      	* cp-gimplify.c (cxx_omp_finish_clause): New function.
      	(cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
      	(cxx_omp_clause_default_ctor): Add outer argument.
      	(cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
      	* cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
      	* parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
      	Add par_clauses argument.  If decl is present in parallel's
      	lastprivate clause, change that clause to shared and add
      	a lastprivate clause for decl to OMP_FOR_CLAUSES.
      	Fix wording of error messages.  Adjust finish_omp_for caller.
      	Add clauses argument.  Parse loops with random access iterators.
      	(cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
      	functions.
      	(cp_parser_omp_for, cp_parser_omp_parallel): Adjust
      	cp_parser_omp_for_loop callers.
      	(cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
      	functions.
      	(cp_parser_omp_clause_name): Handle collapse and untied
      	clauses.
      	(cp_parser_omp_clause_schedule): Handle auto schedule.
      	(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
      	and PRAGMA_OMP_CLAUSE_UNTIED.
      	(OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
      	(OMP_TASK_CLAUSE_MASK): Define.
      	(cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
      	(cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
      	(cp_parser_pragma): Handle PRAGMA_OMP_TASK and
      	PRAGMA_OMP_TASKWAIT.
      	* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
      	OMP_CLAUSE_UNTIED.  Handle OMP_CLAUSE_LASTPRIVATE_STMT.
      	(tsubst_omp_for_iterator): New function.
      	(dependent_omp_for_p): New function.
      	(tsubst_expr) <case OMP_FOR>: Use it.  Handle collapsed OMP_FOR
      	loops.  Adjust finish_omp_for caller.  Handle loops with random
      	access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR} changes.
      	(tsubst_expr): Handle OMP_TASK.
      	* semantics.c (cxx_omp_create_clause_info): New function.
      	(finish_omp_clauses): Call it.  Handle OMP_CLAUSE_UNTIED and
      	OMP_CLAUSE_COLLAPSE.
      	(cxx_omp_predetermined_sharing): Removed.
      	* semantics.c (finish_omp_for): Allow pointer iterators.  Use
      	handle_omp_for_class_iterator and dependent_omp_for_p.  Handle
      	collapsed for loops.  Adjust c_finish_omp_for caller.  Add new
      	clauses argument.  Fix check for type dependent cond or incr.
      	Set OMP_FOR_CLAUSES to clauses.  Use cp_convert instead of
      	fold_convert to convert incr amount to difference_type.  Only
      	fold if not in template.  If decl is mentioned in lastprivate
      	clause, set OMP_CLAUSE_LASTPRIVATE_STMT.  Handle loops with random
      	access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR}
      	changes.
      	(finish_omp_threadprivate): Allow static class members of the
      	current class.
      	(handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
      	finish_omp_taskwait): New functions.
      
      	* parser.c (cp_parser_binary_expression): Add prec argument.
      	(cp_parser_assignment_expression): Adjust caller.
      	* cp-tree.h (outer_curly_brace_block): New prototype.
      	* decl.c (outer_curly_brace_block): No longer static.
      fortran/
      	* scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
      	* parse.c (next_free): Allow tab after !$omp.
      	(decode_omp_directive): Handle !$omp task, !$omp taskwait
      	and !$omp end task.
      	(case_executable): Add ST_OMP_TASKWAIT.
      	(case_exec_markers): Add ST_OMP_TASK.
      	(gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
      	ST_OMP_TASKWAIT.
      	(parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
      	* gfortran.h (gfc_find_sym_in_expr): New prototype.
      	(gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
      	(gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
      	OMP_DEFAULT_FIRSTPRIVATE to default_sharing.  Add collapse and
      	untied fields.
      	(gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
      	* f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
      	LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
      	LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
      	* trans.h (gfc_omp_clause_default_ctor): Add another argument.
      	(gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
      	gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
      	* types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
      	BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
      	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
      	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
      	BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
      	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
      	(BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
      	than boolean_type_node.
      	* dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
      	EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
      	untied and collapse clauses.
      	(gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
      	* trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
      	EXEC_OMP_TASKWAIT.
      	* st.c (gfc_free_statement): Likewise.
      	* resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
      	(find_sym_in_expr): Rename to...
      	(gfc_find_sym_in_expr): ... this.  No longer static.
      	(resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
      	* match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
      	prototypes.
      	* openmp.c (resolve_omp_clauses): Allow allocatable arrays in
      	firstprivate, lastprivate, reduction, copyprivate and copyin
      	clauses.
      	(omp_current_do_code): Made static.
      	(omp_current_do_collapse): New variable.
      	(gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
      	clear omp_current_do_code and omp_current_do_collapse on return.
      	(gfc_resolve_do_iterator): Handle collapsed do loops.
      	(resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
      	(OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
      	(gfc_match_omp_clauses): Handle default (firstprivate),
      	schedule (auto), untied and collapse (n) clauses.
      	(OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
      	(OMP_TASK_CLAUSES): Define.
      	(gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
      	* trans-openmp.c (gfc_omp_private_outer_ref): New function.
      	(gfc_omp_clause_default_ctor): Add outer argument.  For allocatable
      	arrays allocate them with the bounds of the outer var if outer
      	var is allocated.
      	(gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
      	gfc_omp_clause_dtor): New functions.
      	(gfc_trans_omp_array_reduction): If decl is allocatable array,
      	allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
      	and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
      	(gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
      	for assumed-size arrays.
      	(gfc_trans_omp_do): Add par_clauses argument.  If dovar is
      	present in lastprivate clause and do loop isn't simple,
      	set OMP_CLAUSE_LASTPRIVATE_STMT.  If dovar is present in
      	parallel's lastprivate clause, change it to shared and add
      	lastprivate clause to OMP_FOR_CLAUSES.  Handle collapsed do loops.
      	(gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
      	(gfc_trans_omp_parallel_do): Likewise.  Move collapse clause to
      	OMP_FOR from OMP_PARALLEL.
      	(gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
      	OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
      	(gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
      	(gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
      	EXEC_OMP_TASKWAIT.
      gcc/testsuite/
      	* gcc.dg/gomp/collapse-1.c: New test.
      	* gcc.dg/gomp/nesting-1.c: New test.
      	* g++.dg/gomp/task-1.C: New test.
      	* g++.dg/gomp/predetermined-1.C: New test.
      	* g++.dg/gomp/tls-4.C: New test.
      	* gfortran.dg/gomp/collapse1.f90: New test.
      	* gfortran.dg/gomp/sharing-3.f90: New test.
      	* gcc.dg/gomp/pr27499.c (foo): Remove is unsigned dg-warning.
      	* g++.dg/gomp/pr27499.C (foo): Likewise.
      	* g++.dg/gomp/for-16.C (foo): Likewise.
      	* g++.dg/gomp/tls-3.C: Remove dg-error, add S::s definition.
      	* g++.dg/gomp/pr34607.C: Adjust dg-error location.
      	* g++.dg/gomp/for-16.C (foo): Add a new dg-error.
      	* gcc.dg/gomp/appendix-a/a.35.4.c: Add dg-warning.
      	* gcc.dg/gomp/appendix-a/a.35.6.c: Likewise.
      	* gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise.
      	* gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise.
      	* gfortran.dg/gomp/omp_parse1.f90: Remove !$omp tab test.
      	* gfortran.dg/gomp/appendix-a/a.33.4.f90: Remove dg-error
      	about allocatable array.
      	* gfortran.dg/gomp/reduction1.f90: Likewise.
      libgomp/
      	* configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE.
      	Substitute also OMP_*LOCK_25*.
      	* configure: Regenerated.
      	* config.h.in: Regenerated.
      	* Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c,
      	ptrlock.c and task.c.
      	* Makefile.in: Regenerated.
      	* testsuite/Makefile.in: Regenerated.
      	* task.c: New file.
      	* loop_ull.c: New file.
      	* iter_ull.c: New file.
      	* libgomp.h: Include ptrlock.h.
      	(enum gomp_task_kind): New type.
      	(struct gomp_team): Add task_lock, task_queue, task_count,
      	task_running_count, single_count fields.  Add
      	work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS.
      	Remove work_share_lock, generation_mask,
      	oldest_live_gen, num_live_gen and init_work_shares fields, add
      	work work_share_list_alloc, work_share_list_free and work_share_chunk
      	fields.  Change work_shares from pointer to pointers into an array.
      	Change ordered_release field into gomp_sem_t ** from flexible array
      	member.  Add implicit_task and initial_work_shares fields.
      	Move close to the end of the struct.
      	(struct gomp_team_state): Add single_count, last_work_share,
      	active_level and level fields, remove work_share_generation.
      	(gomp_barrier_handle_tasks): New prototype.
      	(gomp_finish_task): New inline function.
      	(struct gomp_work_share): Move chunk_size, end, incr into
      	transparent union/struct, add chunk_size_ull, end_ll, incr_ll and
      	next_ll fields.  Reshuffle fields.  Add next_alloc,
      	next_ws, next_free and inline_ordered_team_ids fields, change
      	ordered_team_ids into pointer from flexible array member.
      	Add mode field.  Put lock and next into a different cache line
      	from most of the write-once fields.
      	(gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked,
      	gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next,
      	gomp_iter_ull_guided_next): New prototypes.
      	(gomp_new_icv): New prototype.
      	(struct gomp_thread): Add thread_pool and task fields.
      	(struct gomp_thread_pool): New type.
      	(gomp_new_team): New prototype.
      	(gomp_team_start): Change type of last argument.
      	(gomp_new_work_share): Removed.
      	(gomp_init_work_share, gomp_fini_work_share): New prototypes.
      	(gomp_work_share_init_done): New static inline.
      	(gomp_throttled_spin_count_var, gomp_available_cpus,
      	gomp_managed_threads): New extern decls.
      	(gomp_init_task): New prototype.
      	(gomp_spin_count_var): New extern var decl.
      	(LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility
      	or no alias support, or if not PIC.
      	(gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30,
      	gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30,
      	gomp_destroy_nest_lock_30, gomp_set_nest_lock_30,
      	gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25,
      	gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25,
      	gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25,
      	gomp_set_nest_lock_25, gomp_unset_nest_lock_25,
      	gomp_test_nest_lock_25): New prototypes.
      	(omp_lock_symver, strong_alias): Define.
      	(gomp_remaining_threads_count, gomp_remaining_threads_lock): New
      	decls.
      	(gomp_end_task): New.
      	(struct gomp_task_icv, gomp_global_icv): New.
      	(gomp_thread_limit_var, gomp_max_active_levels_var): New.
      	(struct gomp_task): New.
      	(gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
      	gomp_run_sched_var, gomp_run_sched_chunk): Remove.
      	(gomp_icv): New.
      	(gomp_schedule_type): Reorder enum to match
      	omp_sched_t.
      	* team.c (struct gomp_thread_start_data): Add thread_pool and task
      	fields.
      	(gomp_thread_start): Add gomp_team_barrier_wait call.
      	For non-nested case remove clearing of docked thread thr fields.
      	Use pool fields instead of global gomp_* variables.  Use
      	gomp_barrier_wait_last when needed.  Initialize ts.active_level.
      	Create tasks for each member thread.
      	(free_team): Only destroy team barrier, task_lock here and free it.
      	(gomp_free_thread): Free last_team if non-NULL.
      	(gomp_team_end): Call gomp_team_barrier_wait instead of
      	gomp_barrier_wait.  For nested case call one extra
      	gomp_barrier_wait.  Move here some destruction from free_team.
      	Call free_team on pool->last_team if any, rather than freeing
      	current team.  Destroy work_share_list_free_lock ifndef
      	HAVE_SYNC_BUILTINS.
      	(gomp_new_icv): New function.
      	(gomp_threads, gomp_threads_size, gomp_threads_used,
      	gomp_threads_dock): Removed.
      	(gomp_thread_destructor): New variable.
      	(gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New
      	functions.
      	(gomp_team_start): Create new pool if current thread doesn't have
      	one.  Use pool fields instead of global gomp_* variables. 
      	Initialize thread_pool field for new threads.  Clear single_count.
      	Change last argument from ws to team, don't create
      	new team, set ts.work_share to &team->work_shares[0] and clear
      	ts.last_work_share.  Don't clear ts.work_share_generation.
      	If number of threads changed, adjust atomically gomp_managed_threads.
      	Use gomp_init_task instead of gomp_new_task,
      	set thr->task to the corresponding implicit_task array entry.
      	Create tasks for each member thread.  Initialize ts.level.
      	(initialize_team): Call pthread_key_create on
      	gomp_thread_destructor.
      	(team_destructor): New function.
      	(new_team): Removed.
      	(gomp_new_team): New function.
      	(free_team): Free gomp_work_share blocks chained through next_alloc,
      	instead of freeing work_shares and destroying work_share_lock.
      	(gomp_team_end): Call gomp_fini_work_share.  If number of threads
      	changed, adjust atomically gomp_managed_threads.  Use gomp_end_task.
      	* barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead
      	of gomp_barrier_wait.
      	* single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait
      	instead of gomp_barrier_wait.  Call gomp_work_share_init_done
      	if gomp_work_share_start returned true.  Don't unlock ws->lock.
      	(GOMP_single_copy_end): Call gomp_team_barrier_wait instead
      	of gomp_barrier_wait.
      	(GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.  Call
      	gomp_work_share_init_done if gomp_work_share_start returned true.
      	Don't unlock ws->lock.
      	* work.c: Include stddef.h.
      	(free_work_share): Use work_share_list_free_lock instead
      	of atomic chaining ifndef HAVE_SYNC_BUILTINS.  Add team argument.
      	Call gomp_fini_work_share and then either free ws if orphaned, or
      	put it into work_share_list_free list of the current team.
      	(alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
      	functions.
      	(gomp_work_share_start, gomp_work_share_end,
      	gomp_work_share_end_nowait): Rewritten.
      	* omp_lib.f90.in Change some tabs to spaces to prevent warnings.
      	(openmp_version): Set to 200805.
      	(omp_sched_kind, omp_sched_static, omp_sched_dynamic,
      	omp_sched_guided, omp_sched_auto): New parameters.
      	(omp_set_schedule, omp_get_schedule, 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): New interfaces.
      	* omp_lib.h.in (openmp_version): Set to 200805.
      	(omp_sched_kind, omp_sched_static, omp_sched_dynamic,
      	omp_sched_guided, omp_sched_auto): New parameters.
      	(omp_set_schedule, omp_get_schedule, 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): New externals.
      	* loop.c: Include limits.h.
      	(GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle
      	GFS_AUTO.
      	(GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start):
      	Likewise.  Use gomp_icv.
      	(gomp_loop_static_start, gomp_loop_dynamic_start): Clear
      	ts.static_trip here.
      	(gomp_loop_static_start, gomp_loop_ordered_static_start): Call
      	gomp_work_share_init_done after gomp_loop_init.  Don't unlock ws->lock.
      	(gomp_loop_dynamic_start, gomp_loop_guided_start): Call
      	gomp_work_share_init_done after gomp_loop_init.  If HAVE_SYNC_BUILTINS,
      	don't unlock ws->lock, otherwise lock it.
      	(gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
      	gomp_work_share_init_done after gomp_loop_init.  Lock ws->lock.
      	(gomp_parallel_loop_start): Call gomp_new_team instead of
      	gomp_new_work_share.  Call gomp_loop_init on &team->work_shares[0].
      	Adjust gomp_team_start caller.  Pass 0 as second argument to
      	gomp_resolve_num_threads.
      	(gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
      	If adding ws->chunk_size nthreads + 1 times after end won't
      	overflow, set ws->mode to 1.
      	* libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start,
      	GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start,
      	GOMP_loop_ull_ordered_static_start,
      	GOMP_loop_ull_ordered_dynamic_start,
      	GOMP_loop_ull_ordered_guided_start,
      	GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next,
      	GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next,
      	GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next,
      	GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next,
      	GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New
      	prototypes.
      	* libgomp.map: Export lock routines also @@OMP_2.0.
      	(GOMP_loop_ordered_dynamic_first,
      	GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first,
      	GOMP_loop_ordered_static_first): Remove.
      	(GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start,
      	GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start,
      	GOMP_loop_ull_ordered_dynamic_next,
      	GOMP_loop_ull_ordered_dynamic_start,
      	GOMP_loop_ull_ordered_guided_next,
      	GOMP_loop_ull_ordered_guided_start,
      	GOMP_loop_ull_ordered_runtime_next,
      	GOMP_loop_ull_ordered_runtime_start,
      	GOMP_loop_ull_ordered_static_next,
      	GOMP_loop_ull_ordered_static_start,
      	GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start,
      	GOMP_loop_ull_static_next, GOMP_loop_ull_static_start,
      	GOMP_task, GOMP_taskwait): Export @@GOMP_2.0.
      	(omp_set_schedule, omp_get_schedule,
      	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_set_schedule_, omp_set_schedule_8_,
      	omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
      	omp_set_max_active_levels_, omp_set_max_active_levels_8_,
      	omp_get_max_active_levels_, omp_get_level_,
      	omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
      	omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
      	New exports @@OMP_3.0.
      	* omp.h.in (omp_sched_t): New type.
      	(omp_set_schedule, omp_get_schedule, 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): New prototypes.
      	* env.c (gomp_spin_count_var, gomp_throttled_spin_count_var,
      	gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var,
      	gomp_thread_limit_var, gomp_remaining_threads_count,
      	gomp_remaining_threads_lock): New variables.
      	(parse_spincount): New function.
      	(initialize_env): Call gomp_init_num_threads unconditionally.
      	Initialize gomp_available_cpus.  Call parse_spincount,
      	initialize gomp_{,throttled_}spin_count_var
      	depending on presence and value of OMP_WAIT_POLICY and
      	GOMP_SPINCOUNT env vars.  Handle GOMP_BLOCKTIME env var.
      	Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS,
      	OMP_THREAD_LIMIT, OMP_STACKSIZE env vars.  Handle unit specification
      	for GOMP_STACKSIZE.  Initialize gomp_remaining_threads_count and
      	gomp_remaining_threads_lock if needed.  Use gomp_global_icv.
      	(gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
      	gomp_run_sched_var, gomp_run_sched_chunk): Remove.
      	(gomp_global_icv): New.
      	(parse_schedule): Use it.  Parse "auto".
      	(omp_set_num_threads): Use gomp_icv.
      	(omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested):
      	Likewise.
      	(omp_get_max_threads): Move from parallel.c.
      	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
      	omp_set_max_active_levels, omp_get_max_active_levels): New functions,
      	add ialias.
      	(parse_stacksize, parse_wait_policy): New functions.
      	* fortran.c: Rewrite lock wrappers, if symbol versioning provide
      	both wrappers for compatibility and new locks.
      	(omp_set_schedule, omp_get_schedule,
      	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): New ialias_redirect.
      	(omp_set_schedule_, omp_set_schedule_8_,
      	omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
      	omp_set_max_active_levels_, omp_set_max_active_levels_8_,
      	omp_get_max_active_levels_, omp_get_level_,
      	omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
      	omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
      	New functions.
      	* parallel.c: Include limits.h.
      	(gomp_resolve_num_threads): Add count argument.  Rewritten.
      	(GOMP_parallel_start): Call gomp_new_team and pass that as last
      	argument to gomp_team_start.  Pass 0 as second argument to
      	gomp_resolve_num_threads.
      	(GOMP_parallel_end): Decrease gomp_remaining_threads_count
      	if gomp_thread_limit_var != ULONG_MAX.
      	(omp_in_parallel): Implement using ts.active_level.
      	(omp_get_max_threads): Move to env.c.
      	(omp_get_level, omp_get_ancestor_thread_num,
      	omp_get_team_size, omp_get_active_level): New functions,
      	add ialias.
      	* sections.c (GOMP_sections_start): Call gomp_work_share_init_done
      	after gomp_sections_init.  If HAVE_SYNC_BUILTINS, call
      	gomp_iter_dynamic_next instead of the _locked variant and don't take
      	lock around it, otherwise acquire it before calling
      	gomp_iter_dynamic_next_locked.
      	(GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
      	gomp_iter_dynamic_next instead of the _locked variant and don't take
      	lock around it.
      	(GOMP_parallel_sections_start): Call gomp_new_team instead of
      	gomp_new_work_share.  Call gomp_sections_init on &team->work_shares[0].
      	Adjust gomp_team_start caller.  Pass count as second argument to
      	gomp_resolve_num_threads, don't adjust num_threads after the call.
      	Use gomp_icv.
      	* iter.c (gomp_iter_dynamic_next_locked): Don't multiply
      	ws->chunk_size by incr.
      	(gomp_iter_dynamic_next): Likewise.  If ws->mode, use more efficient
      	code.
      	* libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New
      	types.
      	(omp_lock_25_arg, omp_nest_lock_25_arg): New macros.
      	(omp_check_defines): Check even the compat defines.
      	* config/linux/ptrlock.c: New file.
      	* config/linux/ptrlock.h: New file.
      	* config/linux/wait.h: New file.
      	* config/posix/ptrlock.c: New file.
      	* config/posix/ptrlock.h: New file.
      	* config/linux/bar.h (gomp_team_barrier_wait,
      	gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
      	(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): New inlines.
      	(gomp_barrier_t): Rewritten.
      	(gomp_barrier_state_t): New typedef.
      	(gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
      	gomp_barrier_wait_start): Rewritten.
      	(gomp_barrier_wait_end): Change second argument to
      	gomp_barrier_state_t.
      	(gomp_barrier_last_thread, gomp_barrier_wait_last): New static
      	inlines.
      	* config/linux/bar.c: Include wait.h instead of libgomp.h and
      	futex.h.
      	(gomp_barrier_wait_end): Rewritten.
      	(gomp_team_barrier_wait, gomp_team_barrier_wait_end,
      	gomp_team_barrier_wake, gomp_barrier_wait_last): New functions.
      	* config/posix/bar.h (gomp_barrier_t): Add generation field.
      	(gomp_barrier_state_t): New typedef.
      	(gomp_team_barrier_wait,
      	gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
      	(gomp_barrier_wait_start): Or all but low 2 bits from generation
      	into the return value.  Return gomp_barrier_state_t.
      	(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): New inlines.
      	(gomp_barrier_wait_end): Change second argument to
      	gomp_barrier_state_t.
      	(gomp_barrier_last_thread, gomp_barrier_wait_last): New static
      	inlines.
      	* config/posix/bar.c (gomp_barrier_init): Clear generation field.
      	(gomp_barrier_wait_end): Change second argument to
      	gomp_barrier_state_t. 
      	(gomp_team_barrier_wait, gomp_team_barrier_wait_end,
      	gomp_team_barrier_wake): New functions.
      	* config/linux/mutex.c: Include wait.h instead of libgomp.h and
      	futex.h.
      	(gomp_futex_wake, gomp_futex_wait): New variables.
      	(gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
      	* config/linux/lock.c: Rewrite to make locks task owned,
      	for backwards compatibility provide the old entrypoints
      	if symbol versioning.  Include wait.h instead of libgomp.h and
      	futex.h.
      	(gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
      	* config/posix95/lock.c: Rewrite to make locks task owned,
      	for backwards compatibility provide the old entrypoints
      	if symbol versioning.
      	* config/posix/lock.c: Rewrite to make locks task owned,
      	for backwards compatibility provide the old entrypoints
      	if symbol versioning.
      	* config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv.
      	(get_num_procs, gomp_dynamic_max_threads): Use gomp_icv.
      	* config/posix/proc.c, config/mingw32/proc.c: Similarly.
      	* config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
      	(sys_futex0): Return error code.
      	(futex_wake, futex_wait): If ENOSYS was returned, clear
      	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
      	(cpu_relax, atomic_write_barrier): New static inlines.
      	* config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
      	(futex_wake, futex_wait): If ENOSYS was returned, clear
      	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
      	(cpu_relax, atomic_write_barrier): New static inlines.
      	* config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
      	(sys_futex0): Return error code.
      	(futex_wake, futex_wait): If ENOSYS was returned, clear
      	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
      	(cpu_relax, atomic_write_barrier): New static inlines.
      	* config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
      	(sys_futex0): Return error code.
      	(futex_wake, futex_wait): If ENOSYS was returned, clear
      	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
      	(cpu_relax, atomic_write_barrier): New static inlines.
      	* config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
      	(sys_futex0): Return error code.
      	(futex_wake, futex_wait): If ENOSYS was returned, clear
      	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
      	(cpu_relax, atomic_write_barrier): New static inlines.
      	* config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
      	(sys_futex0): Return error code.
      	(futex_wake, futex_wait): If ENOSYS was returned, clear
      	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
      	(cpu_relax, atomic_write_barrier): New static inlines.
      	* config/linux/sem.c: Include wait.h instead of libgomp.h and
      	futex.h.
      	(gomp_sem_wait_slow): Call do_wait instead of futex_wait.
      	* config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
      	* config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New
      	types.
      	(omp_nest_lock_t): Change owner into void *, add lock field.
      	* config/posix95/omp-lock.h: Include semaphore.h.
      	(omp_lock_25_t, omp_nest_lock_25_t): New types.
      	(omp_lock_t): Use sem_t instead of mutex if semaphores
      	aren't broken.
      	(omp_nest_lock_t): Likewise.  Change owner to void *.
      	* config/posix/omp-lock.h: Include semaphore.h.
      	(omp_lock_25_t, omp_nest_lock_25_t): New types.
      	(omp_lock_t): Use sem_t instead of mutex if semaphores
      	aren't broken.
      	(omp_nest_lock_t): Likewise.  Add owner field.
      
      	* testsuite/libgomp.c/collapse-1.c: New test.
      	* testsuite/libgomp.c/collapse-2.c: New test.
      	* testsuite/libgomp.c/collapse-3.c: New test.
      	* testsuite/libgomp.c/icv-1.c: New test.
      	* testsuite/libgomp.c/icv-2.c: New test.
      	* testsuite/libgomp.c/lib-2.c: New test.
      	* testsuite/libgomp.c/lock-1.c: New test.
      	* testsuite/libgomp.c/lock-2.c: New test.
      	* testsuite/libgomp.c/lock-3.c: New test.
      	* testsuite/libgomp.c/loop-4.c: New test.
      	* testsuite/libgomp.c/loop-5.c: New test.
      	* testsuite/libgomp.c/loop-6.c: New test.
      	* testsuite/libgomp.c/loop-7.c: New test.
      	* testsuite/libgomp.c/loop-8.c: New test.
      	* testsuite/libgomp.c/loop-9.c: New test.
      	* testsuite/libgomp.c/nested-3.c: New test.
      	* testsuite/libgomp.c/nestedfn-6.c: New test.
      	* testsuite/libgomp.c/sort-1.c: New test.
      	* testsuite/libgomp.c/task-1.c: New test.
      	* testsuite/libgomp.c/task-2.c: New test.
      	* testsuite/libgomp.c/task-3.c: New test.
      	* testsuite/libgomp.c/task-4.c: New test.
      	* testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes
      	to C++ testsuite default compiler options.
      	* testsuite/libgomp.c++/collapse-1.C: New test.
      	* testsuite/libgomp.c++/collapse-2.C: New test.
      	* testsuite/libgomp.c++/ctor-10.C: New test.
      	* testsuite/libgomp.c++/for-1.C: New test.
      	* testsuite/libgomp.c++/for-2.C: New test.
      	* testsuite/libgomp.c++/for-3.C: New test.
      	* testsuite/libgomp.c++/for-4.C: New test.
      	* testsuite/libgomp.c++/for-5.C: New test.
      	* testsuite/libgomp.c++/loop-8.C: New test.
      	* testsuite/libgomp.c++/loop-9.C: New test.
      	* testsuite/libgomp.c++/loop-10.C: New test.
      	* testsuite/libgomp.c++/task-1.C: New test.
      	* testsuite/libgomp.c++/task-2.C: New test.
      	* testsuite/libgomp.c++/task-3.C: New test.
      	* testsuite/libgomp.c++/task-4.C: New test.
      	* testsuite/libgomp.c++/task-5.C: New test.
      	* testsuite/libgomp.c++/task-6.C: New test.
      	* testsuite/libgomp.fortran/allocatable1.f90: New test.
      	* testsuite/libgomp.fortran/allocatable2.f90: New test.
      	* testsuite/libgomp.fortran/allocatable3.f90: New test.
      	* testsuite/libgomp.fortran/allocatable4.f90: New test.
      	* testsuite/libgomp.fortran/collapse1.f90: New test.
      	* testsuite/libgomp.fortran/collapse2.f90: New test.
      	* testsuite/libgomp.fortran/collapse3.f90: New test.
      	* testsuite/libgomp.fortran/collapse4.f90: New test.
      	* testsuite/libgomp.fortran/lastprivate1.f90: New test.
      	* testsuite/libgomp.fortran/lastprivate2.f90: New test.
      	* testsuite/libgomp.fortran/lib4.f90: New test.
      	* testsuite/libgomp.fortran/lock-1.f90: New test.
      	* testsuite/libgomp.fortran/lock-2.f90: New test.
      	* testsuite/libgomp.fortran/nested1.f90: New test.
      	* testsuite/libgomp.fortran/nestedfn4.f90: New test.
      	* testsuite/libgomp.fortran/strassen.f90: New test.
      	* testsuite/libgomp.fortran/tabs1.f90: New test.
      	* testsuite/libgomp.fortran/tabs2.f: New test.
      	* testsuite/libgomp.fortran/task1.f90: New test.
      	* testsuite/libgomp.fortran/task2.f90: New test.
      	* testsuite/libgomp.fortran/vla4.f90: Add dg-warning.
      	* testsuite/libgomp.fortran/vla5.f90: Likewise.
      	* testsuite/libgomp.c/pr26943-2.c: Likewise.
      	* testsuite/libgomp.c/pr26943-3.c: Likewise.
      	* testsuite/libgomp.c/pr26943-4.c: Likewise.
      
      Co-Authored-By: Jakob Blomer <jakob.blomer@ira.uka.de>
      Co-Authored-By: Richard Henderson <rth@redhat.com>
      Co-Authored-By: Ulrich Drepper <drepper@redhat.com>
      
      From-SVN: r136433
      Jakub Jelinek committed
    • cgraph.c: Fix typos in comments. · fa10beec
      gcc/
      	* cgraph.c: Fix typos in comments.
      	(cgraph_availability_names): Fix string typo.
      	* fold-const.c: Fix typos in comments.
      	(fold_binary): Fix typo in warning.
      	* genautomata.c: Fix typos in comments.
      	(check_presence_pattern_sets): Fix typo in local variable.
      	(output_description): Fix typo in output.
      	* ggc-zone.c (ggc_pch_finish): Fix typo in error message.
      	* hwint.h: Likewise.
      	* matrix-reorg.c (check_allocation_function): Likewise.
      	* omega.c (smooth_weird_equations): Likewise.
      	* auto-inc-dec.c: Fix typos in comments.
      	* bb-reorder.c: Likewise.
      	* builtins.c: Likewise.
      	* c-common.c: Likewise.
      	* c-cppbuiltin.c: Likewise.
      	* c-parser.c: Likewise.
      	* c-pretty-print.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* cfgexpand.c: Likewise.
      	* cfghooks.c: Likewise.
      	* cfglayout.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* coverage.c: Likewise.
      	* dbxout.c: Likewise.
      	* df-byte-scan.c: Likewise.
      	* df-core.c: Likewise.
      	* df-problems.c: Likewise.
      	* df-scan.c: Likewise.
      	* dfp.c: Likewise.
      	* dominance.c: Likewise.
      	* domwalk.c: Likewise.
      	* dse.c: Likewise.
      	* dwarf2out.c: Likewise.
      	* emit-rtl.c: Likewise.
      	* et-forest.c: Likewise.
      	* function.c: Likewise.
      	* function.h: Likewise.
      	* gcc.c: Likewise.
      	* gcov-io.c: Likewise.
      	* gcov.c: Likewise.
      	* gcse.c: Likewise.
      	* genattrtab.c: Likewise.
      	* ggc-page.c: Likewise.
      	* gimplify.c: Likewise.
      	* gthr-lynx.h: Likewise.
      	* haifa-sched.c: Likewise.
      	* ipa-cp.c: Likewise.
      	* ipa-inline.c: Likewise.
      	* ipa-prop.h: Likewise.
      	* ipa-pure-const.c: Likewise.
      	* ipa-struct-reorg.c: Likewise.
      	* ipa-struct-reorg.h: Likewise.
      	* ipa-type-escape.c: Likewise.
      	* ipa.c: Likewise.
      	* loop-doloop.c: Likewise.
      	* mips-tfile.c: Likewise.
      	* mkmap-flat.awk: Likewise.
      	* mkmap-symver.awk: Likewise.
      	* modulo-sched.c: Likewise.
      	* omp-low.c: Likewise.
      	* optabs.c: Likewise.
      	* optabs.h: Likewise.
      	* opts.c: Likewise.
      	* passes.c: Likewise.
      	* postreload-gcse.c: Likewise.
      	* postreload.c: Likewise.
      	* predict.c: Likewise.
      	* pretty-print.h: Likewise.
      	* profile.c: Likewise.
      	* protoize.c: Likewise.
      	* ra-conflict.c: Likewise.
      	* real.c: Likewise.
      	* recog.c: Likewise.
      	* regclass.c: Likewise.
      	* regs.h: Likewise.
      	* reload.c: Likewise.
      	* rtl-error.c: Likewise.
      	* rtlanal.c: Likewise.
      	* scan.h: Likewise.
      	* sched-rgn.c: Likewise.
      	* see.c: Likewise.
      	* stmt.c: Likewise.
      	* target.h: Likewise.
      	* tree-dfa.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-flow-inline.h: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-nested.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-pass.h: Likewise.
      	* tree-pretty-print.c: Likewise.
      	* tree-profile.c: Likewise.
      	* tree-scalar-evolution.c: Likewise.
      	* tree-sra.c: Likewise.
      	* tree-ssa-alias-warnings.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* tree-ssa-dom.c: Likewise.
      	* tree-ssa-dse.c: Likewise.
      	* tree-ssa-forwprop.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-live.h: Likewise.
      	* tree-ssa-loop-im.c: Likewise.
      	* tree-ssa-loop-ivopts.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-phiopt.c: Likewise.
      	* tree-ssa-phiprop.c: Likewise.
      	* tree-ssa-sccvn.c: Likewise.
      	* tree-ssa-ter.c: Likewise.
      	* tree-ssa-threadupdate.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-vect-analyze.c: Likewise.
      	* tree-vect-transform.c: Likewise.
      	* tree-vectorizer.c: Likewise.
      	* tree-vn.c: Likewise.
      	* tree-vrp.c: Likewise.
      	* tree.c: Likewise.
      	* tree.def: Likewise.
      	* tree.h: Likewise.
      	* unwind-dw2-fde.c: Likewise.
      	* unwind.inc: Likewise.
      	* value-prof.c: Likewise.
      	* vmsdbgout.c: Likewise.
      
      From-SVN: r136425
      Ralf Wildenhues committed
  35. 18 Apr, 2008 1 commit
    • cpp-id-data.h (UC): Was U, conflicts with U... · b6baa67d
      libcpp/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
      
      * include/cpp-id-data.h (UC): Was U, conflicts with U... literal.
      * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
      (struct cpp_options): Added uliterals.
      (cpp_interpret_string): Update prototype.
      (cpp_interpret_string_notranslate): Idem.
      * charset.c (init_iconv_desc): New width member in cset_converter.
      (cpp_init_iconv): Add support for char{16,32}_cset_desc.
      (convert_ucn): Idem.
      (emit_numeric_escape): Idem.
      (convert_hex): Idem.
      (convert_oct): Idem.
      (convert_escape): Idem.
      (converter_for_type): New function.
      (cpp_interpret_string): Use converter_for_type, support u and U prefix.
      (cpp_interpret_string_notranslate): Match changed prototype.
      (wide_str_to_charconst): Use converter_for_type.
      (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
      * directives.c (linemarker_dir): Macro U changed to UC.
      (parse_include): Idem.
      (register_pragma_1): Idem.
      (restore_registered_pragmas): Idem.
      (get__Pragma_string): Support CPP_STRING{16,32}.
      * expr.c (eval_token): Support CPP_CHAR{16,32}.
      * init.c (struct lang_flags): Added uliterals.
      (lang_defaults): Idem.
      * internal.h (struct cset_converter) <width>: New field.
      (struct cpp_reader) <char16_cset_desc>: Idem.
      (struct cpp_reader) <char32_cset_desc>: Idem.
      * lex.c (digraph_spellings): Macro U changed to UC.
      (OP, TK): Idem.
      (lex_string): Add support for u'...', U'...', u... and U....
      (_cpp_lex_direct): Idem.
      * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
      (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
      
      gcc/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
        
      * c-common.c (CHAR16_TYPE, CHAR32_TYPE): New macros.
      (fname_as_string): Match updated cpp_interpret_string prototype.
      (fix_string_type): Support char16_t* and char32_t*.
      (c_common_nodes_and_builtins): Add char16_t and char32_t (and
      derivative) nodes.  Register as builtin if C++0x.
      (c_parse_error): Support CPP_CHAR{16,32}.
      * c-common.h (RID_CHAR16, RID_CHAR32): New elements. 
      (enum c_tree_index) <CTI_CHAR16_TYPE, CTI_SIGNED_CHAR16_TYPE,
      CTI_UNSIGNED_CHAR16_TYPE, CTI_CHAR32_TYPE, CTI_SIGNED_CHAR32_TYPE,
      CTI_UNSIGNED_CHAR32_TYPE, CTI_CHAR16_ARRAY_TYPE,
      CTI_CHAR32_ARRAY_TYPE>: New elements.
      (char16_type_node, signed_char16_type_node, unsigned_char16_type_node,
      char32_type_node, signed_char32_type_node, char16_array_type_node,
      char32_array_type_node): New defines.
      * c-lex.c (cb_ident): Match updated cpp_interpret_string prototype.
      (c_lex_with_flags): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
      (lex_string): Support CPP_STRING{16,32}, match updated
      cpp_interpret_string and cpp_interpret_string_notranslate prototypes.
      (lex_charconst): Support CPP_CHAR{16,32}.
      * c-parser.c (c_parser_postfix_expression): Support CPP_CHAR{16,32}
      and CPP_STRING{16,32}.
      
      gcc/cp/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
      
      * cvt.c (type_promotes_to): Support char16_t and char32_t.
      * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
      char16_t and char32_t.
      * lex.c (reswords): Add char16_t and char32_t (for c++0x).
      * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
      extended builtin type u8char32_t.
      * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
      RID_CHAR{16,32}.
      (cp_lexer_print_token): Support CPP_STRING{16,32}.
      (cp_parser_is_string_literal): Idem.
      (cp_parser_string_literal): Idem.
      (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
      CPP_STRING{16,32}.
      (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}. 
      * tree.c (char_type_p): Support char16_t and char32_t as char types.
      * typeck.c (string_conv_p): Support char16_t and char32_t.
      
      gcc/testsuite/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
      
      Tests for char16_t and char32_t support.
      * g++.dg/ext/utf-cvt.C: New
      * g++.dg/ext/utf-cxx0x.C: New
      * g++.dg/ext/utf-cxx98.C: New
      * g++.dg/ext/utf-dflt.C: New
      * g++.dg/ext/utf-gnuxx0x.C: New
      * g++.dg/ext/utf-gnuxx98.C: New
      * g++.dg/ext/utf-mangle.C: New
      * g++.dg/ext/utf-typedef-cxx0x.C: New
      * g++.dg/ext/utf-typedef-
      * g++.dg/ext/utf-typespec.C: New
      * g++.dg/ext/utf16-1.C: New
      * g++.dg/ext/utf16-2.C: New
      * g++.dg/ext/utf16-3.C: New
      * g++.dg/ext/utf16-4.C: New
      * g++.dg/ext/utf32-1.C: New
      * g++.dg/ext/utf32-2.C: New
      * g++.dg/ext/utf32-3.C: New
      * g++.dg/ext/utf32-4.C: New
      * gcc.dg/utf-cvt.c: New
      * gcc.dg/utf-dflt.c: New
      * gcc.dg/utf16-1.c: New
      * gcc.dg/utf16-2.c: New
      * gcc.dg/utf16-3.c: New
      * gcc.dg/utf16-4.c: New
      * gcc.dg/utf32-1.c: New
      * gcc.dg/utf32-2.c: New
      * gcc.dg/utf32-3.c: New
      * gcc.dg/utf32-4.c: New
      
      libiberty/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
      
      * testsuite/demangle-expected: Added tests for char16_t and char32_t.
      
      From-SVN: r134438
      Kris Van Hees committed
  36. 03 Apr, 2008 2 commits
    • re PR c/35738 (ICE with #pragma omp atomic and conversion from pointer to int) · 79addd1f
      	PR c/35738
      	* c-parser.c (c_parser_omp_atomic): Call
      	default_function_array_conversion on the RHS.
      
      	* gcc.dg/gomp/pr35738.c: New test.
      
      From-SVN: r133876
      Jakub Jelinek committed
    • c-objc-common.h (LANG_HOOKS_FUNCTION_ENTER_NESTED, [...]): Delete. · d2784db4
      2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
      
      	* c-objc-common.h (LANG_HOOKS_FUNCTION_ENTER_NESTED,
      	LANG_HOOKS_FUNCTION_LEAVE_NESTED): Delete.
      	* c-tree.h (c_push_function_context, c_pop_function_context): Remove
      	argument.
      	* c-decl.c (c_push_function_context, c_pop_function_context): Remove
      	argument, call {push,pop}_function_context from here.
      	* c-parser.c: Use c_{push,pop}_function_context.
      
      	* function.c (push_function_context_to): Move meat ...
      	(push_function_context): ... here.  Simplify.
      	* function.c (pop_function_context_from): Move meat ...
      	(pop_function_context): ... here.  Simplify.
      	* langhooks.h (struct lang_hooks_for_functions): Remove enter_nested,
      	leave_nested).
      	* langhooks-def.h (LANG_HOOKS_FUNCTION_ENTER_NESTED,
              LANG_HOOKS_FUNCTION_LEAVE_NESTED): Delete.
      	(LANG_HOOKS_FUNCTION_INITIALIZER): Delete them from here.
      	* tree.h (push_function_context_to, pop_function_context_from): Remove.
      
      cp:
      2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
      
      	* method.c (synthesize_method): Use {push,pop}_function_context.
      	* name-lookup.c (push_to_top_level): Likewise.
      	* parser.c (cp_parser_late_parsing_for_member): Likewise.
      
      From-SVN: r133860
      Paolo Bonzini committed
  37. 29 Mar, 2008 1 commit