Commit Graph

73144 Commits

Author SHA1 Message Date
DJ Delorie
971dfb9b99 varasm.c (initialize_constant_valid_p): Allow pointers initialized from integer constants of lesser precision.
* varasm.c (initialize_constant_valid_p): Allow pointers
initialized from integer constants of lesser precision.
(output_constant): Allow non-int-sized pointer modes to be
initialized from integer constants.

From-SVN: r110041
2006-01-20 16:55:41 -05:00
Richard Guenther
b615db81a9 configure.ac: Use -fPIC for symbol versioning test.
2006-01-20  Richard Guenther  <rguenther@suse.de>

	* configure.ac: Use -fPIC for symbol versioning test.
	* configure: Regenerate.

From-SVN: r110040
2006-01-20 21:33:25 +00:00
Volker Reichelt
cba43cb6ba parser.c (cp_lexer_next_token_is_keyword): Simplify.
* parser.c (cp_lexer_next_token_is_keyword): Simplify.

	* parser.c (clear_decl_specs): Remove prototype.

	* parser.c (cp_parser_expression_fn): Remove.

From-SVN: r110039
2006-01-20 21:08:48 +00:00
Joseph Myers
2b6dd222bb re PR libstdc++/25524 (libstdc++ headers should go in multilib directories)
PR libstdc++/25524
	* cppdefault.h (struct default_include): Add multilib flag.
	* cppdefault.c (cpp_include_defaults): Set it.
	* c.opt (-imultilib): New option.
	* c-opts.c (imultilib): New.
	(c_common_handle_option): Handle -imultilib.
	(c_common_post_options): Likewise.
	* c-incpath.c (add_standard_paths, register_include_chains):
	Likewise.
	* c-incpath.h (register_include_chains): Add extra parameter.
	* gcc.c (do_spec_1): Generate -imultilib option.
	(The Specs Language): Update %I description.
	(process_command): Update copyright notice.
	* doc/cppopts.texi (-imultilib): Document.
	* doc/invoke.texi (-imultilib): Include in option summary.
	(%I): Update specs documentation.

libstdc++-v3:
	* include/Makefile.am: Install host-specific headers in multilib
	subdirectory.
	* include/Makefile.in: Regenerate.

From-SVN: r110037
2006-01-20 21:00:03 +00:00
Steve Ellcey
6018b746be re PR testsuite/24962 (gcc.target/ia64/20030811-1.c (test for excess errors) fails with -milp32)
PR testsuite/24962
	* gcc.target/ia64/20030811-1.c: Change 'long' to 'long long'.

From-SVN: r110034
2006-01-20 18:29:44 +00:00
Steve Ellcey
692eeb3453 re PR libgomp/25877 (team.c:269: warning: implicit declaration of function 'alloca')
PR libgomp/25877
	* team.c: Add include of alloca.h.
	* configure.ac: Add check for alloca.h.
	* configure: Regenerate.
	* config.h.in: Regenerate.

From-SVN: r110031
2006-01-20 18:17:28 +00:00
Zdenek Dvorak
33cb1cf6c5 loop-iv.c (iv_analysis_loop_init): Use df in more conservative way.
* loop-iv.c (iv_analysis_loop_init): Use df in more conservative way.

From-SVN: r110030
2006-01-20 17:06:34 +00:00
John David Anglin
4bf2d47369 re PR ada/24533 (FAIL: a85013b: *** glibc detected *** free(): invalid pointer: 0x00062a00 ***)
PR ada/24533
	* s-osinte-linux-hppa.ads: Reduce alignment of atomic_lock_t to 8.

From-SVN: r110025
2006-01-20 14:30:33 +00:00
Diego Novillo
670cbfcfc5 configure: Regenerate.
* configure: Regenerate.

From-SVN: r110023
2006-01-20 08:47:14 -05:00
Volker Reichelt
ede7acf175 call.c (add_builtin_candidates): Remove superfluous return.
* call.c (add_builtin_candidates): Remove superfluous return.
	* name-lookup.c (do_toplevel_using_decl): Likewise.
	* parser.c (cp_parser_type_specifier_seq): Likewise.
	(cp_parser_save_default_args): Likewise.

From-SVN: r110022
2006-01-20 13:18:06 +00:00
Richard Sandiford
0174997a11 stmt.c (case_bit_test_cmp): Stabilize the sort using code label numbers.
* stmt.c (case_bit_test_cmp): Stabilize the sort using code
	label numbers.

From-SVN: r110021
2006-01-20 12:12:24 +00:00
Richard Guenther
c11fd0b206 re PR rtl-optimization/24626 (internal compiler error: verify_flow_info failed)
2006-01-20  Richard Guenther  <rguenther@suse.de>
	Steven Bosscher <stevenb.gcc@gmail.com>

	PR rtl-optimization/24626
	* cfgloopmanip.c (lv_adjust_loop_entry_edge): Don't set
	EDGE_TRUE_VALUE if in RTL mode.

	Revert
	2005-03-30 Mostafa Hagog <mustafa@il.ibm.com>
	* cfgrtl.c (rtl_verify_flow_info_1): Fix.

	* gcc.dg/torture/pr24626-1.c: New testcase.
	* gcc.dg/torture/pr24626-2.c: Likewise.
	* gcc.dg/torture/pr24626-3.c: Likewise.
	* gcc.dg/torture/pr24626-4.c: Likewise.

Co-Authored-By: Steven Bosscher <stevenb.gcc@gmail.com>

