Commit Graph

65173 Commits

Author SHA1 Message Date
Douglas Gregor
218f00156c c-common.h (enum rid): Add RID_STATIC_ASSERT.
2006-11-21      Douglas Gregor <doug.gregor@gmail.com>

        * c-common.h (enum rid): Add RID_STATIC_ASSERT.

From-SVN: r119065
2006-11-21 20:22:30 +00:00
Douglas Gregor
200d648149 static_assert1.C: New.
2006-11-21      Douglas Gregor <doug.gregor@gmail.com>

        * g++.dg/cpp0x/static_assert1.C: New.
        * g++.dg/cpp0x/static_assert2.C: New.
        * g++.dg/cpp0x/static_assert3.C: New.

From-SVN: r119063
2006-11-21 20:22:05 +00:00
Richard Guenther
0b2229b0b0 tree-vectorizer.h (NUM_PATTERNS): Increase.
2006-11-21  Richard Guenther  <rguenther@suse.de>

	* tree-vectorizer.h (NUM_PATTERNS): Increase.
	* tree-vect-patterns.c (vect_vect_recog_func_ptrs): Add
	vect_recog_pow_pattern.
	(vect_recog_pow_pattern): New function.

	* gcc.dg/vect/vect-pow-1.c: New testcase.
	* gcc.dg/vect/vect-pow-2.c: Likewise.

From-SVN: r119056
2006-11-21 14:29:53 +00:00
Bernd Schmidt
84e32cbb1f bfin.c (hard_regno_mode_ok): Only allow first 31 regs for DImode.
* config/bfin/bfin.c (hard_regno_mode_ok): Only allow first 31
	regs for DImode.
	(bfin_register_move_cost): Bump costs if trying to move plain
	integer values through accumulators.

From-SVN: r119055
2006-11-21 12:07:39 +00:00
Bernd Schmidt
d6eb07dc7c bfin.opt (mstack-check-l1): New.
* config/bfin/bfin.opt (mstack-check-l1): New.
	* doc/invoke.texi (Blackfin Options): Document it.
	* config/bfin/bfin.c (bfin_expand_prologue): Generate code to use
	stack bounds in L1 memory if the new option is enabled.
	(override_options): Don't allow combinations of -fstack-limit and
	-mstack-check-l1.
	(add_to_reg): Renamed from add_to_sp.  All callers changed.  Lose some
	dead code.

From-SVN: r119049
2006-11-21 10:07:38 +00:00
Jakub Jelinek
fd5b5108b0 re PR c++/29570 (ICE with brace-enclosed initializer)
PR c++/29570
	* decl.c (cp_finish_decl): Check for value dependent brace enclosed
	scalar initializer.

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

From-SVN: r119045
2006-11-21 10:43:16 +01:00
Jakub Jelinek
4576ceaf22 re PR c++/29734 (ICE with vector in switch condition)
PR c++/29734
	* cp-tree.h (WANT_VECTOR): Define.
	(WANT_ARITH): Add WANT_VECTOR.
	* cvt.c (build_expr_type_conversion): Handle vector types.
	* typeck.c (build_unary_op): Add WANT_VECTOR to
	build_expr_type_conversion flags.

	* g++.dg/conversion/simd4.C: New test.

From-SVN: r119044
2006-11-21 10:41:27 +01:00
Ben Elliston
b509487e88 * config/spu/spu.c (spu_expand_vector_init): Initialise x.
From-SVN: r119043
2006-11-21 14:30:34 +11:00
Ben Elliston
83cc06b2b8 Formatting fixes.
From-SVN: r119042
2006-11-21 13:22:40 +11:00
Trevor Smigiel
85d9c13c20 configure.in (skipdirs): Don't build target-libiberty for SPU.
ChangeLog

	* configure.in (skipdirs) : Don't build target-libiberty for SPU.
	* configure : Rebuilt.

gcc/ChangeLog

	* config.gcc : Add target for SPU.
	* config/spu/constraints.md : New file.
	* config/spu/crt0.c : New file.
	* config/spu/crtend.c : New file.
	* config/spu/crti.asm : New file.
	* config/spu/crtn.asm : New file.
	* config/spu/float_unsdidf.c : New file.
	* config/spu/float_unssidf.c : New file.
	* config/spu/predicates.md : New file.
	* config/spu/spu-builtins.def : New file.
	* config/spu/spu-builtins.h : New file.
	* config/spu/spu-builtins.md : New file.
	* config/spu/spu-c.c : New file.
	* config/spu/spu-elf.h : New file.
	* config/spu/spu-modes.def : New file.
	* config/spu/spu-protos.h : New file.
	* config/spu/spu.c : New file.
	* config/spu/spu.h : New file.
	* config/spu/spu.md : New file.
	* config/spu/spu.opt : New file.
	* config/spu/spu_internals.h : New file.
	* config/spu/spu_intrinsics.h : New file.
	* config/spu/spu_mfcio.h : New file.
	* config/spu/t-spu-elf : New file.
	* config/spu/vec_types.h : New file.
	* config/spu/vmx2spu.h : New file.
	* doc/contrib.texi : Document SPU contributor.
	* doc/extend.texi : Document SPU extensions.
	* doc/invoke.texi : Document SPU options.
	* doc/md.texi : Document SPU constraints.

libcpp/ChangeLog

	* configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
	* configure : Rebuilt.

From-SVN: r119041
2006-11-21 01:35:42 +00:00
Zdenek Dvorak
99f8a411dc cfgloopmanip.c (add_loop, [...]): Do not set level of the loop.
* cfgloopmanip.c (add_loop, duplicate_loop): Do not set level
	of the loop.
	* cfgloop.c (flow_loop_level_compute, flow_loops_level_compute):
	Removed.
	(flow_loop_dump): Do not dump loop level.
	(flow_loops_find): Do not call flow_loops_level_compute.
	* cfgloop.h (struct loop): Remove level field.

From-SVN: r119040
2006-11-21 01:08:40 +00:00
Zdenek Dvorak
ca83d38556 tree-ssa-loop-im.c (schedule_sm, [...]): Use vector of edges instead of array.
* tree-ssa-loop-im.c (schedule_sm, determine_lsm_ref,
	hoist_memory_references, loop_suitable_for_sm, determine_lsm_loop):
	Use vector of edges instead of array.
	* tree-ssa-loop-niter.c (find_loop_niter, find_loop_niter_by_eval,
	estimate_numbers_of_iterations_loop): Ditto.
	* predict.c (predict_loops): Ditto.
	* loop-unroll.c (analyze_insns_in_loop): Ditto.
	* tree-ssa-threadupdate.c: Remove declaration of heap allocation for
	edge vectors.
	* basic-block.h: Declare heap allocation for edge vectors.
	* tree-outof-ssa.c: Ditto.
	* cfgloop.c (get_loop_exit_edges): Return vector of edges.
	* cfgloop.h (get_loop_exit_edges): Declaration changed.

From-SVN: r119039
2006-11-21 00:20:02 +00:00
GCC Administrator
c61191974b Daily bump.
From-SVN: r119037
2006-11-21 00:17:38 +00:00
Zack Weinberg
5932ca9d11 gengtype.c (process_gc_options): Remove unnecessary forward decl.
* gengtype.c (process_gc_options): Remove unnecessary forward decl.
	Add another out parameter, "skip".
	(set_gc_used_type): Adjust calls to process_gc_options.  If a field
	is tagged "skip", do not mark its type used.

From-SVN: r119034
2006-11-21 00:16:45 +00:00
Tobias Burnus
2a6dcee5c3 re PR fortran/27546 (IMPORT is broken)
fortran/
2006-11-17  Tobias Burnus  <burnus@net-b.de>

    PR fortran/27546
    * primary.c (gfc_match_rvalue): Added IMPORT support.

testsuite/
2006-11-17  Tobias Burnus  <burnus@net-b.de>

    PR fortran/27546
    * gfortran.dg/import.f90: Extended test.
    * gfortran.dg/import2.f90: Extended test.

From-SVN: r119028
2006-11-20 22:29:32 +01:00
Simon Martin
02022f3a70 re PR c++/29475 (incomplete template diagnostics.)
PR c++/29475
	* cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
	extra argument that represents the declaration to use to print
	potential error messages.
	* init.c (build_offset_ref): Adjusted the call to
	perform_or_defer_access_check.
	* class.c (alter_access, resolve_address_of_overloaded_function):
	Likewise.
	* decl.c (make_typename_type, make_unbound_class_template): Likewise. 
	* search.c (lookup_member): Likewise.
	* friend.c (add_friend): Likewise.
	* parser.c (cp_parser_template_id,
	cp_parser_pre_parsed_nested_name_specifier): Likewise.
	* semantics.c (finish_non_static_data_member,
	check_accessibility_of_qualified_id, finish_id_expression): Likewise.
	(pop_to_parent_deferring_access_checks, perform_access_checks,
	perform_or_defer_access_check): Adjusted the call to enforce_access.
	* call.c (enforce_access): Use the new extra argument to build the
	error message.
	(build_op_delete_call): Adjusted the call to
	perform_or_defer_access_check.
	(build_over_call): Likewise.

	PR c++/29475
	* g++.dg/template/access19.C: New test.
	* g++.old-deja/g++.other/access11.C: Adjusted the line where the
	error is reported.

From-SVN: r119027
2006-11-20 21:15:44 +00:00
Andrew Pinski
903ff2758b re PR target/25500 (SSE2 vectorized code is slower on 4.x.x than previous)
2006-11-20  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/25500
        * tree-sra.c (single_scalar_field_in_record_p): New function.
        (decide_block_copy): Use it.

2006-11-20  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/25500
        * gcc.dg/tree-ssa/sra-4.c: New testcase.

From-SVN: r119026
2006-11-20 12:29:10 -08:00
Tobias Burnus
d7043acd94 symbol.c (check_conflict): Add conflict between VOLATILE attribute and program name.
fortran/
2006-11-20  Tobias Burnus  <burnus@net-b.de>

        * symbol.c (check_conflict): Add conflict between VOLATILE
          attribute and program name.

testsuite/
2006-11-20  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/volatile3.f90: Add conflict test.

From-SVN: r119025
2006-11-20 21:04:24 +01:00
David Daney
9e08816049 mips-signal.h (sys/syscall.h): Do not include.
2006-11-20  David Daney  <ddaney@avtrex.com>

	* include/mips-signal.h (sys/syscall.h): Do not include.
	(sig_ucontext_t): Removed.
	(MAKE_THROW_FRAME): Changed to be a nop.
	(_INIT_SIG_HANDLER): New macro.
	(INIT_SEGV): Rewrote to use _INIT_SIG_HANDLER.
	(INIT_FPE): Same.

2006-11-20  David Daney  <ddaney@avtrex.com>

	* config/mips/linux-unwind.h (mips_fallback_frame_state): Adjust
	PC to point to following instruction.

From-SVN: r119024
2006-11-20 19:49:08 +00:00
Anatoly Sokolov
d5b1188567 re PR target/18553 (Annoying warning with -ffunction-sections -g)
PR target/18553
	PR target/29449
	* config/avr/avr.h (OBJECT_FORMAT_ELF): Define.

	* config/avr/avr.h (DWARF2_DEBUGGING_INFO): Define.

From-SVN: r119019
2006-11-20 21:16:21 +03:00
J"orn Rennecke
8999fdc7c2 config.gcc (sh*-superh-elf): Add t-superh to tmake_file.
* config.gcc (sh*-superh-elf): Add t-superh to tmake_file.
	Add sh/superh.h to tm_file.

From-SVN: r119018
2006-11-20 17:37:50 +00:00
Carlos O'Donell
76642aabbd cppdefault.c: Define cpp_PREFIX, cpp_PREFIX_len, and gcc_exec_prefix.
gcc/

2006-11-20  Carlos O'Donell  <carlos@codesourcery.com>
	    Mark Mitchell  <mark@codesourcery.com>

	* cppdefault.c: Define cpp_PREFIX, cpp_PREFIX_len, and 
	gcc_exec_prefix.
	(cpp_relocated): New function.
	* cppdefault.h: Declare cpp_PREFIX, cpp_PREFIX_len, gcc_exec_prefix 
	and cpp_relocated. 
	* Makefile.in (PREPROCESSOR_DEFINES): Add -DPREFIX option.
	* c-incpath.c (add_standard_paths): Call cpp_relocated. If relocated,
	replace configured prefix with gcc_exec_prefix. 


Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r119017
2006-11-20 17:15:27 +00:00
Bernhard Fischer
9d691ba750 re PR fortran/24783 ([4.1 and 4.2 only] Implicit none in module overwrite explicit in procedure)
fortran/ChangeLog
2006-11-20  Bernhard Fischer  <aldot@gcc.gnu.org>

        PR fortran/24783
        * resolve.c (resolve_variable): Get the implicit type from the
        symbols namespace rather than the default namespace. Fix whitespace.
        (resolve_formal_arglist, resolve_equivalence): Fix typo.


testsuite/ChangeLog
2006-11-20  Bernhard Fischer  <aldot@gcc.gnu.org>

        PR fortran/24783
        * gfortran.dg/implicit_10.f90: New test.

From-SVN: r119016
2006-11-20 17:20:33 +01:00
Bernd Schmidt
b9b36edd96 tree-ssa-loop-ivopts.c (get_address_cost): Do not artificially inflate costs for addresses with an out-of-bounds address.
* tree-ssa-loop-ivopts.c (get_address_cost): Do not artificially
	inflate costs for addresses with an out-of-bounds address.

From-SVN: r119014
2006-11-20 13:06:13 +00:00
Bernd Schmidt
bcbb974df4 bfin.c (bfin_function_ok_for_sibcall): Handle some edge cases with local functions and TARGET_ID_SHARED_LIBRARY.
* config/bfin/bfin.c (bfin_function_ok_for_sibcall): Handle some
	edge cases with local functions and TARGET_ID_SHARED_LIBRARY.

From-SVN: r119013
2006-11-20 12:40:57 +00:00
Bernd Schmidt
9314711904 bfin.md (call_symbol, [...]): Allow these patterns if TARGET_LEAF_ID_SHARED_LIBRARY.
* config/bfin/bfin.md (call_symbol, call_value_symbol, sibcall_symbol,
	sibcall_value_symbol): Allow these patterns if
	TARGET_LEAF_ID_SHARED_LIBRARY.
	* config/bfin/bfin.c (bfin_expand_call): Allow them here as well.
	(override_options): Turn on id shared library flags if -msep-data,
	but disallow the combination of these options on the command line.
	* config/bfin/bfin.h (TARGET_LEAF_ID_SHARED_LIBRARY, MASK_SEP_DATA
	MASK_LEAF_ID_SHARED_LIBRARY, TARGET_SEP_DATA): New macros.
	(DRIVER_SELF_SPECS): -mleaf-id-shared-library implies
	-mid-shared-library.
	(TARGET_SWITCHES): Add -mleaf-id-shared-library and -msep-data.
	* doc/invoke.texi (Blackfin Options): Document new switches.

From-SVN: r119012
2006-11-20 12:35:47 +00:00
Bernd Schmidt
d6f6753efe bfin.h (LEGITIMATE_CONSTANT_P): Call bfin_legitimate_constant_p.
* config/bfin/bfin.h (LEGITIMATE_CONSTANT_P): Call
	bfin_legitimate_constant_p.
	* config/bfin/bfin.md (movsi expander): Check return value of
	expand_mvoe.
	* config/bfin/bfin-protos.h (bfin_legitimate_constant_p): Declare.
	(expand_move): Adjust prototype.
	* config/bfin/bfin.c (expand_move): Now returns bool.  Handle
	invalid constants specially.
	(bfin_cannot_force_const_mem, bfin_legitimate_constant_p): New
	functions.
	(TARGET_CANNOT_FORCE_CONST_MEM): New macro.

From-SVN: r119011
2006-11-20 12:22:25 +00:00
Andrew Pinski
f81c1b60f2 re PR rtl-optimization/29879 (ICE: verify_flow_info: loop_father but no loops)
2006-11-19  Andrew Pinski  <pinskia@gmail.com>

        PR rtl-opt/29879
        * fwprop.c (loops): Remove.
        (forward_propagate_into): Use current_loops instead of
        loops.
        (fwprop_init): Call loop_optimizer_init instead of
        flow_loops_find.
        (fwprop_done): Call loop_optimizer_finalize instead of
        flow_loops_free.
        (fwprop): Use current_loops instead of loo

From-SVN: r119010
2006-11-19 20:51:47 -08:00
Gabriel Dos Reis
7f420d0d64 re PR c++/8586 (-Wwrite-strings should be included in -Wall)
2006-11-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>

        PR c++/8586
        * c-opts.c (c_common_handle_option): Enable -Wwrite-strings if
        -Wall.

testsuite/
2006-11-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>

        PR c++/8586
        * g++.dg/warn/Wall-write-strings.C: New.

From-SVN: r119009
2006-11-20 01:03:49 +00:00
GCC Administrator
e5dfa5b1be Daily bump.
From-SVN: r119006
2006-11-20 00:18:09 +00:00
Erik Edelmann
51f824b647 resolve.c (resolve_ref): Check for ALLOCATABLEs to the right of nonzero rank part references too.
fortran/
2006-11-19  Erik Edelmann  <eedelman@gcc.gnu.org>

        * resolve.c (resolve_ref): Check for ALLOCATABLEs to the right of
        nonzero rank part references too.


testsuite/
2006-11-19  Erik Edelmann  <eedelman@gcc.gnu.org>

        * gfortran.dg/alloc_comp_constraint_5.f90: New.
        * gfortran.dg/alloc_comp_assign_2.f90: Removed invalid code.

From-SVN: r118999
2006-11-19 21:27:16 +00:00
Francois-Xavier Coudert
39f87c0333 module.c (gfc_use_module): Uncomment the ISO_FORTRAN_ENV code.
* module.c (gfc_use_module): Uncomment the ISO_FORTRAN_ENV code.
	Check that intrinsic and non-intrinsic modules don't conflict.
	(use_iso_fortran_env_module): New function.
	(create_int_parameter): New function.
	* trans-types.c (gfc_init_kinds): Choose values for
	gfc_numeric_storage_size and gfc_character_storage_size.
	(gfc_numeric_storage_size, gfc_character_storage_size): New variables.
	* resolve.c (resolve_symbol): Do no check intrinsic modules
	against the list of intrinsic symbols.
	* iso-fortran-env.def: New file.
	* gfortran.h (gfc_numeric_storage_size,
	gfc_character_storage_size): Add prototypes.

	* gfortran.dg/use_3.f90: Remove error message.
	* gfortran.dg/iso_fortran_env_1.f90: New test.
	* gfortran.dg/iso_fortran_env_2.f90: New test.
	* gfortran.dg/iso_fortran_env_3.f90: New test.
	* gfortran.dg/iso_fortran_env_4.f90: New test.

From-SVN: r118998
2006-11-19 21:18:26 +00:00
John David Anglin
0eab781508 re PR target/29114 (ICE when cross-compiling glibc for hppa on a 64bit host)
PR target/29114
	* pa.c (emit_move_sequence): Don't split constants with PLUS for modes
	larger than BITS_PER_WORD.

From-SVN: r118993
2006-11-19 18:24:21 +00:00
Dorit Nuzman
9fe01de4e3 * gcc.dg/vect/vect-27.c: Fix initialization.
From-SVN: r118987
2006-11-19 11:11:57 +00:00
GCC Administrator
5b2b4a6b08 Daily bump.
From-SVN: r118982
2006-11-19 00:18:13 +00:00
John David Anglin
30f421e5a5 re PR fortran/27885 (FAIL: libgomp.fortran/vla[1-7].f90 -O0 (test for excess errors))
PR fortran/27885
	PR middle-end/28176
	* stor-layout.c (set_sizetype): Limit precision of *bitsizetypes types
	to MAX_FIXED_MODE_SIZE.

From-SVN: r118977
2006-11-18 23:17:33 +00:00
Kaveh R. Ghazi
b64d949c61 builtins.c (integer_valued_real_p): Handle fmin/fmax.
* builtins.c (integer_valued_real_p): Handle fmin/fmax.
	(fold_builtin_fmin_fmax): New.
	(fold_builtin_1): Use it.

testsuite:
	* gcc.dg/builtins-20.c: Add fmin/fmax cases.
	* gcc.dg/torture/builtin-minmax-1.c: New.

From-SVN: r118976
2006-11-18 20:38:40 +00:00
Kaveh R. Ghazi
6af46feb6b fold-const.c (fold_strip_sign_ops): Handle copysign.
* fold-const.c (fold_strip_sign_ops): Handle copysign.

testsuite:
	* gcc.dg/builtins-20.c: Add cases for copysign.

From-SVN: r118975
2006-11-18 20:29:22 +00:00
Richard Guenther
4f7d854795 i386.c (ix86_builtins): New array for ix86 builtin function decls.
2006-11-18  Richard Guenther  <rguenther@suse.de>

	* config/i386/i386.c (ix86_builtins): New array for ix86
	builtin function decls.
	(def_builtin): New function.
	(def_builtin_const): Likewise.
	(ix86_init_mmx_sse_builtins): Mark sqrt and cvt builtins const.

From-SVN: r118974
2006-11-18 20:03:52 +00:00
Vladimir Makarov
05f85dbb6d invoke.texi (core2): Add item.
2006-11-18  Vladimir Makarov  <vmakarov@redhat.com>

	* doc/invoke.texi (core2): Add item.

	* config/i386/i386.h (TARGET_CORE2, TARGET_CPU_DEFAULT_core2): New
	macros.
	(TARGET_CPU_CPP_BUILTINS): Add code for core2.
	(TARGET_CPU_DEFAULT_generic): Change value.
	(TARGET_CPU_DEFAULT_NAMES): Add core2.
	(processor_type): Add new constant PROCESSOR_CORE2.

	* config/i386/i386.md (cpu): Add core2.

	* config/i386/i386.c (core2_cost): New initialized variable.
	(m_CORE2): New macro.
	(x86_use_leave, x86_push_memory, x86_movx, x86_unroll_strlen,
	x86_deep_branch, x86_partial_reg_stall, 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_rep_movl_optimal,
	x86_use_incdec, x86_four_jump_limit, x86_schedule,
	x86_pad_returns): Add m_CORE2.
	(override_options): Add entries for Core2.
	(ix86_issue_rate): Add case for Core2.

From-SVN: r118973
2006-11-18 18:43:19 +00:00
Francois-Xavier Coudert
7b66643229 re PR fortran/24285 ([4.2 only] format(1000(a,$)))
PR fortran/24285

	* io.c (check_format): Allow dollars everywhere in format, and
	issue a warning.

	* gfortran.dg/dollar_edit_descriptor-3.f: New test.

From-SVN: r118971
2006-11-18 12:16:42 +00:00
Aldy Hernandez
ea57490067 invoke.texi: Fix mno-isel typo.
* doc/invoke.texi: Fix mno-isel typo.

From-SVN: r118969
2006-11-18 10:55:38 +00:00
Joseph Myers
b9bb3235fe spe.md (movv4hi_internal): Add alternative for easy vector constant loads.
* config/rs6000/spe.md (movv4hi_internal): Add alternative for
	easy vector constant loads.

From-SVN: r118964
2006-11-18 00:27:03 +00:00
Joseph Myers
8609875306 rs6000.h (TARGET_NO_LWSYNC): Define.
gcc:
	* config/rs6000/rs6000.h (TARGET_NO_LWSYNC): Define.
	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
	__NO_LWSYNC__ if TARGET_NO_LWSYNC.
	* config/rs6000/sync.md (lwsync): Emit plain sync if
	TARGET_NO_LWSYNC.

libstdc++-v3:
	* config/cpu/powerpc/atomic_word.h (_GLIBCXX_WRITE_MEM_BARRIER):
	Use plain sync if __NO_LWSYNC__.

From-SVN: r118961
2006-11-18 00:22:45 +00:00
GCC Administrator
0828ca7e69 Daily bump.
From-SVN: r118959
2006-11-18 00:17:55 +00:00
DJ Delorie
d2c9375a6d reload1.c (reloads_unique_chain): New.
* reload1.c (reloads_unique_chain): New.
(reloads_conflict): Call it.

From-SVN: r118953
2006-11-17 18:15:29 -05:00
Bob Wilson
036a2b7a60 predicates.md (addsubx_operand): New.
* config/xtensa/predicates.md (addsubx_operand): New.
	* config/xtensa/xtensa.c (xtensa_emit_branch): New.
	(xtensa_emit_bit_branch): New.
	(xtensa_emit_movcc): New.
	* config/xtensa/xtensa.md (any_minmax): New code macro.
	(minmax): New code attribute.
	(any_cond, any_scc, any_scc_sf): New code macros.
	(*addx2, *addx4, *addx8): Delete.
	(*addx): New.
	(*subx2, *subx4, *subx8): Delete.
	(*subx): New.
	(sminsi3, uminsi3, smaxsi3, umaxsi3): Use any_minmax macro.
	(beq, bne, bgt, bge, blt, ble, bgtu, bgeu, bltu, bleu): Use any_cond.
	(*btrue, *bfalse, *ubtrue, *ubfalse): Use xtensa_emit_branch.
	(*bittrue, *bitfalse): Use xtensa_emit_bit_branch.
	(seq, sne, sgt, sge, slt, sle): Use any_scc macro.
	(movsicc_internal0, movsicc_internal1): Use xtensa_emit_movcc.
	(movsfcc_internal0, movsfcc_internal1): Likewise.
	(seq_sf, slt_sf, sle_sf): Use any_scc_sf macro.
	* config/xtensa/xtensa-protos.h: (xtensa_emit_branch): New.
	(xtensa_emit_bit_branch): New.
	(xtensa_emit_movcc): New.
	(function_arg_boundary): Add missing prototype.

From-SVN: r118952
2006-11-17 23:10:48 +00:00
Bob Wilson
3e98014384 * config/xtensa/xtensa.md (tstsi): Delete
From-SVN: r118949
2006-11-17 22:59:50 +00:00
Bob Wilson
a81126a540 * config/xtensa/xtensa.md (entry): Do not emit .frame directive.
From-SVN: r118948
2006-11-17 22:55:13 +00:00
Bob Wilson
44a69b3186 * config/xtensa/elf.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
From-SVN: r118947
2006-11-17 22:46:57 +00:00
Bob Wilson
05dcbf00e1 * config/xtensa/lib1funcs.asm (__umulsidi3): Restore a0 on exit.
From-SVN: r118946
2006-11-17 22:40:02 +00:00
Eric Botcazou
9fa25ead53 re PR ada/27936 (gnatbind fails to link)
PR ada/27936
	* trans.c (add_decl_expr): Do not dynamically elaborate padded objects
	if the initializer takes into account the padding.

From-SVN: r118939
2006-11-17 15:10:28 +00:00
Zdenek Dvorak
598ec7bdbe tree-vrp.c (execute_vrp): Do not update current_loops.
* tree-vrp.c (execute_vrp): Do not update current_loops.
	* loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with.
	* doc/loop.texi: Remove documentation for cancelled functions.
	* tree-ssa-loop-im.c (loop_commit_inserts): Removed.
	(move_computations, determine_lsm): Use bsi_commit_edge_inserts
	instead.
	* cfgloopmanip.c (remove_bbs): Do not update loops explicitly.
	(remove_path): Ensure that in delete_basic_blocks, the loops
	are still allocated.
	(add_loop): Work on valid loop structures.
	(loopify): Modify call of add_loop.
	(mfb_update_loops): Removed.
	(create_preheader): Do not update loops explicitly.
	(force_single_succ_latches, loop_version): Do not use
	loop_split_edge_with.
	(loop_split_edge_with): Removed.
	* tree-ssa-loop-manip.c (create_iv, determine_exit_conditions):
	Do not use bsi_insert_on_edge_immediate_loop.
	(split_loop_exit_edge, tree_unroll_loop): Do not use
	loop_split_edge_with.
	(bsi_insert_on_edge_immediate_loop): Removed.
	* tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops.  Do not
	use loop_split_edge_with.
	* cfghooks.c: Include cfgloop.h.
	(verify_flow_info): Verify that loop_father is filled iff current_loops
	are available.
	(redirect_edge_and_branch_force, split_block, delete_basic_block,
	split_edge, merge_blocks, make_forwarder_block, duplicate_block):
	Update cfg.
	* cfgloopanal.c (mark_irreducible_loops): Work if the function contains
	no loops.
	* modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use
	loop_split_edge_with.
	(sms_schedule): Use current_loops.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops.
	* loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set
	current_loops.
	(rtl_loop_init, rtl_loop_done): Do not set current_loops.
	* tree-ssa-sink.c (execute_sink_code): Use current_loops.
	* ifcvt.c (if_convert): Ditto.
	* predict.c (predict_loops): Do not clear current_loops.
	(tree_estimate_probability): Use current_loops.
	(propagate_freq): Receive head of the region to propagate instead of
	loop.
	(estimate_loops_at_level): Do not use shared to_visit bitmap.
	(estimate_loops): New function.  Handle case current_loops == NULL.
	(estimate_bb_frequencies): Do not allocate tovisit.  Use
	estimate_loops.
	* tree-ssa-loop.c (current_loops): Removed.
	(tree_loop_optimizer_init): Do not return loops.
	(tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops.
	* tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1,
	slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge):
	Do not update loops explicitly.
	* function.h (struct function): Add x_current_loops field.
	(current_loops): New macro.
	* tree-if-conv.c (combine_blocks): Do not update loops explicitly.
	* loop-unroll.c (split_edge_and_insert): New function.
	(unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not
	use loop_split_edge_with.
	* loop-doloop.c (add_test, doloop_modify): Ditto.
	* tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops.
	* cfglayout.c (copy_bbs): Do not update loops explicitly.
	* lambda-code.c (perfect_nestify): Do not use loop_split_edge_with.
	* tree-vect-transform.c (vect_transform_loop): Do not update loops
	explicitly.
	* cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order.
	(flow_loops_free): Do not free dfs_order and rc_order.
	(flow_loops_find): Do not set dfs_order and rc_order in loops
	structure.  Do not call loops and flow info verification.
	(add_bb_to_loop, remove_bb_from_loops): Check whether the block
	already belongs to some loop.
	* cfgloop.h (struct loops): Remove struct cfg.
	(current_loops, loop_split_edge_with): Declaration removed.
	(loop_optimizer_init, loop_optimizer_finalize): Declaration changed.
	* tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop):
	Declaration removed.
	* Makefile.in (cfghooks.o): Add CFGLOOP_H dependency.
	* basic-block.h (split_edge_and_insert): Declare.
	* tree-cfg.c (remove_bb): Do not update loops explicitly.

From-SVN: r118931
2006-11-17 11:29:17 +00:00
Francois-Xavier Coudert
31198773e4 gfortran.h (gfc_add_intrinsic_modules_path, [...]): New prototypes.
* gfortran.h (gfc_add_intrinsic_modules_path,
	gfc_open_intrinsic_module): New prototypes.
	(gfc_add_include_path, gfc_open_included_file): Update prototypes.
	* lang.opt: Add -fintrinsic-modules-path option.
	* module.c (gfc_match_use): Match the Fortran 2003 form of
	USE statement.
	(gfc_use_module): Also handle intrinsic modules. 
	* scanner.c (gfc_directorylist): Add use_for_modules for field.
	(intrinsic_modules_dirs): New static variable.
	(add_path_to_list, gfc_add_intrinsic_modules_path): New functions.
	(gfc_add_include_path): Use the new add_path_to_list helper
	function.
	(gfc_release_include_path): Free memory for intrinsic_modules_dirs.
	(open_included_file, gfc_open_intrinsic_module): New functions.
	(gfc_open_included_file): Use the new open_included_file
	helper function.
	* lang-specs.h: Use the new -fintrinsic-modules-path option.
	* parse.c (decode_statement): Do not match the required space
	after USE here.
	* options.c (gfc_handle_option): Handle the new option. Use new
	prototype for gfc_add_include_path.
	(gfc_post_options): Use new prototype for gfc_add_include_path.

	* gfortran.dg/use_1.f90: New test.
	* gfortran.dg/use_1.f90: New test.
	* gfortran.dg/use_1.f90: New test.

From-SVN: r118930
2006-11-17 11:11:25 +00:00
Zdenek Dvorak
fc9962ee12 re PR tree-optimization/29801 (ICE in set_lattice_value (tree-ssa-ccp.c))
PR tree-optimization/29801
	* tree-ssa-ccp.c (get_symbol_constant_value): New function.
	(get_default_value): Use get_symbol_constant_value.
	(set_lattice_value): ICE when the value of the constant is
	changed.
	(visit_assignment): Ignore VDEFs of read-only variables.

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

From-SVN: r118926
2006-11-17 10:29:07 +00:00
Zdenek Dvorak
80b4a8d94f tree-vect-transform.c (vect_create_epilog_for_reduction): Fix formating.
2006-11-17  Zdenek Dvorak <dvorakz@suse.cz>

	* tree-vect-transform.c (vect_create_epilog_for_reduction): Fix
	formating.
	(vect_generate_tmps_on_preheader, vect_update_ivs_after_vectorizer,
	vect_gen_niters_for_prolog_loop): Fold the emited expressions.

From-SVN: r118925
2006-11-17 09:34:08 +00:00
Zdenek Dvorak
d092f0f605 tree-ssa-alias.c (new_type_alias): Do not use offset of expr to select subvars of var.
* tree-ssa-alias.c (new_type_alias): Do not use offset of expr to
	select subvars of var.

From-SVN: r118924
2006-11-17 09:24:01 +00:00
Jakub Jelinek
c7b38a8574 re PR middle-end/29584 (internal compiler error on optimization)
PR middle-end/29584
	* tree-ssa-forwprop.c (simplify_switch_expr): Don't
	optimize if DEF doesn't have integral type.

	* gcc.dg/torture/pr29584.c: New test.

From-SVN: r118921
2006-11-17 09:57:45 +01:00
Uros Bizjak
3e0a5abd21 i386.c (ix86_function_sseregparm): Missing comment update.
* config/i386/i386.c (ix86_function_sseregparm): Missing comment update.

From-SVN: r118918
2006-11-17 07:50:45 +01:00
Mike Stump
80c85ca287 darwin.h (LINK_COMMAND_SPEC): Don't do dwarf stuff on pre-darwin9 system, unless the user asks for it directly.
* config/darwin.h (LINK_COMMAND_SPEC): Don't do dwarf stuff on
	pre-darwin9 system, unless the user asks for it directly.
	(PREFERRED_DEBUGGING_TYPE): Likewise.
	* config/i386/darwin.h (PREFERRED_DEBUGGING_TYPE): Likewise.
	* config.gcc: Add suppport for darwin9.h.
	* config/darwin9.h: Add.
	* doc/install.texi (Specific): Clarify darwin documentation.

From-SVN: r118917
2006-11-17 06:48:01 +00:00
Richard Earnshaw
36b15ad0dc arm.h (CONSTANT_ALIGNMENT): Don't over-align strings when optimizing for size.
* arm.h (CONSTANT_ALIGNMENT): Don't over-align strings when
	optimizing for size.

From-SVN: r118914
2006-11-17 00:27:18 +00:00
Joseph Myers
4d7a2662bf stdarg-2.c, stdarg-4.c: Condition PowerPC tests for saving FPRs on powerpc_fprs.
* gcc.dg/tree-ssa/stdarg-2.c, gcc.dg/tree-ssa/stdarg-4.c:
	Condition PowerPC tests for saving FPRs on powerpc_fprs.
	* gcc.target/powerpc/compress-float-ppc.c,
	gcc.target/powerpc/compress-float-ppc-pic.c: Only test if
	powerpc_fprs.
	* gcc.target/powerpc/rs6000-power2-2.c: Only test if powerpc_fprs;
	do not pass -mhard-float.

From-SVN: r118912
2006-11-17 00:25:05 +00:00
GCC Administrator
328488eb1e Daily bump.
From-SVN: r118910
2006-11-17 00:17:33 +00:00
Mike Stump
b8835a420c * Makefile.in (targhooks.o): Add $(OPTABS_H).
From-SVN: r118904
2006-11-16 22:26:09 +00:00
Dirk Mueller
b9eae1a974 tree-vrp.c (get_value_range): Use XCNEW instead of XNEW and memset.
2006-11-16  Dirk Mueller  <dmueller@suse.de>

       * tree-vrp.c (get_value_range): Use XCNEW instead
       of XNEW and memset.
       (insert_range_assertions): Use XCNEWVEC instead
       of XNEWVEC and memset.
       (vrp_initialize): Same.
       (vrp_finalize): Same.
       * tree-ssa-ccp.c (ccp_initialize): Same.
       * predict.c (tree_bb_level_predictions): Same.
       * calls.c (expand_call): Same.
       * tree-ssa-copy.c (init_copy_prop): Same.
       (fini_copy_prop): Same.
       * tree-ssa-alias.c (get_ptr_info): Use GGC_CNEW instead
       of GGC_NEW and memset.

       * name-lookup.c (begin_scope): Use GGC_CNEW instead of
       GGC_NEW and memset.

From-SVN: r118903
2006-11-16 22:07:30 +00:00
Eric Botcazou
a9e64c639e re PR middle-end/26306 (ICE on volatile array with non-constant bounds)
PR middle-end/26306
	* gimplify.c (gimplify_expr): Only force a load for references to
	non-BLKmode volatile values.
	* doc/implement-c.texi (Qualifiers implementation): Document the
	interpretation of what a volatile access is.
	* doc/extend.texi (C++ Extensions): Rework same documentation.

From-SVN: r118900
2006-11-16 21:25:16 +00:00
Joseph Myers
198bc7873d spe.md (frob_di_df_2): Handle non-offsettable memory operand.
* config/rs6000/spe.md (frob_di_df_2): Handle non-offsettable
	memory operand.

From-SVN: r118889
2006-11-16 13:36:23 +00:00
Francois-Xavier Coudert
9f1dce5609 re PR fortran/29391 ([4.2/4.1 only] LBOUND and UBOUND are broken)
PR fortran/29391
	PR fortran/29489

	* simplify.c (simplify_bound): Fix the simplification of
	LBOUND/UBOUND intrinsics.
	* trans-intrinsic.c (simplify_bound): Fix the logic, and
	remove an erroneous assert.

	* gcc/testsuite/gfortran.dg/bound_2.f90: Add more checks.
	* gcc/testsuite/gfortran.dg/bound_3.f90: New test.

From-SVN: r118888
2006-11-16 12:25:11 +00:00
François-Xavier Coudert
6c0e51c4fa trans-decl.c (gfc_get_symbol_decl): Fix formatting.
* trans-decl.c (gfc_get_symbol_decl): Fix formatting.

	* io/open.c (new_unit): Format %d expects an int variable.
	* runtime/error.c (show_locus): Format %d expects an int variable.

From-SVN: r118887
2006-11-16 11:20:57 +00:00
Richard Earnshaw
ecaf6f0780 arm.md (abssi2): Allow Thumb as well.
* arm.md (abssi2): Allow Thumb as well.	 Use an SImode scratch for
	Thumb.
	(arm_neg_abssi2): Renamed from neg_abssi2.
	(thumb_abssi2, thumb_neg_abssi2): New patterns with splitters.

From-SVN: r118884
2006-11-16 08:57:50 +00:00
Uros Bizjak
56829cae9c i386.c (ix86_function_sseregparm): Fix comment: number of arguments passed to local functions in SSE registers is 3.
* config/i386/i386.c (ix86_function_sseregparm): Fix comment:
	number of arguments passed to local functions in SSE registers is 3.

	* doc/invoke.texi (Function Attributes) [sseregparm]: Correct
	number of arguments passed in SSE registers to 3.

From-SVN: r118883
2006-11-16 08:30:18 +01:00
Maxim Kuvyrkov
96370780ab re PR target/29201 (ICE in create_recovery_block, at haifa-sched.c:3692 at -O3)
2006-11-16  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	PR target/29201
	* cfgrtl.c (rtl_delete_block): Move the code for getting last insn of
	bb to ...
	(get_last_bb_insn): ... new global function.
	(basic_block.h): Declare it.
	* haifa-sched.c (create_recovery_block): Use it.

2006-11-16  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	PR target/29201
	* gcc.c-torture/compile/pr29201.c: New test for ia64 target.

From-SVN: r118882
2006-11-16 06:57:59 +00:00
H.J. Lu
db21bbf90c re PR middle-end/29862 (Calling a function with gcc_assert)
2006-11-15  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/29862
	* real.c (mpfr_from_real): Call mpfr_set_str before gcc_assert.

From-SVN: r118881
2006-11-15 19:50:16 -08:00
Brooks Moses
e25a0da328 data.c: Remove trailing periods from error messages.
* data.c: Remove trailing periods from error messages.
* decl.c: Likewise.
* expr.c: Likewise.
* io.c: Likewise.
* match.c: Likewise.
* module.c: Likewise.
* options.c: Likewise.
* resolve.c: Likewise.
* symbol.c: Likewise.
* trans-io.c: Likewise.

From-SVN: r118880
2006-11-15 19:05:28 -08:00
Brooks Moses
10612ddf52 lang.opt: Rearrange entries back into ASCII order.
* lang.opt: Rearrange entries back into ASCII order.

From-SVN: r118879
2006-11-15 19:03:04 -08:00
GCC Administrator
2216398331 Daily bump.
From-SVN: r118876
2006-11-16 00:17:49 +00:00
Steven G. Kargl
813fb18bac import3.f90: Fix error message.
2006-11-15  Steven G. Kargl  <kargl@gcc.gnu.org>

        * gfortran.dg/import3.f90: Fix error message.

From-SVN: r118868
2006-11-15 21:32:31 +00:00
Paul Brook
66403286e3 unwind-arm.c (_Unwind_GetDataRelBase, [...]): Move from here ...
2006-11-15  Paul Brook  <paul@codesourcery.com>

	gcc/
	* config/arm/unwind-arm.c (_Unwind_GetDataRelBase,
	_Unwind_GetTextRelBase): Move from here ...
	* config/arm/pr-support.c (_Unwind_GetDataRelBase,
	_Unwind_GetTextRelBase): ... To here.

From-SVN: r118864
2006-11-15 18:12:17 +00:00
Bernd Schmidt
b1dd92fd59 tree-ssa-loop-ivopts.c (get_address_cost): Make sure memory addresses we generate for testing are aligned.
* tree-ssa-loop-ivopts.c (get_address_cost): Make sure memory
	addresses we generate for testing are aligned.

From-SVN: r118863
2006-11-15 17:54:55 +00:00
Andrew Pinski
f9f63ff215 re PR tree-optimization/29788 (ICE in var_ann, at tree-flow-inline.h:130)
2006-11-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/29788
        * fold-const.c (fold_indirect_ref_1): Fold *&CONST_DECL down
        to what is the const decl is a place holder for.

2006-11-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/29788
        * gfortran.fortran-torture/compile/inline_1.f90:
        New testcase.

From-SVN: r118861
2006-11-15 09:04:56 -08:00
Uros Bizjak
47a37ce45e i386.opt: New target option -mx87regparm.
* config/i386/i386.opt: New target option -mx87regparm.

	* config/i386/i386.h (struct ix86_args): Add x87_nregs, x87_regno,
	float_in_x87: Add new variables. mmx_words, sse_words: Remove.
	(X87_REGPARM_MAX): Define.

	* config/i386/i386.c (override_options): Error out for
	-mx87regparm but no 80387 support.
	(ix86_attribute_table): Add x87regparm.
	(ix86_handle_cconv_attribute): Update comments for x87regparm.
	(ix86_comp_type_attributes): Check for mismatched x87regparm types.
	(ix86_function_x87regparm): New function.
	(ix86_function_arg_regno_p): Add X87_REGPARM_MAX 80387 floating
	point registers.
	(init_cumulative_args): Initialize x87_nregs and float_in_x87
	variables.
	(function_arg_advance): Process x87_nregs and x87_regno when
	floating point argument is to be passed in 80387 register.
	(function_arg): Pass XFmode arguments in 80387 registers for local
	functions.  Pass SFmode and DFmode arguments to local functions
	in 80387 registers when flag_unsafe_math_optimizations is set.

	* reg-stack.c (convert_regs_entry): Disable NaN load for
	stack registers that are used for argument passing.

	* doc/extend.texi: Document x87regparm function attribute.
	* doc/invoke.texi: Document -mx87regparm.

testsuite/ChangeLog:

	* gcc.target/i386/x87regparm-1.c: New test.
	* gcc.target/i386/x87regparm-2.c: New test.
	* gcc.target/i386/x87regparm-3.c: New test.
	* gcc.target/i386/x87regparm-4.c: New test.

From-SVN: r118859
2006-11-15 17:21:58 +01:00
Tobias Burnus
ab25c2d920 parse.c (parse_contained): Fix indention of one line.
2006-11-15  Tobias Burnus  <burnus@net-b.de>

       * parse.c (parse_contained): Fix indention
         of one line.

From-SVN: r118858
2006-11-15 17:16:19 +01:00
Tobias Burnus
8998be2031 re PR fortran/27546 (IMPORT is broken)
fortran/
2006-11-15  Tobias Burnus  <burnus@net-b.de>

       PR fortran/27546
       * decl.c (gfc_match_import,variable_decl):
         Add IMPORT support.
         (gfc_match_kind_spec): Fix typo in gfc_error.
       * gfortran.h (gfc_namespace, gfc_statement):
         Add IMPORT support.
       * parse.c (decode_statement,gfc_ascii_statement,
         verify_st_order): Add IMPORT support.
       * match.h: Add gfc_match_import.
       * gfortran.texi: Add IMPORT to the supported
         Fortran 2003 features.

testsuite/
 2006-11-15  Tobias Burnus  <burnus@net-b.de>

       PR fortran/27546
       * gfortran.dg/import.f90: New test.
       * gfortran.dg/import2.f90: New test.
       * gfortran.dg/import3.f90: New test.

From-SVN: r118857
2006-11-15 16:46:42 +01:00
Bernd Schmidt
dd5f63f83e tree-flow.h (multiplier_allowed_in_address_p): Adjust prototype.
* tree-flow.h (multiplier_allowed_in_address_p): Adjust prototype.
	* tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): New
	arg MODE; all callers changed.  Use it to determine validity per
	machine mode instead of using Pmode for all memory references.
	(get_address_cost): Likewise add and use new arg MEM_MODE.

From-SVN: r118856
2006-11-15 14:29:10 +00:00
Rask Ingemann Lambertsen
c78ba53a65 combine.c (likely_spilled_retval_1): Fix masking operation.
2006-11-15  Rask Ingemann Lambertsen <rask@sygehus.dk>
	    J"orn Rennecke <joern.rennecke@st.com>

	* combine.c (likely_spilled_retval_1): Fix masking operation.
	(likely_spilled_retval_p): Use proper pattern for call to
	likely_spilled_retval_1.

Co-Authored-By: J"orn Rennecke <joern.rennecke@st.com>

From-SVN: r118855
2006-11-15 13:16:41 +00:00
Bernd Schmidt
6b97a43964 bfin.c (legitimize_pic_address): Lose dead code that tests for CONSTANT_POOL_ADDRESS_P.
* config/bfin/bfin.c (legitimize_pic_address): Lose dead code
	that tests for CONSTANT_POOL_ADDRESS_P.

From-SVN: r118854
2006-11-15 12:27:32 +00:00
Bernd Schmidt
0f14009a1e tree-ssa-loop-ivopts.c (determine_iv_costs): Fix formatting.
* tree-ssa-loop-ivopts.c (determine_iv_costs): Fix formatting.

From-SVN: r118853
2006-11-15 12:23:09 +00:00
Tobias Burnus
65713e5bcc re PR fortran/27588 (-fbounds-check should catch substring out of range accesses)
fortran/
2006-11-15  Tobias Burnus  <burnus@net-b.de>
            Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

       PR fortran/27588
       * trans-expr.c (gfc_conv_substring): Add bounds checking.
         (gfc_conv_variable, gfc_conv_substring_expr): Pass more
         arguments to gfc_conv_substring.

testsuite/
2006-11-15  Tobias Burnus  <burnus@net-b.de>

       PR fortran/27588
       * gfortran.dg/char_bounds_check_fail_1.f90: New test.


Co-Authored-By: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>

From-SVN: r118852
2006-11-15 11:13:16 +01:00
Tobias Burnus
8c894ae273 re PR fortran/29806 (Error if CONTAINS is present without SUBPROGRAM)
fortran/
2006-11-15  Tobias Burnus  <burnus@net-b.de>

       PR fortran/29806
       * parse.c (parse_contained): Check for empty contains statement.

testsuite/
2006-11-15  Tobias Burnus  <burnus@net-b.de>

       PR fortran/29806
       * gfortran.dg/contains.f90: New test.
       * gfortran.dg/derived_function_interface_1.f90: Add a dg-warning.

From-SVN: r118851
2006-11-15 11:02:21 +01:00
Jakub Jelinek
08700251e5 re PR tree-optimization/29581 (Latent bug in 4.1/4.2/4.3 lambda-code.c)
PR tree-optimization/29581
	* lambda-code.c (replace_uses_equiv_to_x_with_y): Add YINIT,
	REPLACEMENTS, FIRSTBSI arguments.  If initial condition or
	type is different between Y and USE, create a temporary
	variable, initialize it at the beginning of the body bb
	and use it as replacement instead of Y.

	* gcc.dg/pr29581-1.c: New test.
	* gcc.dg/pr29581-2.c: New test.
	* gcc.dg/pr29581-3.c: New test.
	* gcc.dg/pr29581-4.c: New test.
	* gfortran.dg/pr29581.f90: New test.

From-SVN: r118848
2006-11-15 10:35:34 +01:00
Paolo Bonzini
d6cfd93133 re PR tree-optimization/29753 (Volatile semantics ignored in some cases)
2006-11-15  Paolo Bonzini  <bonzini@gnu.org>

	PR middle-end/29753
	* gimplify.c (fold_indirect_ref_rhs): Use
	STRIP_USELESS_TYPE_CONVERSION rather than STRIP_NOPS.

From-SVN: r118845
2006-11-15 08:07:03 +00:00
Bud Davis
5868cbf992 re PR fortran/28974 (Extremely slow compilation of enumerated DATA statements.)
2006-11-15  Bud Davis <bdavis9659@sbcglobal.net>

        PR fortran/28974
        * gfortran.h (gfc_expr): Add element which holds a splay-tree
        for the exclusive purpose of quick access to a constructor by
        offset.
        * data.c (find_con_by_offset): Use the splay tree for the search.
        (gfc_assign_data_value): Use the splay tree.
        (gfc_assign_data_value_range): ditto.
        * expr.c (gfc_get_expr): Initialize new element to null.
        (gfc_free_expr): Delete splay tree when deleting gfc_expr.

From-SVN: r118844
2006-11-15 05:10:22 +00:00
Brooks Moses
12c7896669 re PR fortran/29702 (RFE: Column number in error messages.)
PR fortran/29702
* fortran/error.c (show_loci): Move column-offset calculation to
show_locus.
(show_locus): Remove blank lines before "Included in"
lines, clean up code, calculate column-offsets, print
column number is error-header lines as appropriate.
(error_integer): (new function) Print integer to error
buffer.
(error_print): Use error_integer, avoid possible buffer
overflows from buggy error formats.
* testsuite/lib/gfortran-dg.exp (gfortran-dg-test): Ignore column
numbers in error message headers.

From-SVN: r118843
2006-11-14 20:00:35 -08:00
Brooks Moses
1dde868307 gfortran.h (GFC_MAX_LINE): Remove constant definition.
* gfortran.h (GFC_MAX_LINE): Remove constant definition.
(gfc_option_t): Clarify comments.
* options.c: Set default line length limits to actual default
values, rather than flag values.
* scanner.c: Eliminate checking and handling of the
fixed/free_line_length flag values.

From-SVN: r118842
2006-11-14 19:52:03 -08:00
Brooks Moses
4887aa7174 lang.opt: Remove -fno-backend option.
* lang.opt: Remove -fno-backend option.
* gfortran.h (gfc_option_t): Remove flag_no_backend.
* options.c (gfc_init_options): Remove flag_no_backend.
(gfc_handle_option): Remove -fno-backend option handler.
* parse.c (gfc_parse_file): Remove references to
gfc_option.flag_no_backend.

From-SVN: r118841
2006-11-14 19:49:21 -08:00
GCC Administrator
a48cfb7cc6 Daily bump.
From-SVN: r118835
2006-11-15 00:17:59 +00:00
Richard Earnshaw
a41a56b62d expmed.c (emit_store_flag_1): New function.
* expmed.c (emit_store_flag_1): New function.
	(emit_store_flag): Call it.  If we can't find a suitable scc insn,
	try a cstore insn.
	* expr.c (do_store_flag): If we can't find a scc insn, try cstore.
	Use do_compare_rtx_and_jump.
	* arm.h (BRANCH_COST): Increase to 2 on Thumb.
	* arm.md (cstoresi4): New define_expand.
	(cstoresi_eq0_thumb, cstoresi_ne0_thumb): Likewise.
	(cstoresi_eq0_thumb_insn, cstore_ne0_thumb_insn): New patterns.
	(cstoresi_nltu_thumb, thumb_addsi3_addgeu): New patterns.

From-SVN: r118829
2006-11-14 23:25:43 +00:00
Richard Guenther
75dc0b383d math-torture.exp: Restrict to i?86 and x86_64 targets.
2006-11-14  Richard Guenther  <rguenther@suse.de>

        * gcc.target/i386/math-torture/math-torture.exp: Restrict
        to i?86 and x86_64 targets.

From-SVN: r118827
2006-11-14 22:01:08 +00:00
Caroline Tice
8970859455 Add ability to generate DWARF pubtypes section if DEBUG_PUBTYPES_SECTION is defined.
Add ability to generate DWARF pubtypes section if DEBUG_PUBTYPES_SECTION
is defined.  Also add dejagnu testcases for pubtypes.

From-SVN: r118826
2006-11-14 12:55:56 -08:00
Joseph Myers
f0c1ebb734 arm.h (FUNCTION_ARG_ADVANCE): Only adjust iwmmxt_nregs if TARGET_IWMMXT_ABI.
* config/arm/arm.h (FUNCTION_ARG_ADVANCE): Only adjust
	iwmmxt_nregs if TARGET_IWMMXT_ABI.
	* config/arm/iwmmxt.md (movv8qi_internal, movv4hi_internal,
	movv2si_internal): Support moves between core registers.

From-SVN: r118825
2006-11-14 20:36:28 +00:00
Eric Christopher
dd7f7a6ea4 configure: Regenerate with autoconf 2.59.
2006-11-14  Eric Christopher  <echristo@apple.com>

        * configure: Regenerate with autoconf 2.59.

From-SVN: r118823
2006-11-14 19:42:51 +00:00
Daniel Berlin
d75dbccd3c re PR tree-optimization/27755 (PRE confused by control flow)
2006-11-14  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/27755

	* tree-ssa-pre.c: Update comments.
	(bb_bitmap_sets): Add pa_in and  deferred member.
	(BB_DEFERRED): New macro.
	(maximal_set): New variable.
	(pre_stats): Add pa_insert member.
	(bitmap_set_and): Short circuit orig == dest.
	(bitmap_set_subtract_values): New function.
	(bitmap_set_contains_expr): Ditto.
	(translate_vuses_through_block): Add phiblock argument.
	(dependent_clean): New function.
	(compute_antic_aux): Update for maximal_set changes.
	(compute_partial_antic_aux): New function.
	(compute_antic): Handle partial anticipation.
	(do_partial_partial_insertion): New function.
	(insert_aux): Handle partial anticipation.
	(add_to_sets): Add to maximal set.
	(compute_avail): Ditto.
	(init_pre): Initialize maximal_set.
	(execute_pre): Do partial anticipation if -O3+.

From-SVN: r118821
2006-11-14 18:12:20 +00:00
Tobias Burnus
17339e8836 match.c (gfc_match_namelist): Add missing space to error message.
2006-11-14  Tobias Burnus  <burnus@net-b.de>

       * match.c (gfc_match_namelist): Add missing space to
         error message.

From-SVN: r118820
2006-11-14 18:31:00 +01:00
Mark Mitchell
1f3a64d10a re PR c++/29106 (sizeof(*var) in expression drops entire line of code out of compile)
PR c++/29106
	* g++.dg/init/self1.C: New test.

From-SVN: r118819
2006-11-14 17:15:08 +00:00
Tobias Burnus
9c213349ff re PR fortran/29657 (Don't allow SAVE for functions)
fortran/
2006-11-14  Tobias Burnus  <burnus@net-b.de>

	PR fortran/29657
	* symbol.c (check_conflict): Add further conflicts.

testsuite/
2006-11-14  Tobias Burnus  <burnus@net-b.de>

	PR fortran/29657
	* gfortran.dg/conflicts.f90: Add.

From-SVN: r118812
2006-11-14 16:35:36 +01:00
Paolo Bonzini
6e0b633f6c re PR rtl-optimization/29798 (-O2 gives wrong results)
2006-11-14  Paolo Bonzini  <bonzini@gnu.org>

	PR rtl-optimization/29798

	* fwprop.c (use_killed_between): Check that DEF_INSN dominates
	TARGET_INSN before any other check.
	(fwprop_init): Always calculate dominators.
	(fwprop_done): Always free them.

2006-11-14  Paolo Bonzini  <bonzini@gnu.org>

	PR rtl-optimization/29798

	* gcc.c-torture/execute/pr29798.c: New.

From-SVN: r118808
2006-11-14 08:46:26 +00:00
Kaveh R. Ghazi
b7e85170cf fold-const.c (fold_strip_sign_ops): Handle COMPOUND_EXPR and COND_EXPR.
* fold-const.c (fold_strip_sign_ops): Handle COMPOUND_EXPR and
	COND_EXPR.

testsuite:
	* gcc.dg/builtins-20.c: Add more cases.

From-SVN: r118802
2006-11-14 05:08:46 +00:00
DJ Delorie
833bf445b0 m32c.c (m32c_prepare_shift): Use a separate temporary for intermediates.
* config/m32c/m32c.c (m32c_prepare_shift): Use a separate
temporary for intermediates.

From-SVN: r118798
2006-11-13 21:29:46 -05:00
GCC Administrator
df84fdf696 Daily bump.
From-SVN: r118791
2006-11-14 00:17:39 +00:00
Roger Sayle
07b183fda9 rtti.c (get_pseudo_ti_init): Ensure that the offset field of the base type info initializer has the correct type.
* rtti.c (get_pseudo_ti_init): Ensure that the offset field of the
	base type info initializer has the correct type.

From-SVN: r118785
2006-11-13 23:28:25 +00:00
Kaz Kojima
cb3d3842bb sh.c (expand_cbranchdi4): Initialize skip_label.
* config/sh/sh.c (expand_cbranchdi4): Initialize skip_label.
	(sh_optimize_target_register_callee_saved): #if 0 the code
	using NOTE_INSN_LOOP_{BEG,END}.

From-SVN: r118784
2006-11-13 23:08:24 +00:00
Roger Sayle
7c06f56575 fold-const.c (optimize_bit_field_compare): Recursively call fold when simplifying non-constant comparisons between bit-fields.
* fold-const.c (optimize_bit_field_compare): Recursively call
	fold when simplifying non-constant comparisons between bit-fields.

From-SVN: r118783
2006-11-13 23:02:41 +00:00
Jakub Jelinek
65280f6ca6 configure.ac: Add changequote around __LONG_DOUBLE_MATH_OPTIONAL test.
* configure.ac: Add changequote around __LONG_DOUBLE_MATH_OPTIONAL
	test.
	* configure: Rebuilt.

From-SVN: r118780
2006-11-13 23:38:21 +01:00
Andrew Pinski
d296e02ef8 cell.md: New file.
2006-11-13  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * config/rs6000/cell.md: New file.
        * config/rs6000/rs6000.c (rs6000_cell_dont_microcode): New
        variable.
        (ppccell_cost): New cost matrix.
        (TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD): Define.
        (rs6000_override_options): Set rs6000_always_hint to false
        for cell. Also align functions/lables/loops to 8byte
        for the Cell. Use PROCESSOR_CELL.
        (rs6000_emit_epilogue): Rename using_mfcr_multiple to
        using_mtcr_multiple.
        (rs6000_variable_issue): If the insn is a nonpipelined instruction
        on the Cell, return 0.
        (rs6000_adjust_cost): Add Cell cost adjustments.
        (is_microcoded_insn): Return true for Cell microcoded
        instructions.
        (is_nonpipeline_insn): New function.
        (rs6000_issue_rate): Add PROCESSOR_CELL.
        (rs6000_use_sched_lookahead): If Cell, then we should look ahead 8
        instructions.
        (rs6000_use_sched_lookahead_guard): New function.
        (rs6000_sched_reorder):  Reorder the ready list, if the second
        to last ready insn is a nonepipeline insn on the Cell.
        * config/rs6000/rs6000.h (processor_type): Add PROCESSOR_CELL.
        (ASM_CPU_SPEC): Add Cell.
        * config/rs6000/rs6000.md (cpu): Add Cell.
        (cell_micro): New Attr.
        Include cell.md

From-SVN: r118776
2006-11-13 12:14:35 -08:00
Jakub Jelinek
e8116f4026 configure.ac (ld_vers): Parse GNU ld version 2.17.50.0.3-6 20060715 style versions.
* configure.ac (ld_vers): Parse GNU ld version 2.17.50.0.3-6 20060715
	style versions.
	* configure: Rebuilt.

From-SVN: r118775
2006-11-13 20:47:06 +01:00
Jakub Jelinek
b30c6a0d21 re PR fortran/29759 (ice on line continuation in OMP statements (gfc_next_char_literal, at fortran/scanner.c:701))
PR fortran/29759
	* fortran/scanner.c (skip_free_comments): Clear openmp_flag
	before returning true.

	* gfortran.dg/gomp/pr29759.f90: New test.

From-SVN: r118773
2006-11-13 20:42:55 +01:00
H.J. Lu
e7d459bd0b re PR middle-end/28915 (ICE: tree check: expected class 'constant', have 'declaration' (var_decl) in build_vector, at tree.c:973)
2006-11-12  Jason Merrill  <jason@redhat.com>
	    Andrew Pinski <pinskia@physics.uc.edu>

	PR middle-end/28915
	* gcc.target/i386/vectorize1.c: New.

From-SVN: r118771
2006-11-13 10:53:27 -08:00
Richard Guenther
63be4b32d1 i386.c (ix86_expand_lround): Handle expand_simple_binop return value.
2006-11-13  Richard Guenther  <rguenther@suse.de>

	* config/i386/i386.c (ix86_expand_lround): Handle expand_simple_binop
	return value.
	(ix86_expand_lfloorceil): Likewise.
	(ix86_expand_rint): Likewise.
	(ix86_expand_floorceildf_32): Likewise.
	(ix86_expand_floorceil): Likewise.
	(ix86_expand_rounddf_32): Likewise.
	(ix86_expand_truncdf_32): Likewise.
	(ix86_expand_round): Likewise.

From-SVN: r118769
2006-11-13 18:20:13 +00:00
Mark Mitchell
48ffd0efe9 re PR c++/29518 (rejects valid template argument, enums vs templates)
PR c++/29518
	* pt.c (coerce_template_parms): Do not skip_evaluation while
	substituting template arguments.
	PR c++/29518
	* g++.dg/template/static28.C: New test.

From-SVN: r118768
2006-11-13 17:49:43 +00:00
Mark Mitchell
a2c5ed873e re PR c++/29518 (rejects valid template argument, enums vs templates)
PR c++/29518
	* pt.c (coerce_template_parms): Do not skip_evaluation while
	substituting template arguments.
	PR c++/29518
	* g++.dg/template/static28.C: New test.

From-SVN: r118767
2006-11-13 17:48:28 +00:00
Carlos O'Donell
f4c0a30368 gcc.c: Organize search path variables into $prefix relative, and well-known native.
gcc/

2006-11-13  Carlos O'Donell  <carlos@codesourcery.com>
	    Mark Mitchell  <mark@codesourcery.com>

	* gcc.c: Organize search path variables into $prefix relative,
	and well-known native. Add comments.
	(add_sysrooted_prefix): Add comment.
	(process_command): If !gcc_exec_prefix add $prefix based paths.
	If *cross_compile == '0', add native well-known paths.
	Assert tooldir_base_prefix is always relative.
	(main): If print_search_dirs, and if gcc_exec_prefix is set,
	use this value for 'install:' path.
	* Makefile.in: Add GCC_EXEC_PREFIX to generated site.exp.

gcc/testsuite/

2006-11-13  Carlos O'Donell  <carlos@codesourcery.com>

	* lib/c-torture.exp: Use target-libpath.exp.
	* lib/target-libpath.exp (set_ld_library_path_env_vars): If present,
	set GCC_EXEC_PREFIX env var from global variable of same name.


Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r118765
2006-11-13 17:25:59 +00:00
H.J. Lu
8fbbf354fc i386.c: Fix a typo in comment.
2006-11-13  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c: Fix a typo in comment.

From-SVN: r118764
2006-11-13 07:29:21 -08:00
Michael Matz
7180bcb13f * genemit.c (gen_expand): Allocate enough memory.
From-SVN: r118762
2006-11-13 14:36:47 +00:00
Andrew Pinski
3e806a3df4 re PR fortran/26994 (Scalar TRANSFER - error: invalid operand to unary operator)
2006-11-12  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR fortran/26994
        * gfortran.fortran-torture/compile/transfer-1.f90:
        New testcase.

2006-11-12  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR fortran/26994
        * trans-expr.c (gfc_conv_expr_reference): Set TREE_STATIC on the
        new CONST_DECL.

From-SVN: r118761
2006-11-13 06:36:09 -08:00
Joseph Myers
b54c93b7b8 bpapi.h (TARGET_BPABI_CPP_BUILTINS): Define __GXX_TYPEINFO_EQUALITY_INLINE but not __GXX_MERGED_TYPEINFO_NAMES.
gcc:
	* config/arm/bpapi.h (TARGET_BPABI_CPP_BUILTINS): Define
	__GXX_TYPEINFO_EQUALITY_INLINE but not
	__GXX_MERGED_TYPEINFO_NAMES.
	* config/arm/symbian.h (TARGET_OS_CPP_BUILTINS): Define
	__GXX_MERGED_TYPEINFO_NAMES.
	* config/i386/cygming.h (TARGET_OS_CPP_BUILTINS): Define
	__GXX_TYPEINFO_EQUALITY_INLINE.

libstdc++-v3:
	* libsupc++/typeinfo (__GXX_TYPEINFO_EQUALITY_INLINE): Define.
	Use instead of __GXX_MERGED_TYPEINFO_NAMES to condition inline
	definitions.
	* libsupc++/tinfo.cc (operator==): Condition on
	__GXX_TYPEINFO_EQUALITY_INLINE; check __GXX_MERGED_TYPEINFO_NAMES
	to determine algorithm.
	* libsupc++/tinfo2.cc (type_info::before): Likewise.

From-SVN: r118755
2006-11-13 13:10:17 +00:00
H.J. Lu
5da10ac71f re PR tree-optimization/29680 (Misscompilation of spec2006 gcc)
PR tree-optimization/29680
	* tree-ssa-operands.c (access_can_touch_variable): Revert fix for
	PR 14784.

	* gcc.dg/alias-11.c: New test.


Co-Authored-By: Zdenek Dvorak <dvorakz@suse.cz>

From-SVN: r118754
2006-11-13 12:37:29 +00:00
Jason Merrill
84816907e4 re PR middle-end/28915 (ICE: tree check: expected class 'constant', have 'declaration' (var_decl) in build_vector, at tree.c:973)
PR middle-end/28915
        * gimplify.c (gimplify_init_constructor): Don't reduce TREE_CONSTANT
        vector ctors.
        * tree-cfg.c (verify_expr): Don't look into TREE_CONSTANT
        vector ctors.
        * expmed.c (make_tree): Handle CONST, SYMBOL_REF.
        * tree.c (build_vector): Handle non-_CST elements.

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

From-SVN: r118747
2006-11-13 03:16:11 -05:00
Kaz Kojima
329b3cc384 genemit.c (gen_insn): Call gen_exp with a non-null used when handling multiple insns.
* genemit.c (gen_insn): Call gen_exp with a non-null used
	when handling multiple insns.
	(gen_expand): Likewise.
	* reorg.c (emit_delay_sequence): Copy the delay slot insn.
	* config/sh/sh.md (ashrsi2_31+1): Copy operands[0].
	(movsi_const_16bit+1): Copy operands[1].
	(call_pcrel): Copy the call_site pattern.
	(call_value_pcrel, sibcall_pcrel, GOTaddr2picreg): Likewise.

From-SVN: r118746
2006-11-13 03:28:13 +00:00
Kaveh Ghazi
6d55dfe3a3 Add PR number to ChangeLog from a previous commit.
From-SVN: r118745
2006-11-13 03:02:14 +00:00
Roger Sayle
1b43b96773 fold-const.c (negate_expr_p): Correct/refine condition for transformations.
* fold-const.c (negate_expr_p) <PLUS_EXPR, MINUS_EXPR>: Correct/refine
	condition for transformations.  Use !HONOR_SIGN_DEPENDENT_ROUNDING
	&& !HONOR_SIGNED_ZEROS instead of flag_unsafe_math_optimizations.
	(fold_negate_expr) <PLUS_EXPR, MINUS_EXPR>: Likewise.

From-SVN: r118744
2006-11-13 02:55:22 +00:00
Daniel Berlin
163b858186 re PR java/29587 (jc1: out of memory allocating 4072 bytes after a total of 708630224 bytes)
2006-11-12  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/29587
	* tree-ssa-structalias.c (process_constraint): Don't
	mark address taken due only to escaped vars constraint.

From-SVN: r118742
2006-11-13 02:18:07 +00:00
Roger Sayle
3b279c7ae7 re PR rtl-optimization/29797 (Miscompiles bit test / set in OpenOffice)
2006-11-12  Michael Matz  <matz@suse.de>
	    Roger Sayle  <roger@eyesopen.com>

	PR rtl-optimization/29797
	* ifcvt.c (noce_try_bitop): Correct calculation of bitnum on
	BITS_BIG_ENDIAN targets.

	* gcc.c-torture/execute/pr29797-1.c: New test case.

From-SVN: r118740
2006-11-13 00:41:53 +00:00
GCC Administrator
d3a6450e36 Daily bump.
From-SVN: r118738
2006-11-13 00:17:41 +00:00
Kaveh R. Ghazi
5c5b21550c builtins.c (fold_builtin_cosh): New.
* builtins.c (fold_builtin_cosh): New.
	(fold_builtin_1): Use it.
	* fold-const.c (negate_mathfn_p): Add llround, lround, round,
	trunc to the list of "odd" functions.  Also add llrint, lrint,
	rint and nearbyint when flag_rounding_math is false.

testsuite:
	* gcc.dg/torture/builtin-symmetric-1.c: Add more cases.

From-SVN: r118733
2006-11-12 23:51:36 +00:00
Zdenek Dvorak
8f8bb1d200 tree-flow.h (name_mappings_registered_p): Declare.
* tree-flow.h (name_mappings_registered_p): Declare.
	* tree-into-ssa.c (name_mappings_registered_p): New function.
	* tree-cfg.c (tree_can_merge_blocks_p): Check
	name_mappings_registered_p instead of need_ssa_update_p.

From-SVN: r118732
2006-11-12 20:59:28 +00:00
Zdenek Dvorak
4d2280f60d tree-ssa-loop.c (tree_vectorize): Return the result of vectorize_loops.
* tree-ssa-loop.c (tree_vectorize): Return the result of
	vectorize_loops.
	* tree-vectorizer.c (vectorize_loops): Return TODO_cleanup_cfg
	if anything changed.
	* tree-vectorizer.h (vectorize_loops): Declaration removed.
	* tree-flow.h (vectorize_loops): Declaration changed.

From-SVN: r118731
2006-11-12 20:11:53 +00:00
Zdenek Dvorak
911b3fdbe3 tree-ssa-loop-prefetch.c (schedule_prefetches): Cleanup and improve comments.
* tree-ssa-loop-prefetch.c (schedule_prefetches): Cleanup and improve
	comments.
	(issue_prefetch_ref): Move assignment to write_p out of loop.
	(determine_unroll_factor): Do not take PARAM_MAX_UNROLL_TIMES and
	SIMULTANEOUS_PREFETCHES into account.
	(loop_prefetch_arrays): Do not pass ahead to determine_unroll_factor.
	* lambda-code.c (lcm): Renamed to ...
	(least_common_multiple): ... and exported.
	* tree-flow.h (least_common_multiple): Declare.

From-SVN: r118730
2006-11-12 20:05:49 +00:00
Zdenek Dvorak
946e1bc757 Makefile.in (tree-data-ref.o): Add langhooks.h dependency.
* Makefile.in (tree-data-ref.o): Add langhooks.h dependency.
	* tree-ssa-loop-niter.c (derive_constant_upper_bound):  Follow
	ud-chains.  Handle AND_EXPR.
	(record_estimate): Record whether the estimate is realistic
	and whether it is derived from a loop exit.
	(record_nonwrapping_iv, idx_infer_loop_bounds, infer_loop_bounds_from_ref,
	infer_loop_bounds_from_array, infer_loop_bounds_from_signedness): New
	functions.
	(compute_estimated_nb_iterations): Take only realistic bounds into
	account.  Set estimate_state.  Use double_ints.
	(infer_loop_bounds_from_undefined): Call infer_loop_bounds_from_array
	and infer_loop_bounds_from_signedness.  Do not consider basic blocks
	that do not have to be always executed.
	(estimate_numbers_of_iterations_loop): Set estimate_state, and use it
	to determine whether to call infer_loop_bounds_from_undefined
	and compute_estimated_nb_iterations.
	(n_of_executions_at_most): Use double_ints.
	(free_numbers_of_iterations_estimates_loop): Set estimate_state.
	(substitute_in_loop_info): Do not replace in estimated_nb_iterations.
	* double-int.c (double_int_to_tree): Improve comment.
	(double_int_fits_to_tree_p): New function.
	* double-int.h (double_int_fits_to_tree_p): Declare.
	* tree-data-ref.c: Include langhooks.h.
	(estimate_niter_from_size_of_data, estimate_iters_using_array): Removed.
	(analyze_array_indexes): Do not call estimate_niter_from_size_of_data.
	(analyze_array): Do not pass estimate_only argument to
	analyze_array_indexes.
	(get_number_of_iters_for_loop): Build tree from the stored double_int
	value.
	(get_references_in_stmt, find_data_references_in_stmt): New functions.
	(find_data_references_in_loop): Use find_data_references_in_stmt.
	* tree-data-ref.h (struct data_ref_loc_d): New.
	(get_references_in_stmt): Declare.
	(estimate_iters_using_array): Declaration removed.
	* cfgloop.h (struct nb_iter_bound): Change type of bound to
	double_int.  Improve comments.  Add is_exit and realistic
	fields.
	(struct loop): Changed type of estimated_nb_iterations to double_int.
	Added estimate_state field.
	(record_estimate): Declaration removed.

From-SVN: r118729
2006-11-12 19:58:05 +00:00
Zdenek Dvorak
47eb5b329b params.c (set_param_value): Initialize the "set" field.
* params.c (set_param_value): Initialize the "set" field.
	* params.h (struct param_info): Add "set" field.
	(PARAM_SET_P): New macro.
	(PREFETCH_LATENCY, SIMULTANEOUS_PREFETCHES, L1_CACHE_SIZE,
	L1_CACHE_LINE_SIZE): New macros.
	* toplev.c (DEFPARAM): Initialize the "set" field.
	* tree-ssa-loop-prefetch.c (PREFETCH_LATENCY,
	SIMULTANEOUS_PREFETCHES): Removed.
	(PREFETCH_BLOCK): Use L1_CACHE_LINE_SIZE.
	(tree_ssa_prefetch_arrays): Dump the values of the parameters.
	* config/sparc/sparc.c: Include params.h.
	(sparc_override_options): Set SIMULTANEOUS_PREFETCHES and
	L1_CACHE_LINE_SIZE parameters.
	* config/sparc/sparc.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES):
	Removed.
	* config/i386/i386.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES):
	Removed.
	* config/i386/i386.c: Include params.h.
	(k8_cost): Change default value for SIMULTANEOUS_PREFETCHES.
	(override_options): Set SIMULTANEOUS_PREFETCHES and
	L1_CACHE_LINE_SIZE parameters.
	* config/sh/sh.h (SIMULTANEOUS_PREFETCHES): Removed.
	(OPTIMIZATION_OPTIONS): Set SIMULTANEOUS_PREFETCHES and
	L1_CACHE_LINE_SIZE parameters.
	* config/ia64/ia64.c (ia64_optimization_options): Set
	SIMULTANEOUS_PREFETCHES and L1_CACHE_LINE_SIZE parameters.
	* config/ia64/ia64.h (SIMULTANEOUS_PREFETCHES, PREFETCH_BLOCK):
	Removed.
	* params.def (PARAM_PREFETCH_LATENCY, PARAM_SIMULTANEOUS_PREFETCHES,
	PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE): New params.
	* doc/invoke.texi: Document new params.

From-SVN: r118728
2006-11-12 19:17:02 +00:00
Roger Sayle
015e23f400 re PR tree-optimization/13827 ((a & b) != (c & b) should be transformed to ((a^c) & b) !=0)
PR tree-optimization/13827
	* fold-const.c (fold_binary) <EQ_EXPR, NE_EXPR>: Fold (X&C) op (Y&C)
	as ((X^Y)&C) op 0.

	* gcc.dg/fold-eqand-1.c: New test case.

From-SVN: r118727
2006-11-12 18:41:31 +00:00
Zdenek Dvorak
c0493b13fb cfgloopmanip.c (update_single_exit_for_duplicated_loop, [...]): New functions.
* cfgloopmanip.c (update_single_exit_for_duplicated_loop,
	update_single_exit_for_duplicated_loops): New functions.
	(duplicate_loop_to_header_edge): Use
	update_single_exit_for_duplicated_loops.
	* tree-ssa-loop-manip.c (tree_unroll_loop): Call verification
	functions only with ENABLE_CHECKING.

From-SVN: r118726
2006-11-12 18:20:03 +00:00
David Daney
8a492e2cbf re PR java/29805 (Write past end of array in java/typeck.c)
PR java/29805
	* typeck.c (build_java_array_type): Increase buffer sizes.

From-SVN: r118724
2006-11-12 17:12:13 +00:00
Andreas Schwab
c57d40281c * except.c (sjlj_emit_function_enter): Remove unused variable.
From-SVN: r118723
2006-11-12 11:15:28 +00:00
Paul Thomas
41f1662296 Correcting ChangeLog errors
From-SVN: r118721
2006-11-12 10:15:04 +00:00
Roger Sayle
000d8d44b7 fold-const.c (int_binop_types_match_p): New function.
* fold-const.c (int_binop_types_match_p): New function.
	(size_binop): Relax constraint that both arguments must both have
	exactly the same sizetype type.  Instead use int_binop_types_match_p.
	(size_diffop): Likewise.

	(make_range): Use build_int_cst instead of fold_convert.
	(fold_cond_expr_with_comparison): Use build_int_cst to construct
	integer constants of the correct type.
	(fold_div_compare): Likewise.
	(fold_single_bit_test): Likewise.
	(fold_binary): Likewise.
	* stor-layout.c (layout_type) <VECTOR_TYPE>: Ensure that TYPE_SIZE
	has type bitsizetype and TYPE_SIZE_UNIT has type sizetype.

From-SVN: r118718
2006-11-12 02:57:10 +00:00
Andrew Pinski
afa8f0fb33 re PR rtl-optimization/28812 (RTL aliasing vs may_alias and structs)
2006-11-11  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR rtl-opt/28812
        * alias.c (fixed_scalar_and_varying_struct_p): Don't return a
        non null value if the struct memory access is in the 0th
        aliasing set.

2006-11-11  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR rtl-opt/28812
        * gcc.c-torture/execute/mayalias-3.c: New test.

From-SVN: r118716
2006-11-11 17:10:56 -08:00
Jie Zhang
a607b34fff revert: bfin.h (TARGET_CPU_CPP_BUILTINS): Define __bfin__ and __BFIN__.
Revert
	2006-11-11  Jie Zhang  <jie.zhang@analog.com>
	* config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Define __bfin__
	and __BFIN__.

	* config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Use builtin_define_std
	instead of builtin_define for bfin and BFIN.

From-SVN: r118713
2006-11-12 00:27:46 +00:00
Jie Zhang
a167b3e88c bfin.h (TARGET_CPU_CPP_BUILTINS): Define __bfin__ and __BFIN__.
* config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Define __bfin__
	and __BFIN__.

From-SVN: r118711
2006-11-12 00:21:30 +00:00
GCC Administrator
e3bf7298c3 Daily bump.
From-SVN: r118709
2006-11-12 00:17:50 +00:00
Tobias Schlüter
b3916b71ea Fix entry missing from previously committed ChangeLog
From-SVN: r118703
2006-11-11 20:20:11 +01:00
Tobias Schlüter
ef56b98dcb Fix typo in previous check-in
From-SVN: r118702
2006-11-11 18:56:11 +01:00
Tobias Schlüter
bc0a33d315 data.c: Add 2006 to copyright years.
* data.c: Add 2006 to copyright years.
* interface.c: Same.
* misc.c: Same.
* trans-io.c: Same.

From-SVN: r118700
2006-11-11 18:10:24 +01:00
Jan Hubicka
9871e7a0c5 Oops, commited wrong variant of patch in last commit, this is the diff
to correct one.

From-SVN: r118698
2006-11-11 16:57:13 +00:00
Jan Hubicka
0817c46a98 extended.texi (__builtin_expect): We no longer require second argument to be constant.
* extended.texi (__builtin_expect): We no longer require second argument
	to be constant.
	* gengtype.c (adjust_field_rtx_def): Drop NOTE_INSN_EXPECTED_VALUE.
	* builtins.c (expand_builtin_expect): Simplify.
	(expand_builtin_expect_jump): Kill.
	* final.c (final_scan_insn): Do not skip the removed notes.
	* insn-notes.def (LOOP_BEG, LOOP_END, REPEATED_LINE_NUMBER,
	EXPECTED_VALUE): Remove.
	* dojump.c (do_jump): Do not care about __builtin_expect.
	* predict.c (expected_value_to_br_prob): Kill.
	* function.c (expand_function_end): Do not expand
	NOTE_INSN_REPEATED_LINE_NUMBER.
	* print-rtl.c (print_rtx): Do not pretty print the removed notes.
	* expect.c (sjlj_emit_function_enter): Emit directly branch probability.
	* cfgexpand.c (add_reg_br_prob_note): Export.
	* cfgcleanup.c (rest_of_handle_jump2): Do not call
	expected_value_to_br_prob.
	* cfglayout.c (duplicate_insn_chain): Do not deal with removed notes.
	* rtl.h (add_reg_br_prob_note): Declare.

From-SVN: r118697
2006-11-11 16:55:48 +00:00
Jan Hubicka
ef950eba66 extended.texi (__builtin_expect): We no longer require second argument to be constant.
* extended.texi (__builtin_expect): We no longer require second argument
	to be constant.
	* gengtype.c (adjust_field_rtx_def): Drop NOTE_INSN_EXPECTED_VALUE.
	* builtins.c (expand_builtin_expect): Simplify.
	(expand_builtin_expect_jump): Kill.
	* final.c (final_scan_insn): Do not skip the removed notes.
	* insn-notes.def (LOOP_BEG, LOOP_END, REPEATED_LINE_NUMBER,
	EXPECTED_VALUE): Remove.
	* dojump.c (do_jump): Do not care about __builtin_expect.
	* predict.c (expected_value_to_br_prob): Kill.
	* function.c (expand_function_end): Do not expand
	NOTE_INSN_REPEATED_LINE_NUMBER.
	* print-rtl.c (print_rtx): Do not pretty print the removed notes.
	* expect.c (sjlj_emit_function_enter): Emit directly branch probability.
	* cfgexpand.c (add_reg_br_prob_note): Export.
	* cfgcleanup.c (rest_of_handle_jump2): Do not call
	expected_value_to_br_prob.
	* cfglayout.c (duplicate_insn_chain): Do not deal with removed notes.
	* rtl.h (add_reg_br_prob_note): Declare.

From-SVN: r118696
2006-11-11 16:54:57 +00:00
Kaveh R. Ghazi
89fa98d6b9 tree-pretty-print.c (dump_generic_node): Print sign of Inf.
* tree-pretty-print.c (dump_generic_node): Print sign of Inf.

From-SVN: r118695
2006-11-11 16:51:17 +00:00
Jan Hubicka
992c31e623 * predict.c (predict_loops): Kill RTL variant.
From-SVN: r118694
2006-11-11 16:13:09 +00:00
Jan Hubicka
6039a0c74a tree-pass.h (pass_purge_lineno_notes): Remove declaration.
* tree-pass.h (pass_purge_lineno_notes): Remove declaration.
	* modulo-sched.c (find_line_note): Remove.
	(loop_canon_p): Do not worry about line number notes.
	(sms_schedule): Likewise.
	* cse.c (cse_main): Likewise.
	* regmove.c (fixup_match_1): Likewise
	* function.c (emit_return_info_block): Likewise.
	(expand_function_end): Likewise.
	(thread_prologue_an_epilogue_insns): Likewise.
	* cfgrtl.c (try_redirect_by_replacing_jump, rtl_tidy_fallthru_edge):
	Likewise.
	* emit-rtl.c (find_line_note, emit_insn_after_with_line_notes,
	emit_note_copy_after): Kill.
	(emit_note_copy): Do not worry about line numbers.
	* jump.c (purge_line_number_notes): Kill.
	(pass_purge_lineno_notes): Kill.
	* cfgcleanup.c (rest_of_handle_jump2): Kill purge_line_number_notes
	call.
	* rtl.h (emit_note_copy_after, emit_insn_after_with_line_notes): Kill.
	* passes.c (init_optimization_passes): Don't purge_lineno_notes.
	* sched-ebb.c (schedule_ebbs): Don't do rm_redundant_line_notes.
	* tree-pass.h (pass_purge_lineno_notes): Kill.
	* sched-ebb.c (schedule_ebb): Don't rm_line_notes,
	rm_redundant_line_notes.
	* sched-rgb.c (schedule_region): Don't rm_line_notes,
	rm_redundant_line_notes.
	* sched-int.h (rm_line_notes, rm_redundant_line_notes): Kill.
	* haifa-sched.c: Update comment about handling notes.
 	(unlink_line_notes): Kill.
	(rm_line_notes): Kill.
	(save_line_notes): Simplify.
	(rm_redundant_line_notes): Kill.

From-SVN: r118693
2006-11-11 15:50:16 +00:00
Richard Guenther
f9f770a8d5 tree.def (FIX_CEIL_EXPR, [...]): Remove unused tree codes.
2006-11-11  Richard Guenther  <rguenther@suse.de>

	* tree.def (FIX_CEIL_EXPR, FIX_FLOOR_EXPR, FIX_ROUND_EXPR):
	Remove unused tree codes.
	* tree-vrp.c (extract_range_from_unary_expr): Remove handling
	of FIX_CEIL_EXPR, FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
	* tree-pretty-print.c (dump_generic_node, op_prio): Likewise.
	* tree.c (stabilize_reference): Likewise.
	* fold-const.c (fold_convert_const_int_from_real, operand_equal_p,
	fold_unary): Likewise.
	* tree-gimple.c (is_gimple_cast): Likewise.
	* dwarf2out.c (loc_descriptor_from_tree_1): Likewise.
	* expr.c (expand_expr_real_1): Likewise.
	* tree-eh.c (tree_could_trap_p): Likewise.
	* gimplify.c (gimplify_expr): Likewise.
	* tree-inline.c (estimate_num_insns_1): Likewise.
	* tree-cfg.c (verify_expr): Likewise.

	cp/
	* typeck.c (build_unary_op): Likewise.

	java/
	* check-init.c (check_init): Likewise.

	ada/
	* trans.c (maybe_stabilize_reference): Likewise.

	fortran/
	* trans-intrinsic.c (enum rounding_mode): New enum.
	(build_fix_expr, gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
	gfc_conv_intrinsic_function): Use it instead of FIX_CEIL_EXPR,
	FIX_FLOOR_EXPR, FIX_ROUND_EXPR and FIX_TRUNC_EXPR.

From-SVN: r118692
2006-11-11 12:05:16 +00:00
Zdenek Dvorak
e324a72fe6 tree-ssa-loop.c (pass_loop_prefetch): Change name to aprefetch.
* tree-ssa-loop.c (pass_loop_prefetch): Change name to aprefetch.
	* tree-ssa-loop-prefetch.c (dump_mem_ref): Fix target file.
	(tree_ssa_prefetch_arrays): Do not dump for removed loops.

From-SVN: r118691
2006-11-11 10:15:18 +00:00
Richard Sandiford
6d40c48924 re PR middle-end/27528 (compiling linux kernels 2.6.16.14/15 2.6.17-rc3 on powerpc (7450) get error on long exixting code)
gcc/
	PR middle-end/27528
	* stmt.c (expand_asm_operands): Use EXPAND_INITIALIZER if the
	constraints accept neither registers or memories.

gcc/testsuite/
	PR middle-end/27528
	* gcc.c-torture/compile/pr27528.c: New test.
	* gcc.dg/pr27528.c: Likewise.

From-SVN: r118689
2006-11-11 09:47:35 +00:00
Jie Zhang
5601414805 bfin.h (FUNCTION_PROFILER): Don't use LABELNO.
* config/bfin/bfin.h (FUNCTION_PROFILER): Don't use LABELNO.
	(NO_PROFILE_COUNTERS): Define as 1.

From-SVN: r118686
2006-11-11 07:48:33 +00:00
Roger Sayle
85914552c7 fold-const.c (operand_equal_p): Don't check for TREE_CONSTANT_OVERFLOW when comparing constants.
* fold-const.c (operand_equal_p) <INTEGER_CST, REAL_CST, VECTOR_CST>:
	Don't check for TREE_CONSTANT_OVERFLOW when comparing constants.

From-SVN: r118685
2006-11-11 05:00:10 +00:00
Peter Bergner
adb43ed451 rtl.h (MEM_COPY_ATTRIBUTES): Copy MEM_POINTER.
* rtl.h (MEM_COPY_ATTRIBUTES): Copy MEM_POINTER.

From-SVN: r118684
2006-11-10 22:20:37 -06:00
Kaveh R. Ghazi
b81e7144aa builtins.c (fold_builtin_cos): Use fold_strip_sign_ops().
* builtins.c (fold_builtin_cos): Use fold_strip_sign_ops().
	(fold_builtin_hypot): Likewise.
	* fold-const.c (fold_strip_sign_ops): Handle "odd" builtins.
	
testsuite:
	* gcc.dg/builtins-20.c: Add more cases for stripping sign ops.

From-SVN: r118683
2006-11-11 04:05:14 +00:00
Kaveh R. Ghazi
345768ef3f fold-const.c (negate_mathfn_p): Add BUILT_IN_ERF.
* fold-const.c (negate_mathfn_p): Add BUILT_IN_ERF.

testsuite:
	* gcc.dg/torture/builtin-symmetric-1.c: New test.

From-SVN: r118682
2006-11-11 04:01:42 +00:00
Roger Sayle
b8b7f1621f tree.c (build_int_cst_wide): Add an assertion (gcc_unreachable) when attempting to build INTEGER_CSTs of...
* tree.c (build_int_cst_wide): Add an assertion (gcc_unreachable)
	when attempting to build INTEGER_CSTs of non-integral types.
	* expmed.c (make_tree): Use the correct type, i.e. the inner
	type, when constructing the individual elements of a CONST_VECTOR.

From-SVN: r118678
2006-11-11 01:47:18 +00:00
GCC Administrator
845e145b6d Daily bump.
From-SVN: r118676
2006-11-11 00:17:31 +00:00
Brooks Moses
100401682c Corrected gfc_process_option to gfc_handle_option in my last
ChangeLog entry.

From-SVN: r118670
2006-11-10 15:43:05 -08:00
Brooks Moses
131ac5dd47 lang.opt (-fmodule-private): Remove option.
* lang.opt (-fmodule-private): Remove option.
* gfortran.h (gfc_option_t): Remove module_access_private flag.
* options.c (gfc_init_options): Remove initialization for it.
(gfc_process_option): Remove handling for -fmodule-private.
* module.c (gfc_check_access): Add comments, remove check for
gfc_option.flag_module_access_private.

(Also fixed tab-damage in preceeding changelog entry.)

From-SVN: r118668
2006-11-10 14:34:26 -08:00
Jan Hubicka
3e916873cb cse.c (cse_process_notes): Copy the propagated value.
* cse.c (cse_process_notes): Copy the propagated value.
	* local-alloc.c (update_equiv_regs): Copy the memory RTX to be used
	in REG_EQUIV notes.
	* gcse.c (try_replace_reg): Copy the replacement.
	* i386.c (emit_i387_cw_initialization): Copy stored_mode
	(assign_386_stack_local): Always return copied memory expression
	* function.c (instantiate_virtual_regs_in_insn): Copy the operand
	duplicates.

From-SVN: r118665
2006-11-10 21:42:04 +00:00
Paul Thomas
d8d8121add re PR fortran/29758 (Runtime segfault in RESHAPE with insufficient elements in SOURCE)
2006-11-10 Paul Thomas <pault@gcc.gnu.org>

   PR fortran/29758
   * check.c (gfc_check_reshape): Check that there are enough
   elements in the source array as to be able to fill an array
   defined by shape, when pad is absent.


2006-11-10 Paul Thomas <pault@gcc.gnu.org>

   PR fortran/29758
   * gfortran.dg/reshape_source_size_1.f90: New test.

From-SVN: r118664
2006-11-10 21:06:42 +00:00
Tobias Burnus
a6b03a63d6 re PR fortran/29454 (Slightly wrong error message for IF statement)
2006-11-10  Tobias Burnus  <burnus@net-b.de>

       PR fortran/29454
       * resolve.c (gfc_resolve_blocks): Fix error message.

From-SVN: r118661
2006-11-10 19:15:39 +01:00
Paul Thomas
95fe073894 re PR fortran/29315 (error passing an array derived from type element)
2006-11-10 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29315
	* trans-expr.c (is_aliased_array): Treat correctly the case where the
	component is itself and array or array reference.


2006-11-10 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29315
	* gfortran.dg/aliasing_dummy_4.f90: New test.

From-SVN: r118659
2006-11-10 17:21:57 +00:00
Jan Hubicka
9ff5780962 final.c (final): Walk from first instruction.
* final.c (final): Walk from first instruction.
	* cfglayout.c (insn_locators_initialize): Remove line number notes.

From-SVN: r118650
2006-11-10 09:30:33 +00:00
Uros Bizjak
0e9dac9e16 re PR tree-optimization/29777 (missed optimization: model missing widen_mult* idioms for SSE)
PR target/29777
	* config/i386/sse.md (smulv8hi3_highpart): Change from define_insn
	to define_expand.
	(umulv8hi3_highpart): Ditto.
	(vec_widen_smult_hi_v8hi): New expander.
	(vec_widen_smult_lo_v8hi): Ditto.

testsuite/ChangeLog:

	PR target/29777
        * lib/target-supports.exp (vect_widen_mult_hi_to_si): Add i?86-*-*
	and x86_64-*-* targets.

From-SVN: r118649
2006-11-10 09:45:47 +01:00
Kaveh R. Ghazi
e61e5ddcce builtins.c (do_mpfr_arg3): New.
* builtins.c (do_mpfr_arg3): New.
	(fold_builtin_1): Handle builtins fma, fmin and fmax.

testsuite:
	* gcc.dg/torture/builtin-math-2.c: Test builtin fma.
	* gcc.dg/torture/builtin-math-3.c (CKSGN_F, CKSGN, CKSGN_L):
	New macros. Use them in exact tests.
	(TESTIT3): New macro.
	Add tests for fmin, fmax and fma.

From-SVN: r118648
2006-11-10 04:26:31 +00:00
Brooks Moses
f5bf550c9d * check.c (same_type_check): Typo fix in comment.
From-SVN: r118647
2006-11-09 19:38:43 -08:00
GCC Administrator
9fac74620f Daily bump.
From-SVN: r118639
2006-11-10 00:17:39 +00:00
Eric Christopher
b8ec3cc8db re PR bootstrap/26892 (Can't compile a 64-bit gcc)
2006-11-09  Eric Christopher  <echristo@apple.com>

        PR bootstrap/26892
        PR bootstrap/27814
        PR other/28994
        * configure.ac: Match powerpc*-*-darwin* for powerpc darwin checks.
        * config.gcc (powerpc64-*-darwin*): New target.
        * config.host: Ditto.
        * config/rs6000/darwin64.h: New file.
        * config/rs6000/x-darwin64: Ditto.
        * config/rs6000/host-ppc64-darwin.c: Ditto.

From-SVN: r118633
2006-11-09 23:56:57 +00:00
Steve Ellcey
bdbba3c27e ia64.c (ia64_hpux_init_libfuncs): Use HP-UX millicode routines for integer division.
* config/ia64/ia64.c (ia64_hpux_init_libfuncs):  Use HP-UX millicode
	routines for integer division.

From-SVN: r118632
2006-11-09 23:48:55 +00:00
Paul Thomas
012019922e re PR fortran/29431 (Not Implemented: complex character array constructors)
2006-11-09 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29431
	* trans-array.c    (get_array_ctor_strlen): If we fall through to
	default, use a constant character length if it is available.

2006-11-09 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29431
	* gfortran.dg/array_constructor_13.f90: New test.

From-SVN: r118631
2006-11-09 22:49:12 +00:00
Daniel Jacobowitz
217b58895e * config/arm/t-linux (LIBGCC2_DEBUG_CFLAGS): Delete.
From-SVN: r118630
2006-11-09 22:14:27 +00:00
Paul Thomas
ff883a9572 re PR fortran/29744 (Type renaming crashes gfortran with excessive memory usage)
2006-11-09 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29744
	* trans-types.c (gfc_get_derived_type): Ensure that the
	proc_name namespace is not the same as the owner namespace and
	that identical derived types in the same namespace share the
	same backend_decl.

2006-11-09 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29744
	* gfortran.dg/used_types_12.f90: New test.

From-SVN: r118627
2006-11-09 20:22:19 +00:00
Serge Belyshev
0ad12cd3b5 re PR middle-end/29726 (invalid folding of ((X >> C1) & C2) != 0 or "M-x is undefined" in emacs)
2006-11-09  Serge Belyshev  <belyshev@depni.sinp.msu.ru>

	PR middle-end/29726
	* fold-const.c (fold_binary) <EQ_EXPR>: Fix typo in variable name.

	* gcc.dg/fold-eqandshift-1.c (test5): Uncomment function.
	(test6): Ditto.
	(dg-final): Add scan-tree-dump-times patterns for test5 and test6.
	* gcc.dg/fold-eqandshift-3.c: New test case.

From-SVN: r118625
2006-11-09 19:24:32 +00:00
Paul Thomas
7114edca02 re PR fortran/29699 (ICE in trans-decl.c)
2006-11-09 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29699
	* trans-array.c (structure_alloc_comps): Detect pointers to
	arrays and use indirect reference to declaration.
	* resolve.c (resolve_fl_variable): Tidy up condition.
	(resolve_symbol): The same and only add initialization code if
	the symbol is referenced.
	* trans-decl.c (gfc_trans_deferred_vars): Call gfc_trans_
	deferred_array before gfc_trans_auto_array_allocation.

	PR fortran/21730
	* symbol.c (check_done): Remove.
	(gfc_add_attribute): Remove reference to check_done and remove
	the argument attr_intent.
	(gfc_add_allocatable, gfc_add_dimension, gfc_add_external,
	gfc_add_intrinsic, gfc_add_optional, gfc_add_pointer,
	gfc_add_cray_pointer, gfc_add_cray_pointee, gfc_add_result,
	gfc_add_target, gfc_add_in_common, gfc_add_elemental,
	gfc_add_pure, gfc_add_recursive, gfc_add_procedure,
	gfc_add_type): Remove references to check_done.
	* decl.c (attr_decl1): Eliminate third argument in call to
	gfc_add_attribute.
	* gfortran.h : Change prototype for gfc_add_attribute.



2006-11-09 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29699
	* gfortran.dg/alloc_comp_auto_array_1.f90: New test.

	PR fortran/21730
	* gfortran.dg/change_symbol_attributes_1.f90: New test.

From-SVN: r118624
2006-11-09 18:42:28 +00:00
Andreas Krebbel
d82a02fa4f simplify-rtx.c (avoid_constant_pool_reference): Avoid calling simplify_subreg with BLKmode outer mode.
2006-11-09  Andreas Krebbel  <krebbel1@de.ibm.com>

	* simplify-rtx.c (avoid_constant_pool_reference): Avoid calling 
	simplify_subreg with BLKmode outer mode.

2006-11-09  Andreas Krebbel  <krebbel1@de.ibm.com>

	* gcc.dg/20061109-1.c: New testcase.

From-SVN: r118622
2006-11-09 17:56:04 +00:00
Kaveh R. Ghazi
282530ce36 builtins-20.c: Use fabs, not __builtin_fabs.
* gcc.dg/builtins-20.c: Use fabs, not __builtin_fabs.

From-SVN: r118621
2006-11-09 14:42:19 +00:00
Tobias Burnus
0b154c5558 io_constraints_3.f90: Fixed by using -fmax-errors.
2006-11-09  Tobias Burnus  <burnus@net-b.de>

       * gfortran.dg/io_constraints_3.f90: Fixed by using -fmax-errors.
       * gfortran.dg/gomp/reduction1.f90: Fixed by using -fmax-errors.

From-SVN: r118619
2006-11-09 11:26:10 +01:00
Brooks Moses
dd50845792 invoke.texi: Minor formatting fixes in option lists.
* doc/invoke.texi: Minor formatting fixes in option lists.

From-SVN: r118617
2006-11-09 00:25:12 -08:00
Brooks Moses
592600ceb1 invoke.texi: Added documentation for -fmax-errors option.
* invoke.texi: Added documentation for -fmax-errors option.

From-SVN: r118616
2006-11-09 00:23:21 -08:00
Brooks Moses
3f139fcf2a lang.opt: Add -fmax-errors= option.
* lang.opt: Add -fmax-errors= option.
* gfortran.h (gfc_option_t): Add max_errors element.
* options.c (gfc_init_options): Set max_errors default value
to 25.
(gfc_handle_options): Assign -fmax_errors value to
gfc_option.max_errors.
* error.c (gfc_increment_error_count): New function, which
also checks whether the error count exceeds max_errors.
(gfc_warning): Use it.
(gfc_warning_now): Use it.
(gfc_notify_std): Use it.
(gfc_error): Use it.
(gfc_error_now): Use it.
(gfc_error_check): Use it.

From-SVN: r118615
2006-11-08 22:53:05 -08:00
Brooks Moses
350ff03fa9 lang.opt: Remove non-working -qkind= option.
* lang.opt: Remove non-working -qkind= option.
* gfortran.h (gfc_option_t): Remove q_kind member.
* options.c (gfc_init_options): Remove q_kind initialization.
(gfc_handle_option): Remove -qkind= option handling.
* primary.c: (match_real_constant): Remove 'Q' exponent.

From-SVN: r118614
2006-11-08 22:41:55 -08:00
GCC Administrator
6e410d2e6d Daily bump.
From-SVN: r118607
2006-11-09 00:17:40 +00:00
Zdenek Dvorak
106dec717f re PR tree-optimization/29738 (Missed constant propagation into loops)
PR tree-optimization/29738
	* tree-ssa-ccp.c: Remove UNKNOWN_VAL from comments.
	(ccp_lattice_t): Remove UNKNOWN_VAL.
	(dump_lattice_value, ccp_lattice_meet, ccp_visit_phi_node):
	Do not handle UNKNOWN_VAL.
	(get_default_value): Set initial value of virtual operands to
	VARYING.
	(get_value): Always use get_default_value on uninitialized
	operands.
	(set_value_varying, surely_varying_stmt_p): New functions.
	(set_lattice_value): Do not pass argument to get_value.
	Do not handle UNKNOWN_VAL.
	(likely_value): Follow the semantics described in the comment.
	(ccp_initialize): Use surely_varying_stmt_p.  Do not mark
	phi nodes DONT_SIMULATE_AGAIN.
	(ccp_fold): Do not pass argument to get_value.
	(fold_const_aggregate_ref, visit_assignment): Ditto.  Do not
	handle UNKNOWN_VAL.

	* gcc.dg/tree-ssa/ssa-ccp-14.c: New test.
	* gcc.dg/tree-ssa/ssa-ccp-15.c: New test.

From-SVN: r118602
2006-11-09 00:09:43 +00:00
Kaveh R. Ghazi
5e3c2d4c68 builtin-math-3.c: Add more sincos tests.
* gcc.dg/torture/builtin-math-3.c: Add more sincos tests.

From-SVN: r118600
2006-11-08 21:53:02 +00:00
Andrew Pinski
54b12dbeb2 tree-pretty-print.c (dump_generic_node): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX instead of format buffer.
2006-11-08  Andrew Pinski  <Andrew_Pinski@playstation.sony.com>

        * tree-pretty-print.c (dump_generic_node) <INTEGER_CST>: Use
        HOST_WIDE_INT_PRINT_DOUBLE_HEX instead of format buffer.

From-SVN: r118597
2006-11-08 11:50:49 -08:00
Roger Sayle
5cdc4a2674 tree-ssa-propagate.c (set_rhs): Restructure validity tests as a test for inclusion rather than as a test for...
* tree-ssa-propagate.c (set_rhs): Restructure validity tests as a
	test for inclusion rather than as a test for exclusion.
	* tree-ssa-ccp.c (fold_stmt_r) <COND_EXPR>: Use set_rhs to modify
	the condition after calling fold_binary.
	* fold-const.c (fold_inf_compare): Remove in_gimple_form check.
	(fold_binary) <LT_EXPR, GT_EXPR, LE_EXPR, GE_EXPR>: Likewise.
	* builtins.c (fold_builtin_isascii): Likewise.
	(fold_builtin_isdigit): Likewise.

From-SVN: r118593
2006-11-08 17:39:35 +00:00
Carlos O'Donell
c794c06fef configure.ac: Do not set PREFIX_INCLUDE_DIR if $prefix is NONE.
gcc/

2006-11-08  Carlos O'Donell  <carlos@codesourcery.com>

	* configure.ac: Do not set PREFIX_INCLUDE_DIR if $prefix is NONE.
	* configure: Regenerate.

From-SVN: r118588
2006-11-08 16:52:05 +00:00
Tobias Burnus
08d7f64ef0 gfortran.texi: Add volatile and internal-file namelist to Fortran 2003 status.
2006-11-08  Tobias Burnus  <burnus@net-b.de>

       * gfortran.texi: Add volatile and internal-file
         namelist to Fortran 2003 status.
       * intrinsic.texi: Correct CHMOD entry.

From-SVN: r118578
2006-11-08 10:23:53 +01:00
Dorit Nuzman
89d67ccabb [multiple changes]
2006-11-08  Dorit Nuzman  <dorit@il.ibm.com>

        * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take
        enum argument instead of bool.
        (vect_analyze_operations): Call vectorizable_type_promotion.
        * tree-vectorizer.h (type_promotion_vec_info_type): New enum
        stmt_vec_info_type value.
        (supportable_widening_operation, vectorizable_type_promotion): New
        function declarations.
        * tree-vect-transform.c (vect_gen_widened_results_half): New function.
        (vectorizable_type_promotion): New function.
        (vect_transform_stmt): Call vectorizable_type_promotion.
        * tree-vect-analyze.c (supportable_widening_operation): New function.
        * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
        Add implementation.
        * tree-vect-generic.c (expand_vector_operations_1): Consider correct
        mode.

        * tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR):
        (VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes.
        * tree-inline.c (estimate_num_insns_1): Add cases for above new
        tree-codes.
        * tree-pretty-print.c (dump_generic_node, op_prio): Likewise.
        * expr.c (expand_expr_real_1): Likewise.
        * optabs.c (optab_for_tree_code): Likewise.
        (init_optabs): Initialize new optabs.
        * genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab,
        vec_widen_smult_hi_optab, vec_widen_smult_lo_optab,
        vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab,
        vec_unpacku_lo_optab): Initialize new optabs.
        * optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo):
        (OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi,
        OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New
        optab indices.
        (vec_widen_umult_hi_optab, vec_widen_umult_lo_optab):
        (vec_widen_smult_hi_optab, vec_widen_smult_lo_optab):
        (vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab):
        (vec_unpacku_lo_optab): New optabs.
        * doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi):
        (vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo):
        (vec_widen_smult_hi, vec_widen_smult_lo): New.
        * doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR):
        (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR):
        (VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New.

        * config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB):
        (UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH):
        (UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New.
        (UNSPEC_VPERMSI, UNSPEC_VPERMHI): New.
        (vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to
        implement the unsigned unpacking patterns.
        (vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi):
        (vec_unpacks_lo_v8hi): New signed unpacking patterns.
        (vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi):
        (vec_unpacku_lo_v8hi): New unsigned unpacking patterns.
        (vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi):
        (vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi):
        (vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi):
        (vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening
        multiplication patterns.

        * target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New.
        * target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN):
        (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New.
        * config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New.
        (rs6000_builtin_mul_widen_odd): New.
        (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined.
        (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined.
        * tree-vectorizer.h (enum vect_relevant): New enum type.
        (_stmt_vec_info): Field relevant chaned from bool to enum
        vect_relevant.
        (STMT_VINFO_RELEVANT_P): Updated.
        (STMT_VINFO_RELEVANT): New.
        * tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT
        instead of STMT_VINFO_RELEVANT_P.
        * tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p):
        Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT,
        and boolean variable with enum vect_relevant.
        (vect_mark_stmts_to_be_vectorized): Likewise + update documentation.
        * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New.
        (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New.

        2006-11-08  Richard Henderson  <rth@redhat.com>

        * config/i386/sse.md (vec_widen_umult_hi_v8hi,
        vec_widen_umult_lo_v8hi): New.
        (vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si,
        vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New.

        * config/i386/i386.c (ix86_expand_sse_unpack): New.
        * config/i386/i386-protos.h (ix86_expand_sse_unpack): New.
        * config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi,
        vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi,
        vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi,
        vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si,
        vec_unpacks_lo_v4si): New.

        2006-11-08  Dorit Nuzman  <dorit@il.ibm.com>

        * tree-vect-transform.c (vectorizable_type_demotion): New function.
        (vect_transform_stmt): Add case for type_demotion_vec_info_type.
        (vect_analyze_operations): Call vectorizable_type_demotion.
        * tree-vectorizer.h (type_demotion_vec_info_type): New enum
        stmt_vec_info_type value.
        (vectorizable_type_demotion): New function declaration.
        * tree-vect-generic.c (expand_vector_operations_1): Consider correct
        mode.

        * tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes.
        * expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and
        VEC_PACK_SAT_EXPR.
        * tree-iniline.c (estimate_num_insns_1): Likewise.
        * tree-pretty-print.c (dump_generic_node, op_prio): Likewise.
        * optabs.c (optab_for_tree_code): Likewise.

        * optabs.c (expand_binop): In case of vec_pack_*_optabs the mode
        compared against the predicate of the result is not 'mode' (the input
        to the function) but a mode with half the size of 'mode'.
        (init_optab): Initialize new optabs.
        * optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat):
        New optab indices.
        (vec_pack_mod_optab, vec_pack_ssat_optab,  vec_pack_usat_optab): New
        optabs.
        * genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab):
        (vec_pack_usat_optab): Initialize new optabs.
        * doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New.
        * config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New.

        2006-11-08  Richard Henderson  <rth@redehat.com>

        * config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si):
        (vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi):
        (vec_interleave_highv8hi, vec_interleave_lowv8hi):
        (vec_interleave_highv4si, vec_interleave_lowv4si):
        (vec_interleave_highv2di, vec_interleave_lowv2di): New.

        2006-11-08  Dorit Nuzman  <dorit@il.ibm.com>

        * tree-vect-transform.c (vectorizable_reduction): Support multiple
        datatypes.
        (vect_transform_stmt): Removed redundant code.

        2006-11-08  Dorit Nuzman  <dorit@il.ibm.com>

        * tree-vect-transform.c (vectorizable_operation): Support multiple
        datatypes.

        2006-11-08  Dorit Nuzman  <dorit@il.ibm.com>

        * tree-vect-transform.c (vect_align_data_ref): Removed.
        (vect_create_data_ref_ptr): Added additional argument - ptr_incr.
        Updated function documentation. Return the increment stmt in ptr_incr.
        (bump_vector_ptr): New function.
        (vect_get_vec_def_for_stmt_copy): New function.
        (vect_finish_stmt_generation): Create a stmt_info to newly created
        vector stmts.
        (vect_setup_realignment): Call vect_create_data_ref_ptr with additional
        argument.
        (vectorizable_reduction, vectorizable_assignment): Not supported yet if
        VF is greater than the number of elements that can fit in one vector
        word.
        (vectorizable_operation, vectorizable_condition): Likewise.
        (vectorizable_store, vectorizable_load): Support the case that the VF
        is greater than the number of elements that can fit in one vector word.
        (vect_transform_loop): Don't fail in case of multiple data-types.
        * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail
        in case of multiple data-types; the smallest type determines the VF.
        (vect_analyze_data_ref_dependence): Don't record datarefs as same_align
        if they are of different sizes.
        (vect_update_misalignment_for_peel): Compare misalignments in terms of
        number of elements rather than number of bytes.
        (vect_enhance_data_refs_alignment): Fix/Add dump printouts.
        (vect_can_advance_ivs_p): Fix a dump printout

From-SVN: r118577
2006-11-08 07:32:44 +00:00
Eric Christopher
6300f037d0 libgcc2.c (__bswapdi2): Rename from bswapDI2.
2006-11-07  Eric Christopher  <echristo@apple.com>

        * libgcc2.c (__bswapdi2): Rename from bswapDI2.
        (__bswapsi2): Ditto.
        * libgcc2.h: Remove transformation of bswap routines.
        * config/i386/i386.md (bswapsi2): New.
        (bswapdi2): Ditto.

2006-11-07  Eric Christopher  <echristo@apple.com>

        * gcc.target/i386/builtin-bswap-1.c: Rewrite for 64-bit.
        Test using scan-assembler-not.

From-SVN: r118576
2006-11-08 02:24:26 +00:00
GCC Administrator
701640b1f9 Daily bump.
From-SVN: r118573
2006-11-08 00:17:57 +00:00
Jakub Jelinek
4eb7fd8398 c-common.c (c_common_attributes): Add gnu_inline attribyte.
* c-common.c (c_common_attributes): Add gnu_inline attribyte.
	(handle_gnu_inline_attribute): New function.
	* c-decl.c (diagnose_mismatched_decls): Handle gnu_inline attribute.
	(merge_decls, start_decl, start_function): Likewise.
	* doc/extend.texi: Document gnu_inline attribute.

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

From-SVN: r118567
2006-11-08 00:01:23 +01:00
Steve Ellcey
a7f02c2d27 re PR other/25028 (TImode-to-floating conversions broken)
PR other/25028
	* config/ia64/t-hpux (LIB1ASMFUNCS):  Filter out _fixtfdi,
	_fixunstfdi, and  _floatditf
	* gcc.dg/torture/fp-int-convert-float128-timode.c:  Do not XFAIL
	on HP-UX.

From-SVN: r118565
2006-11-07 19:14:27 +00:00
Anatoly Sokolov
120b24f7ba avr-protos.h (mask_one_bit_p, [...]): Remove prototype.
* config/avr/avr-protos.h (mask_one_bit_p, const_int_pow2_p): Remove 
	prototype.
	* config/avr/avr.c (mask_one_bit_p, const_int_pow2_p): Remove.
	(output_movhi, ashlhi3_out, ashlsi3_out, ashrhi3_out, ashrsi3_out,
	lshrhi3_out, lshrsi3_out): Remove unnecessary code for handling value
	which start in an odd register.

From-SVN: r118563
2006-11-07 21:33:57 +03:00
Richard Sandiford
daca5b05b0 mips.h (ISA_HAS_PREFETCHX): Fix typo.
gcc/
	* config/mips/mips.h (ISA_HAS_PREFETCHX): Fix typo.

From-SVN: r118562
2006-11-07 18:05:52 +00:00
Josh Conner
d2927bd54f invoke.texi (fstrict-aliasing): Move implementation details...
2006-11-07  Josh Conner  <jconner@apple.com>

	* doc/invoke.texi (fstrict-aliasing): Move implementation
	details...
	* doc/tree-ssa.texi (Alias analysis): ...here.

From-SVN: r118559
2006-11-07 17:40:13 +00:00
Richard Guenther
285e4952c1 re PR middle-end/29610 (ICE when compiling c++ code with -O2 -funswitch-loops)
2006-11-07  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/29610
	* tree-cfgcleanup.c (cleanup_control_flow): Honor return value
	of tree_purge_dead_eh_edges as it may free dominators.

	* g++.dg/other/pr29610.C: New testcase.

From-SVN: r118555
2006-11-07 17:29:34 +00:00
Paul Thomas
8f81c3c650 re PR fortran/29539 (ICE in variable_decl)
2006-11-07 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29539
	PR fortran/29634
	* decl.c (variable_decl): Add test for presence of proc_name.
	* error.c (gfc_error_flag_test): New function.
	* gfortran.h : Prototype for gfc_error_flag_test.

2006-11-07 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29539
	* gfortran.dg/gfortran.dg/blockdata_3.f90: New test.

	PR fortran/29634
	* gfortran.dg/gfortran.dg/derived_function_interface_1.f90: New
	test.

From-SVN: r118553
2006-11-07 15:17:17 +00:00
David Ung
d81ecf52ff mips.c (mips_rtx_cost_optimize_size): New table of costs when optimizing for size.
* config/mips/mips.c (mips_rtx_cost_optimize_size): New table of
	costs when optimizing for size.
	(override_options): Use mips_rtx_cost_optimize_size table for cost
	calculations.

From-SVN: r118550
2006-11-07 14:28:08 +00:00
Jie Zhang
010b2043b0 gcc.c (process_command): Treat -b as normal switch if its argument has no dash.
* gcc.c (process_command): Treat -b as normal switch if its argument
	has no dash.

From-SVN: r118547
2006-11-07 14:24:58 +00:00
David Ung
5ab727410a mips.h (ISA_HAS_PREFETCHX): Add ISA_MIPS32R2 to the list.
* config/mips/mips.h (ISA_HAS_PREFETCHX): Add ISA_MIPS32R2 to the
	list.

From-SVN: r118546
2006-11-07 14:08:55 +00:00
Tobias Burnus
775e6c3a7b re PR fortran/29601 (VOLATILE attribute and statement)
fortran/
2006-11-06  Tobias Burnus  <burnus@net-b.de>

    PR fortran/29601
    * symbol.c (check_conflict, gfc_add_volatile): Add volatile support.
    * decl.c (match_attr_spec, gfc_match_volatile): Add volatile support.
    * gfortran.h (symbol_attribute): Add volatile_ to struct.
    * resolve.c (was_declared): Add volatile support.
    * trans-decl.c (gfc_finish_var_decl): Add volatile support.
    * match.h: Declare gfc_match_volatile.
    * parse.c (decode_statement): Recognize volatile.
    * modules.c (ab_attribute, attr_bits, mio_symbol_attribute):
      Add volatile support.
    * dump-parse-tree.c (gfc_show_attr): Add volatile support.


testsuite/
2006-11-06  Tobias Burnus  <burnus@net-b.de>

    PR fortran/29601
    * gfortran.dg/volatile.f90: Add.
    * gfortran.dg/volatile2.f90: Add.
    * gfortran.dg/volatile3.f90: Add.
    * gfortran.dg/volatile4.f90: Add.
    * gfortran.dg/volatile5.f90: Add.
    * gfortran.dg/volatile6.f90: Add.
    * gfortran.dg/volatile7.f90: Add.

From-SVN: r118545
2006-11-07 14:27:53 +01:00
Tobias Burnus
aa4183d8a5 decl.c (match_attr_spec, [...]): Unify gfc_notify_std message for GFC_STD_F2003.
fortran/
2006-11-06  Tobias Burnus  <burnus@net-b.de>

       * decl.c (match_attr_spec, gfc_match_enum): Unify gfc_notify_std
         message for GFC_STD_F2003.
       * array.c (gfc_match_array_constructor): Unify gfc_notify_std
         message for GFC_STD_F2003.
       * io.c (check_io_constraints): Unify gfc_notify_std message for
         GFC_STD_F2003.
       * resolve.c (resolve_actual_arglist): Unify gfc_notify_std message
         for GFC_STD_F2003.

testsuite/
2006-11-06  Tobias Burnus  <burnus@net-b.de>

       * gfortran.dg/io_constraints_2.f90: Adjust pattern
         for matching error messages.
       * gfortran.dg/specifics_3.f90: Adjust pattern
         for matching error messages.

From-SVN: r118542
2006-11-07 10:11:08 +01:00
Eric Christopher
9519e677aa config.gcc: Add x86_64-darwin host support.
2006-11-06  Eric Christopher  <echristo@apple.com>

	    * config.gcc: Add x86_64-darwin host support.
	    * config.host: Ditto.
	    * config/i386/darwin64.h: New file.
	    * config/i386/t-darwin64: Ditto.

From-SVN: r118541
2006-11-07 05:40:34 +00:00
Brooks Moses
61e390b1ad Fixed incorrect date in changelog entry.
From-SVN: r118540
2006-11-06 17:52:49 -08:00
Brooks Moses
a1758c52e2 intrinsic.texi: Added documentation for FTELL, GETLOG, and HOSTNM intrinsics.
* intrinsic.texi: Added documentation for FTELL, GETLOG, and HOSTNM intrinsics.

From-SVN: r118538
2006-11-06 17:49:55 -08:00
GCC Administrator
d19a4469cb Daily bump.
From-SVN: r118536
2006-11-07 00:17:48 +00:00
Janis Johnson
d6682e2189 sourcebuild.texi (Test Directives): Add output-exists and output-exists-not.
gcc/

2006-11-06  Janis Johnson  <janis187@us.ibm.com>

	* gcc/doc/sourcebuild.texi (Test Directives): Add output-exists
	and output-exists-not.

gcc/testsuite/

2006-11-06  Janis Johnson  <janis187@us.ibm.com
	    Bernhard Fischer  <aldot@gcc.gnu.org>

	* lib/gcc-dg.exp (output-exists): New proc.
	(output-exists-not): New proc.
	* gcc.test-framework/test-framework.awk: Support new directives.
	* gcc.test-framework/dg-outexistsnot-exp-F.c: New test.
	* gcc.test-framework/dg-outexistsnot-exp-P.c: New test.
	* gcc.test-framework/dg-outexists-exp-F.c: New test.
	* gcc.test-framework/dg-outexists-exp-XP.c: New test.
	* gcc.test-framework/dg-outexistsnot-exp-XF.c: New test.
	* gcc.test-framework/dg-outexists-exp-P.c: New test.

From-SVN: r118531
2006-11-07 00:08:32 +00:00
Andrew Pinski
3ea0e1e4d3 re PR tree-optimization/29439 (ICE in fold-const.c:1385 with -O1 -fwrapv -ftree-vrp)
2006-11-06  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/29439
        * tree-vrp.c (vrp_int_const_binop): Use the correct tree when
        checking for overflow.

From-SVN: r118530
2006-11-06 15:25:19 -08:00
Erik Edelmann
abe601c7cb re PR fortran/29630 ("Unclassifiable statement" with vector subscripts in initialization)
fortran/
2006-11-06  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/29630
        PR fortran/29679
        * expr.c (find_array_section): Support vector subscripts.  Don't
        add sizes for dimen_type == DIMEN_ELEMENT to the shape array.


testsuite/
2006-11-06  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/29630
        PR fortran/29679
        * gfortran.dg/initialization_2.f90: Test PRs 29630 and 29679 too.
        * gfortran.dg/initialization_3.f90: New.

From-SVN: r118528
2006-11-06 22:18:54 +00:00
Jan van Dijk
5f60e48f45 configure.ac: Fix typo in case statement: :: changed to ;;
2006-11-06  Jan van Dijk  <jan@etpmod.phys.tue.nl>

	* configure.ac: Fix typo in case statement: :: changed to ;;
	* configure: Regenerate.

From-SVN: r118525
2006-11-06 19:49:31 +00:00
Bob Wilson
09fa8841f4 longlong.h (__xtensa__): Add definitions for umul_ppmm...
* longlong.h (__xtensa__): Add definitions for umul_ppmm, __umulsidi3,
	count_leading_zeros, and count_trailing_zeros.
	* config/xtensa/xtensa.c (TARGET_INIT_BUILTINS): Define.
	(TARGET_FOLD_BUILTIN): Define.
	(TARGET_EXPAND_BUILTIN): Define.
	(xtensa_init_builtins): New.
	(xtensa_fold_builtin): New.
	(xtensa_expand_builtin): New.
	(xtensa_rtx_costs): Add CTZ and CLZ.  Adjust costs for MULT.
	* config/xtensa/xtensa.h (TARGET_MUL32_HIGH): Define.
	(CLZ_DEFINED_VALUE_AT_ZERO): Define.
	(CTZ_DEFINED_VALUE_AT_ZERO): Define.
	* config/xtensa/xtensa.md (UNSPEC_NSAU): Remove.
	(any_extend): New code macro.
	(u, su): New code attributes.
	(<u>mulsidi3, <u>mulsi3_highpart, clzsi2, ctzsi2): New.
	(nsau): Remove; replaced by clzsi2.
	(ffssi2): Use clzsi2.
	* config/xtensa/t-xtensa (LIB1ASMFUNCS): Add _umulsidi3,
	_clzsi2, _ctzsi2, and _ffssi2.  Rename _nsau to _clz.
	* config/xtensa/lib1funcs.asm (__mulsi3): Support Mul32 option.
	(__umulsidi3, __clzsi2, __ctzsi2, __ffssi2): New.
	(__nsau_data): Guard with ifdef L_clz instead of L_nsau.

From-SVN: r118524
2006-11-06 18:50:37 +00:00
Vladimir Prus
8f75f38989 t-strongarm-pe: (TARGET_LIBGCC2_CFLAGS): Do no set inhibit_libc.
* config/arm/t-strongarm-pe: (TARGET_LIBGCC2_CFLAGS): Do no
        set inhibit_libc.
        * config/arm/t-strongarm-elf: Likewise.
        * config/arm/t-pe: Likewise.
        * config/arm/t-arm-elf: Likewise.
        * config/arm/t-xscale-elf: Likewise.
        * config/arm/t-arm-coff: Likewise.
        * config/arm/t-xscale-coff: Likewise.
        * config/arm/t-wince-pe: Likewise.

From-SVN: r118518
2006-11-06 09:49:07 +00:00
GCC Administrator
6e192c850b Daily bump.
From-SVN: r118515
2006-11-06 00:17:47 +00:00
Jerry DeLisle
25825b21a3 re PR libfortran/25545 (internal file and dollar edit descriptor)
2006-11-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25545
	* gfortran.dg/dollar_edit_descriptor-2.f: New test.

From-SVN: r118507
2006-11-05 17:40:42 +00:00
Bernhard Fischer
f4d4085c10 re PR fortran/21061 (gfortran ignores -Werror)
2006-11-05  Bernhard Fischer  <aldot@gcc.gnu.org>

        PR fortran/21061
        * error.c (gfc_warning): If warnings_are_errors then treat
        warnings as errors with respect to the exit code.
        (gfc_notify_std): Ditto.
        (gfc_warning_now): Ditto.

From-SVN: r118501
2006-11-05 15:57:24 +01:00
Kaz Kojima
7945be3f19 lib1funcs-4-300.asm: Guard entire file with #if !__SHMEDIA__ .
* config/sh/lib1funcs-4-300.asm: Guard entire file with
        #if !__SHMEDIA__ .

From-SVN: r118500
2006-11-05 12:58:28 +00:00
Jakub Jelinek
789e604dfa re PR middle-end/29695 (Folding breaks (a & 0x80) ? 0x80 : 0 for unsigned char or unsigned short a)
PR middle-end/29695
	* fold-const.c (fold_ternary): Fix A < 0 ? <sign bit of A> : 0
	simplification.

	* gcc.c-torture/execute/pr29695-1.c: New test.
	* gcc.c-torture/execute/pr29695-2.c: New test.

From-SVN: r118497
2006-11-05 13:13:46 +01:00
Arnaud Charlet
75c0ed055f re PR ada/29707 (s-osinte.adb:86:13: warning: function "To_Target_Priority" is not referenced)
* s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads
	(To_Target_Priority): New function.
	Fix PR ada/29707

From-SVN: r118496
2006-11-05 11:58:41 +01:00
Eric Botcazou
4db425b298 Fix typos.
From-SVN: r118494
2006-11-05 10:19:18 +00:00
Paul Thomas
58b6e04789 2006-11-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu,org>
Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/24518
	* trans-intrinsic.c (gfc_conv_intrinsic_mod): Use built_in fmod
	for both MOD and MODULO, if it is available.

	PR fortran/29565
	* trans-expr.c (gfc_conv_aliased_arg): For an INTENT(OUT), save
	the declarations from the unused loops by merging the block
	scope for each; this ensures that the temporary is declared.

2006-11-05  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/29565
	* gfortran.dg/gfortran.dg/aliasing_dummy_3.f90: New test.

From-SVN: r118492
2006-11-05 06:27:48 +00:00
Brooks Moses
cb60c134e2 error.c (show_locus): Add trailing colon in error messages.
* fortran/error.c (show_locus): Add trailing colon in error messages.
(error_print): Avoid leading space in error lines.
* testsuite/lib/gfortran-dg.exp (gfortran-dg-test): Adjust pattern
for matching error messages.

From-SVN: r118491
2006-11-04 16:28:08 -08:00
GCC Administrator
4872888274 Daily bump.
From-SVN: r118489
2006-11-05 00:17:22 +00:00
Uros Bizjak
2e1f15bd25 re PR target/26915 (missed sized opt returning -1.0)
PR target/26915
        * config/i386/i386.c (standard_80387_constant_p): Treat -0.0 and -1.0
        as a valid 80387 constant.
        (standard_80387_constant_opcode): Return "#" for -0.0 and -1.0.
        * config/i386/i386.md (unnamed splitter): Split the load of
        constant -0.0 or -1.0  into the load of 0.0 or 1.0, followed
        by negation.

testsuite/ChangeLog:

        PR target/26915
        * gcc.target/i386/387-12.c: New test.
~

From-SVN: r118484
2006-11-05 00:12:16 +01:00
Francois-Xavier Coudert
d6910bb551 re PR fortran/29713 (ICE in gfc_set_constant_character_len decl.c:762)
PR fortran/29713

	* expr.c (gfc_simplify_expr): Correct memory allocation.

	* gfortran.dg/pr29713.f90: New test.

From-SVN: r118483
2006-11-04 20:58:26 +00:00
Richard Earnshaw
c5289e454b arm.c (thumb_legitimate_addres_p): Allow any constant offset from the soft-frame, argument and virtual registers.
* arm.c (thumb_legitimate_addres_p): Allow any constant offset
	from the soft-frame, argument and virtual registers.

From-SVN: r118481
2006-11-04 14:26:34 +00:00
Uros Bizjak
50d0a89920 i386.md (*movxf_nointeger, [...]): Enable patterns for standard 80387 constants.
* config/i386/i386.md (*movxf_nointeger, *movxf_integer): Enable
        patterns for standard 80387 constants.

From-SVN: r118479
2006-11-04 13:07:29 +01:00
Steven Bosscher
3589013577 ChangeLog fix
From-SVN: r118478
2006-11-04 11:13:57 +00:00
Paolo Bonzini
a52b023a5f fwprop.c: New file.
2006-11-03  Paolo Bonzini  <bonzini@gnu.org>
            Steven Bosscher  <stevenb.gcc@gmail.com>

        * fwprop.c: New file.
        * Makefile.in: Add fwprop.o.
        * tree-pass.h (pass_rtl_fwprop, pass_rtl_fwprop_with_addr): New.
        * passes.c (init_optimization_passes): Schedule forward propagation.
        * rtlanal.c (loc_mentioned_in_p): Support NULL value of the second
        parameter.
        * timevar.def (TV_FWPROP): New.
        * common.opt (-fforward-propagate): New.
        * opts.c (decode_options): Enable forward propagation at -O2.
        * gcse.c (one_cprop_pass): Do not run local cprop unless touching jumps.
        * cse.c (fold_rtx_subreg, fold_rtx_mem, fold_rtx_mem_1, find_best_addr,
        canon_for_address, table_size): Remove.
        (new_basic_block, insert, remove_from_table): Remove references to
        table_size.
        (fold_rtx): Process SUBREGs and MEMs with equiv_constant, make
        simplification loop more straightforward by not calling fold_rtx
        recursively.
        (equiv_constant): Move here a small part of fold_rtx_subreg,
        do not call fold_rtx.  Call avoid_constant_pool_reference
        to process MEMs.
        * recog.c (canonicalize_change_group): New.
        * recog.h (canonicalize_change_group): New.

        * doc/invoke.texi (Optimization Options): Document fwprop.
        * doc/passes.texi (RTL passes): Document fwprop.


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

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

From-SVN: r118474
2006-11-04 02:59:52 +00:00
Roger Sayle
c79154c4fa call.c (build_op_delete_call): Test user-visible type against size_type_node...
* call.c (build_op_delete_call): Test user-visible type against
	size_type_node, instead of against the internal type, sizetype.
	* class.c (type_requires_array_cookie): Likewise.
	* mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
	handling of TYPE_IS_SIZETYPE.
	* typeck.c (type_after_usual_arithmetic_conversions): Remove
	special case handling of TYPE_IS_SIZETYPE.
	(comptypes): Likewise.

From-SVN: r118472
2006-11-04 00:51:51 +00:00
GCC Administrator
4c9e00c875 Daily bump.
From-SVN: r118470
2006-11-04 00:17:39 +00:00
Steven Bosscher
52bca9998a tree-dump.c (dump_enable_all): Rename local variable ir_type to avoid name conflicts.
* tree-dump.c (dump_enable_all): Rename local variable
	ir_type to avoid name conflicts.
	* cfgloopmanip.c (lv_adjust_loop_entry_edge): Check for IR_GIMPLE
	instead of using ir_type().
	* profile.c (tree_register_profile_hooks): Likewise.
	* value-prof.c (tree_register_value_prof_hooks): Likewise.
	* basic-block.h (struct edge_def): Likewise.
	* config/arm/arm.c (legitimize_pic_address): Likewise.
	* coretypes.h (ir_type): New enum of all intermediate languages
	used in GCC.
	* cfghooks.c (ir_type): Rename to...
	(current_ir_type): ...this.  Distinguish between cfgrtl and
	cfglayout mode when the current IR is RTL.  Return enum ir_type.
	* cfghooks.h (ir_type): Replace with current_ir_type prototype.

From-SVN: r118465
2006-11-03 22:12:37 +00:00
Paul Brook
6c6aa1afed arm.c (arm_file_start): New function.
2006-11-03  Paul Brook  <paul@codesourcery.com>

	gcc/
	* config/arm/arm.c (arm_file_start): New function.
	(TARGET_ASM_FILE_START): Define.
	(arm_default_cpu): New variable.
	(arm_override_options): Set arm_default_cpu.

From-SVN: r118461
2006-11-03 17:49:43 +00:00
David Ung
88c22d094e typo
From-SVN: r118460
2006-11-03 17:39:44 +00:00
David Ung
a55808a73a mips.h (processor_type): Removed PROCESSOR_24K, add PROCESSOR_24KC and PROCESSOR_24KF.
* config/mips/mips.h (processor_type): Removed PROCESSOR_24K, add
PROCESSOR_24KC and PROCESSOR_24KF.
* config/mips/mips.c (mips_cpu_info_table): Add processor names
and aliases for 4kec/4kem/4kep/24kec/24kef/24kex/34kc/34kf/34kx.
(mips_rtx_cost_data): Add costs for the 24kc.
* config/mips/mips.md ("cpu"): Remove 24k, add 24kc and 24kf.
* config/mips/24k.md: Remove references to 24k and replace with
uses of 24kc/24kf in the appropriate reservations.
* doc/invoke.texi (MIPS Options): Updated.

From-SVN: r118459
2006-11-03 17:32:39 +00:00
J"orn Rennecke
78d310c2c1 crt1.asm: Fix #ifdef indent.
gcc:

2006-11-03  J"orn Rennecke  <joern.rennecke@st.com>

	* config/sh/crt1.asm: Fix #ifdef indent.

2006-11-03  J"orn Rennecke  <joern.rennecke@st.com>
	Merged from STMicroelectronics sources:
	2006-10-06  Andrew Stubbs  <andrew.stubbs@st.com>
	  * config/sh/crt1.asm (vbr_600): Add missing #if.
	2006-08-03  J"orn Rennecke  <joern.rennecke@st.com>
	  * sh.opt (mfused-madd): New option.
	  * sh.md (mac_media, macsf3): Make conditional on TARGET_FMAC.
	2006-07-04  Andrew Stubbs  <andrew.stubbs@st.com>
	  * config/sh/crt1.asm (vbr_start): Move to new section .test.vbr.
	  Remove pointless handler at VBR+0.
	  (vbr_200, vbr_300, vbr_500): Remove pointless handler.
	  (vbr_600): Save and restore mach and macl, fpul and fpscr and fr0 to
	  fr7. Make sure the timer handler is called with the correct FPU
	  precision setting, according to the ABI.
	2006-06-14  J"orn Rennecke <joern.rennecke@st.com>
	  * config/sh/sh.opt (m2a-single, m2a-single-only): Fix Condition.
	  * config/sh/sh.h (SUPPORT_SH2A_NOFPU): Fix condition.
	  (SUPPORT_SH2A_SINGLE_ONLY, SUPPORT_SH2A_SINGLE_ONLY): Likewise.
	2006-06-09  J"orn Rennecke <joern.rennecke@st.com>
	  * sh.md (cmpgeusi_t): Change into define_insn_and_split.  Accept
	  zero as second operand.
	2006-04-28  J"orn Rennecke <joern.rennecke@st.com>
	  * config/sh/divtab-sh4-300.c, config/sh/lib1funcs-4-300.asm:
	  Fixed some bugs related to negative values, in particular -0
	  and overflow at -0x80000000.
	  * config/sh/divcost-analysis: Added sh4-300 figures.
	2006-04-27  J"orn Rennecke <joern.rennecke@st.com>
	  * config/sh/t-sh (MULTILIB_MATCHES): Add -m4-300* / -m4-340 options.
	2006-04-26  J"orn Rennecke <joern.rennecke@st.com>
	  * config/sh/t-sh (OPT_EXTRA_PARTS): Add libgcc-4-300.a.
	  ($(T)div_table-4-300.o, $(T)libgcc-4-300.a): New rules.
	  * config/sh/divtab-sh4-300.c, config/sh/lib1funcs-4-300.asm:
	New files.
	  * config/sh/embed-elf.h (LIBGCC_SPEC): Use -lgcc-4-300 for -m4-300* /
	  -m4-340.
	2006-04-24  J"orn Rennecke <joern.rennecke@st.com>
	  SH4-300 scheduling description & fixes to SH4-[12]00 description:
	  * sh.md: New instruction types: fstore, movi8, fpscr_toggle, gp_mac,
	  mac_mem, mem_mac, dfp_mul, fp_cmp.
	  (insn_class, dfp_comp, any_fp_comp): Update.
	  (push_fpul, movsf_ie, fpu_switch, toggle_sz, toggle_pr): Update type.
	  (cmpgtsf_t, "cmpeqsf_t, cmpgtsf_t_i4, cmpeqsf_t_i4): Likewise.
	  (muldf3_i): Likewise.
	  (movsi_i): Split rI08 alternative into two separate alternatives.
	  Update type.
	  (movsi_ie, movsi_i_lowpart): Likewise.
	  (movqi_i): Split ri alternative into two separate alternatives.
	  Update type.
	  * sh1.md (sh1_load_store, sh1_fp): Update.
	  * sh4.md (sh4_store, sh4_mac_gp, fp_arith, fp_double_arith): Update.
	  (mac_mem, sh4_fpscr_toggle): New insn_reservations.
	  * sh4a.md (sh4a_mov, sh4a_load, sh4a_store, sh4a_fp_arith): Update.
	  (sh4a_fp_double_arith): Likewise.
	  * sh4-300.md: New file.
	  * sh.c (sh_handle_option): Handle m4-300* options.
	  (sh_adjust_cost): Fix latency of auto-increments.
	  Handle SH4-300 differently than other SH4s.  Check for new insn types.
	  * sh.h (OVERRIDE_OPTIONS): Initilize sh_branch_cost if it has not
	  been set by an option.
	  * sh.opt (m4-300, m4-100-nofpu, m4-200-nofpu): New options.
	  (m4-300-nofpu, -m4-340, m4-300-single, m4-300-single-only): Likewise.
	  (mbranch-cost=): Likewise.
	  * superh.h (STARTFILE_SPEC): Take -m4-340 into account.

	  * sh.md (mulsf3): Remove special expansion code.
	  (mulsf3_ie): Now a define_insn_and_split.
	  (macsf3): Allow for TARGET_SH4.

	  * sh.md (cbranchsi4, cbranchdi4, cbranchdi4_i): New patterns.
	  * sh.c (prepare_cbranch_operands, expand_cbranchsi4): New functions.
	  (expand_cbranchdi4): Likewise.
	  (sh_rtx_costs): Give lower cost for certain CONST_INT values and for
	  CONST_DOUBLE if the outer code is COMPARE.
	  * sh.h (OPTIMIZATION_OPTIONS): If not optimizing for size, set
	  TARGET_CBRANCHDI4 and TARGET_EXPAND_CBRANCHDI4.
	  (OVERRIDE_OPTIONS): For TARGET_SHMEDIA, clear TARGET_CBRANCHDI4.
	  (LEGITIMATE_CONSTANT_P): Also allow DImode and VOIDmode CONST_DOUBLEs.
	  Remove redundant fp_{zero,one}_operand checks.
	  * sh.opt (mcbranchdi, mexpand-cbranchdi, mcmpeqdi): New options.
	  * sh-protos.h (prepare_cbranch_operands, expand_cbranchsi4): Declare.
	  (expand_cbranchdi4): Likewise.
	2006-04-20  J"orn Rennecke <joern.rennecke@st.com>
	  * sh.h (LOCAL_ALIGNMENT): Use DATA_ALIGNMENT.

gcc/testsuite:

2006-11-03  J"orn Rennecke  <joern.rennecke@st.com>

	* testsuite/gcc.c-torture/execute/arith-rand-ll.c:
	Also test for bogus rest sign.

From-SVN: r118458
2006-11-03 14:52:19 +00:00
Francois-Xavier Coudert
47c07d96b1 re PR libfortran/27895 (problem with RESHAPE and zero-sized arrays)
PR libfortran/27895

	* intrinsics/reshape_generic.c (reshape_internal): Fix so that it
	works correctly for zero-sized arrays.
	* m4/reshape.m4: Likewise.
	* generated/reshape_r16.c: Regenerate.
	* generated/reshape_c4.c: Regenerate.
	* generated/reshape_i4.c: Regenerate.
	* generated/reshape_c16.c: Regenerate.
	* generated/reshape_r10.c: Regenerate.
	* generated/reshape_r8.c: Regenerate.
	* generated/reshape_c10.c: Regenerate.
	* generated/reshape_c8.c: Regenerate.
	* generated/reshape_i8.c: Regenerate.
	* generated/reshape_i16.c: Regenerate.
	* generated/reshape_r4.c: Regenerate.

	* gcc/testsuite/gfortran.dg/zero_sized_1.f90: Uncomment checks
	for RESHAPE.

From-SVN: r118455
2006-11-03 11:51:09 +00:00
Brooks Moses
5d7de335d7 error.c (show_locus): Remove "In file" from error messages.
* fortran/error.c (show_locus): Remove "In file" from error messages.
* testsuite/lib/gfortran-dg.exp (gfortran-dg-test): Remove expected "In file" from error 
messages.

From-SVN: r118450
2006-11-02 21:07:59 -08:00
Andrew Pinski
a8a51a9784 md.texi (RS6000 constraints): Document H, Z, a, t, and W constraints.
2006-11-02  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * doc/md.texi (RS6000 constraints): Document H, Z, a, t, and W
        constraints.

From-SVN: r118448
2006-11-02 17:27:39 -08:00
Brooks Moses
9015044125 invoke.texi: Fix mfp-trap-mode typo.
* doc/invoke.texi: Fix mfp-trap-mode typo.

From-SVN: r118447
2006-11-02 17:06:26 -08:00
Carlos O'Donell
978e411ffa linux-elf.h (NEED_INDICATE_EXEC_STACK): Define as 1.
2006-11-02  Carlos O'Donell  <carlos@codesourcery.com>

	gcc/
	* config/arm/linux-elf.h (NEED_INDICATE_EXEC_STACK): Define as 1.
	* arm.c (arm_file_end): If NEED_INDICATE_EXEC_STACK call 
	file_end_indicate_exec_stack. 
	* arm.h [!NEED_INDICATE_EXEC_STACK] (NEED_INIDCATE_EXEC_STACK): 
	Define as 0.
	* lib1funcs.asm [__ELF__ && __linux__]: Emit .note.GNU-stack section
	for a non-executable stack.
	* crti.asm: Likewise.
	* crtn.asm: Likewise.
	* libunwind.S: Likewise.

From-SVN: r118445
2006-11-03 00:59:32 +00:00
Ben Elliston
50f606a629 tree-ssa.c (warn_uninit): Use expand_location variables for locus and declaration locus.
* tree-ssa.c (warn_uninit): Use expand_location variables for
	locus and declaration locus.

From-SVN: r118444
2006-11-03 11:56:35 +11:00
GCC Administrator
bf821e6ad5 Daily bump.
From-SVN: r118442
2006-11-03 00:17:46 +00:00
Kaz Kojima
537426e7ad re PR target/27405 (gcc.c-torture/execute/960209-1.c ICEs on sh64-* with -O3)
PR target/27405
	* config/sh/sh.md (cmp{eq,gt,gtu}{si,di}_media): Remove.
	(cmpsi{eq,gt,gtu}{si,di}_media): Rename to
	cmp{eq,gt,gtu}{si,di}_media.
	(*cmpne0si_media): Remove.
	(*movsicc_umin): Adjust gen_cmp*_media call.
	(unordered): Change the mode of unordered and operands[1] to
	SImode.
	(seq): Adjust gen_cmp*_media calls.  Make the mode of
	a temporary result of compare SImode if needed.  If the mode
	of operands[0] is DImode, extend the temporary result to DImode.
	(slt, sle, sgt, sge, sgtu, sltu, sleu, sgue, sne): Likewise.
	(sunorderd): Change the mode of match_operand and unorderd to
	SImode.
	(cmpeq{sf,df}_media): Remove.
	(cmpsieq{sf,df}_media): Rename to cmpeq{sf,df}_media.
	(cmp{gt,ge,un}{sf,df}_media): Change the mode of match_operand
	and compare operation to SImode.

From-SVN: r118435
2006-11-02 22:57:13 +00:00
Mike Stump
a6f07cc35d * obj-c++.dg/const-str-9.mm: Don't run on 64-bit.
From-SVN: r118433
2006-11-02 22:01:36 +00:00
Mike Stump
b654d3320b * g++.old-deja/g++.abi/align.C: Enable for darwin.
From-SVN: r118431
2006-11-02 21:06:40 +00:00
Eric Botcazou
b3c9881c2d install.texi (sparc-sun-solaris2*): Update GMP/MPFR build instructions.
* doc/install.texi (sparc-sun-solaris2*): Update GMP/MPFR build
	instructions.
	(sparc64-sun-solaris2*): Likewise.

From-SVN: r118426
2006-11-02 20:43:19 +00:00
Paul Brook
50603eedf7 arm.c (arm_elf_asm_constructor): Remove ATTRIBUTE_UNUSED from priority argument.
2006-11-02  Paul Brook  <paul@codesourcery.com>

	gcc/
	* config/arm/arm.c (arm_elf_asm_constructor): Remove ATTRIBUTE_UNUSED
	from priority argument.  Use different section for non-default
	priority.
	* config/arm/elf.h: Remove definition of SUPPORTS_INIT_PRIORITY.

From-SVN: r118425
2006-11-02 20:18:42 +00:00
Andreas Tobler
88852cb512 objc-act.c (objc_finish_file): Remove ifdef clause for OBJCPLUS and content where we called cp_finish_file.
2006-11-02  Andreas Tobler  <a.tobler@schweiz.org>

	* objc-act.c (objc_finish_file): Remove ifdef clause for OBJCPLUS and
	content where we called cp_finish_file.

From-SVN: r118424
2006-11-02 21:03:40 +01:00
Eric Botcazou
55fc9e87b2 re PR other/29639 (ext/bitmap_allocator/check_allocate_max_size.cc execution test)
PR other/29639
	* except.c (switch_to_exception_section): Do not cache the section
	if named sections are supported and HAVE_LD_EH_GC_SECTIONS is defined
	and flag_function_sections is set.

From-SVN: r118422
2006-11-02 18:40:54 +00:00
Kaveh R. Ghazi
b68bcfff54 re PR middle-end/29335 (transcendental functions with constant arguments should be resolved at compile-time)
PR middle-end/29335
	* builtins.c (do_mpfr_sincos): New.
	(fold_builtin_1): Use it to fold builtin sincos.

testsuite:
	* gcc.dg/torture/builtin-math-3.c: Fix semicolons.
	(TESTIT_2P, TESTIT_2P_R): New macros.  Test sincos.

From-SVN: r118409
2006-11-02 03:20:49 +00:00
Roger Sayle
1d07712df0 darwin.h (CPP_SPEC): Handle -pthread, transforming it into -D_REENTRANT.
* config/darwin.h (CPP_SPEC): Handle -pthread, transforming
	it into -D_REENTRANT.

From-SVN: r118408
2006-11-02 02:37:38 +00:00
Roger Sayle
68b92f787e configure.ac (HAVE_AS_IX86_DIFF_SECT_DELTA): New test to determine whether the assembler supports taking the difference of...
* configure.ac (HAVE_AS_IX86_DIFF_SECT_DELTA): New test to determine
	whether the assembler supports taking the difference of symbols in
	different sections.  On x86/Solaris, GAS does but Solaris as doesn't.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/i386/sol2-10.h (JUMP_TABLES_IN_TEXT_SECTION): Define if
	the assembler doesn't support taking the difference of symbols in
	different sections, i.e. we're using the native solaris assembler.

From-SVN: r118405
2006-11-02 00:56:38 +00:00
GCC Administrator
fc354c12ad Daily bump.
From-SVN: r118403
2006-11-02 00:17:55 +00:00
Pete Steinmetz
44cd321ed8 invoke.texi: Add cpu_type power6x (RS/6000 and PowerPC Options): Add -mmfpgpr.
* doc/invoke.texi: Add cpu_type power6x
	(RS/6000 and PowerPC Options): Add -mmfpgpr.
	* config.gcc: Add cpu_type power6x.
	* configure.ac: Add test for mf{t,f}gpr instructions.
	(HAVE_AS_MFPGPR): New.
	* config.in: Regenerate.
	* configure: Regenerate.
	* config/rs6000/aix52.h (ASM_CPU_SPEC): Add power6x.
	* config/rs6000/rs6000.md (define_attr "type"): Add insert_dword,
	shift,trap,var_shift_rotate,cntlz,exts, var_delayed_compare, mffgpr
	and mftgpr attributes.
	(define_attr "cpu"): Add power6.
	Change instruction sequences to use new attributes.
	(floatsidf2,fix_truncdfsi2): use TARGET_MFPGPR.
	(fix_truncdfsi2_mfpgpr): New.
	(floatsidf_ppc64_mfpgpr): New.
	(floatsidf_ppc64): Added !TARGET_MFPGPR condition.
	(movdf_hardfloat64_mfpgpr,movdi_mfpgpr): New.
	(movdf_hardfloat64): Added !TARGET_MFPGPR condition.
	(movdi_internal64): Added !TARGET_MFPGPR and related conditions.
	(fix_truncdfsi2): Use gpc_reg_operand constraint.
	* config/rs6000/{6xx.md,power4.md,8540.md,603.md,mpc.md,
	7xx.md,rios2.md,7450.md,440.md,rios1.md,rs64.md,power5.md,40x.md}:
	Add descriptions for insert_dword, shift,trap,var_shift_rotate,
	cntlz,exts and var_delayed_compare.
	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
	_ARCH_PWR6X, if features enabled.
	* config/rs6000/rs6000.opt (mmfpgpr): New.
	* config/rs6000/rs6000.c (rs6000_align_branch_targets): New variable.
	(cached_can_issue_more): New variable.
	(processor_costs): Add power6_cost.
	(rs6000_sched_init): New function.
	(is_dispatch_slot_restricted): Deleted.
	(set_to_load_agen): New function.
	(is_load_insn,is_store_insn): New functions.
	(adjacent_mem_locations): New function.
	(insn_must_be_first_in_group): New function.
	(insn_must_be_last_in_group): New function.
	(rs6000_sched_reorder): New function.
	(rs6000_sched_reorder2): New function.
	(TARGET_SCHED_INIT,TARGET_SCHED_REORDER,
	TARGET_SCHED_REORDER2): Define.
	(processor_target_table): Use PROCESSOR_POWER6 for power6.
	Add power6x. Add MASK_MFPGPR for power6x.
	(POWERPC_MASKS): Add MASK_MFPGPR.
	(rs6000_override_options): Set rs6000_always_hint to false
	for power6.  Set rs6000_align_branch_targets. Replace
	rs6000_sched_groups check with rs6000_align_branch_targets.
	Use PROCESSOR_POWER6.
	(last_scheduled_insn): New variable.
	(load_store_pendulum): New variable.
	(rs6000_variable_issue): Set last_scheduled_insn and
	cached_can_issue_more.
	(rs6000_adjust_cost): Add power6 cost adjustments.
	(rs6000_adjust_priority): Replace is_dispatch_slot_restricted
	with insn_must_be_first_in_group. Add power6 priority adjustments.
	(rs6000_issue_rate): Add CPU_POWER6.
	(insn_terminates_group_p): Use insn_must_be_{first,last}_in_group.
	* config/rs6000/rs6000.h (processor_type): Add PROCESSOR_POWER6.
	(TARGET_MFPGPR): New.
	(SECONDARY_MEMORY_NEEDED): Use TARGET_MFPGPR.
	(ASM_CPU_SPEC): Add power6x.
	(SECONDARY_MEMORY_NEEDED): Added mode!=DFmode and mode!=DImode
	conditions.
	* config/rs6000/power6.md: New file.


Co-Authored-By: Peter Bergner <bergner@vnet.ibm.com>

From-SVN: r118396
2006-11-01 14:47:53 -06:00
Adam Nemet
293be7fd22 fold-mod-1.c: Match the leading 0x for the hexadecimal value.
* gcc.dg/fold-mod-1.c: Match the leading 0x for the
	hexadecimal value.
	* gcc.dg/tree-prof/val-prof-2.c: Likewise.
	* gcc.dg/pr14796-2.c: Likewise.

From-SVN: r118394
2006-11-01 19:22:02 +00:00
Adam Nemet
38b97f4da2 tree-pretty-print.c (dump_generic_node): Use HOST_WIDE_INT_PRINT to print high and low parts.
* tree-pretty-print.c (dump_generic_node) <INTEGER_CST>: Use
	HOST_WIDE_INT_PRINT to print high and low parts.  Use
	HOST_BITS_PER_WIDE_INT for the width of HOST_WIDE_INT.  When
	printing a hexadecimal number prefix it with 0x.

From-SVN: r118393
2006-11-01 19:19:28 +00:00
Chris Johns
f03668f6ee re PR bootstrap/28400 (install-driver is missing $(exeext) from gcc-$(version))
2006-11-01  Chris Johns <chris@contemporary.net.au>

        PR bootstrap/28400
        * Makefile.in (install-driver): Use exeext when installing
        $target-gcc-$version.

From-SVN: r118392
2006-11-01 19:01:36 +00:00
Doug Gregor
5812d1e465 c-common.c (flag_cpp0x): New.
2006-11-01	Douglas Gregor <doug.gregor@gmail.com>

	* c-common.c (flag_cpp0x): New.
	* c-common.h (flag_cpp0x): New.
	* c-cppbuiltin.c (c_cpp_builtins): If C++0x extensions are
	supported, define __GXX_EXPERIMENTAL_CPP0X__.
	* c-opts.c (set_std_cxx0x): New.
	(c_common_handle_option): Handle -std=c++0x, -std=gnu++0x.
	* c.opt (std=c++0x): Document.
	(std=gnu++0x): Ditto.
	* doc/cpp.texi: Document __GXX_EXPERIMENTAL_CPP0X__.
	* doc/invoke.texi: Document -std=c++0x, -std=gnu++0x.

From-SVN: r118389
2006-11-01 17:13:27 +00:00
Doug Gregor
966541e34d c-common.c (flag_cpp0x): New.
2006-11-01	Douglas Gregor <doug.gregor@gmail.com>

	* c-common.c (flag_cpp0x): New.
	* c-common.h (flag_cpp0x): New.
	* c-cppbuiltin.c (c_cpp_builtins): If C++0x extensions are
	supported, define __GXX_EXPERIMENTAL_CPP0X__.
	* c-opts.c (set_std_cxx0x): New.
	(c_common_handle_option): Handle -std=c++0x, -std=gnu++0x.
	* c.opt (std=c++0x): Document.
	(std=gnu++0x): Ditto.
	* doc/cpp.texi: Document __GXX_EXPERIMENTAL_CPP0X__.
	* doc/invoke.texi: Document -std=c++0x, -std=gnu++0x.

From-SVN: r118386
2006-11-01 16:29:06 +00:00
Eric Botcazou
36c90fd27a 20061101-1.c: New test.
* gcc.c-torture/execute/20061101-1.c: New test.

From-SVN: r118377
2006-11-01 12:09:25 +00:00
Eric Botcazou
cb953056bb Fix asm string.
From-SVN: r118374
2006-11-01 11:58:18 +00:00
Richard Guenther
7e35fcb30e i386.c (ix86_expand_rint): Fix issues with signed zeros.
2006-11-01  Richard Guenther  <rguenther@suse.de>

	* config/i386/i386.c (ix86_expand_rint): Fix issues with
	signed zeros.
	(ix86_expand_floorceildf_32): Likewise.
	(ix86_expand_floorceil): Likewise.
	(ix86_expand_trunc): Likewise.

	* testsuite/gcc.target/i386/fpprec-1.c: New testcase.

From-SVN: r118373
2006-11-01 11:38:06 +00:00
Andrew Pinski
4a574196f5 invoke.texi (-fkeep-inline-functions): Change "GNU C" to "GNU C89".
2006-10-31  Andrew Pinski  <pinskia@gmail.com>

        * doc/invoke.texi (-fkeep-inline-functions): Change "GNU C"
        to "GNU C89".

From-SVN: r118372
2006-10-31 23:28:53 -08:00
Danny Smith
97388150b4 target.h (targetm.cxx.use_atexit_for_cxa_atexit): New target hook.
* target.h (targetm.cxx.use_atexit_for_cxa_atexit): New target
	hook.
	* target-def.h: (TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT): Define
	default.
	* config/i386/mingw32.h (TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT):
	Override default.
	* doc/tm.texi (TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT): Document.
	* configure.ac (use_cxa_atexit): As a special case, don't test
	for libc definition of __cxa_atexit on mingw32
	* configure: Regenerate.
	* config.gcc (i[34567]86-pc-mingw32): Default to
	enable__cxa_atexit=yes.

cp

	* decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
	if targetm.cxx.use_atexit_for cxa_atexit.
	(start_cleanup_fn): Likewise.
	(register_dtor_fn): Likewise.

From-SVN: r118371
2006-11-01 06:23:12 +00:00
Kaveh R. Ghazi
e35ae5fe4e builtins.def (gamma, lgamma): Use ATTR_MATHFN_FPROUNDING_STORE.
* builtins.def (gamma, lgamma): Use ATTR_MATHFN_FPROUNDING_STORE.
	
testsuite:
	* gcc.dg/torture/builtin-attr-1.c: Don't test gamma/lgamma.
	* gcc.dg/torture/builtin-convert-1.c: Don't test lgamma.

From-SVN: r118366
2006-11-01 05:38:21 +00:00
Geoffrey Keating
58182de357 In gcc/: PR 23067
In gcc/:
	PR 23067
	* c-decl.c (start_struct): Don't create self-containing
	structures.
	* config/rs6000/rs6000.c (darwin_rs6000_special_round_type_align):
	New.
	* config/rs6000/rs6000-protos.h
	(darwin_rs6000_special_round_type_align): New.
	* config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Rewrite.
	(ROUND_TYPE_ALIGN): Use darwin_rs6000_special_round_type_align.
In gcc/testsuite/:
	PR 23067
	* gcc.target/powerpc/darwin-abi-3.c: Remove XFAIL.
	* gcc.target/powerpc/darwin-abi-6.c: Remove XFAIL.
	* gcc.target/powerpc/darwin-abi-7.c: Remove XFAIL.
	* gcc.target/powerpc/darwin-abi-8.c: Remove XFAIL.
	* gcc.target/powerpc/darwin-abi-9.c: Remove XFAIL.
	* gcc.target/powerpc/darwin-abi-10.c: Remove XFAIL.
	* gcc.target/powerpc/darwin-abi-11.c: Remove XFAIL.
In libobjc/:
	* encoding.c (darwin_rs6000_special_round_type_align): New.
In libffi/:
	* src/powerpc/ffi_darwin.c (darwin_adjust_aggregate_sizes): New.
	(ffi_prep_cif_machdep): Call darwin_adjust_aggregate_sizes for
	Darwin.
	* testsuite/libffi.call/nested_struct4.c: Remove Darwin XFAIL.
	* testsuite/libffi.call/nested_struct6.c: Remove Darwin XFAIL.

From-SVN: r118365
2006-11-01 05:28:41 +00:00
Eric Christopher
0e7e09dc1e builtin-bswap-1.c: New.
2006-10-31  Eric Christopher  <echristo@apple.com>
	    Falk Hueffner  <falk@debian.org>

	* gcc.dg/builtin-bswap-1.c: New.
	* gcc.dg/builtin-bswap-2.c: New.
	* gcc.dg/builtin-bswap-3.c: New.
	* gcc.dg/builtin-bswap-4.c: New.
	* gcc.dg/builtin-bswap-5.c: New.
	* gcc.target/i386/builtin-bswap-1.c: New.

Co-Authored-By: Falk Hueffner <falk@debian.org>

From-SVN: r118364
2006-11-01 05:20:05 +00:00
Geoffrey Keating
91053e6c25 Add missing genopinit.c change for revision 118361.
From-SVN: r118363
2006-11-01 05:17:14 +00:00
Geoffrey Keating
e430546039 In gcc/:
* toplev.c (compile_file): Call final_write_globals
	even if there have been errors.
In gcc/cp/:
	* decl2.c (cp_write_global_declarations): Rename from
	cp_finish_file.
	* cp-lang.c (finish_file): Don't call cp_finish_file.
	* cp-tree.h (cp_write_global_declarations): Rename from
	cp_finish_file.
	* cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
	cp_write_global_declarations.

From-SVN: r118362
2006-11-01 05:16:14 +00:00
Eric Christopher
167fa32c09 extend.texi (__builtin_bswap32): Document.
2006-09-07  Eric Christopher  <echristo@apple.com>
	    Falk Hueffner  <falk@debian.org>

	* doc/extend.texi (__builtin_bswap32): Document.
	(__builtin_bswap64): Ditto.
	* doc/libgcc.texi (bswapsi2): Document.
	(bswapdi2): Ditto.
	* doc/rtl.texi (bswap): Document.
	* optabs.c (expand_unop): Don't widen a bswap.
	(init_optabs): Init bswap. Set libfuncs explicitly
	for bswapsi2 and bswapdi2.
	* optabs.h (OTI_bswap): New.
	(bswap_optab): Ditto.
	* genopinit.c (optabs): Handle bswap_optab.
	* tree.h (tree_index): Add TI_UINT32_TYPE and
	TI_UINT64_TYPE.
	(uint32_type_node): New.
	(uint64_type_node): Ditto.
	* tree.c (build_common_tree_nodes_2): Initialize
	uint32_type_node and uint64_type_node.
	* builtins.c (expand_builtin_bswap): New.
	(expand_builtin): Call.
	(fold_builtin_bswap): New.
	(fold_builtin_1): Call.
	* fold-const.c (tree_expr_nonnegative_p): Return true
	for bswap.
	* builtin-types.def (BT_UINT32): New.
	(BT_UINT64): Ditto.
	(BT_FN_UINT32_UINT32): Ditto.
	(BT_FN_UINT64_UINT64): Ditto.
	* builtins.def (BUILT_IN_BSWAP32): New.
	(BUILT_IN_BSWAP64): Ditto.
	* rtl.def (BSWAP): New.
	* genattrtab.c (check_attr_value): New.
	* libgcc2.c (__bswapSI2): New.
	(__bswapDI2): Ditto.
	* libgcc2.h (__bswapSI2): Declare.
	(__bswapDI2): Ditto.
	* mklibgcc.in (lib2funcs): Add _bswapsi2 and _bswapdi2.
	* simplify-rtx.c (simplify_const_unary_operation): Return
	0 for BSWAP.
	* libgcc-std.ver (__bwapsi2): Add.
	(__bswapdi2): Ditto.
	* reload1.c (eliminate_regs_1): Add bswap.
	(elimination_effects): Ditto.
	* config/i386/i386.h (x86_bswap): New.
	(TARGET_BSWAP): Use.
	* config/i386/i386.c (x86_bswap): Set.

Co-Authored-By: Falk Hueffner <falk@debian.org>

From-SVN: r118361
2006-11-01 05:14:40 +00:00
Geoffrey Keating
5880f14fe8 In gcc/:
* coverage.c (coverage_checksum_string): Update comment.
	* dwarf2out.c (switch_to_eh_frame_section): Update for removal
	of get_file_function_name.
	* cgraphunit.c (cgraph_build_static_cdtor): Update for rename
	of get_file_function_name_long.
	* tree.c (get_file_function_name): Rename from
	get_file_function_name_long; improve comment; handle 'I' and 'D'
	specially when the target has ctor/dtor support; remove special
	handling for 'F'.
	(get_file_function_name): Remove.
	* tree.h (get_file_function_name): Rename from
        get_file_function_name_long.
	(get_file_function_name): Remove prototype.
In gcc/cp/:
	* name-lookup.c (get_anonymous_namespace_name): New.
	(push_namespace_with_attribs): Use get_anonymous_namespace_name.
	* decl2.c (start_objects): Update for rename of
	get_file_function_name_long.
In gcc/fortran/:
	* trans-decl.c (gfc_generate_constructors): Update for removal
	of get_file_function_name.

From-SVN: r118360
2006-11-01 05:06:12 +00:00
Geoffrey Keating
4d04fa0539 darwin.h (PREFERRED_DEBUGGING_TYPE): Remove.
* config/i386/darwin.h (PREFERRED_DEBUGGING_TYPE): Remove.
	* config/darwin.h (PREFERRED_DEBUGGING_TYPE): Set to DWARF2_DEBUG.

	* config/darwin.h (LINK_COMMAND_SPEC): Don't do weird things with -@.
	Call dsymutil when compiling and linking one or more source files
	in one step.

From-SVN: r118359
2006-11-01 04:55:19 +00:00
Geoffrey Keating
7eb0a43cd6 re PR target/15834 (NO_IMPLICIT_EXTERN_C should be gotten rid of)
PR 15834
	* config/darwin.h (NO_IMPLICIT_EXTERN_C): Define.

From-SVN: r118358
2006-11-01 04:53:33 +00:00
Geoffrey Keating
0a052b16fe re PR c/16622 ([C99] extern inline is handled wrong in C99 mode)
* c-decl.c (grokdeclarator): Don't set DECL_EXTERNAL on
	inline static functions in c99 mode.

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

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

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

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

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

From-SVN: r118356
2006-11-01 04:47:30 +00:00
Roger Sayle
682d039597 re PR middle-end/23470 (a*a (for floats) is not considered always postive (-ffast-math only))
PR middle-end/23470
	* tree.h (tree_expr_nonnegative_p): Return "bool" instead of "int".
	* fold-const.c (tree_expr_nonnegative_p): Likewise.  Consider
	pow(x,y) and powi(x,y) to be nonnegative if either x is nonnegative
	or y is an even integer.

	* gcc.dg/pr23470-1.c: New test case.

From-SVN: r118355
2006-11-01 02:56:45 +00:00
GCC Administrator
a3a1ebb559 Daily bump.
From-SVN: r118353
2006-11-01 00:17:53 +00:00
Bernhard Fischer
4143349751 re PR fortran/29537 (ICE in gfc_match_common for blank common in BLOCK DATA unit)
fortran/ChangeLog:
2006-11-01  Bernhard Fischer  <aldot@gcc.gnu.org>

        PR fortran/29537
        * trans-common.c (gfc_trans_common): If the blank common is
        in a procedure or program without a name then proc_name is null, so use
        the locus of the common.
        (gfc_sym_mangled_common_id): Fix whitespace.
        * match.c (gfc_match_common): Emit warning about blank common in
        block data.

testsuite/ChangeLog:
2006-11-01  Bernhard Fischer  <aldot@gcc.gnu.org>

        PR fortran/29537
        * gfortran.dg/blockdata_1.f90: Add warning about blank common in block
	data.
        * gfortran.dg/blockdata_2.f90: New testcase.

From-SVN: r118347
2006-11-01 00:38:58 +01:00
Eric Botcazou
af9d099362 20061031-1.c: New test.
* gcc.c-torture/execute/20061031-1.c: New test.

From-SVN: r118344
2006-10-31 23:29:06 +00:00
Thomas Koenig
8a7f7fb6de re PR libfortran/29627 ([4.1 only] partial unformatted reads shouldn't succeed)
2006-10-31  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/29627
	* libgfortran.h: Add ERROR_SHORT_RECORD
	* runtime/error.c (translate_error): Add case
	for ERROR_SHORT_RECORD.
	* io/transfer.c (read_block_direct):  Separate codepaths
	for stream and record unformatted I/O.  Remove unneeded
	tests for standard input, padding and formatted I/O.
	If the record is short, read in as much data as possible,
	then raise the error.

2006-10-31  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/29627
	* gfortran.dg/unf_short_record_1.f90:  New test.

From-SVN: r118341
2006-10-31 20:58:26 +00:00
Arnaud Charlet
401c8e8059 Fix typo.
From-SVN: r118340
2006-10-31 21:43:39 +01:00
François-Xavier Coudert
5d32fe7f45 * ChangeLog: Forgotten ChangeLog entry for previous commit.
From-SVN: r118339
2006-10-31 20:17:11 +00:00
Francois-Xavier Coudert
150675a88b re PR fortran/29067 (gfc_resolve_expr(): Bad expression type)
PR fortran/29067

	* decl.c (gfc_set_constant_character_len): NULL-terminate the
	character constant string.
	* data.c (create_character_intializer): Likewise.
	* expr.c (gfc_simplify_expr): NULL-terminate the substring
	character constant.
	* primary.c (match_hollerith_constant): NULL-terminate the
	character constant string.

	* gfortran.dg/pr29067.f: New test.

From-SVN: r118338
2006-10-31 20:15:22 +00:00
Arnaud Charlet
70198b9f22 Resync.
From-SVN: r118337
2006-10-31 21:11:46 +01:00
Joseph Myers
c03b92063a target-supports.exp (get_compiler_messages): Append options as a single list element.
2006-10-31  Joseph Myers  <joseph@codesourcery.com>
            Richard Sandiford  <richard@codesourcery.com>

	* lib/target-supports.exp (get_compiler_messages): Append options
	as a single list element.
	(check_effective_target_arm_vfp_ok): New.
	* gcc.dg/arm-vfp1.c: Use arm_vfp_ok.

Co-Authored-By: Richard Sandiford <richard@codesourcery.com>

From-SVN: r118334
2006-10-31 19:58:21 +00:00
Arnaud Charlet
b5ace3b783 Resync.
From-SVN: r118333
2006-10-31 19:21:54 +01:00
Arnaud Charlet
ea7339d1fb Add new Ada test cases.
From-SVN: r118332
2006-10-31 19:20:42 +01:00
Eric Botcazou
c8945d5632 gigi.h: (tree_code_for_record_type): Declare.
2006-10-31  Eric Botcazou  <ebotcazou@adacore.com>
	    Nicolas Setton  <setton@adacore.com>
	    Olivier Hainque  <hainque@adacore.com>
	    Gary Dismukes  <dismukes@adacore.com>

	* gigi.h: (tree_code_for_record_type): Declare.
	(add_global_renaming_pointer): Rename to record_global_renaming_pointer.
	(get_global_renaming_pointers): Rename to
	invalidate_global_renaming_pointers.
	(static_ctors): Delete.
	(static_dtors): Likewise.
	(gnat_write_global_declarations): Declare.
	(create_var_decl): Adjust descriptive comment to indicate that the
	subprogram may return a CONST_DECL node.
	(create_true_var_decl): Declare new function, similar to
	create_var_decl but forcing the creation of a VAR_DECL node.
	(get_global_renaming_pointers): Declare.
	(add_global_renaming_pointer): Likewise.

	* ada-tree.h (DECL_READONLY_ONCE_ELAB): New macro.

	* decl.c (gnat_to_gnu_entity) <case E_Function>: Don't copy the type
	tree before setting TREE_ADDRESSABLE for by-reference return mechanism
	processing.
	(gnat_to_gnu_entity): Remove From_With_Type from computation for
	imported_p.
	<E_Access_Type>: Use the Non_Limited_View as the full view of the
	designated type if the pointer comes from a limited_with clause.  Make
	incomplete designated type if it is in the main unit and has a freeze
	node.
	<E_Incomplete_Type>: Rework to treat Non_Limited_View, Full_View, and
	Underlying_Full_View similarly.  Return earlier if the full view already
	has an associated tree.
	(gnat_to_gnu_entity) <E_Record_Type>: Restore comment.
	(gnat_to_gnu_entity) <E_Record_Type>: Do not use a dummy type.
	(gnat_to_gnu_entity) <E_Variable>: Set TYPE_REF_CAN_ALIAS_ALL on the
	reference type built for objects with an address clause.
	Use create_true_var_decl with const_flag set for
	DECL_CONST_CORRESPONDING_VARs, ensuring a VAR_DECL is created with
	TREE_READONLY set.
	(gnat_to_gnu_entity, case E_Enumeration_Type): Set TYPE_NAME
	for Character and Wide_Character types. This info is read by the
	dwarf-2 writer, and is needed to be able to use the command "ptype
	character" in the debugger.
	(gnat_to_gnu_entity): When generating a type representing
	a Character or Wide_Character type, set the flag TYPE_STRING_FLAG,
	so that debug writers can distinguish it from ordinary integers.
	(elaborate_expression_1): Test the DECL_READONLY_ONCE_ELAB flag in
	addition to TREE_READONLY to assert the constantness of variables for
	elaboration purposes.
	(gnat_to_gnu_entity, subprogram cases): Change loops on formal
	parameters to call new Einfo function First_Formal_With_Extras.
	(gnat_to_gnu_entity): In type_annotate mode, replace a discriminant of a
	protected type with its corresponding discriminant, to obtain a usable
	declaration
	(gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Be prepared
	for a multiple elaboration of the "equivalent" type.
	(gnat_to_gnu_entity): Adjust for renaming of add_global_renaming_pointer
	into record_global_renaming_pointer.
	(gnat_to_gnu_entity) <E_Array_Type>: Do not force
	TYPE_NONALIASED_COMPONENT to 0 if the element type is an aggregate.
	<E_Array_Subtype>: Likewise.
	(gnat_to_gnu_entity) <E_Incomplete_Subtype>: Add support for regular
	incomplete subtypes and incomplete subtypes of incomplete types visible
	through a limited with clause.
	(gnat_to_gnu_entity) <E_Array_Subtype>: Take into account the bounds of
	the base index type for the maximum size of the array only if they are
	constant.
	(gnat_to_gnu_entity, renaming object case): Do not wrap up the
	expression into a SAVE_EXPR if stabilization failed.

	* utils.c (create_subprog_decl): Turn TREE_ADDRESSABLE on the type of
	a result decl into DECL_BY_REFERENCE on this decl, now what is expected
	by lower level compilation passes.
	(gnat_genericize): New function, lowering a function body to GENERIC.
	Turn the type of RESULT_DECL into a real reference type if the decl
	has been marked DECL_BY_REFERENCE, and adjust references to the latter
	accordingly.
	(gnat_genericize_r): New function. Tree walking callback for
	gnat_genericize.
	(convert_from_reference, is_byref_result): New functions. Helpers for
	gnat_genericize_r.
	(create_type_decl): Call gnat_pushdecl before calling
	rest_of_decl_compilation, to make sure that field TYPE_NAME of
	type_decl is properly set before calling the debug information writers.
	(write_record_type_debug_info): The heuristics which compute the
	alignment of a field in a variant record might not be accurate. Add a
	safety test to make sure no alignment is set to a smaller value than
	the alignment of the field type.
	(make_dummy_type): Use the Non_Limited_View as the underlying type if
	the type comes from a limited_with clause. Do not loop on the full view.
	(GET_GNU_TREE, SET_GNU_TREE, PRESENT_GNU_TREE): New macros.
	(dummy_node_table): New global variable, moved from decl.c.
	(GET_DUMMY_NODE, SET_DUMMY_NODE, PRESENT_DUMMY_NODE): New macros.
	(save_gnu_tree): Use above macros.
	(get_gnu_tree): Likewise.
	(present_gnu_tree): Likewise.
	(init_dummy_type): New function, moved from decl.c. Use above macros.
	(make_dummy_type): Likewise.
	(tree_code_for_record_type): New function extracted from make_dummy_type
	(init_gigi_decls): Set DECL_IS_MALLOC on gnat_malloc.
	(static_ctors): Change it to a vector, make static.
	(static_dtors): Likewise.
	(end_subprog_body): Adjust for above change.
	(build_global_cdtor): Moved from trans.c.
	(gnat_write_global_declarations): Emit global constructor and
	destructor, and call cgraph_optimize before emitting debug info for
	global declarations.
	(global_decls): New global variable.
	(gnat_pushdecl): Store the global declarations in global_decls, for
	later use.
	(gnat_write_global_declarations): Emit debug information for global
	 declarations.
	(create_var_decl_1): Former create_var_decl, with an extra argument to
	 state whether the creation of a CONST_DECL is allowed.
	(create_var_decl): Behavior unchanged. Now a wrapper around
	create_var_decl_1 allowing CONST_DECL creation.
	(create_true_var_decl): New function, similar to create_var_decl but
	forcing the creation of a VAR_DECL node (CONST_DECL not allowed).
	(create_field_decl): Do not always mark the field as addressable
	if its type is an aggregate.
	(global_renaming_pointers): New static variable.
	(add_global_renaming_pointer): New function.
	(get_global_renaming_pointers): Likewise.

	* misc.c (gnat_dwarf_name): New function.
	(LANG_HOOKS_DWARF_NAME): Define to gnat_dwarf_name.
	(gnat_post_options): Add comment about structural alias analysis.
	(gnat_parse_file): Do not call cgraph_optimize here.
	(LANG_HOOKS_WRITE_GLOBALS): Define to gnat_write_global_declarations.

	* trans.c (process_freeze_entity): Don't abort if we already have a
	non dummy GCC tree for a Concurrent_Record_Type, as it might
	legitimately have been elaborated while processing the associated
	Concurrent_Type prior to this explicit freeze node.
	(Identifier_to_gnu): Do not make a variable referenced in a SJLJ
	exception handler volatile if it is of variable size.
	(process_type): Remove bypass for types coming from a limited_with
	clause.
	(call_to_gnu): When processing the copy-out of a N_Type_Conversion GNAT
	actual, convert the corresponding gnu_actual to the real destination
	type when necessary.
	(add_decl_expr): Set the DECL_READONLY_ONCE_ELAB flag on variables
	originally TREE_READONLY but whose elaboration cannot be performed
	statically.
	Part of fix for F504-021.
	(tree_transform, subprogram cases): Change loops on formal parameters to
	call new Einfo function First_Formal_With_Extras.
	(gnat_to_gnu) <N_Op_Shift_Right_Arithmetic>: Ignore constant overflow
	stemming from type conversion for the lhs.
	(Attribute_to_gnu) <Attr_Alignment>: Also divide the alignment by the
	number of bits per unit for components of records.
	(gnat_to_gnu) <N_Code_Statement>: Mark operands addressable if needed.
	(Handled_Sequence_Of_Statements_to_gnu): Register the cleanup associated
	with At_End_Proc after the SJLJ EH cleanup.
	(Compilation_Unit_to_gnu): Call elaborate_all_entities only on the main
	compilation unit.
	(elaborate_all_entities): Do not retest type_annotate_only.
	(tree_transform) <N_Abstract_Subprogram_Declaration>: Process the
	result type of an abstract subprogram, which may be an itype associated
	with an anonymous access result (related to AI-318-02).
	(build_global_cdtor): Move to utils.c.
	(Case_Statement_to_gnu): Avoid adding the choice of a when statement if
	this choice is not a null tree nor an integer constant.
	(gigi): Run unshare_save_expr via walk_tree_without_duplicates
	on the body of elaboration routines instead of mark_unvisited.
	(add_stmt): Do not mark the tree.
	(add_decl_expr): Tweak comment.
	(mark_unvisited): Delete.
	(unshare_save_expr): New static function.
	(call_to_gnu): Issue an error when making a temporary around a
	procedure call because of non-addressable actual parameter if the
	type of the formal is by_reference.
	(Compilation_Unit_to_gnu): Invalidate the global renaming pointers
	after building the elaboration routine.

From-SVN: r118331
2006-10-31 19:19:52 +01:00
Robert Dewar
bfc8aa81e4 fmap.adb: Put routines in alpha order
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Thomas Quinot  <quinot@adacore.com>
	    Arnaud Charlet  <charlet@adacore.com>

	* fmap.adb: Put routines in alpha order

	* g-boumai.ads: Remove redundant 'in' keywords

	* g-cgi.adb: Minor reformatting

	* g-cgi.ads: Remove redundant 'in' keywords

	* get_targ.adb: Put routines in alpha order

	* prj-attr.ads: Minor reformatting

	* s-atacco.ads: Minor reformatting

	* scn.adb: Put routines in alpha order

	* sinput-l.adb: Minor comment fix

	* sinput-p.adb: Minor comment fix

	* s-maccod.ads: Minor reformatting

	* s-memory.adb: Minor reformatting

	* s-htable.adb: Fix typo in comment.

	* s-secsta.adb: Minor comment update.

	* s-soflin.adb: Minor reformatting

	* s-stoele.ads: 
	Add comment about odd qualification in Storage_Offset declaration

	* s-strxdr.adb: 
	Remove unnecessary 'in' keywords for formal parameters.

	* treeprs.adt: Minor reformatting

	* urealp.adb: Put routines in alpha order

	* s-wchcon.ads, s-wchcon.adb (Get_WC_Encoding_Method): New version
	taking string.

	* s-asthan-vms-alpha.adb: Remove redundant 'in' keywords

	* g-trasym-vms-ia64.adb: Remove redundant 'in' keywords

	* env.c (__gnat_unsetenv): Unsetenv is unavailable on LynxOS, so
	workaround as on other platforms.

	* g-eacodu-vms.adb: Remove redundant 'in' keywords
	* g-expect-vms.adb: Remove redundant 'in' keywords

	* gnatdll.adb (Add_Files_From_List): Handle Name_Error and report a
	clear error message if the list-of-files file cannot be opened.

	* g-thread.adb (Unregister_Thread_Id): Add use type Thread_Id so the
	equality operator is always visible.

	* lang.opt: Woverlength-strings: New option.

	* nmake.adt: 
	Update copyright, since nmake.ads and nmake.adb have changed.

	* osint-b.ads, osint-b.adb (Time_From_Last_Bind): removed function .
	(Binder_Output_Time_Stamps_Set): removed.
	(Old_Binder_Output_Time_Stamp): idem.
	(New_Binder_Output_Time_Stamp): idem.
	(Recording_Time_From_Last_Bind): idem.
	(Recording_Time_From_Last_Bind): Make constant.

	* output.ads, output.adb (Write_Str): Allow LF characters
	(Write_Spaces): New procedure

	* prepcomp.adb (Preproc_Data_Table): Change Increment from 5% to 100%

	* inline.adb: Minor reformatting

	* s-asthan-vms-alpha.adb: Remove redundant 'in' keywords

	* s-mastop-vms.adb: Remove redundant 'in' keywords

	* s-osprim-vms.adb: Remove redundant 'in' keywords

	* s-trafor-default.adb: Remove redundant 'in' keywords

	* 9drpc.adb: Remove redundant 'in' keywords

	* s-osinte-mingw.ads: Minor reformatting

	* s-inmaop-posix.adb: Minor reformatting

	* a-direio.ads: Remove quotes from Compile_Time_Warning message

	* a-exexda.adb: Minor code reorganization

	* a-filico.adb: Minor reformatting

	* a-finali.adb: Minor reformatting

	* a-nudira.ads: Remove quote from Compile_Time_Warning message

	* a-numeri.ads: Minor reformatting

	* a-sequio.ads: Remove quotes from Compile_Time_Warning message

	* exp_pakd.ads: Fix obsolete comment

	* a-ztenau.adb, a-ztenio.adb, a-wtenau.adb, a-tienau.adb,
	a-wtenio.adb (Put): Avoid assuming low bound of string is 1.
	Probably not a bug, but certainly neater and more efficient.

	* a-tienio.adb: Minor reformatting

	* comperr.adb (Compiler_Abort): Call Cancel_Special_Output at start
	Avoid assuming low bound of string is 1.

	* gnatbind.adb: Change Bindusg to package and rename procedure as
	Display, which now ensures that it only outputs usage information once.
	(Scan_Bind_Arg): Avoid assuming low bound of string is 1.

	* g-pehage.adb (Build_Identical_Keysets): Replace use of 1 by
	Table'First.

	* g-regpat.adb (Insert_Operator): Add pragma Warnings (Off) to kill
	warning.
	(Match): Add pragma Assert to ensure that Matches'First is zero

	* g-regpat.ads (Match): Document that Matches lower bound must be zero

	* makeutl.adb (Is_External_Assignment): Add pragma Assert's to check
	documented preconditions (also kills warnings about bad indexes).

	* mdll.adb (Build_Dynamic_Library): Avoid assumption that Afiles'First
	is 1.
	(Build_Import_Library): Ditto;

	* mdll-utl.adb: (Gnatbind): Avoid assumption that Alis'First = 1

	* rtsfind.adb (RTE_Error_Msg): Avoid assuming low bound of string is 1.

	* sem_case.adb (Analyze_Choices): Add pragma Assert to check that
	lower bound of choice table is 1.

	* sem_case.ads (Analyze_Choices): Document that lower bound of
	Choice_Table is 1.

	* s-imgdec.adb (Set_Decimal_Digits): Avoid assuming low bound of
	string is 1.

	* uintp.adb (Init_Operand): Document that low bound of Vec is always 1,
	and add appropriate Assert pragma to suppress warnings.

	* atree.h, atree.ads, atree.adb
	Change Elist24 to Elist25
	Add definitions of Field28 and Node28
	(Traverse_Field): Use new syntactic parent table in sinfo.

	* cstand.adb: Change name Is_Ada_2005 to Is_Ada_2005_Only

	* itypes.adb: Change name Is_Ada_2005 to Is_Ada_2005_Only

	* exp_tss.adb: Put routines in alpha order

	* fe.h: Remove redundant declarations.

From-SVN: r118330
2006-10-31 19:16:03 +01:00
Robert Dewar
e0ae4e94e9 s-osinte-tru64.adb: Mark Asm statements Volatile to prevent warnings (seems a reasonable change...
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* s-osinte-tru64.adb: 
	Mark Asm statements Volatile to prevent warnings (seems a
	reasonable change anyway)
	Fixes new warnings

	* s-mastop-irix.adb: Add Volatile to Asm statements
	Suppresses warning, and seems appropriate in any case

	* s-osinte-vms.adb: Add Volatile to Asm statement

	* s-vaflop-vms-alpha.adb: Add Volatile to Asm statements

	* exp_code.ads, exp_code.adb (Asm_Input_Value): Note that Error can be
	returned.
	Add call to Check_Code_Statement

From-SVN: r118329
2006-10-31 19:15:40 +01:00
Robert Dewar
ba1cbfb946 debug.adb: Update flags documentation
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Cyrille Comar  <comar@adacore.com>
	    Ben Brosgol  <brosgol@adacore.com>

	* debug.adb:  Update flags documentation

        * gnat_ugn.texi: Add documentation for new -gnatwq switch
        Clean up documentation for several other warning switches
        Clarify how task stack size can be specified with various
        versions of Windows.
        Add note that -gnatVo includes ranges including loops
	Add documentation for -gnatL switch
	Add note on elaboration warning for initializing variables
	Add documentation for new -gnatwt warning switch
	Document new form of pragma Warnings (On|Off, string)
	Add comment on use of pragma Warnings to control warnings
	Add documentation for -gnatjnn switch
	Modify section on interfacing with C for VMS 64-bit.
	Add doc for -gnatVe/E
	Add documentation of new warning flags -gnatww/-gnatwW
	Add warnings about address clause overlays to list of warnings
	(Exception Handling Control): Document that the option --RTS must be
	used consistently for gcc and gnatbind.
	Clarify that inlining is not always possible
	Update documentation on pragma Unchecked_Union.

	* gnat_rm.texi: 
	Add documentation for new extended version of pragma Obsolescent
	Add documentation for implementation defined attribute 'Stub_Type.
	Add note on use of Volatile in asm statements
	Add documentation on use of pragma Unreferenced in context clause
	Document new form of pragma Warnings (On|Off, pattern)
	Document pragma Wide_Character_Encoding
	Add note that pragma Restrictions (No_Elaboration_Code) is only fully
	enforced if code generation is active.
	Add section on pragma Suppress to document GNAT specific check
	Alignment_Check
	Clarify difference between No_Dispatching_Calls & No_Dispatch.
	Add documentation for pragma Restrictions (No_Elaboration_Code)

	* gnat-style.texi: 
	Add comments on layout of subprogram local variables in the
	presence of nested subprograms.

        * ug_words: Resync.

	* elists.ads: Minor reformatting
	Node returns Node_Or_Entity_Id (doc change only)

	* xgnatugn.adb: Replace ACADEMICEDITION with GPLEDITION

	* g-arrspl.ads (Create): Update comments.

	* sem.ads: Add details on the handling of the scope stack.

        * usage.adb: Update documentation.

	* validsw.ads, validsw.adb: 
	Add definition of Validity_Check_Components and implement -gnatVe/E

        * vms_data.ads: Add missing VMS qualifiers.

	* s-addope.ads: Add documentation on overflow and divide by zero

From-SVN: r118328
2006-10-31 19:14:24 +01:00
Pat Rogers
ab31b1a60f a-rttiev.ads, [...]: This is a significant redesign primarily for the sake of automatic timer task...
2006-10-31  Pat Rogers  <rogers@adacore.com>

	* a-rttiev.ads, a-rttiev.adb: 
	This is a significant redesign primarily for the sake of automatic
	timer task termination but also to fix a design flaw.
	Therefore we are now using an RTS lock, instead of a protected
	object, to provide mutual exclusion to the queue of pending events
	and the type Timing_Event is no longer a protected type.

From-SVN: r118327
2006-10-31 19:14:09 +01:00
Vincent Celier
7440d86c98 symbols-processing-vms-ia64.adb, [...] (Process): Do not include symbols that come from generic instantiations in bodies.
2006-10-31  Vincent Celier  <celier@adacore.com>

	* symbols-processing-vms-ia64.adb,
	symbols-processing-vms-alpha.adb (Process): Do not include symbols
	that come from generic instantiations in bodies.

From-SVN: r118326
2006-10-31 19:13:55 +01:00
Doug Rupp
c5e2b716b0 g-trasym-vms-alpha.adb: Dummy_User_Act_Proc: New function.
2006-10-31  Doug Rupp  <rupp@adacore.com>

	* g-trasym-vms-alpha.adb: Dummy_User_Act_Proc: New function.
	Call TBK$SYMBOLIZE without omitting parameters.

From-SVN: r118325
2006-10-31 19:13:39 +01:00
Matt Heaney
3837bc7f86 a-crbtgo.ads: Commented each subprogram
2006-10-31  Matt Heaney  <heaney@adacore.com>

	* a-crbtgo.ads: Commented each subprogram

	* a-crbtgo.adb: Added reference to book from which algorithms were
	adapted.

        * a-crbtgk.ads, a-crbtgk.adb (Generic_Insert_Post): pass flag to
	indicate which child.
	(Generic_Conditional_Insert): changed parameter name from "Success" to
	"Inserted".
	(Generic_Unconditional_Insert_With_Hint): improved algorithm

	* a-coorse.adb (Replace_Element): changed parameter name in call to
	conditional insert operation.

	* a-convec.adb, a-coinve.adb (Insert): removed obsolete comment

	* a-cohama.adb (Iterate): manipulate busy-bit here, instead of in
	Generic_Iteration

	* a-ciorse.adb (Replace_Element): changed parameter name in call to
	conditional insert operation.

	* a-cihama.adb (Iterate): manipulate busy-bit here, instead of in
	Generic_Iteration.

	* a-cidlli.ads, a-cidlli.adb (Splice): Position param is now mode in
	instead of mode inout.

	* a-chtgop.adb (Adjust): modified comments to reflect current AI-302
	draft
	(Generic_Read): preserve existing buckets array if possible
	(Generic_Write): don't send buckets array length anymore

	* a-cdlili.ads, a-cdlili.adb (Splice): Position param is now mode in
	instead of mode inout.

	* a-cihase.adb (Difference): iterate over smaller of Tgt and Src sets
	(Iterate): manipulate busy-bit here, instead of in Generic_Iteration

	* a-cohase.adb (Difference): iterate over smaller of Tgt and Src sets
	(Iterate): manipulate busy-bit here, instead of in Generic_Iteration
	(Replace_Element): local operation is now an instantiation

	* a-chtgke.ads, a-chtgke.adb (Generic_Conditional_Insert): manually
	check current length.
	(Generic_Replace_Element): new operation

From-SVN: r118324
2006-10-31 19:13:22 +01:00
Vincent Celier
31a3312587 makegpr.adb (Check_Compilation_Needed): Take into account path names with spaces.
2006-10-31  Vincent Celier  <celier@adacore.com>

	* makegpr.adb (Check_Compilation_Needed): Take into account path names
	with spaces.
	(Check_Compilation_Needed): When checking a C or C++ source, do not
	resolve symbolic links.
	(Display_Command): New Boolean parameter Ellipse, defaulted to False.
	When not in verbose mode and Ellipse is True, display "..." for the
	first argument with Display set to False.
	(Build_Global_Archive): Always set Display True for the first object
	file. Call Display_Command with Ellipse set to True.

From-SVN: r118323
2006-10-31 19:13:06 +01:00
Vincent Celier
57d9e177cc a-direct.ads, [...] (Search): New procedure in Ada 2005
2006-10-31  Vincent Celier  <celier@adacore.com>

	* a-direct.ads, a-direct.adb (Search): New procedure in Ada 2005

From-SVN: r118322
2006-10-31 19:12:50 +01:00
Vincent Celier
271ae089f3 a-dirval-vms.adb (Invalid_Character): Specify that digits are allowed in file names.
2006-10-31  Vincent Celier  <celier@adacore.com>

	* a-dirval-vms.adb (Invalid_Character): Specify that digits are allowed
	in file names.

From-SVN: r118321
2006-10-31 19:12:34 +01:00
Olivier Hainque
99f503294e s-stchop.ads: make this unit preelaborate.
2006-10-31  Olivier Hainque  <hainque@adacore.com>

	* s-stchop.ads: make this unit preelaborate. This is desirable in
	general and made mandatory by the use of this unit by s-taprop which
	is itself preelaborate.

	* s-stchop-vxworks.adb (Set_Stack_Info, Task_Descriptor type): Add
	Td_Events component.

From-SVN: r118320
2006-10-31 19:12:23 +01:00
Robert Dewar
86e16c560d widechar.adb (Is_Start_Of_Wide_Char): In case of brackets encoding...
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* widechar.adb (Is_Start_Of_Wide_Char): In case of brackets encoding,
	add more precise check for the character sequence that follows '[' to
	avoid possible confusion in case if '[' is the last character of a
	string literals.
	(Scan_Wide): Always allow brackets encoding

From-SVN: r118319
2006-10-31 19:12:08 +01:00
Jose Ruiz
c0297c4773 s-tpobop.adb (Requeue_Call): Introduce a dispatching point when requeuing to the same protected object to...
2006-10-31  Jose Ruiz  <ruiz@adacore.com>

	* s-tpobop.adb (Requeue_Call): Introduce a dispatching point when
	requeuing to the same protected object to give higher priority tasks
	the opportunity to execute.

From-SVN: r118318
2006-10-31 19:11:57 +01:00
Javier Miranda
15b540bec8 2006-10-31 Javier Miranda <miranda@adacore.com>
* s-tpoben.ads, s-tpoben.adb, s-taprob.ads, s-taprob.adb
	(Get_Ceiling): New subprogram that returns
	the ceiling priority of the protected object.
	(Set_Ceiling): New subprogram that sets the new ceiling priority of
	the protected object.

	* s-tarest.adb: (Create_Restricted_Task): Fix potential CE.

	* s-taskin.ads, s-taskin.adb: (Storage_Size): New function.

From-SVN: r118317
2006-10-31 19:11:44 +01:00
Gary Dismukes
d5ef47fb25 s-scaval.adb (Initialize): Add new Boolean flag AFloat that is set True when...
2006-10-31  Gary Dismukes  <dismukes@adacore.com>

	* s-scaval.adb (Initialize): Add new Boolean flag AFloat that is set
	True when AAMP extended floating-point is in use (48-bit). Change type
	ByteLF to ByteLLF, add new array type ByteLF and condition the size of
	the two byte array types on AFloat. Change type of IV_Ilf overlay
	variable from Byte8 to ByteLF. Add appropriate initializations of
	floating-point overlays for AAMP cases.

From-SVN: r118316
2006-10-31 19:11:33 +01:00
Arnaud Charlet
f7753fbb7e s-restri.ads, [...]: Mark this package as Preelaborate.
2006-10-31  Arnaud Charlet  <charlet@adacore.com>

	* s-restri.ads, s-restri.adb: Mark this package as Preelaborate.
	Remove elaboration code, now done in the binder.

	* s-rident.ads: Make this unit Preelaborate.
	(No_Restrictions): New constant used to clean up code and follow
	preelaborate constraints.

	* s-stalib.adb: 
	Add System.Restrictions dependence, referenced directly from the
	binder generated file.

From-SVN: r118315
2006-10-31 19:11:19 +01:00
Ed Schonberg
39485a7b0c sprint.adb (Sprint_Node_Actual, [...]): Do not print null exclusion twice in the case of an access definition...
2006-10-31  Ed Schonberg  <schonberg@adacore.com>
	    Robert Dewar  <dewar@adacore.com>
	    Bob Duff  <duff@adacore.com>

	* sprint.adb (Sprint_Node_Actual, case Parameter_Specification): Do not
	print null exclusion twice in the case of an access definition,
	Implement new -gnatL switch
	Remove N_Return_Object_Declaration. We now use
	N_Object_Declaration instead. Implement the case for
	N_Extended_Return_Statement. Alphabetize the cases.
	Add cases for new nodes N_Extended_Return_Statement and
	N_Return_Object_Declaration. The code is not yet written.
	Update the output for N_Formal_Object_Declaration
	and N_Object_Renaming_Declaration.
	(Write_Itype): Account for the case of a modular integer subtype whose
	base type is private.

From-SVN: r118314
2006-10-31 19:11:05 +01:00
Robert Dewar
e3da30b2ef sinfo.ads, sinfo.adb (Set_Synchronized_Present, [...]): Add Formal_Derived_Type_Definition and Private_Extension_Declaration to the...
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>
	    Bob Duff  <duff@adacore.com>

	* sinfo.ads, sinfo.adb (Set_Synchronized_Present,
	Synchronized_Present): Add Formal_Derived_Type_Definition and
	Private_Extension_Declaration to the list of assertions.
	(Is_Entry_Barrier_Function): New flag
	(Has_Self_Reference): New flag on aggregates, to indicate that they
	contain a reference to the enclosing type, inserted through a default
	initialization.
	(Next_Rep_Item): Move from Node4 to Node5.
	(Entity): Add this field for N_Attribute_Definition_Clause.
	(Comes_From_Extended_Return_Statement): New flag on N_Return_Statement
	(N_Return_Object_Declaration): Remove this node kind. We now use
	N_Object_Declaration instead.
	(Actual_Designated_Subtype): Move to a different place to make room in
	N_Extended_Return_Statement.
	(Procedure_To_Call): Move to a different place to make room in
	N_Extended_Return_Statement.
	(Return_Type): Removed this field to make room in return statements
	(both kinds).
	(Return_Statement_Entity): New field in return statements, in part to
	replace Return_Type, and in part to support the fact that return
	statements are now pushed on the scope stack during semantic analysis.
	(Return_Object_Declarations): New field to support extended return
	statements.
	(N_Extended_Return_Statement): New node for extended_return_statement
	nonterminal.
	(N_Return_Object_Declaration): New node for part of
	extended_return_statement nonterminal. Needed because all the necessary
	fields won't fit in N_Extended_Return_Statement.
	Generic_associations now carry the Box_Present flag, to indicate a
	default for an actual in a partially parametrized formal package.

        * snames.h, snames.ads, snames.adb: Add definition for Validity_Check
	(Preset_Names): Add entries for Priority_Specific_Dispatching pragma
	and for the new predefined dispatching policies: EDF_Across_Priorities,
	Non_Preemptive_Within_Priorities, and Round_Robin_Within_Priorities.
	Introduce new name Stub_Type for implementation defined attribute.
	Add pragma Preelaborable_Initialization
	Add entry for Priority attribute.
	Add Pragma_Wide_Character_Encoding
	(Get_Convention_Name): Given a convention id, this function returns the
	corresponding name id from the names table.

From-SVN: r118313
2006-10-31 19:10:46 +01:00
Robert Dewar
9b0986f858 sem_util.ads, [...] (Enter_Name): Exclude -gnatwh warning messages for entities in packages which are not used.
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Hristian Kirtchev  <kirtchev@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>
        
        * sem_util.ads, sem_util.adb (Enter_Name): Exclude -gnatwh warning
	messages for entities in packages which are not used.
	(Collect_Synchronized_Interfaces): New procedure.
	(Overrides_Synchronized_Primitive): New function.
	(Denotes_Discriminant): Extend predicate to apply to task types.
	Add missing continuation marks in error msgs
	(Unqualify): New function for removing zero or more levels of
	qualification from an expression. There are numerous places where this
	ought to be used, but we currently only deal properly with zero or one
	level.
	(In_Instance); The analysis of the actuals in the instantiation of a
	child unit is not within an instantiation, even though the parent
	instance is on the scope stack.
	(Safe_To_Capture_Value): Exclude the case of variables that are
	renamings.
	(Check_Obsolescent): Removed
	(Is_Aliased_View): A reference to an enclosing instance in an aggregate
	is an aliased view, even when rewritten as a reference to the target
	object in an assignment.
	(Get_Subprogram_Entity): New function
	(Known_To_Be_Assigned): New function
	(Type_Access_Level): Compute properly the access level of a return
	subtype that is an anonymous access type.
	(Explain_Limited_Type): Correct use of "\" for continuation messages.
	(Is_Transfer): The new extended_return_statement causes a transfer of
	control.
	(Has_Preelaborable_Initialization): New function
	(Has_Null_Exclusion): New function. Given a node N, determine whether it
	has a null exclusion depending on its Nkind.
	Change Is_Lvalue to May_Be_Lvalue
	(May_Be_Lvalue): Extensive additional code to deal with subprogram
	arguments (IN parameters are not Lvalues, IN OUT parameters are).
	(Safe_To_Capture_Value): Extend functionality so it can be used for
	the current value condition case.
	(Has_Compatible_Alignment): New function
	(Is_Dependent_Component_Of_Mutable_Object): Revise the tests for mutable
	objects to handle the Ada 2005 case, where aliasedness no longer implies
	that the object is constrained. In particular, for dereferenced names,
	the designated object must be assumed to be unconstrained.
	(Kill_Current_Values): Properly deal with the case where we encounter
	a loop in the scope chain.
	(Safe_To_Capture_Value): Do not let a loop stop us from capturing
	a value.
	(Compile_Time_Constraint_Error): Improve error message in error case

	* exp_ch13.adb (Expand_N_Freeze_Entity): Remove the freezing node
	associated with entities of abstract interface primitives.
	Call Apply_Address_Clause_Check instead of Apply_Alignment_Check

From-SVN: r118312
2006-10-31 19:10:11 +01:00
Ed Schonberg
60573ca25a sem_type.adb (Add_One_Interp): If node is an indirect call...
2006-10-31  Ed Schonberg  <schonberg@adacore.com>
	    Hristian Kirtchev  <kirtchev@adacore.com>
	    Javier Miranda  <miranda@adacore.com>

	* sem_type.adb (Add_One_Interp): If node is an indirect call, preserve
	subprogram type to provide better diagnostics in case of ambiguity.
	(Covers): Handle coverage of formal and actual anonymous access types in
	the context of generic instantiation.
	(Covers/Interface_Present_In_Ancestors): Use the base type to manage
	abstract interface types; this is required to handle concurrent types
	with discriminants and abstract interface types.
	(Covers): Include type coverage of both regular incomplete subtypes and
	incomplete subtypes of incomplete type visibles through a limited with
	clause.

From-SVN: r118311
2006-10-31 19:09:49 +01:00
Robert Dewar
29797f340d sem_eval.adb (Compile_Time_Compare): Make use of information from Current_Value in the conditional case...
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* sem_eval.adb (Compile_Time_Compare): Make use of information from
	Current_Value in the conditional case, to evaluate additional
	comparisons at compile time.

From-SVN: r118310
2006-10-31 19:09:38 +01:00
Robert Dewar
a5abb241f3 sem_elab.ads, [...] (Check_Elab_Assign): New procedure Add new calls to this procedure during traversal
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>

	* sem_elab.ads, sem_elab.adb (Check_Elab_Assign): New procedure
	Add new calls to this procedure during traversal
	(Activate_Elaborate_All_Desirable): Do not set elaboration flag on
	another unit if expansion is disabled.

From-SVN: r118309
2006-10-31 19:09:19 +01:00
Hristian Kirtchev
67f3c450aa sem_disp.adb (Check_Dispatching_Operation): Do not flag subprograms inherited from an interface ancestor by another...
2006-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>
	    Javier Miranda  <miranda@adacore.com>
	    Gary Dismukes  <dismukes@adacore.com>

	* sem_disp.adb (Check_Dispatching_Operation): Do not flag subprograms
	inherited from an interface ancestor by another interface in the
	context of an instance as 'late'.
	(Is_Tag_Indeterminate, Propagate_Tag): Handle properly the dereference
	of a call to a function that dispatches on access result.
	(Check_Dispatching_Operation): In case of late overriding of a primitive
	that covers abstract interface subprograms we register it in all the
	secondary dispatch tables associated with abstract interfaces.
	(Check_Dispatching_Call): Add check that a dispatching call is not made
	to a function with a controlling result of a limited type. This is a
	current implementation restriction.
	(Check_Controlling_Formal): Remove bogus checks for E.2.2(14).
	(Check_Dispatching_Operation): Do no emit a warning if the controlling
	argument is an interface type that is a generic formal.
	(Is_Interface_Subprogram): Removed.
	(Check_Dispatching_Operation): If the subprogram is not a dispatching
	operation, check the formals to handle the case in which it is
	associated with an abstract interface type.

From-SVN: r118308
2006-10-31 19:09:03 +01:00
Hristian Kirtchev
3100e48f7c sem_ch9.adb (Analyze_Protected_Definition): Remove call to Check_Overriding_Indicator.
2006-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>

	* sem_ch9.adb (Analyze_Protected_Definition): Remove call to
	Check_Overriding_Indicator.
	(Analyze_Task_Definition): Ditto.
	(Analyze_Protected_Type, Analyze_Task_Type): Code cleanup.
	(Check_Overriding_Indicator): To find overridden interface operation,
	examine only homonyms that have an explicit subprogram declaration, not
	inherited operations created by an unrelated type derivation.
	(Check_Overriding_Indicator): When checking for the presence of "null"
	in a procedure, ensure that the queried node is a procedure
	specification.
	(Matches_Prefixed_View_Profile): Add mechanism to retrieve the parameter
	type when the formal is an access to variable.
	(Analyze_Protected_Type): Add check for Preelaborable_Initialization
	(Analyze_Task_Type): Same addition
	(Analyze_Entry_Declaration): Call Generate_Reference_To_Formals, to
	provide navigation capabilities for entries.

From-SVN: r118307
2006-10-31 19:08:46 +01:00
Robert Dewar
923fa078d5 sem_ch8.adb: Minor error msg rewording
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Hristian Kirtchev  <kirtchev@adacore.com>
	    Javier Miranda  <miranda@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>
        
	* sem_ch8.adb: Minor error msg rewording
	(Undefined): When checking for misspellings, invert arguments (to get
	expected and found set right)
	(Analyze_Subprogram_Renaming): Propagate Is_Pure, Is_Preelaborated
	(Analyze_Generic_Renaming): Same fix
	(Use_One_Package): Do not take into account the internal entities of
	abstract interfaces during the analysis of entities that are marked
	as potentially use-visible.
	(Find_Type): Handle the case of an attribute reference for
	implementation defined attribute Stub_Type (simply let the analysis of
	the attribute reference rewrite it).
	(Use_One_Type, End_Use_Type): Reject a reference to a limited view of a
	type that appears in a Use_Type clause.
	(Analyze_Object_Renaming): Add support for renaming of the Priority
	attribute.
	(Find_Type): In Ada 2005, a task type can be used within its own body,
	when it appears in an access definition.
	(Analyze_Object_Renaming): Remove warning on null_exclusion.
	(Analyze_Object_Renaming): Introduce checks for required null exclusion
	 in a formal object declaration or in a subtype declaration.
	(Analyze_Subprogram_Renaming): Add call to Check_Null_Exclusion.
	(Check_Null_Exclusion): New local routine to
	Analyze_Subprogram_Renaming. Check whether the formals and return
	profile of a renamed subprogram have required null exclusions when
	their counterparts of the renaming already impose them.
	(In_Generic_Scope): New local routine to Analyze_Object_Renaming.
	Determine whether an entity is inside a generic scope.
	(In_Open_Scope): First pass of documentation update.
	(Find_Expanded_Name): Add support for shadow entities associated with
	limited withed packages. This is required to handle nested packages.
	(Analyze_Package_Renaming): Remove the restriction imposed by AI-217
	that makes a renaming of a limited withed package illegal.

From-SVN: r118306
2006-10-31 19:08:29 +01:00
Ed Schonberg
3b75bcab98 sem_ch7.adb (Check_Anonymous_Access_Types): New procedure...
2006-10-31  Ed Schonberg  <schonberg@adacore.com>
	    Javier Miranda  <miranda@adacore.com>

	* sem_ch7.adb (Check_Anonymous_Access_Types): New procedure, subsidiary
	of Analyze_Package_Body, to create Itype references for anonymous
	access types created in the package declaration, whose designated types
	may have only a limited view.
	(Analyze_Package_Specification): For the private part of a nested
	package, install private_with_clauses of enclosing compilation unit if
	we are in its visible part.
	(Declare_Inherited_Private_Subprograms): Complete barrier
	to ensure that the primitive operation has an alias to some parent
	primitive. This is now required because, after the changes done for the
	implementation of abstract interfaces, the contents of the list of
	primitives has entities whose alias attribute references entities of
	such list of primitives.
	(Analyze_Package_Specification): Simplify code that handles parent units
	of instances and formal packages.
	(Uninstall_Declarations): Check the convention consistency among
	primitive overriding operations of a tagged record type.

From-SVN: r118305
2006-10-31 19:08:12 +01:00
Ed Schonberg
ec4867fab9 sem_ch6.ads, [...] (Analyze_Subprogram_Declaration): A null procedure cannot be a protected operation (it is a basic_declaration...
2006-10-31  Ed Schonberg  <schonberg@adacore.com>
	    Hristian Kirtchev  <kirtchev@adacore.com>
	    Bob Duff  <duff@adacore.com>
        
	* sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Declaration): A null
	procedure cannot be a protected operation (it is a basic_declaration,
	not a subprogram_declaration).
	(Check_Overriding_Indicator): Rename formal Does_Override to Overridden_
	Subp. Add logic for entry processing.
	(Check_Synchronized_Overriding): New procedure in New_Overloaded_Entity.
	Determine whether an entry or subprogram of a protected or task type
	override an inherited primitive of an implemented interface.
	(New_Overloaded_Entity): Add calls to Check_Synchronized_Overriding.
	Update the actual used in calls to Check_Overriding_Indicator.
	(Analyze_Generic_Subprogram_Body): If the subprogram is a child unit,
	generate the proper reference to the parent unit, for cross-reference.
	(Analyze_Subprogram_Declaration): Protect Is_Controlling_Formal with
	Is_Formal.
	Add -gnatd.l --Use Ada 95 semantics for limited function returns,
	(Add_Extra_Formal): Revise procedure to allow passing in associated
	entity, scope, and name suffix, and handle setting of the new
	Extra_Formals field.
	(Create_Extra_Formals): Change existing calls to Add_Extra_Formal to
	pass new parameters. Add support for adding the new extra access formal
	for functions whose calls are treated as build-in-place.
	(Analyze_A_Return_Statement): Correct casing in error message.
	Move Pop_Scope to after Analyze_Function_Return, because an extended
	return statement really is a full-fledged scope. Otherwise, visibility
	doesn't work right. Correct use of "\" for continuation messages.
	(Analyze_Function_Return): Call Analyze on the Obj_Decl, rather than
	evilly trying to call Analyze_Object_Declaration directly. Otherwise,
	the node doesn't get properly marked as analyzed.
	(Analyze_Subprogram_Body): If subprogram is a function that returns
	an anonymous access type that denotes a task, build a Master Entity
	for it.
	(Analyze_Return_Type): Add call to Null_Exclusion_Static_Checks. Verify
	proper usage of null exclusion in a result definition.
	(Process_Formals): Code cleanup and new error message.
	(Process_Formals): Detect incorrect application of null exclusion to
	non-access types.
	(Conforming_Types): Handle conformance between [sub]types and itypes
	 generated for entities that have null exclusions applied to them.
	(Maybe_Primitive_Operation): Add an additional type retrieval when the
	 base type is an access subtype. This case arrises with null exclusions.
	(New_Overloaded_Entity): Do not remove the overriden entity from the
	homonym chain if it corresponds with an abstract interface primitive.
	(Process_Formals): Replace membership test agains Incomplete_Kind with a
	call to the synthesized predicate Is_Incomplete_Type.
	(Analyze_Subprogram_Body): Check wrong placement of abstract interface
	primitives.
	(Analyze_Subprogram_Declaration): Check that abstract interface
	primitives are abstract or null.
	(Analyze_Subprogram_Specification): Remove previous check for abstract
	interfaces because it was not complete.
	(Has_Interface_Formals): Removed.

From-SVN: r118304
2006-10-31 19:07:52 +01:00
Robert Dewar
2a806772b8 sem_ch5.ads, [...] (Analyze_Loop_Statement): Add circuit to warn on infinite loops.
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>
	    Gary Dismukes  <dismukes@adacore.com>

	* sem_ch5.ads, sem_ch5.adb (Analyze_Loop_Statement): Add circuit to
	warn on infinite loops.
	Add \\ to some continuation messages
	(Analyze_Assignment_Statement): Call Warn_On_Useless_Assignment
	(Process_Bounds): If the bounds are integer literals that result from
	constant-folding, and they carry a user-defined type, preserve that type
	rather than treating this as an integer range.
	(Analyze_Exit_Statement): Test for E_Return_Statement in legality check.
	(Analyze_Goto_Statement): Test for E_Return_Stateemnt in legality check.
	(Analyze_Assignment_Statement): Add call to Check_Elab_Assign for
	left hand side of assignment.
	(Analyze_Assignment): Add suport to manage assigments to the attribute
	priority of a protected object.
	(Check_Possible_Current_Value_Condition): Allow fully qualified names
	not just identifiers.
	(Check_Possible_Current_Value_Condition): Acquire left operand of AND
	or AND THEN for possible tracking.
	(Analyze_Iteration_Scheme): Check for setting Current_Value for the
	case of while loops so we can track values in the loop body.

From-SVN: r118303
2006-10-31 19:07:33 +01:00
Ed Schonberg
b67a385c62 sem_ch4.adb (Try_Primitive_Operation): Code cleanup to ensure that we generate the same errors compiling under -gnatc.
2006-10-31  Ed Schonberg  <schonberg@adacore.com>
	    Javier Miranda  <miranda@adacore.com>
	    Robert Dewar  <dewar@adacore.com>

	* sem_ch4.adb (Try_Primitive_Operation): Code cleanup to ensure that we
	generate the same errors compiling under -gnatc.
	(Try_Object_Operation): If no candidate interpretation succeeds, but
	there is at least one primitive operation with the right name, report
	error in call rather than on a malformed selected component.
	(Analyze_Selected_Component): If the prefix is an incomplete type from
	a limited view, and the full view is available, use the full view to
	determine whether this is a prefixed call to a primitive operation.
	(Operator_Check): Verify that a candidate interpretation is a binary
	operation before checking the type of its second formal.
	(Analyze_Call): Add additional warnings for function call contexts not
	yet supported.
	(Analyze_Allocator): Move the check for "initialization not allowed for
	limited types" after analyzing the expression. This is necessary,
	because OK_For_Limited_Init looks at the structure of the expression.
	Before analysis, we don't necessarily know what sort of expression it
	is. For example, we don't know whether F(X) is a function call or an
	indexed component; the former is legal in Ada 2005; the latter is not.
	(Analyze_Allocator): Correct code for AI-287 -- extension aggregates
	were missing. We also didn't handle qualified expressions. Now also
	allow function calls. Use new common routine OK_For_Limited_Init.
	(Analyze_Type_Conversion): Do not perform some legality checks in an
	instance, because the error message will be redundant or spurious.
	(Analyze_Overloaded_Selected_Component): Do not do style check when
	setting an entity, since we do not know it is the right entity yet.
	(Analyze_Selected_Component): Move Generate_Reference call to Sem_Res
	(Analyze_Overloaded_Selected_Component): Same change
	(Analyze_Selected_Component): Remove unnecessary prefix type retrieval
	since regular incomplete subtypes are transformed into corresponding
	subtypes of their full views.
	(Complete_Object_Operation): Treat name of transformed subprogram call
	as coming from source, for browsing purposes.
	(Try_Primitive_Operation): If formal is an access parameter, compare
	with base type of object to determine whether it is a primitive
	operation.
	(Operator_Check): If no interpretation of the operator matches, check
	whether a use clause on any candidate might make the operation legal.
	(Try_Class_Wide_Operation): Check whether the first parameter is an
	access type whose designated type is class-wide.

From-SVN: r118302
2006-10-31 19:07:13 +01:00
Robert Dewar
affbee12f4 sem_ch13.adb: Storage pool cannot be given for access to subprogram type.
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Thomas Quinot  <quinot@adacore.com>

	* sem_ch13.adb: Storage pool cannot be given for access to subprogram
	type.
	(New_Stream_Subprogram): When processing an attribute definition clause
	for a stream-oriented subprogram, record an entity node occurring at
	the point of clause to use for checking the visibility of the clause,
	as defined by 8.3(23) as amended by AI-195.
	(New_Stream_Subprogram): New procedure, factoring behaviour from both
	 New_Stream_Function and New_Stream_Procedure.
	(New_Stream_Function, New_Stream_Procedure): Removed.
	(Analyze_Attribute_Definition_Clause, case Address): Check new
	Alignment_Check check

From-SVN: r118301
2006-10-31 19:06:54 +01:00
Ed Schonberg
097fdf65a0 sem_ch12.ads, [...] (Save_References): If node is an operator that has been constant-folded...
2006-10-31  Ed Schonberg  <schonberg@adacore.com>
	    Hristian Kirtchev  <kirtchev@adacore.com>
        
        * sem_ch12.ads, sem_ch12.adb (Save_References): If node is an operator
	that has been constant-folded, preserve information of original tree,
	for ASIS uses.
	(Analyze_Formal_Derived_Type): Set the limited present flag of the newly
	generated private extension declaration if the formal derived type is
	synchronized. Carry synchronized present over to the generated private
	extension.
	(Validate_Derived_Type_Instance): Ensure that the actual of a
	synchronized formal derived type is a synchronized tagged type.
	(Instantiate_Formal_Package): When creating the instantiation used to
	validate the actual package of a formal declared without a box, check
	whether the formal itself depends on a prior actual.
	(Instantiate_Formal_Subprogram): Create new entities for the defining
	identifiers of the formals in the renaming declaration, for ASIS use.
	(Instantiate_Formal_Subprogram, Instantiate_Formal_Type): When creating
	a renaming declaration or a subtype declaration for an actual in an
	instance, capture location information of declaration in generic, for
	ASIS use.
	(Instantiate_Formal_Package): Add comments on needed additional tests.
	AI-317 (partial parametrization) is fully implemented.
	(Validate_Private_Type_Instance): Add check for actual which
	must have preelaborable initialization
	Use new // insertion for some continuation messages
	(Analyze_Formal_Object_Declaration): Change usage of Expression to
	Default_Expression. Add type retrieval when the declaration has an
	access definition. Update premature usage of incomplete type check.
	(Check_Access_Definition): New subsidiary routine. Check whether the
	current compilation version is Ada 05 and the supplied node has an
	access definition.
	(Instantiate object): Alphabetize local variables. Handle the creation
	of new renaming declarations with respect to the kind of definition
	used - either an access definition or a subtype mark. Guard against
	unnecessary error message in the context of anonymous access types after
	they have been resolved. Add check for required null exclusion in a
	formal object declaration.
	(Switch_View): A private subtype of a non-private type needs to be
	switched (the base type can have been switched without its private
	dependents because of the last branch of Check_Private_View.
	(Check_Private_View): Do not recompute Base_Type (T), instead use cached
	value from BT.
	(Instantiate_Type): Emit an error message whenever a class-wide type of
	a tagged incomplete type is used as a generic actual.
	(Find_Actual_Type): Extend routine to handle a component type in a child
	unit that is imported from a formal package in a parent.
	(Validate_Derived_Type_Instance): Check that analyzed formal and actual
	agree on constrainedness, rather than checking against ultimate ancestor
	(Instantiate_Subprogram_Body): Create a cross-reference link to the
	generic body, for navigation purposes.

From-SVN: r118300
2006-10-31 19:06:39 +01:00
Robert Dewar
6109adeb7d sem_ch11.adb (Analyze_Handled_Statements): Move final test for useless assignments here and conditionalize it on absence...
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* sem_ch11.adb (Analyze_Handled_Statements): Move final test for
	useless assignments here and conditionalize it on absence of exception
	handlers.
	(Analyze_Exception_Handlers): Small code reorganization of error
	detection code, for new handling of formal packages.

From-SVN: r118299
2006-10-31 19:06:22 +01:00
Ed Schonberg
468c6c8af6 sem_attr.ads, [...] (Analyze_Access_Attribute): Diagnose properly an attempt to apply Unchecked_Access to a protected operation.
2006-10-31  Ed Schonberg  <schonberg@adacore.com>
	    Thomas Quinot  <quinot@adacore.com>
	    Javier Miranda  <miranda@adacore.com>
	    Gary Dismukes  <dismukes@adacore.com>

	* sem_attr.ads, sem_attr.adb (Analyze_Access_Attribute): Diagnose
	properly an attempt to apply Unchecked_Access to a protected operation.
	(OK_Self_Reference): New subprogram to check the legality of an access
	attribute whose prefix is the type of an enclosing aggregate.
	Generalizes previous mechanism to handle attribute references nested
	arbitrarily deep within the aggregate.
	(Analyze_Access_Attribute): An access attribute whose prefix is a type
	can appear in an aggregate if this is a default-initialized aggregate
	for a self-referential type.
	(Resolve_Attribute, case Access): Ditto.
	Add support for new implementation defined attribute Stub_Type.
	(Eval_Attribute, case Attribute_Stub_Type): New case.
	(Analyze_Attribute, case Attribute_Stub_Type): New case.
	(Stream_Attribute_Available): Implement using new subprogram from
	sem_cat, Has_Stream_Attribute_Definition, instead of incorrect
	Has_Specified_Stream_Attribute flag.
	Disallow Storage_Size and Storage_Pool for access to subprogram
	(Resolve_Attribute, case 'Access et al): Take into account anonymous
	access types of return subtypes in extended return statements. Remove
	accessibility checks on anonymous access types when Unchecked_Access is
	used.
	(Analyze_Attribute): Add support for the use of 'Class to convert
	a class-wide interface to a tagged type.
	Add support for the attribute Priority.
	(Resolve_Attribute, case Attribute_Access): For Ada_05, add test for
	whether the designated type is discriminated with a constrained partial
	view and require static matching in that case.
	Add local variable Des_Btyp. The Designated_Type
	of an access to incomplete subtype is either its non-limited view if
	coming from a limited with or its etype if regular incomplete subtype.

	* sem_cat.ads, sem_cat.adb (Validate_Remote_Access_To_Class_Wide_Type):
	Fix predicate to identify and allow cases of (expander-generated)
	references to tag of designated object of a RACW.
	(Validate_Static_Object_Name): In Ada 2005, a formal object is
	non-static, and therefore cannot appear as a primary in a preelaborable
	package.
	(Has_Stream_Attribute_Definition): New subprogram, abstracted from
	Has_Read_Write_Attributes.
	(Has_Read_Write_Attributes): Reimplement in termes of
	Has_Stream_Attribute_Definition.
	(Missing_Read_Write_Attributes): When checking component types in a
	record, unconditionally call Missing_Read_Write_Attributes recursively
	(remove guard checking for Is_Record_Type / Is_Access_Type).

From-SVN: r118298
2006-10-31 19:06:06 +01:00
Robert Dewar
daca8389ef scng.adb (Scan, [...]): Better msg for identifier starting with a digit.
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* scng.adb (Scan, case of numeric literal): Better msg for identifier
	starting with a digit.

From-SVN: r118297
2006-10-31 19:05:47 +01:00
Arnaud Charlet
1fa4cb204c rtsfind.adb: Remove s-polint from comment as it exists no more.
* rtsfind.adb: Remove s-polint from comment as it exists no more.

        * rtsfind.ads: 
        Move entity RE_Get_Active_Partition_Id to package System.DSA_Services.
        Move all the entities in obsolete package System.PolyORB_Interface to
        System.Partition_Interface.
	(RE_Storage_Size): New function in System.Tasking.
	(RE_Get_Ceiling): New entity.
	(RE_Set_Ceiling): New entity.
	(RO_PE_Get_Ceiling): New entity.
	(RO_RE_Set_Ceiling): New entity.
	(Inherit_CPP_DT): New entity

From-SVN: r118296
2006-10-31 19:05:34 +01:00
Arnaud Charlet
de397a3d0a restrict.ads, [...] (Restriction_Active): Now returns False if only a restriction warning is active for the given restriction.
2006-10-31  Arnaud Charlet  <charlet@adacore.com>
	    Robert Dewar  <dewar@adacore.com>

	* restrict.ads, restrict.adb (Restriction_Active): Now returns False if
	only a restriction warning is active for the given restriction. This is
	desirable because we do not want to modify code in the case where only
	a warning is set.
	(Set_Profile_Restrictions): Make sure that a Profile_Warnings never
	causes overriding of real restrictions.
	Take advantage of new No_Restrictions constant.

	* raise.h: (__gnat_set_globals): Change profile.

From-SVN: r118295
2006-10-31 19:05:19 +01:00
Robert Dewar
d3879a5ac8 repinfo.adb (List_Entities): Don't list entities from renaming declarations.
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* repinfo.adb (List_Entities): Don't list entities from renaming
	declarations.

From-SVN: r118294
2006-10-31 19:04:59 +01:00
Vincent Celier
ddd6e5ae32 prj-nmsc.adb (Check_Ada_Name): For children of package A...
2006-10-31  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb (Check_Ada_Name): For children of package A, G, I and S
	on VMS, change "__" to '.' before checking the name.
	(Record_Ada_Source): Always add the source file name in the list of
	of sources, even if it is not the first time, as it is for another
	source index.
	(Get_Unit): Replace both '_' (after 'a', 'g', 'i' or 's') with a single
	dot, instead of replacing only the first '_'.

	* prj-part.adb (Parse): Convert project file path to canonical form

	* prj-proc.adb (Recursive_Process): Make sure that, when a project is
	extended, the project id of the project extending it is recorded in its
	data, even when it has already been processed as an imported project.

From-SVN: r118293
2006-10-31 19:04:45 +01:00
Vincent Celier
3356ee073b prj-makr.adb (Packages_To_Check_By_Gnatname): New global constant
2006-10-31  Vincent Celier  <celier@adacore.com>

	* prj-makr.adb (Packages_To_Check_By_Gnatname): New global constant
	(Make): Call Parse with Packages_To_Check_By_Gnatname for parameter
	Packages_To_Check.

From-SVN: r118292
2006-10-31 19:04:28 +01:00
Vincent Celier
aa1c3df226 prj-dect.adb (Parse_Attribute_Declaration): Do not issue warning for unknown attribute in unknown package or in package...
2006-10-31  Vincent Celier  <celier@adacore.com>

	* prj-dect.adb (Parse_Attribute_Declaration): Do not issue warning for
	unknown attribute in unknown package or in package that does not need
	to be checked.
	(Parse_Package_Declaration): Do not issue warning for unknown package in
	quiet output.

From-SVN: r118291
2006-10-31 19:04:10 +01:00
Robert Dewar
529c27463f par-ch3.adb (P_Range_Or_Subtype_Mark): Check for bad parentheses
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Javier Miranda  <miranda@adacore.com>
        
	* par-ch3.adb (P_Range_Or_Subtype_Mark): Check for bad parentheses
	(P_Type_Declaration): Remove barrier against the reserved word "limited"
	after "abstract" to give support to the new syntax of AARM 3.4 (2/2).
	(P_Type_Declaration): Minor code cleanup. Add support for synchronized
	private extensions.
	(P_Type_Declaration): Add the new actual Abstract_Present to every call
	to P_Interface_Type_Definition.
	(P_Interface_Type_Definition): Addition of one formal to report an error
	if the reserved word abstract has been previously found.
	(P_Identifier_Declarations): Update grammar rules. Handle parsing of an
	object renaming declaration with an access definition or subtype mark
	with a possible null exclusion.

	* par-ch9.adb: Minor error msg fix

	* par-load.adb: Add missing continuation mark to error msg

	* par-tchk.adb: (Wrong_Token): Code cleanup, use concatenation

From-SVN: r118290
2006-10-31 19:03:53 +01:00
Hristian Kirtchev
fd6342ec0e par-ch12.adb: Grammar update and cleanup.
2006-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
	    Javier Miranda  <miranda@adacore.com>

	* par-ch12.adb: Grammar update and cleanup.
	(P_Formal_Type_Definition, P_Formal_Derived_Type_Definition): Add
	support for synchronized derived type definitions.
	Add the new actual Abstract_Present to every call to
	P_Interface_Type_Definition.
	(P_Formal_Object_Declarations): Update grammar rules. Handle parsing of
	a formal object declaration with an access definition or a subtype mark
	with a null exclusion.
	(P_Generic_Association): Handle association with box, and others_choice
	with box, to support Ada 2005 partially parametrized formal packages.

From-SVN: r118289
2006-10-31 19:03:23 +01:00
Robert Dewar
aae02e6a54 par-ch10.adb (P_Context_Clause): Minor error message fix
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* par-ch10.adb (P_Context_Clause): Minor error message fix

From-SVN: r118288
2006-10-31 19:03:00 +01:00
Ed Schonberg
743c8beb16 sem_ch10.ads, [...] (Check_Redundant_Withs, [...]): If the context of a body includes a use clause for P.Q then a with_clause for P...
2006-10-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch10.ads, sem_ch10.adb (Check_Redundant_Withs,
	Process_Body_Clauses): If the context of a body includes a use clause
	for P.Q then a with_clause for P in the same body is not redundant,
	even if the spec also has a with_clause on P.
	Add missing continuation mark to error msg
	(Build_Limited_Views): A limited view of a type is tagged if its
	declaration includes a record extension.
	(Analyze_Proper_Body): Set Corresponding_Stub field in N_Subunit
	node, even if the subunit has errors. This avoids malfunction by
	Lib.Check_Same_Extended_Unit in the presence of syntax errors.
	(Analyze_Compilation_Unit): Add circuit to make sure we get proper
	generation of obsolescent messages for with statements (cannot do
	this too early, or we cannot implement avoiding the messages in the
	case of obsolescent units withing obsolescent units).
	(Install_Siblings): If the with_clause is on a remote descendant of
	an ancestor of the current compilation unit, find whether there is
	a sibling child unit that is immediately visible.
	(Remove_Private_With_Clauses): New procedure, invoked after completing
	the analysis of the private part of a nested package, to remove from
	visibility the private with_clauses of the enclosing package
	declaration.
	(Analyze_With_Clause): Remove Check_Obsolescent call, this checking is
	now centralized in Generate_Reference.
	(Install_Limited_Context_Clauses): Remove superfluous error
	message associated with unlimited view visible through use
	and renamings. In addition, at the point in which the error
	is reported, we add the backslash to the text of the error
	to ensure that it is reported as a single error message.
	Use new // insertion for some continuation messages
	(Expand_Limited_With_Clause): Use copy of name rather than name itself,
	to create implicit with_clause for parent unit mentioned in original
	limited_with_clause.
	(Install_Limited_With_Unit): Set entity of parent identifiers if the
	unit is a child unit. For ASIS queries.
	(Analyze_Subunit): If the subunit appears within a child unit, make all
	ancestor child units directly visible again.

From-SVN: r118287
2006-10-31 19:02:40 +01:00
Vincent Celier
f6cf2af4c7 mlib-utl.adb (Initialized): Remove, no longer used
2006-10-31  Vincent Celier  <celier@adacore.com>

	* mlib-utl.adb (Initialized): Remove, no longer used
	(Initialize): Remove, no longer used
	(Ar): If Ar_Exec is null, get the location of the archive builder and,
	if there is one, the archive indexer. Fail if the archive builder cannot
	be found.
	(Gcc): If the driver path is unknown, get it. Fail if the driver cannot
	be found.

From-SVN: r118286
2006-10-31 19:02:17 +01:00
Thomas Quinot
b8783398c1 Makefile.in: Set EH mechanism to ZCX for FreeBSD.
2006-10-31  Thomas Quinot  <quinot@adacore.com>
	    Eric Botcazou  <ebotcazou@adacore.com>
	    Arnaud Charlet  <charlet@adacore.com>

	* Makefile.in: Set EH mechanism to ZCX for FreeBSD.
	(NO_REORDER_ADAFLAGS): New var defined to -fno-toplevel-reorder if
	possible.
	(a-except.o): Pass it to the compiler.
	(gnatlib-shared-vms): Removed -nostartfiles switch in link step.
	(LIBGNAT_TARGET_PAIRS for Windows): Avoid the use of the specific
	a-calend-mingw.adb version.

        * Makefile.rtl: Added s-dsaser.
	Add object entries for Ada.Calendar.[Arithmetic/Formatting/Time_Zones]
	(GNATRTL_TASKING_OBJS): Add Ada.Dispatching and
	Ada.Dispatching.Round_Robin.
	Added new unit Ada.Containers.Restricted_Bounded_Doubly_Linked_Lists

	* Make-lang.in: Remove all references to gt-ada-decl.h.
	Add concatenation (s-strops/s-sopco3/s-sopco4/s-sopco5) to compiler
	sources.
	Add dependency on ada/s-restri.o for GNAT1 and GNATBIND objects.
	Update dependencies.

	* system-freebsd-x86.ads: Make ZCX the default EH mechanism for FreeBSD

From-SVN: r118285
2006-10-31 19:02:00 +01:00
Vincent Celier
53973dcf9d lib-load.adb (Load_Unit): Skip the test for a unit not found when its file has already been loaded...
2006-10-31  Vincent Celier  <celier@adacore.com>

	* lib-load.adb (Load_Unit): Skip the test for a unit not found when
	its file has already been loaded, according to the unit being loaded,
	not to the current value of Multiple_Unit_Index.

From-SVN: r118284
2006-10-31 19:01:41 +01:00
Robert Dewar
cac01ae32b layout.adb (Layout_Record_Type): Deal with non-static subtypes of variant records
2006-10-31  Robert Dewar  <dewar@adacore.com>

        * layout.adb (Layout_Record_Type): Deal with non-static subtypes of
        variant records
        (Layout_Variant_Record): Retrieve the discriminants from the entity
	rather than from the type definition, because in the case of a full
	type for a private type we need to take the discriminants from the
	partial view.
        (Layout_Component_List): When applying the Max operator to variants with
        a nonstatic size, check whether either operand is static and scale that
        operand from bits to storage units before applying Max.
	(Layout_Type): In VMS, if a C-convention access type has no explicit
	size clause (and does not inherit one in the case of a derived type),
	then the size is reset to 32 from 64.

From-SVN: r118283
2006-10-31 19:01:28 +01:00
Robert Dewar
2d6a1685fa g-spipat.adb (S_To_PE): Remove incorrect use of 0 instead of Str'First
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* g-spipat.adb (S_To_PE): Remove incorrect use of 0 instead of Str'First

From-SVN: r118282
2006-10-31 19:01:11 +01:00
Robert Dewar
30f41abaec g-speche.ads, [...]: Add special case to recognize misspelling initial letter o as a zero.
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* g-speche.ads, g-speche.adb: Add special case to recognize misspelling
	initial letter o as a zero.

From-SVN: r118281
2006-10-31 19:00:56 +01:00
Thomas Quinot
ad98c85e5b g-socket.ads, [...] (Close_Selector): Once the signalling sockets are closed...
2006-10-31  Thomas Quinot  <quinot@adacore.com>

	* g-socket.ads, g-socket.adb (Close_Selector): Once the signalling
	sockets are closed, reset the R_Sig_Socket and W_Sig_Socket components
	to No_Socket.
	(Selector_Type): Add default value of No_Socket for R_Sig_Socket and
	W_Sig_Socket.

From-SVN: r118280
2006-10-31 19:00:42 +01:00
Vincent Celier
8967c38f74 g-os_lib.ads, [...] (Locate_Exec_On_Path): Always return an absolute path name.
2006-10-31  Vincent Celier  <celier@adacore.com>

	* g-os_lib.ads, g-os_lib.adb (Locate_Exec_On_Path): Always return an
	absolute path name.
	(Locate_Regular_File): Ditto
	(Change_Dir): Remove, no longer used
	(Normalize_Pathname): Do not use Change_Dir to get the drive letter
	on Windows. Get it calling Get_Current_Dir.
	(OpenVMS): Remove imported boolean, no longer needed.
	(Normalize_Pathname)[VMS]: Do not resolve directory names.
	(Pid_To_Integer): New function to convert a Process_Id to  Integer

From-SVN: r118279
2006-10-31 19:00:29 +01:00
Vincent Celier
ac36caab6b gnatls.adb: Take into account GPR_PROJECT_PATH...
2006-10-31  Vincent Celier  <celier@adacore.com>
        
	* gnatls.adb: Take into account GPR_PROJECT_PATH, when it is defined,
	instead of ADA_PROJECT_PATH, for the project path.
	(Gnatls): When displaying the project path directories, use host dir
	specs.

	* prj-ext.adb (Prj.Ext elaboration): On VMS, only expand relative path
	names in the project path, as absolute paths may correspond to
	multi-valued VMS logical names.

From-SVN: r118278
2006-10-31 19:00:14 +01:00
Vincent Celier
ef6ea465e3 gnatlink.adb (Gnatlink): If gcc is not called with -shared-libgcc...
2006-10-31  Vincent Celier  <celier@adacore.com>

	* gnatlink.adb (Gnatlink): If gcc is not called with -shared-libgcc,
	call it with -static-libgcc, as there are some platforms, such as
	Darwin, where one of these two switches is compulsory to link.

From-SVN: r118277
2006-10-31 18:59:58 +01:00
Arnaud Charlet
64c69860aa gnatcmd.adb (Process_Link): Use Osint.Executable_Name instead of handling executable extension manually and...
2006-10-31  Arnaud Charlet  <charlet@adacore.com>
	    Robert Dewar  <dewar@adacore.com>

	* gnatcmd.adb (Process_Link): Use Osint.Executable_Name instead of
	handling executable extension manually and duplicating code.

	* make.adb: Implement new -S switch
	(Gnatmake): Use new function Osint.Executable_Name instead
	of handling executable extension manually.

	* prj-util.adb (Executable_Of): Make sure that if an Executable_Suffix
	is specified, the executable name ends with this suffix.
	Take advantage of Osint.Executable_Name instead of duplicating code.

	* switch-m.adb: Recognize new gnatmake -S switch

	* targparm.ads, targparm.adb (Executable_Extension_On_Target): New
	variable.
	(Get_Target_Parameters): Set Executable_Extension_On_Target if
	available.

	* makeusg.adb: Add line for gnatmake -S switch

From-SVN: r118276
2006-10-31 18:59:45 +01:00
Vincent Celier
5b8b905744 g-debpoo.adb (Is_Valid): Correctly compute Offset using Integer_Address arithmetic, as in Set_Valid.
2006-10-31  Vincent Celier  <celier@adacore.com>

	* g-debpoo.adb (Is_Valid): Correctly compute Offset using
	Integer_Address arithmetic, as in Set_Valid.

From-SVN: r118275
2006-10-31 18:59:28 +01:00
Hristian Kirtchev
87009d43ae g-catiio.ads, [...] (Value): New function.
2006-10-31  Hristian Kirtchev  <kirtchev@adacore.com>

	* g-catiio.ads, g-catiio.adb (Value): New function.
	Given an input String, try and parse a valid Time value.

From-SVN: r118274
2006-10-31 18:59:12 +01:00
Bob Duff
88b32fc3a7 g-awk.adb (Default_Session, [...]): Compile this file in Ada 95 mode, because it violates the new rules for AI-318.
2006-10-31  Bob Duff  <duff@adacore.com>
	    Robert Dewar  <dewar@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>

	* g-awk.adb (Default_Session, Current_Session): Compile this file in
	Ada 95 mode, because it violates the new rules for AI-318.

	* g-awk.ads: Use overloaded subprograms in every case where we used to
	have a default of Current_Session. This makes the code closer to be
	correct for both Ada 95 and 2005.

	* g-moreex.adb (Occurrence): Turn off warnings for illegal-in-Ada-2005
	code, relying on the fact that the compiler generates a warning
	instead of an error in -gnatg mode.

	* lib-xref.ads (Xref_Entity_Letters): Add entry for new
	E_Return_Statement entity kind.
	Add an entry for E_Incomplete_Subtype in Xref_Entity_Letters.

	* par.adb (P_Interface_Type_Definition): Addition of one formal to
	report an error if the reserved word abstract has been previously found.
	(SS_End_Type): Add E_Return for new extended_return_statement syntax.
        
        * par-ch4.adb (P_Aggregate_Or_Paren_Expr): Improve message for
	parenthesized range attribute usage
	(P_Expression_No_Right_Paren): Add missing comment about error recovery.

	* par-ch6.adb (P_Return_Object_Declaration): AI-318: Allow "constant"
	in the syntax for extended_return_statement. This is not in the latest
	RM, but the ARG is expected to issue an AI allowing this.
	(P_Return_Subtype_Indication,P_Return_Subtype_Indication): Remove
	N_Return_Object_Declaration. We now use N_Object_Declaration instead.
	(P_Return_Object_Declaration, P_Return_Subtype_Indication,
	P_Return_Statement): Parse the new syntax for extended_return_statement.

	* par-endh.adb (Check_End, Output_End_Deleted, Output_End_Expected,
	Output_End_Missing): Add error-recovery code for the new
	extended_return_statement syntax; that is, the new E_Return entry on
	the scope stack.

	* s-auxdec-vms_64.ads, s-auxdec.ads (AST_Handler): Change type from
	limited to nonlimited, because otherwise we violate the new Ada 2005
	rules about returning limited types in function Create_AST_Handler in
	s-asthan.adb.

	* sem.adb (Analyze): Add cases for new node kinds
	N_Extended_Return_Statement and N_Return_Object_Declaration.

	* sem_aggr.adb (Aggregate_Constraint_Checks): Verify that component
	type is in the same category as type of context before applying check,
	to prevent anomalies in instantiations.
	(Resolve_Aggregate): Remove test for limited components in aggregates.
	It's unnecessary in Ada 95, because if it has limited components, then
	it must be limited. It's wrong in Ada 2005, because limited aggregates
	are now allowed.
	(Resolve_Record_Aggregate): Move check for limited types later, because
	OK_For_Limited_Init requires its argument to have been resolved.
	(Get_Value): When copying the component default expression for a
	defaulted association in an aggregate, use the sloc of the aggregate
	and not that of the original expression, to prevent spurious
	elaboration errors, when the expression includes function calls.
	(Check_Non_Limited_Type): Correct code for AI-287, extension aggregates
	were missing. We also didn't handle qualified expressions. Now also
	allow function calls. Use new common routine OK_For_Limited_Init.
	(Resolve_Extension_Aggregate): Minor fix to bad error message (started
	with space can upper case letter).

        * sem_ch3.ads, sem_ch3.adb (Create_Constrained_Components): Set
	Has_Static_Discriminants flag
        (Record_Type_Declaration): Diagnose an attempt to declare an interface
        type with discriminants.
        (Process_Range_Expr_In_Decl): Do validity checks on range
	(Build_Discriminant_Constraints): Use updated form of
	Denotes_Discriminant.
	(Process_Subtype): If the subtype is a private subtype whose full view
	is a concurrent subtype, introduce an itype reference to prevent scope
	anomalies in gigi.
	(Build_Derived_Record_Type, Collect_Interface_Primitives,
	Record_Type_Declaration):  The functionality of the subprograms
	Collect_Abstract_Interfaces and Collect_All_Abstract_Interfaces
	is now performed by a single routine.
	(Build_Derived_Record_Type): If the type definition includes an explicit
	indication of limitedness, then the type must be marked as limited here
	to ensure that any access discriminants will not be treated as having
	a local anonymous access type.
	(Check_Abstract_Overriding): Issue a detailed error message when an
	abstract subprogram was not overridden due to incorrect mode of its
	first parameter.
	(Analyze_Private_Extension_Declaration): Add support for the analysis of
	synchronized private extension declarations. Verify that the ancestor is
	a limited or synchronized interface or in the generic case, the ancestor
	is a tagged limited type or synchronized interface and all progenitors
	are either limited or synchronized interfaces.
	Derived_Type_Declaration): Check for presence of private extension when
	dealing with synchronized formal derived types.
	Process_Full_View): Enchance the check done on the usage of "limited" by
	testing whether the private view is synchronized.
	Verify that a synchronized private view is completed by a protected or
	task type.
	(OK_For_Limited_Init_In_05): New function.
	(Analyze_Object_Declaration): Move check for limited types later,
	because OK_For_Limited_Init requires its argument to have been resolved.
	Add -gnatd.l --Use Ada 95 semantics for limited function returns,
	in order to alleviate the upward compatibility introduced by AI-318.
	(Constrain_Corresponding_Record): If the constraint is for a component
	subtype, mark the itype as frozen, to avoid out-of-scope references to
	discriminants in the back-end.
	(Collect_Implemented_Interfaces): Protect the recursive algorithm of
	this subprogram against wrong sources.
	(Get_Discr_Value, Is_Discriminant): Handle properly references to a
	discriminant of limited type completed with a protected type, when the
	discriminant is used to constrain a private component of the type, and
	expansion is disabled.
	(Find_Type_Of_Object): Do not treat a return subtype that is an
	anonymous subtype as a local_anonymous_type, because its accessibility
	level is the return type of the enclosing function.
	(Check_Initialization): In -gnatg mode, turn the error "cannot
	initialize entities of limited type" into a warning.
	(OK_For_Limited_Init): Return true for generated nodes, since it
	sometimes violates the legality rules.
	(Make_Incomplete_Declaration): If the type for which an incomplete
	declaration is created happens to be the currently visible entity,
	preserve the homonym chain when removing it from visibility.
	(Check_Conventions): Add support for Ada 2005 (AI-430): Conventions of
	inherited subprograms.
	(Access_Definition): If this is an access to function that is the return
	type of an access_to_function definition, context is a type declaration
	and the scope of the anonymous type is the current one.
	(Analyze_Subtype_Declaration): Add the defining identifier of a regular
	incomplete subtype to the set of private dependents of the original
	incomplete type.
	(Constrain_Discriminated_Type): Emit an error message whenever an
	incomplete subtype is being constrained.
	(Process_Incomplete_Dependents): Transform an incomplete subtype into a
	corresponding subtype of the full view of the original incomplete type.
	(Check_Incomplete): Properly detect invalid usage of incomplete types
	and subtypes.

From-SVN: r118273
2006-10-31 18:58:48 +01:00
Olivier Hainque
bae7876b4d g-alleve.adb (lvx, stvx): Ceil-Round the Effective Address to the closest multiple of VECTOR_ALIGNMENT...
2006-10-31  Olivier Hainque  <hainque@adacore.com>

	* g-alleve.adb (lvx, stvx): Ceil-Round the Effective Address to the
	closest multiple of VECTOR_ALIGNMENT and not the closest multiple of 16.

From-SVN: r118272
2006-10-31 18:58:30 +01:00
Robert Dewar
3f1ede06fc freeze.adb: Add handling of Last_Assignment field
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb: Add handling of Last_Assignment field
	(Warn_Overlay): Supply missing continuation marks in error msgs
	(Freeze_Entity): Add check for Preelaborable_Initialization

	* g-comlin.adb: Add Warnings (Off) to prevent new warning

	* g-expect.adb: Add Warnings (Off) to prevent new warning

	* lib-xref.adb: Add handling of Last_Assignment field
	(Generate_Reference): Centralize handling of pragma Obsolescent here
	(Generate_Reference): Accept an implicit reference generated for a
	default in an instance.
	(Generate_Reference): Accept a reference for a node that is not in the
	main unit, if it is the generic body corresponding to an subprogram
	instantiation.

	* xref_lib.adb: Add pragma Warnings (Off) to avoid new warnings

        * sem_warn.ads, sem_warn.adb (Set_Warning_Switch): Add processing for
	-gnatwq/Q.
	(Warn_On_Useless_Assignment): Suppress warning if enclosing inner
	exception handler.
	(Output_Obsolescent_Entity_Warnings): Rewrite to avoid any messages on
	use clauses, to avoid messages on packages used to qualify, and also
	to avoid messages from obsolescent units.
	(Warn_On_Useless_Assignments): Don't generate messages for imported
	and exported variables.
	(Warn_On_Useless_Assignments): New procedure
	(Output_Obsolescent_Entity_Warnings): New procedure
	(Check_Code_Statement): New procedure

        * einfo.ads, einfo.adb (Has_Static_Discriminants): New flag
	Change name Is_Ada_2005 to Is_Ada_2005_Only
	(Last_Assignment): New field for useless assignment warning

From-SVN: r118271
2006-10-31 18:58:16 +01:00
Vincent Celier
ac3b962ec3 krunch.ads, krunch.adb (Krunch): New Boolean parameter VMS_On_Target.
2006-10-31  Vincent Celier  <celier@adacore.com>

	* krunch.ads, krunch.adb (Krunch): New Boolean parameter VMS_On_Target.
	When True, apply VMS treatment to children of packages A, G, I and S.
	For F320-016

	* fname-uf.adb (Get_File_Name): Call Krunch with OpenVMS_On_Target

From-SVN: r118270
2006-10-31 18:57:54 +01:00
Bob Duff
05350ac648 exp_ch7.adb (Build_Array_Deep_Procs, [...]): Rename Is_Return_By_Reference_Type to be Is_Inherently_Limited_Type...
2006-10-31  Bob Duff  <duff@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>
	    Robert Dewar  <dewar@adacore.com>

	* exp_ch7.adb (Build_Array_Deep_Procs, Build_Record_Deep_Procs,
	Make_Deep_Record_Body): Rename Is_Return_By_Reference_Type to be
	Is_Inherently_Limited_Type, because return-by-reference has no meaning
	in Ada 2005.
	(Find_Node_To_Be_Wrapped): Use new method of determining the result
	type of the function containing a return statement, because the
	Return_Type field was removed. We now use the Return_Applies_To field.

        * exp_util.ads, exp_util.adb: Use new subtype N_Membership_Test
	(Build_Task_Image_Decl): If procedure is not called from an
	initialization procedure, indicate that function that builds task name
	uses the sec. stack. Otherwise the enclosing initialization procedure
	will carry the indication.
	(Insert_Actions): Remove N_Return_Object_Declaration. We now use
	N_Object_Declaration instead.
	(Kill_Dead_Code): New interface to implement -gnatwt warning for
	conditional dead code killed, and change implementation accordingly.
	(Insert_Actions): Add N_Return_Object_Declaration case.
	Correct comment to mention N_Extension_Aggregate node.
	(Set_Current_Value_Condition): Call Safe_To_Capture_Value to avoid bad
	attempts to save information for global variables which cannot be
	safely tracked.
	(Get_Current_Value_Condition): Handle conditions the other way round
	(constant on left). Also handle right operand of AND and AND THEN
	(Set_Current_Value_Condition): Corresponding changes
	(Append_Freeze_Action): Remove unnecessary initialization of Fnode.
	(Get_Current_Value_Condition): Handle simple boolean operands
	(Get_Current_Value_Condition): Handle left operand of AND or AND THEN
	(Get_Current_Value_Condition): If the variable reference is within an
	if-statement, does not appear in the list of then_statments, and does
	not come from source, treat it as being at unknown location.
	(Get_Current_Value_Condition): Enhance to allow while statements to be
	processed as well as if statements.
	(New_Class_Wide_Subtype): The entity for a class-wide subtype does not
	come from source.
	(OK_To_Do_Constant_Replacement): Allow constant replacement within body
	of loop. This is safe now that we fixed Kill_Current_Values.
	(OK_To_Do_Constant_Replacement): Check whether current scope is
	Standard, before examining outer scopes.

From-SVN: r118269
2006-10-31 18:57:36 +01:00
Robert Dewar
ac9e991846 exp_prag.adb (Expand_Pragma_Common_Object): Use a single Machine_Attribute pragma internally to implement the user pragma.
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* exp_prag.adb (Expand_Pragma_Common_Object): Use a single
	Machine_Attribute pragma internally to implement the user pragma.
	Add processing for pragma Interface so that it is now completely
	equivalent to pragma Import.

	* sem_prag.adb (Analyze_Pragma, case Obsolescent): Extend this pragma
	so that it can be applied to all entities, including record components
	and enumeration literals.
	(Analyze_Pragma, case Priority_Specific_Dispatching): Check whether
	priority ranges are correct, verify compatibility against task
	dispatching and locking policies, and if everything is correct an entry
	is added to the table containing priority specific dispatching entries
	for this compilation unit.
	(Delay_Config_Pragma_Analyze): Delay processing
	Priority_Specific_Dispatching pragmas because when processing the
	pragma we need to access run-time data, such as the range of
	System.Any_Priority.
	(Sig_Flags): Add Pragma_Priority_Specific_Dispatching.
	Allow pragma Unreferenced as a context item
	Add pragma Preelaborable_Initialization
	(Analyze_Pragma, case Interface): Interface is extended so that it is
	now syntactically and semantically equivalent to Import.
	(Analyze_Pragma, case Compile_Time_Warning): Fix error of blowups on
	insertion characters.
	Add handling for Pragma_Wide_Character_Encoding
	(Process_Restrictions_Restriction_Warnings): Ensure that a warning
	never supercedes a real restriction, and that a real restriction
	always supercedes a warning.
	(Analyze_Pragma, case Assert): Set Low_Bound_Known if assert is of
	appropriate form.

From-SVN: r118268
2006-10-31 18:57:10 +01:00
Javier Miranda
53cc4a7aa1 exp_intr.adb (Expand_Dispatching_Constructor_Call): Add missing run-time membership test to ensure that the constructed object...
2006-10-31  Javier Miranda  <miranda@adacore.com>
        
	* exp_intr.adb (Expand_Dispatching_Constructor_Call): Add missing
	run-time membership test to ensure that the constructed object
	implements the target abstract interface.

From-SVN: r118267
2006-10-31 18:56:43 +01:00
Robert Dewar
c99e6969f2 exp_imgv.adb (Expand_Image_Attribute): For Wide_[Wide_]Character cases...
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* exp_imgv.adb (Expand_Image_Attribute): For Wide_[Wide_]Character
	cases, pass the encoding method, since it is now required by the run
	time.

	* s-valwch.ads, s-valwch.adb (Value_Wide_Wide_Character): Avoid
	assumption that Str'First = 1.
	(Value_Wide_Character): Takes EM (encoding method) parameter and passes
	it on to the Value_Wide_Wide_Character call.
	(Value_Wide_Wide_Character): Takes EM (encoding method) parameter and
	properly handles a string of the form quote-encoded_wide_char-quote.

	* s-wchcnv.adb: Minor reformatting

From-SVN: r118266
2006-10-31 18:56:24 +01:00
Ed Schonberg
20f96ac918 exp_fixd.adb (Rounded_Result_Set): For multiplication and division of fixed-point operations in an integer context...
2006-10-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_fixd.adb (Rounded_Result_Set): For multiplication and division of
	fixed-point operations in an integer context, i.e. as operands of a
	conversion to an integer type, indicate that result must be rounded.

From-SVN: r118265
2006-10-31 18:56:09 +01:00
Thomas Quinot
92869a7b6b exp_dist.adb (Get_Subprogram_Ids): This function will no more assign subprogram Ids, even if they are not yet assigned.
2006-10-31  Thomas Quinot  <quinot@adacore.com>
	    Pablo Oliveira  <oliveira@adacore.com>
        
        * exp_dist.adb (Get_Subprogram_Ids): This function will no more assign
	subprogram Ids, even if they are not yet assigned.
	(Build_Subprogram_Id): It is now this function that will take care of
	calling Assign_Subprogram_Ids if necessary.
	(Add_Receiving_Stubs_To_Declarations): Checking the subprograms ids
	should be done only once they are assigned.
	(Build_From_Any_Function, case of tagged types): Add missing call to
	Allocate_Buffer.
	(Corresponding_Stub_Type): New subprogram. Returns the associated stub
	type for an RACW type.
	(Add_RACW_Features): When processing an RACW declaration for which the
	designated type is already frozen, enforce E.2.2(14) rules immediately.
	(GARLIC_Support.Build_Subprogram_Receiving_Stubs): Do not perform any
	special reordering of controlling formals.

	* exp_dist.ads (Corresponding_Stub_Type): New subprogram. Returns the
	associated stub type for an RACW type.

From-SVN: r118264
2006-10-31 18:55:55 +01:00
Robert Dewar
108e13eb74 exp_dbug.ads, [...] (Get_External_Name): Add missing initialization of Homonym_Len.
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* exp_dbug.ads, exp_dbug.adb (Get_External_Name): Add missing
	initialization of Homonym_Len.
	(Fully_Qualify_Name): Remove kludge to eliminate anonymous block
	names from fully qualified name. Fixes problem of duplicate
	external names differing only in the presence of such a block name.

From-SVN: r118263
2006-10-31 18:55:39 +01:00
Ed Schonberg
ae5dd59d04 exp_ch9.adb (Update_Prival_Types): Simplify code for entity references that are private components of the...
2006-10-31  Ed Schonberg  <schonberg@adacore.com>             

        * exp_ch9.adb (Update_Prival_Types): Simplify code for entity
	references that are private components of the protected object.
	(Build_Barrier_Function): Set flag Is_Entry_Barrier_Function
	(Update_Prival_Subtypes): Add explicit Process argument to Traverse_Proc
	instantiation to deal with warnings.
	(Initialize_Protection): If expression for priority is non-static, use
	System_Priority as its expected type, in case the expression has not
	been analyzed yet.

From-SVN: r118261
2006-10-31 18:55:21 +01:00
Robert Dewar
02822a92a4 exp_ch6.ads, [...]: Use new Validity_Check suppression capability.
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>
	    Bob Duff  <duff@adacore.com>
	    Gary Dismukes  <dismukes@adacore.com>

	* exp_ch6.ads, exp_ch6.adb: Use new Validity_Check suppression
	capability.
	(Expand_Inlined_Call): Tagged types are by-reference types, and
	therefore should be replaced by a renaming declaration in the expanded
	body, as is done for limited types.
	(Expand_Call): If this is a call to a function with dispatching access
	result, propagate tag from context.
	(Freeze_Subprogram): Enable full ABI compatibility for interfacing with
	CPP by default.
	(Make_Build_In_Place_Call_In_Assignment): New procedure to do
	build-in-place when the right-hand side of an assignment is a
	build-in-place function call.
	(Make_Build_In_Place_Call_In_Allocator): Apply an unchecked conversion
	of the explicit dereference of the allocator to the result subtype of
	the build-in-place function. This is needed to satisfy type checking
	in cases where the caller's return object is created by an allocator for
	a class-wide access type and the type named in the allocator is a
	specific type.
	(Make_Build_In_Place_Call_In_Object_Declaration): Apply an unchecked
	conversion of the reference to the declared object to the result subtype
	of the build-in-place function. This is needed to satisfy type checking
	in cases where the declared object has a class-wide type. Also, in the
	class-wide case, change the type of the object entity to the specific
	result subtype of the function, to avoid passing a class-wide object
	without explicit initialization to the back end.
	(Register_Interface_DT_Entry): Moved outside the body of
	Freeze_Subprogram because this routine is now public; it is called from
	Check_Dispatching_Overriding to handle late overriding of abstract
	interface primitives.
	(Add_Access_Actual_To_Build_In_Place_Call): New utility procedure for
	adding an implicit access actual on a call to a build-in-place function.
	(Expand_Actuals): Test for an actual parameter that is a call to a
	build-in-place function and apply
	Make_Build_In_Place_Call_In_Anonymous_Context to the call.
	(Is_Build_In_Place_Function): New function to determine whether an
	entity is a function whose calls should be handled as build-in-place.
	(Is_Build_In_Place_Function_Call): New function to determine whether an
	expression is a function call that should handled as build-in-place.
	(Make_Build_In_Place_Call_In_Allocator): New procedure for handling
	calls to build-in-place functions as the initialization of an allocator.
	(Make_Build_In_Place_Call_In_Anonymous_Context): New procedure for
	handling calls to build-in-place functions in contexts that do not
	involve init of a separate object (for example, actuals of subprogram
	calls).
	(Make_Build_In_Place_Call_In_Object_Declaration): New procedure for
	handling calls to build-in-place functions as the initialization of an
	object declaration.
	(Detect_Infinite_Recursion): Add explicit parameter Process to
	instantiation of Traverse_Body to avoid unreferenced warning.
	(Check_Overriding_Inherited_Interfaces): Removed.
	(Register_Interface_DT_Entry): Code cleanup.
	(Register_Predefined_DT_Entry): Code cleanup.
	(Expand_Inlined_Call.Rewrite_Procedure_Call): Do not omit block around
	inlined statements if within a transient scope.
	(Expand_Inlined_Call.Process_Formals): When replacing occurrences of
	formal parameters with occurrences of actuals in inlined body, establish
	visibility on the proper view of the actual's subtype for the body's
	context.
	(Freeze_Subprogram): Do nothing if we are compiling under full ABI
	compatibility mode and we have an imported CPP subprogram because
	for now we assume that imported CPP primitives correspond with
	objects whose constructor is in the CPP side (and therefore we
	don't need to generate code to register them in the dispatch table).
	(Expand_Actuals): Introduce copy of actual, only if it might be a bit-
	aligned selected component.
	(Add_Call_By_Copy_Node): Add missing code to handle the case in which
	the actual of an in-mode parameter is a type conversion.
	(Expand_Actuals): If the call does not come from source and the actual
	is potentially misaligned, let gigi handle it rather than rejecting the
	(Expand_N_Subprogram_Body, Freeze_Subprogram): set subprograms returning
	Class Wide types as returning by reference independantly of their
	controlled status since with HIE runtimes class wide types are not
	potentially controlled anymore.

From-SVN: r118260
2006-10-31 18:55:05 +01:00
Eric Botcazou
efd6ef80ca re PR target/24071 (__gthread_active_p vs __gthread_once)
PR target/24071
	* gthr-posix.h (__gthread_active_p): New implementation on Solaris.
	* gthr-posix95.h (__gthread_active_p): Likewise.

From-SVN: r118259
2006-10-31 17:54:58 +00:00
Bob Duff
9e5ac75fe2 exp_ch5.ads (Expand_N_Extended_Return_Statement): New procedure.
2006-10-31  Bob Duff  <duff@adacore.com>
	    Robert Dewar  <dewar@adacore.com>
	    Gary Dismukes  <dismukes@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>

	* exp_ch5.ads (Expand_N_Extended_Return_Statement): New procedure.

        * exp_ch5.adb (Expand_N_Loop_Statement): Do validity checks on range
	(Expand_N_Assignment_Statement): Call
	Make_Build_In_Place_Call_In_Assignment if the right-hand side is a
	build-in-place function call. Currently, this can happen only for
	assignments that come from aggregates.
	Add -gnatd.l --Use Ada 95 semantics for limited function returns,
	in order to alleviate the upward compatibility introduced by AI-318.
	(Expand_N_Extended_Return_Statement): Add support for handling the
	return object as a build-in-place result.
	(Expand_Non_Function_Return): Implement simple return statements nested
	within an extended return.
	(Enable_New_Return_Processing): Turn on the new processing of return
	statements.
	(Expand_Non_Function_Return): For a return within an extended return,
	don't raise Program_Error, because Sem_Ch6 now gives a warning.
	(Expand_N_Extended_Return_Statement): Implement AI-318
	(Expand_Simple_Function_Return): Ditto.
	(Expand_N_If_Statement): Handle new -gnatwt warning
	(Expand_N_Case_Statement): Handle new -gnatwt warning
	(Expand_N_Assignment): Handle assignment to the Priority attribute of
	a protected object.
	(Expand_N_Assignment_Statement): Implement -gnatVe/E to control
	validity checking of assignments to elementary record components.
	(Expand_N_Return_Statement): return Class Wide types on the secondary
	stack independantly of their controlled status since with HIE runtimes,
	class wide types are not potentially controlled anymore.

	* expander.adb (Expand): Add case for new N_Extended_Return_Statement
	node kind.

	* exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Avoid
	Expand_Cleanup_Actions in case of N_Extended_Return_Statement, because
	it expects a block, procedure, or task. The return statement will get
	turned into a block, and Expand_Cleanup_Actions will happen then.

From-SVN: r118258
2006-10-31 18:54:50 +01:00
Javier Miranda
20b5d666e7 exp_ch4.adb (Expand_N_Type_Conversion): Handle missing interface type conversion.
2006-10-31  Javier Miranda  <miranda@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>
	    Bob Duff  <duff@adacore.com>
	    Gary Dismukes  <dismukes@adacore.com>
	    Robert Dewar  <dewar@adacore.com>
        
        * exp_ch4.adb (Expand_N_Type_Conversion): Handle missing interface type
	conversion.
        (Expand_N_In): Do validity checks on range
	(Expand_Selected_Component): Use updated for of Denotes_Discriminant.
	(Expand_N_Allocator): For "new T", if the object is constrained by
	discriminant defaults, allocate the right amount of memory, rather than
	the maximum for type T.
	(Expand_Allocator_Expression): Suppress the call to Remove_Side_Effects
	when the allocator is initialized by a build-in-place call, since the
	allocator is already rewritten as a reference to the function result,
	and this prevents an unwanted duplication of the function call.
	Add with and use of Exp_Ch6.
	(Expand_Allocator_Expresssion): Check for an allocator whose expression
	is a call to build-in-place function and apply
	Make_Build_In_Place_Call_In_Allocator to the call (for both tagged and
	untagged designated types).
	(Expand_N_Unchecked_Type_Conversion): Do not do integer literal
	optimization if source or target is biased.
	(Expand_N_Allocator): Add comments for case of an allocator within a
	function that returns an anonymous access type designating tasks.
	(Expand_N_Allocator): apply discriminant checks for access
	discriminants of anonymous access types (AI-402, AI-416)

From-SVN: r118257
2006-10-31 18:54:34 +01:00
Javier Miranda
3476f94908 exp_ch3.ads, [...] (Expand_N_Object_Declaration): Do not register in the final list objects containing class-wide interfaces...
2006-10-31  Javier Miranda  <miranda@adacore.com>
	    Robert Dewar  <dewar@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>
	    Gary Dismukes  <dismukes@adacore.com>

        * exp_ch3.ads, exp_ch3.adb (Expand_N_Object_Declaration): Do not
	register in the final list objects containing class-wide interfaces;
	otherwise we incorrectly register the tag of the interface in the final
	list.
        (Make_Controlling_Function_Wrappers): Add missing barrier to do not
        generate the wrapper if the parent primitive is abstract. This is
        required to report the correct error message.
        (Expand_N_Subtype_Indication): Do validity checks on range
	(Clean_Task_Names): If an initialization procedure includes a call to
	initialize a task (sub)component, indicate that the procedure will use
	the secondary stack.
	(Build_Init_Procedure, Init_Secondary_Tags): Enable full ABI
	compatibility for interfacing with CPP by default.
	(Expand_N_Object_Declaration): Only build an Adjust call when the
	object's type is a nonlimited controlled type.
	* exp_ch3.adb: Add with and use of Exp_Ch6.
	(Expand_N_Object_Declaration): Check for object initialization that is a
	call to build-in-place function and apply Make_Build_In_Place_Call_In_
	Object_Declaration to the call.
	(Freeze_Type): When the designated type of an RACW was not frozen at the
	point where the RACW was declared, validate the primitive operations
	with respect to E.2.2(14) when it finally is frozen.
	(Build_Initialization_Call,Expand_Record_Controller): Rename
	Is_Return_By_Reference_Type to be Is_Inherently_Limited_Type, because
	return-by-reference has no meaning in Ada 2005.
	(Init_Secondary_Tags): Add missing call to Set_Offset_To_Top
	to register tag of the immediate ancestor interfaces in the
	run-time structure.
	(Init_Secondary_Tags): Moved to the specification to allow the
	initialization of extension aggregates with abstract interfaces.
	(Build_Master_Renaming): Make public, for use by function declarations
	whose return type is an anonymous access type.
	(Freeze_Record_Type): Replace call to Insert_List_Before by call to
	Insert_List_Before_And_Analyze after the generation of the specs
	associated with null procedures.
	(Expand_Tagged_Root): Update documentation in its specification.
	(Init_Secondary_Tags): Update documentation.
	(Build_Init_Procedure): If we are compiling under CPP full ABI compa-
	tibility mode and the immediate ancestor is a CPP_Pragma tagged type
	then generate code to inherit the contents of the dispatch table
	directly from the ancestor.
	(Expand_Record_Controller): Insert controller component after tags of
	implemented interfaces.
	(Freeze_Record_Type): Call new procedure Make_Null_Procedure_Specs to
	create null procedure overridings when null procedures are inherited
	from interfaces.
	(Make_Null_Procedure_Specs): New procedure to generate null procedure
	declarations for overriding null primitives inherited from interfaces.
	(Is_Null_Interface_Procedure): New function in
	Make_Null_Procedure_Specs.
	(Make_Predefined_Primitive_Specs/Predefined_Primitive_Bodies): If the
	immediate ancestor of a tagged type is an abstract interface type we
	must generate the specification of the predefined primitives associated
	with controlled types (because the dispatch table of the ancestor is
	null and hence these entries cannot be inherited). This is required to
	elaborate well the dispatch table.

From-SVN: r118256
2006-10-31 18:54:22 +01:00
Robert Dewar
d705ba7827 exp_ch2.adb: Change Is_Lvalue to May_Be_Lvalue
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* exp_ch2.adb: Change Is_Lvalue to May_Be_Lvalue
	(Expand_Entity_Reference): Correct error of not handling subprogram
	formals in current_value processing.

From-SVN: r118255
2006-10-31 18:54:05 +01:00
Ed Schonberg
7ce611e210 exp_attr.adb:
2006-10-31  Ed Schonberg  <schonberg@adacore.com>
	    Thomas Quinot  <quinot@adacore.com>
	    Javier Miranda  <miranda@adacore.com>
	    Robert Dewar  <dewar@adacore.com>
        
        * exp_attr.adb: 
        (Expand_Access_To_Protected_Op): If the context indicates that an access
        to a local operation may be transfered outside of the object, create an
        access to the wrapper operation that must be used in an external call.
	(Expand_N_Attribute_Reference, case Attribute_Valid): For the AAMP
	target, pass the Valid attribute applied to a floating-point prefix on
	to the back end without expansion.
	(Storage_Size): Use the new run-time function Storage_Size to retrieve
	the allocated storage when it is specified by a per-object expression.
	(Expand_N_Attribute_Reference): Add case for Attribute_Stub_Type.
	Nothing to do here, the attribute has been rewritten during semantic
	analysis.
	(Expand_Attribute_Reference): Handle expansion of the new Priority
	attribute
	(Find_Fat_Info): Handle case of universal real
	(Expand_Access_To_Protected_Op): Fix use of access to protected
	subprogram from inside the body of a protected entry.
	(Expand_Access_To_Protected_Op): Common procedure for the expansion of
	'Access and 'Unrestricted_Access, to transform the attribute reference
	into a fat pointer.
	(Is_Constrained_Aliased_View): New predicate to help determine whether a
	subcomponent's enclosing variable is aliased with a constrained subtype.
	(Expand_N_Attribute_Reference, case Attribute_Constrained): For Ada_05,
	test Is_Constrained_Aliased_View rather than Is_Aliased_View, because
	an aliased prefix must be known to be constrained in order to use True
	for the attribute value, and now it's possible for some aliased views
	to be unconstrained.

From-SVN: r118254
2006-10-31 18:53:50 +01:00
Bob Duff
c5ee5ad288 exp_aggr.adb (Build_Record_Aggr_Code): For extension aggregates...
2006-10-31  Bob Duff  <duff@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>

	* exp_aggr.adb (Build_Record_Aggr_Code): For extension aggregates, if
	the parent part is a build-in-place function call, generate assignments.
	(Expand_Record_Aggregate): Call Convert_To_Assignments if any components
	are build-in-place function calls.
	(Replace_Self_Reference): New subsidiary of
	Make_OK_Assignment_Statement, to replace an access attribute that is a
	self-reference into an access to the appropriate component of the
	target object. Generalizes previous mechanism to handle self-references
	nested at any level.
	(Is_Self_Referential_Init): Remove, not needed.
	(Is_Self_Referential_Init): New predicate to simplify handling of self
	referential components in record aggregates.
	(Has_Default_Init_Comps, Make_OK_Assignment_Statement): Add guard to
	check for presence of entity before checking for self-reference.
	(Has_Default_Init_Comps): Return True if a component association is a
	self-reference to the enclosing type, which can only come from a
	default initialization.
	(Make_OK_Assignment_Statement): If the expression is of the form
	Typ'Acc, where Acc is an access attribute, the expression comes from a
	default initialized self-referential component.
	(Build_Record_Aggr_Code): If the type of the aggregate is a tagged type
	that has been derived from several abstract interfaces we must also
	initialize the tags of the secondary dispatch tables.

From-SVN: r118253
2006-10-31 18:53:35 +01:00
Robert Dewar
e84a19613d erroutc.ads, [...] (Set_Specific_Warning_On): New procedure
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* erroutc.ads, erroutc.adb (Set_Specific_Warning_On): New procedure
	(Set_Specific_Warning_Off): New procedure
	(Warning_Specifically_Suppressed): New function
	(Validate_Specific_Warnings): New procedure
	(Output_Msg_Text): Complete rewrite to support -gnatjnn

	* err_vars.ads: Implement insertion character ~ (insert string)

From-SVN: r118252
2006-10-31 18:53:20 +01:00
Robert Dewar
4ecc031cdb errout.ads, errout.adb (Finalize): Implement switch -gnatd.m Avoid abbreviation Creat
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* errout.ads, errout.adb (Finalize): Implement switch -gnatd.m
	Avoid abbreviation Creat
	(Finalize): List all sources in extended mail source if -gnatl
	switch is active.
	Suppress copyright notice to file in -gnatl=f mode if -gnatd7 set
	(Finalize): Implement new -gnatl=xxx switch to output listing to file
	(Set_Specific_Warning_On): New procedure
	(Set_Specific_Warning_Off): New procedure
	Add implementation of new insertion \\
	(Error_Msg_Internal): Add handling for Error_Msg_Line_Length
	(Unwind_Internal_Type): Improve report on anonymous access_to_subprogram
	types.
	(Error_Msg_Internal): Make sure that we set Last_Killed to
	True when a message from another package is suppressed.
	Implement insertion character ~ (insert string)
	(First_Node): Minor adjustments to get better placement.

	* frontend.adb: 
	Implement new -gnatl=xxx switch to output listing to file

	* gnat1drv.adb: 
	Implement new -gnatl=xxx switch to output listing to file

        * opt.ads: (Warn_On_Questionable_Missing_Paren): New switch
	(Commands_To_Stdout): New flag
	Implement new -gnatl=xxx switch to output listing to file
	New switch Dump_Source_Text
	(Warn_On_Deleted_Code): New warning flag for -gnatwt
	Define Error_Msg_Line_Length
	(Warn_On_Assumed_Low_Bound): New switch

	* osint.ads, osint.adb
	(Normalize_Directory_Name): Fix bug.
	Implement new -gnatl=xxx switch to output listing to file
	(Concat): Removed, replaced by real concatenation
	Make use of concatenation now allowed in compiler
	(Executable_Prefix.Get_Install_Dir): First get the full path, so that
	we find the 'lib' or 'bin' directory even when the tool has been
	invoked with a relative path.
	(Executable_Name): New function taking string parameters.

	* osint-c.ads, osint-c.adb: 
	Implement new -gnatl=xxx switch to output listing to file

	* sinput-d.adb: Change name Creat_Debug_File to Create_Debug_File

	* switch-c.adb: 
	Implement new -gnatl=xxx switch to output listing to file
	Recognize new -gnatL switch
	(no longer keep in old warning about old style usage)
	Use concatenation to simplify code
	Recognize -gnatjnn switch
	(Scan_Front_End_Switches): Clean up handling of -gnatW
	(Scan_Front_End_Switches): Include Warn_On_Assumed_Low_Bound for -gnatg

From-SVN: r118251
2006-10-31 18:52:20 +01:00
Robert Dewar
6e443c9013 einfo.ads, einfo.adb (Obsolescent_Warning): Now defined on all entities.
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>
	    Bob Duff  <duff@adacore.com>

	* einfo.ads, einfo.adb (Obsolescent_Warning): Now defined on all
	entities. Move other fields around to make this possible
	(Is_Derived_Type): Add missing call to Is_Type.
	(Extra_Formals): New function for subprograms, entries, subprogram
	types.
	(Set_Extra_Formals): New procedure for subprograms, entries, subp types.
	(First_Formal_With_Extras): New function for subprogs, entries, subp
	types.
	(Write_Field28_Name): New procedure for node display of "Extra_Formals".
	Add node information for E_Return_Statement.
	(Elaborate_Body_Desirable): New flag
	(Is_Return_By_Reference_Type): Rename Is_Return_By_Reference_Type
	to be Is_Inherently_Limited_Type, because return-by-reference has
	no meaning in Ada 2005.
	(E_Return_Statement): New entity kind.
	(Return_Applies_To): Field of E_Return_Statement.
	(Is_Return_Object): New flag in object entities.
	(Is_Dynamic_Scope): Make it True for E_Return_Statement.
	(Must_Have_Preelab_Init): New flag
	(Known_To_Have_Preelab_Init): New flag
	(Is_Formal_Object): Move from Sem_Ch8 body to Einfo
	(Is_Visible_Formal): New flag on entities in formal packages.
	(Low_Bound_Known): New flag
	(Non_Limited_View, Set_Non_Limited_View): Add membership test agains
	Incomplete_Kind.
	(Write_Field17_Name): Correct spelling of Non_Limited_View. Add name
	output when Id is an incomplete subtype.

From-SVN: r118250
2006-10-31 18:51:56 +01:00
Robert Dewar
cce685621b clean.adb, [...]: Fix bad table increment values (much too small)
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* clean.adb, gnatname.adb, gnatsym.adb, prep.adb, prep.ads,
	prepcomp.adb, prj.ads, prj-strt.adb, sem_maps.ads,
	vms_conv.adb: Fix bad table increment values (much too small)

	* table.adb (Realloc): Make sure we get at least some new elements
	Defends against silly small values for table increment

From-SVN: r118249
2006-10-31 18:51:38 +01:00
Robert Dewar
c064e06602 treepr.adb: Use new subtype N_Membership_Test
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>

	* treepr.adb: Use new subtype N_Membership_Test

        * checks.ads, checks.adb: Add definition for Validity_Check
        (Range_Or_Validity_Checks_Suppressed): New function
        (Ensure_Valid): Test Validity_Check suppressed
        (Insert_Valid_Check): Test Validity_Check suppressed
        (Insert_Valid_Check): Preserve Do_Range_Check flag
	(Validity_Check_Range): New procedure
	(Expr_Known_Valid): Result of membership test is always valid
	(Selected_Range_Checks): Range checks cannot be applied to discriminants
	by themselves. Disabling those checks must also be done for task types,
	where discriminants may be used for the bounds of entry families.
	(Apply_Address_Clause_Check): Remove side-effects if address expression
	is non-static and is not the name of a declared constant.
	(Null_Exclusion_Static_Checks): Extend to handle Function_Specification.
	Code cleanup and new error messages.
	(Enable_Range_Check): Test for some cases of suppressed checks
	(Generate_Index_Checks): Suppress index checks if index checks are
	suppressed for array object or array type.
	(Apply_Selected_Length_Checks): Give warning for compile-time detected
	length check failure, even if checks are off.
	(Ensure_Valid): Do not generate a check on an indexed component whose
	prefix is a packed boolean array.
	* checks.adb: (Alignment_Checks_Suppressed): New function
	(Apply_Address_Clause_Check): New procedure, this is a completely
	rewritten replacement for Apply_Alignment_Check
	(Get_E_Length/Get_E_First_Or_Last): Add missing barrier to ensure that
	we request a discriminal value only in case of discriminants.
	(Apply_Discriminant_Check): For Ada_05, only call Get_Actual_Subtype for
	assignments where the target subtype is unconstrained and the target
	object is a parameter or dereference (other aliased cases are known
	to be unconstrained).

From-SVN: r118248
2006-10-31 18:51:20 +01:00
Jose Ruiz
ff9625b0fa cal.c: Use the header sys/time.h for VxWorks 6.2 or greater when using RTPs.
2006-10-31  Jose Ruiz  <ruiz@adacore.com>

	* cal.c: Use the header sys/time.h for VxWorks 6.2 or greater when
	using RTPs.

	* mkdir.c: Use a different version of mkdir for VxWorks 6.2 or greater
	when using RTPs.

From-SVN: r118247
2006-10-31 18:51:01 +01:00
Robert Dewar
db89aef26f bindusg.ads, [...]: Change to package and rename procedure as Display...
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* bindusg.ads, bindusg.adb:
	Change to package and rename procedure as Display, which
	now ensures that it only outputs usage information once.

From-SVN: r118246
2006-10-31 18:50:47 +01:00
Robert Dewar
bd8b9b1eae binde.adb (Better_Choice, [...]): Implement new preferences.
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* binde.adb (Better_Choice, Worse_Choice): Implement new preferences.

From-SVN: r118245
2006-10-31 18:50:31 +01:00
Javier Miranda
bfef8d0d62 a-tags.ads, a-tags.adb:
2006-10-31  Javier Miranda  <miranda@adacore.com>

	* a-tags.ads, a-tags.adb: 
	(Predefined_DT): New function that improves readability of the code.
	(Get_Predefined_Prim_Op_Address, Set_Predefined_Prim_Op_Address,
	Inherit_DT): Use the new function Predefined_DT to improve code
	readability.
	(Register_Interface_Tag): Update assertion.
	(Set_Interface_Table): Update assertion.
	(Interface_Ancestor_Tags): New subprogram required to implement AI-405:
	determining progenitor interfaces in Tags.
	(Inherit_CPP_DT): New subprogram.

        * exp_disp.adb (Expand_Interface_Thunk): Suppress checks during the
	analysis of the thunk code.
        (Expand_Interface_Conversion): Handle run-time conversion of
        access to class wide types.
	(Expand_Dispatching_Call): When generating the profile for the
	subprogram itype for a dispatching operation, properly terminate the
	formal parameters chaind list (set the Next_Entity of the last formal
	to Empty).
	(Collect_All_Interfaces): Removed. This routine has been moved to
	sem_util and renamed as Collect_All_Abstract_Interfaces.
	(Set_All_DT_Position): Hidden entities associated with abstract
	interface primitives are not taken into account in the check for
	3.9.3(10); this check is done with the aliased entity.
	(Make_DT, Set_All_DT_Position): Enable full ABI compatibility for
	interfacing with CPP by default.
	(Expand_Interface_Conversion): Add missing support for static conversion
	from an interface to a tagged type.
	(Collect_All_Interfaces): Add new out formal containing the list of
	abstract interface types to cleanup the subprogram Make_DT.
	(Make_DT): Update the code to generate the table of interfaces in case
	of abstract interface types.
	(Is_Predefined_Dispatching_Alias): New function that returns true if
	a primitive is not a predefined dispatching primitive but it is an
	alias of a predefined dispatching primitive.
	(Make_DT): If the ancestor of the type is a CPP_Class and we are
	compiling under full ABI compatibility mode we avoid the generation of
	calls to run-time services that fill the dispatch tables because under
	this mode we currently inherit the dispatch tables in the IP subprogram.
	(Write_DT): Emit an "is null" indication for a null procedure primitive.
	(Expand_Interface_Conversion): Use an address as the type of the formal
	of the internally built function that handles the case in which the
	target type is an access type.

From-SVN: r118244
2006-10-31 18:50:11 +01:00
Robert Dewar
3cb8344bd3 a-dispat.ads, [...]: New files.
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Jose Ruiz  <ruiz@adacore.com>

	* a-dispat.ads, a-diroro.ads, a-diroro.adb: New files.

	* ali.adb (Get_Name): Properly handle scanning of wide character names
	encoded with brackets notation.
	(Known_ALI_Lines): Add S lines to this list.
	(Scan_ALI): Acquire S (priority specific dispatching) lines.
	New flag Elaborate_All_Desirable in unit table

	* ali.ads (Priority_Specific_Dispatching): Add this range of
	identifiers to be used for Priority_Specific_Dispatching table entries.
	(ALIs_Record): Add First_Specific_Dispatching and
	Last_Specific_Dispatching that point to the first and last entries
	respectively in the priority specific dispatching table for this unit.
	(Specific_Dispatching): Add this table for storing each S (priority
	specific dispatching) line encountered in the input ALI file.
	New flag Elaborate_All_Desirable in unit table

	* bcheck.adb: (Check_Configuration_Consistency): Add call to
	Check_Consistent_Dispatching_Policy.
	(Check_Consistent_Dispatching_Policy): Add this procedure in charge of
	verifying that the use of Priority_Specific_Dispatching,
	Task_Dispatching_Policy, and Locking_Policy is consistent across the
	partition.

	* bindgen.adb: (Public_Version_Warning): function removed.
	(Set_PSD_Pragma_Table): Add this procedure in charge of getting the
	required information from ALI files in order to initialize the table
	containing the specific dispatching policy.
	(Gen_Adainit_Ada): Generate the variables required for priority specific
	dispatching entries (__gl_priority_specific_dispatching and
	__gl_num_specific_dispatching).
	(Gen_Adainit_C): Generate the variables required for priority specific
	dispatching entries (__gl_priority_specific_dispatching and
	__gl_num_specific_dispatching).
	(Gen_Output_File): Acquire settings for Priority_Specific_Dispatching
	pragma entries.
	(Gen_Restrictions_String_1, Gen_Restrictions_String_2): Removed.
	(Gen_Restrictions_Ada, Gen_Restrictions_C, Set_Boolean): New procedures.
	(Tab_To): Removed.
	(Gen_Output_File_Ada/_C): Set directly __gl_xxx variables instead of
	a call to gnat_set_globals.
	Generate a string containing settings from
	Priority_Specific_Dispatching pragma entries.
	(Gen_Object_Files_Options): Do not include the runtime libraries when
	pragma No_Run_Time is specified.

	* init.c (__gnat_install_handler, case FreeBSD): Use SA_SIGINFO, for
	consistency with s-intman-posix.adb.
	(__gnat_error_handler, case FreeBSD): Account for the fact that the
	handler is installed with SA_SIGINFO.
	(__gnat_adjust_context_for_raise, FreeBSD case): New function for
	FreeBSD ZCX support, copied from Linux version.
	Add MaRTE-specific definitions for the linux target. Redefine sigaction,
	sigfillset, and sigemptyset so the routines defined by MaRTE.
	(__gl_priority_specific_dispatching): Add this variable that stores the
	string containing priority specific dispatching policies in the
	partition.
	(__gl_num_specific_dispatching): Add this variable that indicates the
	highest priority for which a priority specific dispatching pragma
	applies.
	(__gnat_get_specific_dispatching): Add this routine that returns the
	priority specific dispatching policy, as set by a
	Priority_Specific_Dispatching pragma appearing anywhere in the current
	partition. The input argument is the priority number, and the result
	is the upper case first character of the policy name.
	(__gnat_set_globals): Now a dummy function.
	(__gnat_handle_vms_condition): Feed adjust_context_for_raise with
	mechargs instead of sigargs, as the latter can be retrieved from the
	former and sigargs is not what we want on ia64.
	(__gnat_adjust_context_for_raise, alpha-vms): Fetch sigargs from the
	mechargs argument.
	(__gnat_adjust_context_for_raise, ia64-vms): New function.
	(tasking_error): Remove unused symbol.
	(_abort_signal): Move this symbol to the IRIX specific part since this
	is the only target that uses this definition.
	(Check_Abort_Status): Move this symbol to the IRIX specific part since
	this is the only target that uses this definition.
	(Lock_Task): Remove unused symbol.
	(Unlock_Task): Remove unused symbol.

	* lib-writ.adb (Write_ALI): Output new S lines for
	Priority_Specific_Dispatching pragmas.
	Implement new flag BD for elaborate body desirable

	* lib-writ.ads: Document S lines for Priority Specific Dispatching.
	(Specific_Dispatching): Add this table for storing the entries
	corresponding to Priority_Specific_Dispatching pragmas.
	Document new BD flag for elaborate body desirable

	* par-prag.adb (Prag): Add Priority_Specific_Dispatching to the list
	of known pragmas.

From-SVN: r118243
2006-10-31 18:49:53 +01:00
Robert Dewar
9b832db55c lib.adb, lib.ads: (In_Predefined_Unit): New functions
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* lib.adb, lib.ads: (In_Predefined_Unit): New functions

	* a-finali.ads, a-ngcoty.ads, a-strbou.ads, a-stream.ads, a-strmap.ads, 
	a-strunb.ads, a-stwibo.ads, a-stwima.ads, a-stwiun.ads, a-taside.ads, 
	a-coorse.ads, a-convec.ads, a-coinve.ads, a-cohama.ads, a-ciorse.ads, 
	a-cihama.ads, a-cihase.ads, a-cohase.ads, a-ciorma.ads, a-coorma.ads, 
	a-ciormu.ads, a-coormu.ads, a-stzbou.ads, a-stzmap.ads, a-stzunb.ads, 
	a-except-2005.ads: Add pragma Preelaborable_Warning

From-SVN: r118242
2006-10-31 18:49:05 +01:00
Bob Duff
498a5a8414 a-filico.adb (Finalize(List_Controller)): Mark the finalization list as finalization-started...
2006-10-31  Bob Duff  <duff@adacore.com>

	* a-filico.adb (Finalize(List_Controller)): Mark the finalization list
	as finalization-started, so we can raise Program_Error on 'new'.

	* s-finimp.adb: Raise Program_Error on 'new' if finalization of the
	collection has already started.

	* s-finimp.ads (Collection_Finalization_Started): Added new special
	flag value for indicating that a collection's finalization has started.

	* s-tassta.adb (Create_Task): Raise Program_Error on an attempt to
	create a task whose master has already waited for dependent tasks.

From-SVN: r118241
2006-10-31 18:48:46 +01:00
Pascal Obry
18f2228492 adaint.c (__gnat_get_libraries_from_registry): Call explicitly the ASCII version of the registry API.
2006-10-31  Pascal Obry  <obry@adacore.com>
	    Eric Botcazou  <ebotcazou@adacore.com>
	    Vincent Celier  <celier@adacore.com>

	* adaint.c (__gnat_get_libraries_from_registry): Call explicitly the
	ASCII version of the registry API. This is needed as the GNAT runtime
	is now UNICODE by default.
	Include version.h.
	(get_gcc_version): Do not hardcode the return value.
	(__gnat_file_time_name): On Windows properly set the default returned
	value to -1 which corresponds to Invalid_Time.
	(__gnat_fopen): New routine. A simple wrapper on all plateforms
	 except on Windows where it does conversion for unicode support.
	(__gnat_freopen): Idem.
	(__gnat_locate_exec_on_path): If environment variable PATH does not
	exist, return a NULL pointer

	* adaint.h: (__gnat_fopen): Declare.
	(__gnat_freopen): Likewise.

	* mingw32.h (_tfreopen): Define this macro here for older MingW
	version.
	Activate the unicode support on platforms using a MingW runtime
	version 3.9 or newer.

	* s-crtl.ads (fopen): Is now an import to the wrapper __gnat_freopen.
	This is needed for proper unicode support on Windows.
	(freopen): Idem.

From-SVN: r118240
2006-10-31 18:47:20 +01:00
Jose Ruiz
d1fa78e300 s-osinte-vxworks.ads, [...]:
2006-10-31  Jose Ruiz  <ruiz@adacore.com>

	* s-osinte-vxworks.ads, s-osinte-vxworks.adb: 
	(getpid): New body for this function that uses the underlying taskIdSelf
	function for VxWorks 5 and VxWorks 6 in kernel mode.
	(unsigned_int): New type, modular to allow logical bit operations.
	(taskOptionsGet): New imported function.

	* s-taspri-vxworks.ads (Private_Data): Change the type for the LWP
	field to be compliant with the type used by the corresponding operating
	system primitive.

From-SVN: r118239
2006-10-31 18:47:01 +01:00
Eric Botcazou
8dbb621ea2 s-taprop-solaris.adb: (Time_Slice_Val): Change type to Integer.
2006-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* s-taprop-solaris.adb: (Time_Slice_Val): Change type to Integer.
	(Initialize): Add type conversions required by above change.

From-SVN: r118238
2006-10-31 18:46:26 +01:00
Vincent Celier
f95969eabc mlib-tgt-lynxos.adb, [...]: Use Append_To, instead of Ext_To, when building the library file name
2006-10-31  Vincent Celier  <celier@adacore.com>
	    Eric Botcazou  <ebotcazou@adacore.com>

	* mlib-tgt-lynxos.adb, mlib-tgt-mingw.adb, mlib-tgt-tru64.adb,
	mlib-tgt-aix.adb, mlib-tgt-irix.adb, mlib-tgt-hpux.adb,
	mlib-tgt-linux.adb, mlib-tgt-solaris.adb: Use Append_To, instead of
	Ext_To, when building the library file name

	* mlib-tgt-vxworks.adb: ditto.
	(Get_Target_Suffix): Add support for x86 targets.

	* mlib-fil.ads, mlib-fil.adb: (Append_To): New function

	* mlib-tgt-darwin.adb: 
	Use Append_To, instead of Ext_To, when building the library file name
	(Flat_Namespace): New global variable.
	(No_Shared_Libgcc_Switch): Rename to No_Shared_Libgcc_Options.
	(Shared_Libgcc_Switch): Rename to With_Shared_Libgcc_Options.
	(Link_Shared_Libgcc): Delete.
	(Build_Dynamic_Library): Adjust for above changes.
	Use Opt package.
	(Build_Dynamic_Library): Pass -shared-libgcc if GCC 4 or later.

From-SVN: r118237
2006-10-31 18:45:59 +01:00
Robert Dewar
f28ded01c6 system-vms_64.ads, [...]: Add pragma Warnings(Off...
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads, 
	system-linux-hppa.ads, system-hpux-ia64.ads, 
	system-lynxos-ppc.ads, system-lynxos-x86.ads, system-tru64.ads, 
	system-vxworks-sparcv9.ads, system-solaris-x86.ads, 
	system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads, 
	system-vxworks-m68k.ads, system-vxworks-mips.ads, system-interix.ads, 
	system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads, 
	system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads, 
	system-vxworks-alpha.ads, system.ads: Add pragma Warnings(Off,
	Default_Bit_Order) to kill constant condition warnings for references
	to this switch.

From-SVN: r118236
2006-10-31 18:45:31 +01:00
Arnaud Charlet
ec946d1845 s-osinte-posix.adb, [...] (To_Target_Priority): New function maps from System.Any_Priority to a POSIX priority on the target.
2006-10-31  Arnaud Charlet  <charlet@adacore.com>
	    Jose Ruiz  <ruiz@adacore.com>

	* s-osinte-posix.adb, s-osinte-linux.ads, s-osinte-freebsd.adb, 
	s-osinte-freebsd.ads, s-osinte-solaris-posix.ads, s-osinte-hpux.ads, 
	s-osinte-darwin.adb, s-osinte-darwin.ads, s-osinte-lynxos-3.ads,
	s-osinte-lynxos-3.adb (To_Target_Priority): New function maps from
	System.Any_Priority to a POSIX priority on the target.

	* system-linux-ia64.ads: 
	Extend range of Priority types on Linux to use the whole range made
	available by the system.

	* s-osinte-aix.adb, s-osinte-aix.ads (To_Target_Priority): New
	function maps from System.Any_Priority to a POSIX priority on the
	target.
	(PTHREAD_PRIO_PROTECT): Set real value.
	(PTHREAD_PRIO_INHERIT): Now a function.
	(SIGCPUFAIL): New signal.
	(Reserved): Add SIGALRM1, SIGWAITING, SIGCPUFAIL, since these signals
	are documented as reserved by the OS.

	* system-aix.ads: Use the full range of priorities provided by the
	system on AIX.

	* s-taprop-posix.adb: Call new function To_Target_Priority.
	(Set_Priority): Take into account Task_Dispatching_Policy and
	Priority_Specific_Dispatching pragmas when determining if Round Robin
	must be used for scheduling the task.

	* system-linux-x86_64.ads, system-linux-x86.ads, 
	system-linux-ppc.ads: Extend range of Priority types on Linux to use
	the whole range made available by the system.

	* s-taprop-vms.adb, s-taprop-mingw.adb, s-taprop-irix.adb, 
	s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-hpux-dce.adb, 
	s-taprop-lynxos.adb (Finalize_TCB): invalidate the stack-check cache
	when deallocating the TCB in order to avoid potential references to
	deallocated data.
	(Set_Priority): Take into account Task_Dispatching_Policy and
	Priority_Specific_Dispatching pragmas when determining if Round Robin
	or FIFO within priorities must be used for scheduling the task.

	* s-taprop-vxworks.adb (Enter_Task): Store the user-level task id in
	the Thread field (to be used internally by the run-time system) and the
	kernel-level task id in the LWP field (to be used by the debugger).
	(Create_Task): Reorganize to unify the calls to taskSpawn into a single
	instance, and propagate the current task options to the spawned task.
	(Set_Priority): Take into account Priority_Specific_Dispatching pragmas.
	(Initialize): Set Round Robin dispatching when the corresponding pragma
	is in effect.

From-SVN: r118235
2006-10-31 18:45:11 +01:00
Hristian Kirtchev
6e451134f0 a-calend-vms.adb (Leap_Sec_Ops): Temp body for package in private part of Ada.Calendar...
2006-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
	    Jose Ruiz  <ruiz@adacore.com>

	* a-calend-vms.adb (Leap_Sec_Ops): Temp body for package in private
	part of Ada.Calendar: all subprogram raise Unimplemented.
	(Split_W_Offset): Temp function body, raising Unimplemented

	* a-calend.ads, a-calend-vms.ads: 
	Add imported variable Invalid_TZ_Offset used to designate targets unable
	to support time zones.
	(Unimplemented): Temporary function raised by the body of new
	subprograms below.
	(Leap_Sec_Ops): New package in the private part of Ada.Calendar. This
	unit provides handling of leap seconds and is used by the new Ada 2005
	packages Ada.Calendar.Arithmetic and Ada.Calendar.Formatting.
	(Split_W_Offset): Identical spec to that of Ada.Calendar.Split. This
	version returns an extra value which is the offset to UTC.

	* a-calend.adb (Split_W_Offset): Add call to localtime_tzoff.
	(Leap_Sec_Ops): New body for package in private part of Ada.Calendar.
	(Split_W_Offset): New function body.
	(Time_Of): When a date is close to UNIX epoch, compute the time for
	that date plus one day (that amount is later substracted after
	executing mktime) so there are no problems with time zone adjustments.

	* a-calend-mingw.adb: Remove Windows specific version no longer needed.

	* a-calari.ads, a-calari.adb, a-calfor.ads, a-calfor.adb,
	a-catizo.ads, a-catizo.adb: New files.

        * impunit.adb: Add new Ada 2005 entries

	* sysdep.c: Add external variable __gnat_invalid_tz_offset.
	Rename all occurences of "__gnat_localtime_r" to
	"__gnat_localtime_tzoff".
	(__gnat_localtime_tzoff for Windows): Add logic to retrieve the time
	zone data and calculate the GMT offset.
	(__gnat_localtime_tzoff for Darwin, Free BSD, Linux, Lynx and Tru64):
	Use the field "tm_gmtoff" to extract the GMT offset.
	(__gnat_localtime_tzoff for AIX, HPUX, SGI Irix and Sun Solaris): Use
	the external variable "timezone" to calculate the GMT offset.

From-SVN: r118234
2006-10-31 18:44:55 +01:00
Thomas Quinot
014c9caac5 g-socthi-vxworks.adb (C_Gethostbyname): Fix wrong test for returned error status.
2006-10-31  Thomas Quinot  <quinot@adacore.com>

	* g-socthi-vxworks.adb (C_Gethostbyname): Fix wrong test for returned
	error status.

From-SVN: r118233
2006-10-31 18:44:38 +01:00
Robert Dewar
aa1806136c sem_res.adb (Resolve_Unary_Op): Add warning for use of unary minus with multiplying operator.
2006-10-31  Robert Dewar  <dewar@adacore.com>
	    Bob Duff  <duff@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>

        * sem_res.adb (Resolve_Unary_Op): Add warning for use of unary minus
	with multiplying operator.
	(Expected_Type_Is_Any_Real): New function to determine from the Parent
	pointer whether the context expects "any real type".
	(Resolve_Arithmetic_Op): Do not give an error on calls to the
	universal_fixed "*" and "/" operators when they are used in a context
	that expects any real type. Also set the type of the node to
	Universal_Real in this case, because downstream processing requires it
	(mainly static expression evaluation).
	Reword some continuation messages
	Add some \\ sequences to continuation messages
	(Resolve_Call): Refine infinite recursion case. The test has been
	sharpened to eliminate some false positives.
	Check for Current_Task usage now includes entry barrier, and is now a
	warning, not an error.
	(Resolve): If the call is ambiguous, indicate whether an interpretation
	is an inherited operation.
	(Check_Aggr): When resolving aggregates, skip associations with a box,
	which are priori correct, and will be replaced by an actual default
	expression in the course of expansion.
	(Resolve_Type_Conversion): Add missing support for conversion from
	a class-wide interface to a tagged type. Minor code cleanup.
	(Valid_Tagged_Converion): Add support for abstact interface type
	conversions.
	(Resolve_Selected_Component): Call Generate_Reference here rather than
	during analysis, and use May_Be_Lvalue to distinguish read/write.
	(Valid_Array_Conversion): New procedure, abstracted from
	Valid_Conversion, to incorporate accessibility checks for arrays of
	anonymous access types.
	(Valid_Conversion): For a conversion to a numeric type occurring in an
	instance or inlined body, no need to check that the operand type is
	numeric, since this has been checked during analysis of the template.
	Remove legacy test for scope name Unchecked_Conversion.

	* sem_res.ads: Minor reformatting

	* a-except.adb, a-except-2005.adb: Turn off subprogram ordering
	(PE_Current_Task_In_Entry_Body): New exception code
	(SE_Restriction_Violation): Removed, not used

	* a-except.ads:  Update comments.

	* types.h, types.ads: Add definition for Validity_Check
	(PE_Current_Task_In_Entry_Body): New exception code
	(SE_Restriction_Violation): Removed, not used

From-SVN: r118232
2006-10-31 18:44:22 +01:00
Robert Dewar
524c02d73c a-taster.adb, [...]: Minor reformatting.
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* a-taster.adb, s-traent-vms.adb, a-elchha.ads, a-elchha.adb,
	a-exctra.adb, ali-util.adb, exp_disp.ads, s-stalib.ads, s-traent.adb,
	s-addope.ads, s-addope.adb, a-rbtgso.adb, a-crbltr.ads, a-coprnu.adb,
	a-cgcaso.adb, a-cgarso.adb, a-cgaaso.adb, a-coormu.adb, a-ciormu.adb,
	a-rbtgso.ads, a-stunha.adb, a-stunha.adb, a-ciorma.adb, a-coorma.adb,
	a-secain.adb, a-slcain.adb, a-shcain.adb, a-stwiha.adb, a-stwiha.adb,
	a-strhas.adb, a-strhas.adb, a-stzhas.adb, a-stzhas.adb, a-szuzha.adb,
	a-chacon.adb, a-chacon.adb, a-chacon.ads, a-stboha.adb, a-swbwha.adb,
	a-szbzha.adb: Minor reformatting. Fix header.

	* a-numaux-x86.adb: Add parentheses for use of unary minus
	* a-ngcefu.adb: Supply missing parentheses for unary minus
	* a-ngcoty.adb: Add parens for use of unary minus
	* a-ngelfu.adb: Add missing parens for unary minus
	* a-tifiio.adb: Add parentheses for uses of unary minus

From-SVN: r118231
2006-10-31 18:43:17 +01:00
Richard Guenther
1d08f95566 i386.md (asindf2, [...]): Conditionalize expansion on !optimize_size.
2006-10-31  Richard Guenther  <rguenther@suse.de>

	* config/i386/i386.md (asindf2, asinsf2, asinxf2, acosdf2,
	acossf2, acosxf2, log1psf2, log1pdf2, log1pxf2, ilogbsi2,
	expsf2, expdf2, expxf2, exp10sf2, exp10df2, exp10xf2,
	exp2sf2, exp2df2, exp2xf2, expm1df2, expm1sf2, expm1xf2,
	ldexpdf3, ldexpsf3, ldexpxf3, rintxf2, rintdf2, rintsf2,
	lround<mode>di2, lround<mode>si2, floorxf2, floordf2, floorsf2,
	lfloor<mode>di2, lfloor<mode>si2, ceilxf2, ceildf2, ceilsf2,
	btruncxf2, btruncdf2, btruncsf2): Conditionalize expansion on
	!optimize_size.

From-SVN: r118221
2006-10-31 09:08:11 +00:00
Paul Thomas
dd5797cc36 re PR fortran/29387 (ICE on character array function of variable length)
2006-10-31  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/29387
	* trans-intrinsic.c (gfc_conv_intrinsic_len): Rearrange to have
	a specific case for EXPR_VARIABLE and, in default, build an ss
	to call gfc_conv_expr_descriptor for array expressions..

	PR fortran/29490
	* trans-expr.c (gfc_set_interface_mapping_bounds): In the case
	that GFC_TYPE_ARRAY_LBOUND is not available, use descriptor
	values for it and GFC_TYPE_ARRAY_UBOUND.

	PR fortran/29641
	* trans-types.c (gfc_get_derived_type): If the derived type
	namespace has neither a parent nor a proc_name, set NULL for
	the search namespace.


2006-10-31  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/29387
	* gfortran.dg/intrinsic_actual_2.f90: New test.

	PR fortran/29490
	* gfortran.dg/actual_array_interface_1.f90: New test.

	PR fortran/29641
	* gfortran.dg/used_types_11.f90: New test.

From-SVN: r118220
2006-10-31 06:03:24 +00:00
Steven Bosscher
e5c18c3c29 * opts.c (decode_options): Disable CSE skip blocks.
From-SVN: r118219
2006-10-31 05:31:53 +00:00
GCC Administrator
e4a6b83503 Daily bump.
From-SVN: r118215
2006-10-31 00:17:51 +00:00
Dirk Mueller
f88d05c05f * decl.c (grokdeclarator): Fix line-wrapping.
From-SVN: r118210
2006-10-30 23:56:15 +00:00
Dirk Mueller
32b1d579ae fix typo
From-SVN: r118209
2006-10-30 23:41:07 +00:00
Dirk Mueller
ebbc3ce18e re PR c++/28704 (%s substituted with "static member"/"free" can't be properly translated)
2006-10-30  Dirk Mueller  <dmueller@suse.de>

       PR c++/28704
       * decl.c (grokdeclarator): Duplicate diagnostic message
       for easier translation.

From-SVN: r118208
2006-10-30 23:32:29 +00:00
Dirk Mueller
a1e45ff04c re PR c++/6321 (no warning for bad main function declaration)
2006-10-30  Dirk Mueller  <dmueller@suse.de>

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

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

From-SVN: r118206
2006-10-30 23:15:42 +00:00
Dirk Mueller
e7c41c9948 re PR c++/28669 (%s substituted with static/non- can't be properly translated)
2006-10-30  Dirk Mueller  <dmueller@suse.de>

       PR c++/28669
       * decl.c (grokfndecl): Duplicate warning message for
       easier translation.

From-SVN: r118205
2006-10-30 23:08:59 +00:00
Dirk Mueller
95220fdfba eichin01a.C (main): Fix prototype.
2006-10-30  Dirk Mueller  <dmueller@suse.de>

       * g++.old-deja/g++.pt/eichin01a.C (main): Fix prototype.
       * g++.old-deja/g++.pt/eichin01b.C (main): Same.
       * g++.old-deja/g++.pt/eichin01.C (main): Same.
       * g++.old-deja/g++.mike/net25.C (main): Same.
       * g++.dg/lookup/exception1.C (main): Same.
       * g++.dg/parse/parens2.C (main): Same.

From-SVN: r118204
2006-10-30 22:25:07 +00:00
Roger Sayle
771e6d83c9 pr27827.c: Explicitly specify -mfpmath=387.
* gcc.target/i386/pr27827.c: Explicitly specify -mfpmath=387.

From-SVN: r118201
2006-10-30 21:31:19 +00:00
Kaveh R. Ghazi
61fb309f70 re PR middle-end/29335 (transcendental functions with constant arguments should be resolved at compile-time)
PR middle-end/29335
	* builtins.c (fold_builtin_1): Evaluate tgamma using MPFR.

testsuite:
	* gcc.dg/torture/builtin-math-2.c: Add tgamma tests.
	* gcc.dg/torture/builtin-math-3.c: Likewise.

From-SVN: r118200
2006-10-30 20:21:59 +00:00
Pete Steinmetz
ff81aa23e5 recog.c (store_data_bypass_p): Add support to allow IN_INSN to be a PARALLEL containing sets.
* recog.c (store_data_bypass_p): Add support to allow IN_INSN to
	be a PARALLEL containing sets.  Return false when out_pat is not
	a PARALLEL insn.

From-SVN: r118199
2006-10-30 13:43:55 -06:00
Tobias Burnus
9aceacac92 re PR fortran/29452 (Keyword check for specifiers in WRITE and READ)
fortran/
2006-10-30  Tobias Burnus  <burnus@net-b.de>

       	PR fortran/29452
       	* io.c (check_io_constraints): Fix keyword string comparison.

libgfortran/
2006-10-30  Tobias Burnus  <burnus@net-b.de>

       	PR fortran/29452
	* runtime/string.c (compare0): Check whether string lengths match.

testsuite/
2006-10-30  Tobias Burnus  <burnus@net-b.de>

	PR fortran/29452
	* gfortran.dg/write_check.f90: Check run-time keyword checking.
	* gfortran.dg/write_check2.f90: Check compile-time keyword checking

From-SVN: r118191
2006-10-30 19:22:47 +01:00
Richard Sandiford
e1efef1ef1 mips.md (mul<mode>3): Split into...
gcc/
	* config/mips/mips.md (mul<mode>3): Split into...
	(mulsi3, muldi3): ...these separate patterns.

From-SVN: r118190
2006-10-30 18:18:03 +00:00
Richard Sandiford
8ec2ac7b26 linux64.h (DRIVER_SELF_SPECS): Use a single spec, but with each set of options separated by spaces.
gcc/
	* config/mips/linux64.h (DRIVER_SELF_SPECS): Use a single spec,
	but with each set of options separated by spaces.

From-SVN: r118189
2006-10-30 18:05:54 +00:00
J"orn Rennecke
7bec3e8418 unwind-dw2.c (uw_init_context_1): Fix test that checks if dwarf_reg_size_table has been initialized.
* unwind-dw2.c (uw_init_context_1): Fix test that checks if
	dwarf_reg_size_table has been initialized.

From-SVN: r118188
2006-10-30 17:55:33 +00:00
Roger Sayle
428aba16aa builtins.c (expand_builtin_mathfn_3): Correct coding style.
* builtins.c (expand_builtin_mathfn_3): Correct coding style.
	* ddg.c (print_ddg_edge): Likewise.
	* dwarf2out.c (prune_unused_types_walk): Likewise.
	* ifcvt.c (noce_try_cmove_arith): Likewise.
	* langhooks.c (add_builtin_function): Likewise.
	* reg-stack.c (subst_stack_regs_pat): Likewise.
	* tree.c (expanded_location): Likewise.
	* tree-dump.c (dequeue_and_dump): Likewise.

From-SVN: r118187
2006-10-30 17:51:46 +00:00
Andrew Pinski
0e69739965 re PR fortran/29410 ([4.2 only] bug with TRANSFER() and -O2)
2006-10-30  Andrew Pinski  <pinskia@gmail.com>

        PR fortran/29410
        * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer):
        Change over to create VIEW_CONVERT_EXPR instead of using an
        ADDR_EXPR, a cast and then an indirect reference
2006-10-30  Andrew Pinski  <pinskia@gmail.com>

        PR Fortran/29410
        * gfortran.fortran-torture/execute/transfer1.f90: New test.

From-SVN: r118186
2006-10-30 08:15:09 -08:00
Dirk Mueller
ff84991f99 typeck.c (build_unary_op): Fix indenting.
2006-10-30  Dirk Mueller  <dmueller@suse.de>

       * typeck.c (build_unary_op): Fix indenting. Use G_().

From-SVN: r118185
2006-10-30 14:44:45 +00:00
Joseph Myers
709e1a1a8a default.exp (${tool}_target_compile): Use v3_target_compile.
libstdc++-v3:
	* testsuite/config/default.exp (${tool}_target_compile): Use
	v3_target_compile.

gcc/testsuite:
	* lib/target-supports.exp (check_function_available): Declare
	function before calling.

From-SVN: r118182
2006-10-30 14:03:05 +00:00
David Daney
aaf0c39c04 * config/mips/linux.h (NO_SHARED_SPECS): Correct syntax error.
From-SVN: r118179
2006-10-30 08:25:25 +00:00
Jakub Jelinek
cc59abbf35 re PR tree-optimization/29637 (Endless recursion in make_vector_type)
PR tree-optimization/29637
	* tree.c (make_vector_type): Don't recurse if TYPE_MAIN_VARIANT
	of the innertype is the innertype itself.

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

From-SVN: r118175
2006-10-30 09:01:28 +01:00
Mike Stump
5fbd205139 Fix whitespacing.
From-SVN: r118173
2006-10-30 05:56:18 +00:00
Danny Smith
2310f1f84f dwarf2out.c (file_name_acquire): Correct typo.
* dwarf2out.c (file_name_acquire): Correct typo.
	Formatting tweak to earlier ChangeLog entry.

From-SVN: r118171
2006-10-30 03:18:57 +00:00
Roger Sayle
00f5f722bf fold-compare-1.c: Update to reflect recent changes in tree canonicalization.
* gcc.dg/fold-compare-1.c: Update to reflect recent changes in
	tree canonicalization.

From-SVN: r118170
2006-10-30 02:46:11 +00:00
Daniel Berlin
83737db21d tree.h (tree_value_handle): Remove struct value_set declaration.
2006-10-29  Daniel Berlin  <dberlin@dberlin.org>

	* tree.h (tree_value_handle): Remove struct value_set declaration.	
	Change value_set to bitmap_set.
	* tree-pretty-print.c (dump_generic_node): Use has_stmt_ann.
	* tree-vn.c (get_value_handle): Made inline and moved to
	tree-flow-inline.h.
	* tree-flow-inline.h: (has_stmt_ann): New function.
	* tree-ssa-pre.c (expressions): New variable.
	(next_expression_id): Ditto.
	(alloc_expression_id): New function.
	(struct value_set): Remove.
	(get_expression_id): New function.
	(get_or_alloc_expression_id): Ditto.
	(expression_for_id): Ditto.
	(clear_expression_ids): Ditto.
	(FOR_EACH_EXPR_ID_IN_SET): New macro.
	(bb_value_sets): Renamed to bb_bitmap_sets.
	All value sets replaced with bitmap_sets.
	Add visited member.
	(BB_VISITED): New macro.
	(postorder): New variable.
	(add_to_value): Removed.
	(value_exists_in_set_bitmap): Ditto.
	(value_insert_into_set_bitmap): Ditto.
	(set_new): Ditto.
	(set_copy): Ditto.
	(set_remove): Ditto.
	(set_contains_value): Ditto.
	(insert_into_set): Ditto.
	(set_equal): Ditto.
	(find_leader): Ditto.
	(bitmap_set_subtract_from_value_set): Ditto.
	(value_insert_into_set): Ditto.
	(print_value_set): Ditto.
	(debug_value_set): Ditto.
	(constant_expr_p): New function.
	(bitmap_remove_from_set): Ditto.
	(bitmap_insert_into_set): Ditto.
	(bitmap_set_free): Ditto.
	(vh_compare): Ditto.
	(sorted_array_from_bitmap_set): Ditto.
	(bitmap_set_subtract): Ditto.
	(bitmap_set_equal): Ditto.
	(debug_bitmap_set): Ditto.
	(find_leader_in_sets): Ditto.
	(bitmap_set_replace_value): Modify for bitmapped sets.
	(phi_translate): Ditto.
	(phi_translate_set): Ditto.
	(bitmap_find_leader): Ditto.
	(valid_in_sets): Ditto.
	(union_contains_value): Ditto.
	(clean): Ditto.
	(compute_antic_aux): Ditto.  Mark changed blocks.
	(compute_antic): Ditto. Iterate in postorder and only over
	changing blocks.
	(compute_rvuse_and_antic_safe): Reuse postorder.
	(create_component_ref_by_pieces): Modify for bitmapped sets.
	(find_or_generate_expression): Ditto.
	(create_expression_by_pieces): Ditto.
	(insert_into_preds_of_block): Ditto.
	(changed_blocks): New variable.
	(do_regular_insertion): Broken out from insert_aux.
	(insert_aux): Modified for bitmapped sets.
	(find_existing_value_expr): New function.
	(create_value_expr_from): Use it.
	(insert_extra_phis): Removed.
	(print_bitmap_set): Renamed from bitmap_print_value_set.
	(compute_avail): Handle RETURN_EXPR.
	(init_pre): Modify for bitmapped sets.
	* tree-flow.h (has_stmt_ann): New function.

From-SVN: r118169
2006-10-30 01:58:42 +00:00
Roger Sayle
7c73bdc185 builtins.c (fold_builtin_floor): Check for the availability of the C99 trunc function before transforming floor...
* builtins.c (fold_builtin_floor): Check for the availability of
	the C99 trunc function before transforming floor into trunc.

From-SVN: r118168
2006-10-30 01:14:37 +00:00
GCC Administrator
bd91e5ba22 Daily bump.
From-SVN: r118165
2006-10-30 00:17:44 +00:00
Kaveh R. Ghazi
012c53688f builtins.c (fold_builtin_hypot): Rearrange recursive transformation before others, and also do ABS_EXPR.
* builtins.c (fold_builtin_hypot): Rearrange recursive
	transformation before others, and also do ABS_EXPR.  When
	necessary, check flag_unsafe_math_optimizations.  When necessary,
	add fabs.

testsuite:
	* gcc.dg/builtins-20.c: Add more hypot tests.

From-SVN: r118160
2006-10-29 23:08:23 +00:00
Roger Sayle
c159ffe706 fold-const.c (fold_comparison): Fold ~X op ~Y as Y op X.
* fold-const.c (fold_comparison): Fold ~X op ~Y as Y op X.
	Fold ~X op C as X op' ~C, where op' is the swapped comparison.
	(fold_binary): ~X eq/ne C is now handled in fold_comparison.
	Fold -X eq/ne -Y as X eq/ne Y.

	* gcc.dg/fold-compare-1.c: New test case.

From-SVN: r118158
2006-10-29 21:41:48 +00:00
Dirk Mueller
153ae66aee re PR c++/29089 (Words substituted for %s in a sentence can not be translated)
PR c++/29089
       * typeck.c (build_unary_op): Duplicate warning message
       for easier translation.

From-SVN: r118156
2006-10-29 19:52:52 +00:00
Dirk Mueller
180550a8b8 fix testcase
From-SVN: r118155
2006-10-29 18:46:49 +00:00
Dirk Mueller
0958b0d31d re PR c++/16307 (-Wchar-subscripts does not warn on pointers)
2006-10-29  Dirk Mueller  <dmueller@suse.de>

        PR c++/16307
        * typeck.c (build_array_ref): Warn for char subscriptions
        on pointers.

        * g++.dg/warn/Wchar-subscripts-2.C: New testcase.

From-SVN: r118154
2006-10-29 18:38:26 +00:00
Richard Sandiford
3f07249e98 mips.md (mul<mode>3): Check ISA_HAS_MUL3 rather than GENERATE_MULT3_<MODE>.
gcc/
	* config/mips/mips.md (mul<mode>3): Check ISA_HAS_MUL3 rather than
	GENERATE_MULT3_<MODE>.  Restrict the test to SImode.  Use ISA_HAS_MUL3
	rather than GENERATE_MULT3_SI in the various define_peephole2s.
	(mulsi3_mult3): Depend on ISA_HAS_MUL3 rather than GENERATE_MULT3_SI.
	Use an inclusive test for "mult" rather than "mul".
	(rotr<mode>3): Depend on ISA_HAS_ROR.
	* config/mips/mips.h (GENERATE_MULT3_SI): Delete in favor of
	ISA_HAS_MUL3.
	(GENERATE_MULT3_DI): Delete.
	(ISA_HAS_64BIT_REGS): Use consistent formatting.
	(ISA_HAS_MUL3): New macro.
	(ISA_HAS_CONDMOVE, ISA_HAS_8CC): Use consistent formatting.
	(ISA_HAS_FP4, ISA_HAS_MADD_MSUB, ISA_HAS_NMADD_NMSUB): Likewise.
	(ISA_HAS_CLZ_CLO): Likewise.
	(ISA_HAS_DCLZ_DCLO): Delete.
	(ISA_HAS_MULHI, ISA_HAS_MULS, ISA_HAS_MSAC): Require !TARGET_MIPS16.
	(ISA_HAS_MACC): Require !TARGET_MIPS16 for all ISAs, not just
	the VR4120 and VR4130.
	(ISA_HAS_MACCHI): Use consistent formatting.
	(ISA_HAS_ROTR_SI, ISA_HAS_ROTR_DI): Delete in favor of...
	(ISA_HAS_ROR): ...this new macro.
	(ISA_HAS_PREFETCH, ISA_HAS_PREFETCHX): Use consistent formatting.
	(ISA_HAS_SEB_SEH, ISA_HAS_EXT_INS): Likewise.
	(ISA_HAS_LOAD_DELAY): Use ISA_MIPS1.

From-SVN: r118153
2006-10-29 18:20:45 +00:00
Roger Sayle
f8ed9a1c65 re PR tree-optimization/15458 (Combine ~ and ^.)
PR tree-optimization/15458
	* fold-const.c (fold_binary): Optimize ~X ^ C as X ^ ~C, where C
	is a constant.

	* gcc.dg/fold-xornot-1.c: New test case.

From-SVN: r118152
2006-10-29 17:51:07 +00:00
Francois-Xavier Coudert
0f8bc3e173 trans-intrinsic.c (gfc_conv_intrinsic_loc): Make LOC return a signed integer node.
* trans-intrinsic.c (gfc_conv_intrinsic_loc): Make LOC return a
	signed integer node.

From-SVN: r118151
2006-10-29 17:05:37 +00:00
Jerry DeLisle
2c693a24a0 re PR fortran/17741 (ICE in gfc_free_namespace, at fortran/symbol.c:2208)
2006-10-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/17741
	* decl.c (get_proc_name): Bump current namespace refs count.

From-SVN: r118149
2006-10-29 16:43:48 +00:00
Richard Guenther
044928d612 i386-protos.h (ix86_expand_trunc): Declare.
2006-10-29  Richard Guenther  <rguenther@suse.de>

	* config/i386/i386-protos.h (ix86_expand_trunc): Declare.
	(ix86_expand_truncdf_32): Likewise.
	* config/i386/i386.c (ix86_expand_trunc): New function expanding
	trunc inline for SSE math and -fno-trapping-math and if not
	optimizing for size.
	(ix86_expand_truncdf_32): Same for DFmode on 32bit archs.
	* config/i386/i386.md (btruncsf2, btruncdf2): Adjust expanders
	for expanding btrunc inline for SSE math.

	* gcc.target/i386/math-torture/trunc.c: New testcase.

From-SVN: r118148
2006-10-29 16:43:21 +00:00
Joseph Myers
0f45f0f588 config.gcc (i[34567]86-*-linux*): Handle --enable-targets=all.
gcc:
	* config.gcc (i[34567]86-*-linux*): Handle --enable-targets=all.
	Handle tuning for bi-arch i[34567]86-*-linux* like that for
	i[34567]86-*-solaris2.1[0-9]*.
	* config/i386/linux64.h (TARGET_VERSION, MULTILIB_DEFAULTS):
	Define conditionally depending on TARGET_64BIT_DEFAULT.
	(SPEC_32, SPEC_64): Define.
	(LINK_SPEC): Use them.
	* doc/install.texi (--enable-targets=all): Document for x86-linux.

libcpp:
	* configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
	depending on --enable-targets=all.
	* configure: Regenerate.

fixincludes:
	* inclhack.def (AAB_fd_zero_asm_posix_types_h): Bypass on x86_64.
	* fixincl.x: Regenerate.

From-SVN: r118147
2006-10-29 16:35:50 +00:00
Richard Guenther
097f296422 i386-protos.h (ix86_expand_round): Declare.
2006-10-29  Richard Guenther  <rguenther@suse.de>

	* config/i386/i386-protos.h (ix86_expand_round): Declare.
	(ix86_expand_rounddf_32): Likewise.
	* config/i386/i386.c (ix86_expand_round): New function expanding
	round inline for SSE math and -fno-trapping-math and if not
	optimizing for size.
	(ix86_expand_rounddf_32): Same for DFmode on 32bit archs.
	* config/i386/i386.md (rounddf2, roundsf2): New pattern expanding
	round via ix86_expand_round.

	* gcc.target/i386/math-torture/round.c: New testcase.

From-SVN: r118146
2006-10-29 16:33:36 +00:00
Richard Guenther
d096ecdd96 i386-protos.h (ix86_expand_floorceil): Declare.
2006-10-29  Richard Guenther  <rguenther@suse.de>

	* config/i386/i386-protos.h (ix86_expand_floorceil): Declare.
	(ix86_expand_floorceildf_32): Likewise.
	* config/i386/i386.c (ix86_expand_sse_compare_mask): New
	static helper function.
	(ix86_expand_floorceil): Expander for floor and ceil to SSE
	math.
	(ix86_expand_floorceildf_32): Same for DFmode on 32bit archs.
	* config/i386/i386.md (floordf2): Adjust to enable floor
	expansion via ix86_expand_floorceil if TARGET_SSE_MATH and
	-fno-trapping-math is enabled and if not optimizing for size.
	(floorsf2, ceildf2, ceilsf2): Likewise.
	* config/i386/sse.md (sse_maskcmpsf3): New insn.
	(sse2_maskcmpdf3): Likewise.

	* gcc.target/i386/math-torture/ceil.c: New testcase.
	* gcc.target/i386/math-torture/floor.c: Likewise.

From-SVN: r118145
2006-10-29 16:28:40 +00:00
Richard Guenther
c7d32ff619 builtins.c (expand_builtin_mathfn): Expand nearbyint as rint in case -fno-trapping-math is enabled.
2006-10-29  Richard Guenther  <rguenther@suse.de>

	* builtins.c (expand_builtin_mathfn): Expand nearbyint as
	rint in case -fno-trapping-math is enabled.
	* config/i386/i386-protos.h (ix86_expand_rint): Declare.
	* config/i386/i386.c (ix86_gen_TWO52): New static helper function.
	(ix86_expand_sse_fabs): Likewise.
	(ix86_expand_rint): New function expanding rint to x87 or SSE math.
	* config/i386/i386.md (rintdf2): Enable for SSE math if
        -fno-trapping-math is enabled, use ix86_expand_rint for expansion.
	(rintsf2): Likewise.

	* gcc.target/i386/math-torture/rint.c: New testcase.
	* gcc.target/i386/math-torture/nearbyint.c: Likewise.

From-SVN: r118144
2006-10-29 15:25:52 +00:00
Richard Guenther
c3a4177fe1 genopinit.c (optabs): Change lfloor_optab and lceil_optab to conversion optabs.
2006-10-29  Richard Guenther  <rguenther@suse.de>

	* genopinit.c (optabs): Change lfloor_optab and lceil_optab
	to conversion optabs.
	* optabs.c (init_optabs): Initialize lfloor_optab and lceil_optab
	as conversion optab.
	* optabs.h (enum optab_index): Remove OTI_lfloor and OTI_lceil.
	(enum convert_optab_index): Add COI_lfloor and COI_lceil.
	(lfloor_optab, lceil_optab): Adjust defines.
	* builtins.c (expand_builtin_int_roundingfn): Adjust for
	lfloor and lceil optabs now being conversion optabs.
	* config/i386/i386-protos.h (ix86_expand_lfloorceil): Declare.
	* config/i386/i386.c (ix86_expand_sse_compare_and_jump):
	New static helper function.
	(ix86_expand_lfloorceil): New function to expand lfloor and
	lceil inline.
	* config/i386/i386.md (lfloor<mode>2): Split into ...
	(lfloorxf<mode>2): ... x87 variant
	(lfloor<mode>di2, lfloor<mode>si2): ... and SSE variants
	using ix86_expand_lfloorceil.
	(lceil<mode>2, lceilxf<mode>2, lceil<mode>di2, lceil<mode>si2):
	Likewise.
	* doc/md.texi (lfloorMN, lceilMN): Document.

	* gcc.target/i386/math-torture/lfloor.c: New testcase.
	* gcc.target/i386/math-torture/lceil.c: Likewise.

From-SVN: r118143
2006-10-29 15:18:24 +00:00
Tobias Burnus
98c58757e6 re PR libfortran/24313 (complex sqrt function does not return principal value)
2006-10-28  Tobias Burnus  <burnus@net-b.de>

       PR libgfortran/24313
       * gfortran.dg/csqrt_2.f: Remove xfail *-*-linux-gnu.

From-SVN: r118142
2006-10-29 12:56:56 +01:00
Richard Sandiford
4551169f83 configure.ac (HAVE_AS_NO_SHARED): New AC_DEFINE.
gcc/
	* configure.ac (HAVE_AS_NO_SHARED): New AC_DEFINE.  Test for the
	-mno-shared assembler option on mips targets.
	* configure, config.in: Regenerate.
	* config/mips/linux.h (NO_SHARED_SPECS): New macro.
	(DRIVER_SELF_SPECS): Define to NO_SHARED_SPECS if non-empty.
	* config/mips/linux64.h (DRIVER_SELF_SPECS): Include NO_SHARED_SPECS.

From-SVN: r118138
2006-10-29 11:13:14 +00:00
Richard Sandiford
5f687d19e0 mips.c (mips_classify_symbol): Test DECL_WEAK as well as TREE_PUBLIC when deciding whether to return...
gcc/
	* config/mips/mips.c (mips_classify_symbol): Test DECL_WEAK as well
	as TREE_PUBLIC when deciding whether to return SYMBOL_GOT_GLOBAL.

From-SVN: r118137
2006-10-29 11:00:08 +00:00
Jakub Jelinek
a7a53ca582 re PR fortran/29629 (ICE on OpenMP-enabled program (gfc_conv_variable, at fortran/trans-expr.c:404))
PR fortran/29629
	* trans-openmp.c (gfc_trans_omp_array_reduction): Set attr.flavor
	of init_val_sym and outer_sym to FL_VARIABLE.

	* testsuite/libgomp.fortran/pr29629.f90: New test.

From-SVN: r118134
2006-10-29 11:27:39 +01:00
Kazu Hirata
3a0572072d darwin.c, [...]: Fix comment typos.
* config/darwin.c, config/darwin.opt, config/ia64/itanium1.md,
	config/ia64/itanium2.md, real.c, tree-ssa-structalias.c: Fix
	comment typos.

From-SVN: r118133
2006-10-29 04:46:24 +00:00
Kazu Hirata
ec4178c957 20020118-1.c, [...]: Fix comment typos.
* gcc.c-torture/execute/20020118-1.c,
	gcc.c-torture/execute/builtins/strlen.c,
	gcc.c-torture/execute/pr23135.c, lib/fortran-torture.exp: Fix
	comment typos.

From-SVN: r118132
2006-10-29 04:43:45 +00:00
Kazu Hirata
37efe9e9c7 * intrinsic.texi: Fix a typo.
From-SVN: r118131
2006-10-29 04:41:10 +00:00
Kazu Hirata
bd6f7848ee * decl.c: Fix a comment typo.
From-SVN: r118130
2006-10-29 04:38:03 +00:00
Kaveh R. Ghazi
4413d881d0 re PR middle-end/29335 (transcendental functions with constant arguments should be resolved at compile-time)
PR middle-end/29335
	* builtins.c (do_mpfr_arg2, fold_builtin_hypot): New.
	(fold_builtin_pow): Evaluate constant arguments at compile-time
	using MPFR.
	(fold_builtin_1): Handle BUILT_IN_ATAN2 and BUILT_IN_HYPOT.
	(do_mpfr_ckconv): New helper function.
	(do_mpfr_arg1): Use do_mpfr_ckconv.
	(do_mpfr_arg2): New.

testsuite:
	* gcc.dg/builtins-20.c: Add tests for hypot.
	* gcc.dg/torture/builtin-math-2.c (TESTIT2): New.  Add tests for
	two-argument builtins.
	* gcc.dg/torture/builtin-math-3.c (TESTIT_R): Renamed from
	TESTIT2.  Update all callers.
	(TESTIT2, TESTIT2_R): New helper macros.
	Add testcases for pow, hypot and atan2.

From-SVN: r118129
2006-10-29 02:02:10 +00:00
Andrew Pinski
5c9ab0a6ee re PR other/29271 (Incorrect -fdump-rtl-sched documentation)
2006-10-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/29271
        * doc/invoke.texi (-fdump-rtl-sched2) Fix file extension number.
        (-fdump-rtl-sched): Rename to ..
        (-fdump-rtl-sched1): here.  Also fix file extension number.

From-SVN: r118128
2006-10-28 17:27:49 -07:00
GCC Administrator
c0c1e7189f Daily bump.
From-SVN: r118126
2006-10-29 00:17:41 +00:00
Steven G. Kargl
b814a64ea1 gfortran.h: Remove GFC_MPFR_TOO_OLD.
2006-10-27  Steven G. Kargl  <kargl@gcc.gnu.org>
	* gfortran.h: Remove GFC_MPFR_TOO_OLD.
	* arith.c (arctangent2): Remove function
	(gfc_check_real_range): Remove subnormal kludge.
	* arith.h: Remove arctangent2 prototype.
	* simplify.c: (gfc_simplify_atan2): Remove use of arctangent2.
	(gfc_simplify_exponent, gfc_simplify_log, gfc_simplify_nearest,
	gfc_simplify_rrspacing, gfc_simplify_spacing): Remove mpfr kludges.

From-SVN: r118120
2006-10-28 23:31:22 +00:00
Andrew Pinski
857d325a64 re PR c++/29295 (++ operator with bool typedef increments or operator -- with bool typedef)
2006-10-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C++/29295
        * typeck.c (build_unary_op): Use same_type_p when comparing to
        boolean type.

2006-10-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C++/29295
        * g++.dg/expr/bool1.C: New test.
        * g++.dg/expr/bool2.C: New test.

From-SVN: r118118
2006-10-28 16:01:59 -07:00
Dirk Mueller
85f37826c6 re PR c++/29033 (%s substituted with "left"/"right" can't be properly translated)
2006-10-29  Dirk Mueller  <dmueller@suse.de>

       PR c++/29033
      * typeck.c (build_binary_op): Duplicate warning message
       for better translation.

From-SVN: r118117
2006-10-28 22:34:06 +00:00
Tobias Burnus
f1827a8c69 re PR fortran/28224 (gfortran should support namelist (nml) for internal file units)
fortran/
2006-10-28  Tobias Burnus  <burnus@net-b.de>

	PR fortran/28224
	* io.c (check_io_constraints): Allow namelists
	  for internal files for Fortran 2003.

testsuite/
2006-10-28  Tobias Burnus  <burnus@net-b.de>

	PR fortran/28224
	* gfortran.dg/io_constraints_2.f90: Use -std=f95.
	* gfortran.dg/namelist_internal.f90: New test.

From-SVN: r118113
2006-10-28 23:59:20 +02:00
Tobias Burnus
0a3a2b91a5 re PR fortran/29625 (Octal edit descriptors allow real variables, even with -std=f95)
2006-10-28  Tobias Burnus  <burnus@net-b.de>

	PR fortran/29625
	* gfortran.dg/io_real_boz.f90: Add.
	* gfortran.dg/io_real_boz2.f90: Add.

From-SVN: r118112
2006-10-28 23:07:19 +02:00
Richard Guenther
4e9100638e fold-const.c (maybe_canonicalize_comparison): Fix code to match comment.
2006-10-28  Richard Guenther  <rguenther@suse.de>

	* fold-const.c (maybe_canonicalize_comparison): Fix code
	to match comment.

From-SVN: r118110
2006-10-28 20:36:54 +00:00
Uros Bizjak
fb84c7a05b i386.h (GENERAL_REGNO_P): Use STACK_POINTER_REGNUM.
* config/i386/i386.h (GENERAL_REGNO_P): Use STACK_POINTER_REGNUM.
        (NON_QI_REG_P): Use IN_RANGE.
        (REX_INT_REGNO_P): Use IN_RANGE.
        (FP_REGNO_P): Use IN_RANGE.
        (SSE_REGNO_P): Use IN_RANGE.
        (REX_SSE_REGNO_P): Use IN_RANGE.
        (MMX_REGNO_P): Use IN_RANGE.
        (STACK_REGNO_P): New macro.
        (STACK_REG_P): Use STACK_REGNO_P.
        (NON_STACK_REG_P): Use STACK_REGNO_P.
        (REGNO_OK_FOR_INDEX_P): Use REX_INT_REGNO_P.
        (REGNO_OK_FOR_BASE_P): Use GENERAL_REGNO_P.
        (REG_OK_FOR_INDEX_NONSTRICT_P): Use REX_INT_REGNO_P.
        (REG_OK_FOR_BASE_NONSTRICT_P): Use GENERAL_REGNO_P.
        (HARD_REGNO_RENAME_OK): Use !IN_RANGE.

From-SVN: r118109
2006-10-28 22:25:27 +02:00
Eric Botcazou
22ba88ef4b except.h (output_function_exception_table): Add 'const char*' param.
* except.h (output_function_exception_table): Add 'const char*' param.
	* except.c (switch_to_exception_section): Add 'const char*' param.
	If named sections are supported and HAVE_LD_EH_GC_SECTIONS is defined
	and flag_function_sections is set, use a function-specific section.
	(output_function_exception_table): Add 'const char*' param.
	Adjust call to switch_to_exception_section.
	* final.c (rest_of_handle_final): Adjust calls to
	output_function_exception_table.
	* configure.ac (HAVE_LD_EH_GC_SECTIONS): New check.
	* config.in: Regenerate.
	* configure: Likewise.

From-SVN: r118107
2006-10-28 18:11:28 +00:00
Richard Guenther
e73dbcaefc re PR middle-end/26899 (Fold does not fold (i0 > i1 + 1) || (i1 < i0 - 1))
2006-10-28  Richard Guenther  <rguenther@suse.de>

	PR middle-end/26899
	* fold-const.c (maybe_canonicalize_comparison_1): Helper
	for maybe_canonicalize_comparison.
	(maybe_canonicalize_comparison): New function for canonicalizing
	comparison trees.
	(fold_comparison): Call it to canonicalize comparisons with
	constants involved.

	* gcc.dg/tree-ssa/pr26899.c: New testcase.

From-SVN: r118106
2006-10-28 18:03:21 +00:00
Richard Guenther
4d81bf8435 re PR target/28806 (lround is not expanded inline to SSE conversion sequence)
2006-10-28  Richard Guenther  <rguenther@suse.de>

	PR target/28806
	* builtins.c (expand_builtin_int_roundingfn_2): Expand
	BUILT_IN_LROUND and BUILT_IN_LLROUND from here.
	(expand_builtin): Adjust likewise.
	* genopinit.c (optabs[]): Add lround optab.
	* optabs.c (init_optabs): Initialize lround_optab.
	* optabs.h (enum convert_optab_index): Add COI_lround.
	(lround_optab): Define.
	* config/i386/i386-protos.h (ix86_expand_lround): Declare.
	* config/i386/i386.c (ix86_sse_copysign_to_positive): New
	static function.
	(ix86_expand_lround): New function.
	* config/i386/i386.md (lround<mode>di2, lround<mode>si2):
	New expanders.
	* doc/md.texi (lroundMN2): Document.

	* gcc.target/i386/math-torture/lround.c: New testcase.

From-SVN: r118105
2006-10-28 11:30:41 +00:00
Mike Stump
6f16dafb64 Fixup whitespacing
From-SVN: r118104
2006-10-28 10:37:12 +00:00
Uros Bizjak
e68d4dd1b4 re PR target/29377 (Build for h8300-elf crashes on 64bit hosts due to int/HWI mismatch)
PR target/29377
        * config/h8300/h8300.c (h8300_emit_stack_adjustment): Change "size"
        argument to HOST_WIDE_INT.  Update function prototype.
        (round_frame_size): Change return type to HOST_WIDE_INT.  Change
        "size" argument to HOST_WIDE_INT.  Update function prototype.

From-SVN: r118102
2006-10-28 11:41:41 +02:00
Uros Bizjak
87ccbc5cdd i386.c (output_387_ffreep): Create output from a template string for !HAVE_AS_IX86_FFREEP.
* config/i386/i386.c (output_387_ffreep): Create output from a
        template string for !HAVE_AS_IX86_FFREEP.

From-SVN: r118101
2006-10-28 11:20:23 +02:00
Eric Christopher
62baeb4f01 darwin.c: Fix formatting and grammar.
2006-10-27  Eric Christopher  <echristo@apple.com>

	    * config/darwin.c: Fix formatting and grammar.

From-SVN: r118099
2006-10-28 01:00:21 +00:00
GCC Administrator
922764658e Daily bump.
From-SVN: r118097
2006-10-28 00:17:40 +00:00
Jan Hubicka
2e929cf3b2 builtins.c (fold_builtin): Don't generate NOP_EXPR that is going to be thrown away soon when IGNORE is set.
* builtins.c (fold_builtin): Don't generate NOP_EXPR that is going
	to be thrown away soon when IGNORE is set.
	* tree-ssa-ccp.c (convert_to_gimple_builtin): Add IGNORE argument
	indicating when return value shall not be computed.
	* gimplify.c (internal_get_tmp_var): Avoid random tree sharing.

From-SVN: r118091
2006-10-27 22:47:47 +00:00
Vladimir Makarov
cfe1b18f45 2006-10-27 Vladimir Makarov <vmakarov@redhat.com>
* config/i386/i386.h (TARGET_GEODE):
	(TARGET_CPU_CPP_BUILTINS): Add code for geode.
	(TARGET_CPU_DEFAULT_geode): New macro.
	(TARGET_CPU_DEFAULT_k6, TARGET_CPU_DEFAULT_k6_2,
	TARGET_CPU_DEFAULT_k6_3, TARGET_CPU_DEFAULT_athlon,
	TARGET_CPU_DEFAULT_athlon_sse, TARGET_CPU_DEFAULT_k8,
	TARGET_CPU_DEFAULT_pentium_m, TARGET_CPU_DEFAULT_prescott,
	TARGET_CPU_DEFAULT_nocona, TARGET_CPU_DEFAULT_generic): Increase
	the macro values.
	(TARGET_CPU_DEFAULT_NAMES): Add geode.
	(processor_type): Add PROCESSOR_GEODE.

	* config/i386/i386.md: Include geode.md.
	(cpu): Add geode.

	* config/i386/i386.c (geode_cost): New initialized global
	variable.
	(m_GEODE, m_K6_GEODE): New macros.
	(x86_use_leave, x86_push_memory, x86_deep_branch, x86_use_sahf,
	x86_use_himode_fiop, x86_promote_QImode, x86_add_esp_4,
	x86_add_esp_8, x86_rep_movl_optimal, x86_ext_80387_constants,
	x86_schedule): Use m_K6_GEODE instead of m_K6.
	(x86_movx, x86_cmove): Set up m_GEODE.
	(x86_integer_DFmode_moves): Clear m_GEODE.
	(processor_target_table): Add entry for geode.
	(processor_alias_table): Ditto.

	* config/i386/geode.md: New file.

	* doc/invoke.texi: Add entry about geode processor.

From-SVN: r118090
2006-10-27 22:43:00 +00:00
Kaz Kojima
2810ec2fd5 builtins-43.c: Add -fno-finite-math-only.
* gcc.dg/builtins-43.c: Add -fno-finite-math-only.
	* gcc.dg/builtins-44.c: Likewise.
	* gcc.dg/builtins-45.c: Likewise.
	* gcc.dg/pr28796-2.c: Likewise.
	* gcc.dg/unordered-3.c: Likewise.

From-SVN: r118089
2006-10-27 22:04:35 +00:00
Jerry DeLisle
ef4a3e6410 PR libgfortran/27954 Fix type in changelog, pr number
2006-10-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/27954  Fix type in changelog, pr number
	* gfortran.dg/error_recovery_2.f90: New test.

From-SVN: r118086
2006-10-27 20:54:54 +00:00
Jerry DeLisle
ee7b3e9ab1 re PR fortran/29563 (Internal read loses data.)
2006-10-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/29563
	* gfortran.dg/error_recovery_2.f90: New test.

From-SVN: r118085
2006-10-27 20:50:15 +00:00
Jerry DeLisle
a9f6f1f27f re PR fortran/27954 (ICE on garbage in DATA statement)
2006-10-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/27954
	* decl.c (gfc_free_data_all): New function to free all data structures
	after errors in DATA statements and declarations.
	(top_var_list): Use new function.(top_val_list): Use new function.
	(gfc_match_data_decl): Use new function.
	* misc.c (gfc_typename): Fixed incorrect function name in error text.

From-SVN: r118084
2006-10-27 20:47:28 +00:00
Mike Stump
95c0fb7a06 darwin-c.c (darwin_cpp_builtins): Move __STATIC__ and __DYNAMIC__ from here back to ...
* config/darwin-c.c (darwin_cpp_builtins): Move __STATIC__ and
	__DYNAMIC__ from here back to ...
	* config/darwin.h (CPP_SPEC): ... here.
Radar 4804385

From-SVN: r118082
2006-10-27 17:47:38 +00:00
GCC Administrator
8878463727 Daily bump.
From-SVN: r118077
2006-10-27 00:17:41 +00:00
Nathan Froyd
ded5f8f464 ggc-common.c (ggc_min_heapsize_heuristic): Be more conservative when choosing the minimum heapsize.
* ggc-common.c (ggc_min_heapsize_heuristic): Be more conservative
      when choosing the minimum heapsize.

Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>

From-SVN: r118070
2006-10-26 20:39:10 +00:00
Nathan Froyd
6673f90bc6 unwind-dw2.h: Move cfa-related variables into struct frame_state_reg_info to ensure that the...
* gcc/unwind-dw2.h: Move cfa-related variables into
	struct frame_state_reg_info to ensure that the CFA is properly
	handled when executing DW_CFA_{remember,restore}_state.
	* gcc/unwind-dw2.c, gcc/config/alpha/linux-unwind.h,
	gcc/config/alpha/vms-unwind.h, gcc/config/s390/tpf-unwind.h
	gcc/config/s390/linux-unwind.h, gcc/config/sparc/linux-unwind.h
	gcc/config/i386/linux-unwind.h, gcc/config/sh/linux-unwind.h
	gcc/config/rs6000/linux-unwind.h,
	gcc/config/rs6000/darwin-fallback.c, gcc/config/pa/linux-unwind.h,
	gcc/config/pa/hpux-unwind.h, gcc/config/mips/linux-unwind.h:
	Modify to use new cfa_* fields.

From-SVN: r118068
2006-10-26 19:31:09 +00:00
Richard Guenther
4bab2b2301 i386.exp: Use glob, not find to collect tests.
2006-10-26  Richard Guenther  <rguenther@suse.de>

	* gcc.target/i386/i386.exp: Use glob, not find to collect
	tests.  Avoids recursing into subdirectories.
	* gcc.target/i386/math-torture/math-torture.exp: Torture
	for interesting ia32 math options.
	* gcc.target.i386/math-torture/lrint.c: New testcase.

From-SVN: r118065
2006-10-26 08:23:19 +00:00
Jerry DeLisle
9a3da65a38 re PR fortran/29563 (Internal read loses data.)
2006-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/29563
	* gfortran.dg/arrayio_9.f90: Update test.
	* gfortran.dg/arrayio_19.f90: New test.

From-SVN: r118064
2006-10-26 07:19:49 +00:00
Andreas Krebbel
20f04e65e3 s390.c (s390_init_frame_layout): Check positive frame_size.
2006-10-26  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.c (s390_init_frame_layout): Check positive
	frame_size.

2006-10-26  Andreas Krebbel  <krebbel1@de.ibm.com>

	* gcc.dg/20061026.c: New testcase.

From-SVN: r118062
2006-10-26 06:58:29 +00:00
Jerry DeLisle
ac2de15d44 re PR fortran/29563 (Internal read loses data.)
2006-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/29563
	* gfortran.dg/arrayio_9.f90: New test.

From-SVN: r118060
2006-10-26 04:41:55 +00:00
Ben Elliston
0da67a3234 gimplify.c (get_name): Remove extraneous break.
* gimplify.c (get_name): Remove extraneous break.
	(gimplify_omp_for): Initialise ret with GS_OK.

From-SVN: r118057
2006-10-26 11:56:19 +10:00
GCC Administrator
1fdeec2c59 Daily bump.
From-SVN: r118054
2006-10-26 00:17:36 +00:00
Ben Elliston
377d876f81 strlen.c: Do not use strcpy.
* gcc.c-torture/execute/builtins/strlen.c: Do not use strcpy.
	Copy the strings manually, as strcpy may call strlen.

From-SVN: r118045
2006-10-26 08:58:27 +10:00
Steve Ellcey
6db63df90f hpux.h: Define _INCLUDE__STDC_A1_SOURCE in C++.
* config/ia64/hpux.h: Define _INCLUDE__STDC_A1_SOURCE in C++.
	Add unix98.o to link line.

From-SVN: r118043
2006-10-25 21:35:25 +00:00
Kaveh R. Ghazi
cf1491f0e5 re PR middle-end/29335 (transcendental functions with constant arguments should be resolved at compile-time)
PR middle-end/29335
	* builtins.c (fold_builtin_cbrt, fold_builtin_logarithm):
	Calculate compile-time constants using MPFR.
	(fold_builtin_1): Likewise handle BUILT_IN_ERF, BUILT_IN_ERFC,
	BUILT_IN_EXPM1 and BUILT_IN_LOG1P.
	
testsuite:
	* gcc.dg/torture/builtin-math-2.c (TESTIT): Use new helper macro.
	Add checks for log, log2, log10 and log1p.

	* gcc.dg/torture/builtin-math-3.c: Add checks for -0.0 everywhere
	we already test 0.0.  Add checks for expm1, log, log2, log10,
	log1p, cbrt, erf and erfc.

From-SVN: r118042
2006-10-25 20:44:09 +00:00
Bob Wilson
76f6e118d8 * config/xtensa/lib2funcs.S: Use C-style comments.
From-SVN: r118039
2006-10-25 17:03:02 +00:00
Steve Ellcey
29f7d34e1f * gcc.dg/pthread-init-2.c: Define _POSIX_C_SOURCE on ia64 HP-UX.
From-SVN: r118035
2006-10-25 16:32:30 +00:00
Nathan Froyd
1d2c2b9681 dwarf2out.c (gen_compile_unit_die): Use IS_ABSOLUTE_PATH.
* dwarf2out.c (gen_compile_unit_die): Use IS_ABSOLUTE_PATH.
        (file_table_relative_p): Likewise.
        (dwarf2out_finish): Likewise.
        (file_name_acquire): Use DIR_SEPARATOR and DIR_SEPARATOR_2.

From-SVN: r118033
2006-10-25 13:31:21 +00:00
Daniel Berlin
80ba94327e tree-ssa-structalias.c (intra_create_variable_infos): Don't recreate nonlocal_all if it already exists.
2006-10-25  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-structalias.c (intra_create_variable_infos):
	  Don't recreate nonlocal_all if it already exists.

From-SVN: r118031
2006-10-25 13:26:55 +00:00
Richard Guenther
bb7f04236c optabs.h (enum optab_index): Remove OTI_lrint.
2006-10-25  Richard Guenther  <rguenther@suse.de>

	* optabs.h (enum optab_index): Remove OTI_lrint.
	(enum convert_optab_index): Add COI_lrint.
	(lrint_optab): Adjust.
	(expand_sfix_optab): Declare.
	* optabs.c (expand_sfix_optab): New function.
	(init_optabs): Init lrint_optab as conversion optab.
	* genopinit.c (lrint_optab): Change to a conversion optab.
	* builtins.c (expand_builtin_int_roundingfn_2): Adjust to
	expansion via conversion optab.
	* config/i386/i386.md (*fistdi2_1): Remove
	flag_unsafe_math_optimizations guard.
	(fistdi2, fistdi2_with_temp, *fist<mode>2_1, fist<mode>2,
	fist<mode>2_with_temp): Likewise.
	(lrint<mode>2): Split into...
	(lrintxf<mode>2): ... x87 part
	(lrint<mode>di2, lrint<mode>si2): ... and SSE parts.
	* config/i386/sse.md (sse_cvtss2si_2, sse_cvtss2_siq_2,
	sse2_cvtsd2si_2, sse2_cvtsd2siq_2): New insns for
	UNSPEC_FIX_NOTRUNC matching non-vector float modes.
	* doc/md.texi (lrintMN2): Document.

From-SVN: r118029
2006-10-25 13:01:14 +00:00
Uros Bizjak
ef984648a1 re PR target/28909 (Missed optimization with x86 sync builtins)
PR target/28909
        * config/i386/sync.md ("sync_add<mode>", "sync_sub<mode>"):
        Use inc and dec instructions for TARGET_USE_INCDEC.
        ("*sync_compare_and_swap<mode>"): Fix -masm=intel template.
        ("sync_double_compare_and_swap<mode>"): Likewise.
        ("*sync_double_compare_and_swapdi_pic"): Likewise.
        ("*sync_compare_and_swap_cc<mode>"): Likewise.
        ("sync_double_compare_and_swap_cc<mode>"): Likewise.
        ("*sync_double_compare_and_swap_ccdi_pic"): Likewise.
        ("sync_old_add<mode>"): Likewise.
        ("sync_lock_test_and_set<mode>"): Likewise.
        ("sync_lock_test_and_set<mode>"): Likewise.
        ("sync_add<mode>"): Likewise.
        ("sync_sub<mode>"): Likewise.
        ("sync_ior<mode>"): Likewise.
        ("sync_and<mode>"): Likewise.
        ("sync_xor<mode>"): Likewise.

From-SVN: r118028
2006-10-25 12:14:41 +02:00
Uros Bizjak
17b982699f optabs.h (enum optab_index): Rename OTI_drem to OTI_remainder.
* optabs.h (enum optab_index): Rename OTI_drem to OTI_remainder.
        (remainder_optab): Define corresponding macro.
        (drem_optab): Remove.
        * optabs.c (init_optabs): Initialize remainder_optab.  Remove
        drem_optab initialization.
        * genopinit.c (optabs): Implement remainder_optab using
        remainder?f3 patterns.  Remove drem_optab.
        * builtins.c (expand_builtin_mathfn_2): Handle
        BUILT_IN_REMAINDER{,F,L} using remainder_optab.
        (expand_builtin): Expand BUILT_IN_REMAINDER{,F,L} using
        expand_builtin_mathfn_2.

        (expand_builtin) [BUILT_IN_FMOD, BUILT_IN_DREM]: Do not
        depend on flag_unsafe_math_optimizations.

        * config/i386/i386.md ("remaindersf3", "remainderdf3")
        ("remainderxf3"): Renamed from "drem{s,d,x}f3" expanders.
        Do not depend on flag_unsafe_math_optimizations.  Use
        truncxf?f expander instead of truncxf?f_i387_noop.

        ("fpremxf4", "fprem1xf4"): Do not depend on
        flag_unsafe_math_optimizations.
        ("fmodsf3", "fmoddf3", "fmodxf3"): Do not depend on
        flag_unsafe_math_optimizations.  Use truncxf?f expander
        instead of truncxf?f_i387_noop.

        * doc/md.texi (fmod, remainder): Document standard named pattern.

testsuite/ChangeLog:

        * gcc.dg/builtins-40.c: Also check remainder(), remainderf()
        and remainderl() built-in functions.  Remove -ffast-math from
        dg-options.

From-SVN: r118024
2006-10-25 08:36:49 +02:00
Richard Sandiford
942d782179 re PR middle-end/29519 (Bad code on MIPS with -fnon-call-exceptions)
PR middle-end/29519
	* rtlanal.c (nonzero_address_p):  Remove check for values wrapping.

Co-Authored-By: David Daney <ddaney@avtrex.com>

From-SVN: r118023
2006-10-25 05:49:43 +00:00
GCC Administrator
7068ca911a Daily bump.
From-SVN: r118020
2006-10-25 00:17:43 +00:00
Ben Elliston
9baf8aea95 * doc/extend.texi (Variable Attributes): Typo fix.
From-SVN: r118015
2006-10-25 09:20:33 +10:00