From-SVN: r110020
2006-01-20 09:38:56 +00:00
Dirk Mueller
74ac79fa80 re PR c++/5520 (Add a warning to detect empty body of if statements (like in the C frontend))
2006-01-20  Dirk Mueller  <dmueller@suse.com>

        PR c++/5520
        * c-parser.c (c_parser_if_body): Use build_empty_stmt()
        instead of a special NOP marker.
        * c-typeck.c (c_finish_if_stmt): Remove obsoleted special
        NOP marker handling.
        * c-common.h (empty_body_warning): Add forward declaration.
        * c-common.c (empty_body_warning): Add (from c_finish_if_stmt).
        Now uses IS_EMPTY_STMT() instead of special NOP markers.

        * semantics.c (finish_if_stmt): Call empty_body_warning.
        * parser.c (cp_parser_implicitly_scoped_statement):
        Mark empty statement with an empty stmt.

        * g++.dg/warn/empty-body.C: New.

From-SVN: r110019
2006-01-20 09:30:22 +00:00
Mark Mitchell
577b02d863 re PR c++/22136 (Rejects old-style using declaration)
PR c++/22136
	* name-lookup.c (do_class_using_decl): Don't try to look up base
	classes in templates with dependent base types.
	PR c++/22136
	* g++.dg/template/using10.C: New test.
	* g++.dg/temlpate/using11.C: Likewise.
	* g++.dg/inherit/using5.C: Tweak error messages.

From-SVN: r110017
2006-01-20 03:07:58 +00:00
Paul Brook
577092baab Makefile.in (lang_checks): Keep going if mkdir fails.
2005-01-20  Paul Brook  <paul@codesourcery.com>

	* Makefile.in (lang_checks): Keep going if mkdir fails.

From-SVN: r110012
2006-01-20 02:41:21 +00:00
Paolo Carlini
af8590d281 Implement list::splice (and merge) bits of N1599
2006-01-19  Paolo Carlini  <pcarlini@suse.de>

	Implement list::splice (and merge) bits of N1599
	* include/bits/stl_list.h (list<>::_M_check_equal_allocators): New.
	(list<>::splice(iterator, list&), splice(iterator, list&, iterator),
	splice(iterator, list&, iterator, iterator)): Use it.
	* include/bits/stl_list.h (list<>::merge(list&), merge(list&,
	_StrictWeakOrdering)): Likewise.
	* testsuite/23_containers/list/operators/5.cc: New.

From-SVN: r110011
2006-01-20 02:38:54 +00:00
Kenneth Zadeck
3b8266e279 df-scan.c (df_scan_free_bb_info): Added basic block parameter to be able to clean out basic block when not necessary.
2005-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>

	* df-scan.c (df_scan_free_bb_info): Added basic block parameter to
	be able to clean out basic block when not necessary.
	(df_scan_free): Fixed to properly delete information if df is
	unused before calling df_finish.
	(df_scan_alloc, df_rescan_blocks, df_reg_chain_unlink,
	df_insn_create_insn_record, df_bb_refs_record): Fixed formatting
	or comment typos.
	(df_bb_refs_delete): New function.
	(df_refs_delete): Moved per block code to df_bb_refs_delete.
	* df-core.c (df_set_blocks): Added code to properly clean out
	unused blocks if they are not part of the blocks to consider.
	Added additional null check.
	(df_compact_blocks): Added basic block parameter to free_bb_fun to
	be able to clean out basic block when not necessary
	* df.h (df_free_bb_function): Ditto.
	(df_bb_refs_delete): New function.
	* df-problems.c (df_ru_free_bb_info, df_rd_set_bb_info,
	df_lr_set_bb_info, df_ur_free_bb_info, df_urec_free_bb_info):Added
	basic block parameter to be able to clean out basic block when not
	necessary.
	(df_ru_alloc, df_rd_alloc): Fixed dyslexic overflow test.
	(df_ru_free, df_rd_free, df_lr_free, df_ur_free, df_urec_free):
	Fixed to properly delete information if df is unused before
	calling df_finish.

From-SVN: r110009
2006-01-20 01:55:52 +00:00
Kenneth Zadeck
a6d8ef6c5c re PR rtl-optimization/25799 (cc1 stalled with -O1 -fmodulo-sched)
2005-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR rtl-optimization/25799 
	* df-problems.c (df_ru_confluence_n, df_rd_confluence_n):
	Corrected confluence operator to remove bits from op2 before oring
	with op1 rather than removing bits from op1.
        (df_ru_transfer_function): Corrected test on wrong bitmap which
	caused infinite loop.  Both of these problems were introduced in
	the dataflow rewrite.

From-SVN: r110008
2006-01-20 01:28:34 +00:00
Kenneth Zadeck
59c52af442 re PR rtl-optimization/25799 (cc1 stalled with -O1 -fmodulo-sched)
2005-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR rtl-optimization/25799 
	* df-problems.c (df_ru_confluence_n, df_rd_confluence_n):
	Corrected confluence operator to remove bits from op2 before oring
	with op1 rather than removing bits from op1.
        * (df_ru_transfer_function): Corrected test on wrong bitmap which
	caused infinite loop.  Both of these problems were introduced in
	the dataflow rewrite.

From-SVN: r110007
2006-01-20 01:24:00 +00:00
DJ Delorie
ff182b5cf7 reload1.c (find_reload_regs): Note the details of reload failures in the dump file.
* reload1.c (find_reload_regs): Note the details of reload
failures in the dump file.
(spill_failure): Likewise.

From-SVN: r110006
2006-01-19 20:16:17 -05:00
Zdenek Dvorak
03fd221518 loop-iv.c: Include df.h and hashtab.h.
* loop-iv.c: Include df.h and hashtab.h.
	(enum iv_grd_result): New enum.
	(DF_REF_IV, DF_REF_IV_SET): New macros.
	(struct biv_entry): New.
	(df, bivs): New global variables.
	(struct insn_info, insn_info, last_def, bivs, max_insn_no, max_reg_no,
	assign_luids, mark_sets, kill_sets, mark_single_set, simple_set_p):
	Removed.
	(clear_iv_info, latch_dominating_def, record_iv, iv_analyze_expr,
	iv_analyze_result, iv_analyze_def, biv_hash, biv_eq,
	analyzed_for_bivness_p, record_biv): New functions.
	(iv_analysis_loop_init, iv_get_reaching_def, simple_reg_p,
	get_biv_step_1, get_biv_step, iv_analyze_biv, iv_analyze_op,
	iv_analyze, biv_p, iv_analysis_done): Work with df representation of
	UD chains.
	(iv_constant, iv_subreg, iv_extend, iv_mult, iv_shift): Do not set
	analysed.
	(iv_number_of_iterations): Use new interface to iv analysis.
	* loop-unroll.c: Do not include varray.h.
	(analyze_iv_to_split_insn): Use new interface to iv
	analysis.
	* loop-unswitch.c (may_unswitch_on): Ditto.
	* df.c (df_bitmaps_free): Only work for bbs for that structures are
	allocated.
	(df_bb_modify): Realloc tables to the new index.
	(df_find_use): New function.
	* df.h (df_find_use): Declare.
	* optabs.c (expand_unop): Make the mode of the REG_EQUAL node be
	outmode.
	* cfgloop.h (struct rtx_iv): Remove analysed field.
	(iv_get_reaching_def): Removed.
	(iv_analyze_result, iv_analyze_expr, iv_current_loop_df): Declare.
	* Makefile.in (loop-unroll.o): Remove VARRAY_H dependency.
	(loop-iv.o): Add df.h and hashtab.h dependency.
	* df-problems.c (df_ru_alloc, df_rd_alloc): Fix memory reallocation.

From-SVN: r110005
2006-01-20 00:46:37 +00:00
Alan Modra
b04c90638b libgcc2.c (__floatdisf, [...]): Don't use IBM Extended Double TFmode.
* libgcc2.c (__floatdisf, __floatdidf): Don't use IBM Extended
	Double TFmode.
	(__floatundisf, __floatundidf): Likewise.
	* libgcc2.h (IS_IBM_EXTENDED): Define.

From-SVN: r110004
2006-01-20 11:12:29 +10:30
DJ Delorie
e9a8eb89de * config/m32c/m32c.h (REG_ALLOC_ORDER): Define.
From-SVN: r110003
2006-01-19 19:38:42 -05:00
GCC Administrator
f36cc6d098 Daily bump.
From-SVN: r110001
2006-01-20 00:17:32 +00:00
Alan Modra
d67d833f0f rs6000-ldouble-1.c: Tweak powerpc linux target test.
* gcc.target/powerpc/rs6000-ldouble-1.c: Tweak powerpc linux
	target test.
	* gcc.target/powerpc/rs6000-ldouble-2.c: Likewise.

From-SVN: r109995
2006-01-20 10:46:18 +10:30
Paul Brook
cf1955dc95 arm.c (arm_compute_func_type): Treat all functions as nothrow when unwinding tables are disabled.
2006-01-19  Paul Brook  <paul@codesourcery.com>

	* gcc/config/arm/arm.c (arm_compute_func_type): Treat all functions
	as nothrow when unwinding tables are disabled.

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

From-SVN: r109990
2006-01-19 23:45:49 +00:00
DJ Delorie
2e16005633 m32c.c (m32c_prepare_shift): Add code to deal with the 16 bit shift limit of the m16c.
* config/m32c/m32c.c (m32c_prepare_shift): Add code to deal with
the 16 bit shift limit of the m16c.

From-SVN: r109987
2006-01-19 18:18:57 -05:00
H.J. Lu
360e875934 re PR libstdc++/25797 (almost all libstdc++ tests fail)
2006-01-19  H.J. Lu  <hongjiu.lu@intel.com>

	PR libstdc++/25797
	* acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Remove -Werror
	from CFLAGS.  Check if linker really supports --gc-sections.
	* configure: Regenerated.

From-SVN: r109985
2006-01-19 14:36:41 -08:00
Jan Hubicka
dd1a203f19 * gcc.target/i386/lea.c: Test pentiumpro, not i686.
From-SVN: r109982
2006-01-19 20:52:39 +00:00
Volker Reichelt
c9043d0372 re PR c++/25854 (Bogus diagnostic with '<type error>')
PR c++/25854
	* pt.c (maybe_process_partial_specialization): Return early on
	error_mark_node.

	* g++.dg/template/spec28.C: New test.

From-SVN: r109975
2006-01-19 17:29:42 +00:00
Andrew Pinski
9795d9fd7a re PR target/22099 (builtin_setjmp gives duplicate labels)
2006-01-19  Andrew Pinski  <pinskia@physics.uc.edu>

        PR target/22099
        * config/i386/i386.md (builtin_setjmp_receiver): Don't emit the label.
        * config/i386/i386.c (output_set_got): Output the label if we have one
        for the TARGET_DEEP_BRANCH_PREDICTION case.

From-SVN: r109974
2006-01-19 09:28:53 -08:00
Andrew Pinski
bf73f6d2a0 re PR target/15642 (NAN Is Not a Constant Because __APPLE_CC__ is Not Defined (OK in Apple 3.3.0))
2006-01-19  Andrew Pinski  <pinskia@physics.uc.edu>

        PR target/15642
        * inclhack.def (AAB_darwin7_9_long_double_funcs [replace]): Define
        __APPLE_CC_ as 1345.
        (broken_nan): New.
        * fixincl.x: Regenerate.

From-SVN: r109973
2006-01-19 09:18:29 -08:00
Jan Hubicka
786872fdd1 invoke.texi (generic): Document (i686) Update.
* invoke.texi (generic): Document
	(i686) Update.
	* config.gcc: Make x86_64-* and i686-* default to generic tunning.
	* i386.h (TARGET_GENERIC32, TARGET_GENERIC64, TARGET_GENERIC,
	TARGET_USE_INCDEC, TARGET_PAD_RETURNS): New macros.
	(x86_use_incdec, x86_pad_returns): New variables
	(TARGET_CPU_DEFAULT_generic): New constant
	(TARGET_CPU_DEFAULT_NAMES): Add generic.
	(enum processor_type): Add generic32 and generic64.
	* i386.md (cpu attribute): Add generic32/generic64
	(movhi splitter): Behave sanely when both partial_reg_dependency and
	partial_reg_stall are set.
	(K8 splitters): Enable for generic as well.
	* predicates.md (incdec_operand): Use TARGET_INCDEC
	(aligned_operand): Avoid memory mismatch stalls.
	* athlon.md: Enable for generic64, new patterns for 128bit moves.
	* ppro.md: Enable for generic32
	* i386.c (generic64_cost, generic32_cost): New.
	(m_GENERIC32, m_GENERIC64, m_GENERIC): New macros.
	(x86_use_leave): Enable for generic64.  (x86_use_sahf,
	x86_ext_80387_constants): Enable for generic32.  (x86_push_memory,
	x86_movx, x86_unroll_strlen, x86_deep_branch, x86_use_simode_fiop,
	x86_use_cltd, x86_promote_QImode, x86_sub_esp_4, x86_sub_esp_8,
	x86_add_esp_4, x86_add_esp_8, x86_integer_DFmode_moves,
	x86_partial_reg_dependency, x86_memory_mismatch_stall,
	x86_accumulate_outgoing_args, x86_prologue_using_move,
	x86_epilogue_using_move, x86_arch_always_fancy_math_387,
	x86_sse_partial_reg_dependency, x86_four_jump_limit, x86_schedule):
	Enable for generic.
	(x86_use_incdec, x86_pad_returns): New.
	(override_options): Add generic32 and generic64, translate "generic"
	to generic32/generic64 and "i686" to "generic32", refuse
	"generic32"/"generic64" as arch target.
	(ix86_issue_rate, ix86_adjust_cost): Handle generic as athlon.
	(ix86_reorg): Honor PAD_RETURNS.

From-SVN: r109972
2006-01-19 17:12:37 +00:00
Jan Hubicka
d326eaf06a invoke.texi (generic): Document (i686) Update.
* invoke.texi (generic): Document
	(i686) Update.
	* config.gcc: Make x86_64-* and i686-* default to generic tunning.
	* i386.h (TARGET_GENERIC32, TARGET_GENERIC64, TARGET_GENERIC,
	TARGET_USE_INCDEC, TARGET_PAD_RETURNS): New macros.
	(x86_use_incdec, x86_pad_returns): New variables
	(TARGET_CPU_DEFAULT_generic): New constant
	(TARGET_CPU_DEFAULT_NAMES): Add generic.
	(enum processor_type): Add generic32 and generic64.
	* i386.md (cpu attribute): Add generic32/generic64
	(movhi splitter): Behave sanely when both partial_reg_dependency and
	partial_reg_stall are set.
	(K8 splitters): Enable for generic as well.
	* predicates.md (incdec_operand): Use TARGET_INCDEC
	(aligned_operand): Avoid memory mismatch stalls.
	* athlon.md: Enable for generic64, new patterns for 128bit moves.
	* ppro.md: Enable for generic32
	* i386.c (generic64_cost, generic32_cost): New.
	(m_GENERIC32, m_GENERIC64, m_GENERIC): New macros.
	(x86_use_leave): Enable for generic64.  (x86_use_sahf,
	x86_ext_80387_constants): Enable for generic32.  (x86_push_memory,
	x86_movx, x86_unroll_strlen, x86_deep_branch, x86_use_simode_fiop,
	x86_use_cltd, x86_promote_QImode, x86_sub_esp_4, x86_sub_esp_8,
	x86_add_esp_4, x86_add_esp_8, x86_integer_DFmode_moves,
	x86_partial_reg_dependency, x86_memory_mismatch_stall,
	x86_accumulate_outgoing_args, x86_prologue_using_move,
	x86_epilogue_using_move, x86_arch_always_fancy_math_387,
	x86_sse_partial_reg_dependency, x86_four_jump_limit, x86_schedule):
	Enable for generic.
	(x86_use_incdec, x86_pad_returns): New.
	(override_options): Add generic32 and generic64, translate "generic"
	to generic32/generic64 and "i686" to "generic32", refuse
	"generic32"/"generic64" as arch target.
	(ix86_issue_rate, ix86_adjust_cost): Handle generic as athlon.
	(ix86_reorg): Honor PAD_RETURNS.

Co-Authored-By: Evandro Menezes <evandro.menezes@amd.com>
Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com>

From-SVN: r109971
2006-01-19 17:10:24 +00:00
Andrew Pinski
d103fa240f struct-layout-encoding-1_generate.c (switchfiles): Fix fprintf's by adding srcdir or removing it.
2006-01-19  Andrew Pinski  <pinskia@physics.uc.edu>

        * objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c (switchfiles):
        Fix fprintf's by adding srcdir or removing it.

From-SVN: r109970
2006-01-19 08:57:43 -08:00
Diego Novillo
50674e968a tree-pretty-print.c (dump_generic_node): Handle OMP_PARALLEL_FN, OMP_PARALLEL_DATA_ARG and OMP_RETURN_EXPR.
* tree-pretty-print.c (dump_generic_node): Handle
	OMP_PARALLEL_FN, OMP_PARALLEL_DATA_ARG and OMP_RETURN_EXPR.
	* cgraph.c (cgraph_expand_queue): Rename from
	cgraph_analyze_queue.
	Update all users.
	* cgraphunit.c (cgraph_assemble_pending_functions): Process
	cgraph_expand_queue.
	(cgraph_expand_all_functions): Likewise.
	(cgraph_finalize_pending_functions): Remove.  Update callers.

	* tree.h (OMP_DIRECTIVE_P): Define.
	(OMP_PARALLEL_FN): Define.
	(OMP_PARALLEL_DATA_ARG): Define.
	(OMP_SECTIONS_SECTIONS): Define.
	* tree-pass.h (pass_expand_omp): Declare.
	* omp-low.c (struct omp_region): Declare.
	(struct omp_context): Remove fields 'parallel_type',
	'parallel_start_ix' and 'parallel_start_additional_args'.
	Update all users.
	(struct omp_for_data): Rename from struct expand_omp_for_data.
	(omp_regions): New static variable.
	(root_omp_region): New static variable.
	(find_omp_clause): Make static.
	(is_in_combined_parallel_ctx): Remove.
	(is_combined_parallel): New.
	(extract_omp_for_data): Move earlier in the file.
	(workshare_safe_to_combine_p): New.
	(get_ws_args_for): New.
	(determine_parallel_type): Move earlier in the file.
	(omp_copy_decl_2): Do not set DECL_CONTEXT of new local to the
	child function.
	(omp_copy_decl): Likewise.
	(create_omp_child_function): Likewise.
	(lookup_omp_region): New.
	(dump_omp_region): New.
	(debug_omp_region): New.
	(debug_all_omp_regions): New.
	(new_omp_region): New.
	(scan_omp_parallel): If parallel_nesting_level > 1, the
	directive is nested within another parallel directive.
	Set OMP_PARALLEL_FN.
	(scan_omp_for): Do not try to handle combined parallel+for
	cases.
	Remove FIXME comment.
	(scan_omp_nested): Remove.
	(scan_omp_1): Do not call scan_omp_nested when
	parallel_nesting_level is > 1.
	Do not change the DECL_CONTEXT of local variables found.
	(lookup_decl_in_outer_ctx): New.
	(lower_rec_input_clauses): Rename from expand_rec_input_clauses.
	(lower_lastprivate_clauses): Rename from expand_lastprivate_clauses.
	(lower_reduction_clauses): Rename from expand_reduction_clauses.
	(lower_copyprivate_clauses): Rename from expand_copyprivate_clauses.
	If CTX is nested, lookup VAR in the outer context when
	building copy assignment.
	(lower_send_clauses): Rename from expand_send_clauses.
	If CTX is nested, lookup VAR in the outer context when
	building copy assignments.
	(lower_send_shared_vars): Rename from expand_send_shared_vars.
	If CTX is nested, lookup VAR in the outer context when
	building copy assignments.
	(expand_parallel_call): Rename from build_parallel_call.
	Handle combined parallel+workshare cases.
	Re-implement to emit code into the CFG.
	(list2chain): New.
	(expand_omp_parallel): Re-implement to emit code into the CFG.
	Call move_sese_region_to_fn to outline the sub-graph
	containing the parallel region.
	(expand_omp_for_1): Remove.
	(expand_omp_for_generic): Re-implement to emit code into the
	CFG.
	(expand_omp_for_static_nochunk): Likewise.
	(expand_omp_for_static_chunk): Likewise.
	(expand_omp_for): Likewise.
	(expand_omp_sections): Likewise.
	(remove_exit_barriers): New.
	(expand_omp_synch): New.
	(expand_omp): New.
	(build_omp_regions_1): New.
	(build_omp_regions): New.
	(execute_expand_omp): New.
	(gate_expand_omp): New.
	(pass_expand_omp): Define.
	(lower_omp_sections): Rename from expand_omp_sections.
	Set OMP_SECTIONS_SECTIONS.
	(lower_omp_single_simple): Rename from expand_omp_single_simple.
	(lower_omp_single_copy): Rename from expand_omp_single_copy.
	(lower_omp_single): Rename from expand_omp_simple.
	(lower_omp_master): Rename from expand_omp_master.
	(lower_omp_ordered): Rename from expand_omp_ordered.
	(lower_omp_critical): Rename from expand_omp_critical.
	(lower_omp_for_lastprivate): Rename from expand_omp_for_lastprivate.
	(lower_omp_for): Re-implement.
	(lower_omp_parallel): Re-implement.
	(lower_regimplify): Rename from expand_regimplify.
	(lower_omp_1): Rename from expand_omp_1.
	If there are syntax errors in the program, replace every
	OpenMP directive with NOP.
	Call lower_omp_* instead of expand_omp_*.
	(lower_omp): Rename from expand_omp.

	* tree-gimple.c (is_gimple_stmt): Handle OMP_RETURN_EXPR.
	* tree-gimple.h (enum omp_parallel_type): Remove.
	(gimple_boolify): Declare extern.
	(find_omp_clause, determine_parallel_type): Remove.

	* gimple-low.c (lower_omp_directive): New.
	(lower_stmt): Call it.
	(record_vars_into): Move from ...
	(record_vars): ... here.
	Call record_vars_into with current_function_decl.

	* gimplify.c (struct gimplify_ctx): Remove fields
	combined_pre_p and combined_ctxp.  Update users.
	(get_formal_tmp_var): Add documentation.
	(gimple_boolify): Make extern.
	(gimplify_expr_in_ctx): Remove.  Update callers.
	(gimplify_omp_parallel): Do not assume that OMP_PARALLEL_BODY
	will always be a BIND_EXPR.
	(gimplify_expr): Handle OMP_RETURN_EXPR.
	* tree.def (BLOCK): Remove documentation about BLOCK_TYPE_TAGS.
	(OMP_PARALLEL): Add 3 operands.
	(OMP_SECTIONS): Add 1 operand.
	(OMP_RETURN_EXPR): Define.

	* tree-inline.c (estimate_num_insns_1): Handle OpenMP directives.
	(copy_tree_r): Restore TREE_CHAIN in OMP_CLAUSE_*.
	* tree-iterator.c (alloc_stmt_list): Assert that we are not
	creating a circular free list.
	(free_stmt_list): Assert that we are not freeing stmt_list_cache.

	* tree-flow.h (move_sese_region_to_fn): Declare.
	(record_vars_into): Declare.
	* tree-cfg.c (make_omp_sections_edges): New.
	(make_exit_edges): Handle OMP_PARALLEL, OMP_FOR, OMP_SINGLE,
	OMP_MASTER, OMP_ORDERED, OMP_CRITICAL, OMP_RETURN_EXPR,
	OMP_SECTIONS and OMP_SECTION.
	(is_ctrl_altering_stmt): Return true for OMP_DIRECTIVE_P.
	(set_bb_for_stmt): Undo change to check currently_expanding_to_rtl.
	(verify_stmt): Do not handle OMP_DIRECTIVE_P.
	(gather_blocks_in_sese_region): New.
	(struct move_stmt_d): Declare.
	(move_stmt_r): New.
	(move_block_to_fn): New.
	(move_sese_region_to_fn): New.

	* passes.c (init_optimization_passes): Schedule
	pass_expand_omp after pass_init_datastructures.

	* tree-ssa-operands.c (get_expr_operands): Handle
	OMP_PARALLEL, OMP_SECTIONS, OMP_FOR, OMP_RETURN_EXPR,
	OMP_SINGLE, OMP_MASTER, OMP_ORDERED, OMP_CRITICAL.


testsuite/

	* testsuite/gcc.dg/gomp/for-13.c: Use -fdump-tree-ompexp.
	* testsuite/gcc.dg/gomp/critical-1.c: Likewise.
	* testsuite/gcc.dg/gomp/critical-3.c: Likewise.
	* testsuite/gcc.dg/gomp/empty.c: Likewise.
	* testsuite/gcc.dg/gomp/ordered-1.c: Likewise.
	* testsuite/gcc.dg/gomp/for-4.c: Likewise.
	* testsuite/gcc.dg/gomp/for-6.c: Likewise.
	* testsuite/gcc.dg/gomp/master-3.c: Likewise.
	* testsuite/gcc.dg/gomp/for-8.c: Likewise.
	* testsuite/gcc.dg/gomp/for-10.c: Likewise.
	* testsuite/gcc.dg/gomp/for-18.c: Likewise.
	* testsuite/gcc.dg/gomp/for-5.c: Likewise.
	* testsuite/gcc.dg/gomp/for-7.c: Likewise.
	* testsuite/gcc.dg/gomp/for-9.c: Likewise.

From-SVN: r109969
2006-01-19 11:55:52 -05:00
Jeff Law
307d19feb1 tree-vrp.c (extract_range_from_assert): Refine the result range if the variable referenced by the ASSERT_EXPR has a...
* tree-vrp.c (extract_range_from_assert): Refine the result range
	if the variable referenced by the ASSERT_EXPR has a range and
	either the tentative result range or the previous range is a 
	VR_ANTI_RANGE.

	* gcc.dg/tree-ssa/vrp25.c: New test.

From-SVN: r109968
2006-01-19 09:30:59 -07:00
Richard Sandiford
2e6f91e35a * gcc.dg/pr25805.c: Fix misapplied patch.
From-SVN: r109967
2006-01-19 16:29:44 +00:00
Richard Sandiford
2fa6ddddfe * c-decl.c (add_flexible_array_elts_to_size): Simplify vector accesses.
From-SVN: r109966
2006-01-19 16:28:31 +00:00
Jan Hubicka
440350810f * tree-vect-patterns.c (vect_pattern_recog_1): Prevent parse error.
From-SVN: r109962
2006-01-19 15:04:46 +00:00
Paolo Bonzini
79c2903212 combine.c (try_combine): Do not worry about MEMs wrapped by USEs.
2006-01-19  Paolo Bonzini  <bonzini@gnu.org>

	* combine.c (try_combine): Do not worry about MEMs wrapped by USEs.
	(expand_compound_operation, expand_field_assignment): Fail if the
	bit lengths of an extract operation are out of range.
	(make_extraction): Compute wanted_inner_mode based on the position
	and length of the extraction.  Make it extraction_mode for non-constant
	positions, and do not modify offset in that case.  When generating a
	new MEM, use a mode that can hold the extraction while keeping correct
	alignment.  Remove code that supported MEMs wrapped by USEs.
	(simplify_shift_const_1, force_to_mode) <case USE>: Remove.

From-SVN: r109961
2006-01-19 14:54:57 +00:00
Andreas Krebbel
3298c037d4 s390.md ("Y", "y"): New mode attribute.
2006-01-19  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.md ("Y", "y"): New mode attribute.
	("*cmpdi_ccs", "*cmpsi_ccs", "*adddi3_imm_cc", "*adddi3_carry1_cc", 
	"*adddi3_carry1_cconly", "*adddi3_carry2_cc", "*adddi3_carry2_cconly",
	"*adddi3_cc", "*adddi3_cconly", "*adddi3_cconly2", "*adddi3_64", 
	"*addsi3_imm_cc", "*addsi3_carry1_cc", 
	"*addsi3_carry1_cconly", "*addsi3_carry2_cc", "*addsi3_carr2_cconly",
	"*addsi3_cc", "*addsi3_cconly", "*addsi3_cconly2",
	"*subdi3_borrow_cc", "*subdi3_borrow_cconly", "*subdi3_cc", 
	"*subdi3_cc2", "*subdi3_cconly", "*subdi3_cconly2", "*subdi3_64",
	"*subsi3_borrow_cc", "*subsi3_borrow_cconly", "*subsi3_cc",
	"*subsi3_cc2", "*subsi3_cconly", "*subsi3_cconly", "*subsi3_cconly2",
	"addsi3", "subsi3"): Insn patterns removed.
	("*add<mode>3_carry1_cc", "*add<mode>3_carry1_cconly",
	"*add<mode>3_carry2_cc", "*add<mode>3_carry2_cconly", "*add<mode>3_cc",
	"*add<mode>3_cconly", "*add<mode>3_cconly2", "*add<mode>3_imm_cc",
	"*sub<mode>3_borrow_cc", "*sub<mode>3_borrow_cconly",
	"*sub<mode>3_cc", "*sub<mode>3_cc2", "*sub<mode>3_cconly", 
	"*sub<mode>3_cconly2"): New insn patterns.
	("addsi3", "subsi3"): New expanders.

From-SVN: r109957
2006-01-19 14:28:01 +00:00
Dorit Nuzman
20f0622174 Makefile.in (tree-vect-patterns.o): Add rule for new file.
* Makefile.in (tree-vect-patterns.o): Add rule for new file.
        * tree-vect-analyze.c (vect_determine_vectorization_factor): Use
        existing STMT_VINFO_VECTYPE if available.
        (vect_mark_relevant): Add special handling for stmts that are
        marked as STMT_VINFO_IN_PATTERN_P.
        (vect_analyze_loop): Call vect_pattern_recog.
        * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields.
        * tree-vectorizer.h (in_pattern_p, related_stmt): New fields in
        stmt_info.
        (STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros.
        (vect_recog_func_ptr): New function-pointer type.
        * tree-vect-patterns.c: New file.
        (vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern):
        (vect_recog_dot_prod_pattern, vect_pattern_recog):
        (vect_pattern_recog_1): New functions.
        (vect_pattern_recog_funcs): New array of function pointers.

        * tree-vectorizer.h (ternary_op): New enum value.
        * tree-vect-transform.c (vect_create_epilog_for_reduction): Added
        declaration. Revised documentation. Removed redundant dump prints.
        Removed redundant argument. Added support for reduction patterns.
        (vectorizable_reduction): Added support for reduction patterns.
        (vect_transform_stmt): Added support for patterns.

        * expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR.
        * genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize.
        * optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR.
        (expand_widen_pattern_expr): New function.
        (init_optabs): Initialize new optabs udot_prod_optab,
        sdot_prod_optab.
        * optabs.h (OTI_sdot_prod, OTI_udot_prod): New.
        (sdot_prod_optab, udot_prod_optab): Define new optabs.
        (expand_widen_pattern_expr): New function declaration.
        * tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New
        tree-codes.
        * tree-inline.c (estimate_num_insns_1): Added cases for new
        tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR.
        * tree-pretty-print.c (dump_generic_node): Likewise.
        (op_prio): Likewise.
        (op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR.
        * tree-ssa-operands.c (get_expr_operands): Added case for
        DOT_PROD_EXPR.
        * tree-vect-patterns.c (widened_name_p): New function.
        (vect_recog_dot_prod_pattern): Added function implementation.
        * tree-vect-transform.c (get_initial_def_for_reduction): Added
        cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR.
        * config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New.
        * config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New.

        * expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR.
        * genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize.
        * optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR.
        (init_optabs): Initialize new optabs widen_ssum_optab,
        widen_usum_optab.
        * optabs.h (OTI_widen_ssum, OTI_widen_usum): New.
        (widen_ssum_optab, widen_usum_optab): Define new optabs.
        * tree-vect-generic.c: (expand_vector_operations_1): Check type of
        use instead of type of def.
        * tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added
        function implementation.
        * config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi,
        widen_ssumv8hi): New.

        * doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New
        patterns.

From-SVN: r109954
2006-01-19 10:24:00 +00:00
Tobias Schlüter
681f47f25d gfortranspec.c: Update copyright years.
* gfortranspec.c: Update copyright years.
* trans.c: Likewise.
* trans-array.c: Likewise.
* trans-array.h: Likewise.
* trans-decl.c: Likewise.
* trans-stmt.c: Likewise.
* trans-stmt.h: Likewise.
* trans-types.c: Likewise.

From-SVN: r109951
2006-01-19 10:53:36 +01:00
Volker Reichelt
607c855eb7 re PR c++/16829 (default parameter can be not one of the last in function)
PR c++/16829
	* decl.c (start_preparsed_function): Check default arguments
	unconditionally.
	* name-lookup.c (pushdecl_maybe_friend): Check default arguments
	of all functions and function templates.
	* parser.c (cp_parser_late_parsing_default_args): Check default
	arguments.
	* decl2.c (check_default_args): Set missing default arguments to
	error_mark_node.

	* g++.dg/other/default2.C: New test.
	* g++.dg/other/default3.C: New test.

From-SVN: r109950
2006-01-19 09:51:57 +00:00
Richard Sandiford
1f0f7cebf9 re PR c/25805 (Incorrect handling of zero-initialized flexible arrays)
PR c/25805
	* c-decl.c (add_flexible_array_elts_to_size): New function.
	(finish_decl): Use it.

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

From-SVN: r109946
2006-01-19 07:35:47 +00:00
Mark Mitchell
c888c93b29 re PR c++/25836 (G++ does not allow a conversion of templated types)
PR c++/25836
	* cp-tree.h (push_class_stack): New function.
	(pop_class_stack): Likewise.
	* class.c (class_stack_node): Add hidden field.
	(pushclass): Clear it.
	(push_class_stack): New function.
	(pop_class_stack): Likewise.
	(currently_open_class): Ignore hidden classes.
	(currently_open_derived_class): Likewise.
	* name-lookup.c (push_to_top_level): Call push_class_stack.
	(pop_from_top_level): Call pop_class_stack.
	PR c++/25836
	* g++.dg/template/init6.C: New test.

From-SVN: r109945
2006-01-19 06:55:53 +00:00
Andrew Pinski
e79b9d54a1 diagnostic.h: Include options.h.
2006-01-18  Andrew Pinski  <pinskia@physics.uc.edu>

        * diagnostic.h: Include options.h.
        * config/rs6000/x-darwin (host-ppc-darwin.o): Correct the
        dependancies for diagnostic.h.
        * Makefile.in (DIAGNOSTIC_H): Add options.h.

From-SVN: r109941
2006-01-18 20:24:22 -08:00
Daniel Berlin
d16a5e3669 tree-ssa-operands.h (ssa_call_clobbered_cache_valid): Remove.
2006-01-16  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-operands.h (ssa_call_clobbered_cache_valid): Remove.
	(ssa_ro_call_cache_valid): Ditto.
	* tree-ssa-alias.c (sort_tags_by_id): New function.
	(init_transitive_clobber_worklist): Ditto.
	(add_to_worklist): Ditto.
	(mark_aliases_call_clobbered): Ditto.
	(compute_tag_properties): Ditto.
	(set_initial_properties): Ditto.
	(compute_call_clobbered): Ditto.
	(compute_may_aliases):	Call compute_call_clobbered and grouping.
	(compute_flow_sensitive_aliasing): Remove clobbering related code.
	(compute_flow_insensitive_aliasing): Grouping now happens in our
	caller.
	(setup_pointers_and_addressables): Remove clobbering related code.
	(add_may_alias): Ditto.
	(replace_may_alias): Ditto.
	(get_nmt_for): Ditto.
	(create_global_var): 
	(is_escape_site): Return an escape_type enumeration.
	* tree-flow-inline.h (is_call_clobbered):  Global var does not
	imply call clobbered.
	(mark_call_clobbered): Take a reason for marking this. Remove
	marking of globalness, and cache invalidation.
	(clear_call_clobbered): Remove cache invalidation code.
	* tree-dfa.c (dump_variable): If details is on, dump the reason
	for escaping.
	* tree-outof-ssa.c (create_temp): Copy escape mask from original
	variable. 
	* tree-flow.h (struct ptr_info_def): Add escape mask member.
	(struct var_ann_d): Ditto.
	(enum escape_type): New.
	(mark_call_clobbered): Adjust prototype.
	* tree-ssa-structalias.c (update_alias_info): Unmodifiable vars
	are never call clobbered. 
	Record reasons for escaping.
	* tree-ssa-structalias.h (is_escape_site): Update prototype.
	* tree-ssa-operands.c (ssa_call_clobbered_cache_valid): Remove.
	(ssa_ro_call_cache_valid): Ditto.
	(clobbered_v_may_defs): Ditto.
	(clobbered_vuses): Ditto.
	(ro_call_vuses): Ditto.
	(clobber_stats): New.
	(init_ssa_operands): Zero out clobber stats.
	(fini_ssa_operands): Print out clobber stats.
	(get_call_expr_operands): Pass callee fndecl to
	add_call_read_ops).
	(add_call_clobber_ops): Remove use of cache.
	Add use of PURE_CONST information.
	(add_call_read_ops): Remove use of cache.
	Add use of static not_read information.

From-SVN: r109938
2006-01-19 01:42:48 +00:00