Commit Graph

7829 Commits

Author SHA1 Message Date
Manuel López-Ibáñez 05170031ab re PR c/9072 (-Wconversion should be split into two distinct flags)
2006-11-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c/9072 
	* c.opt (Wtraditional-conversion): New.
	(Wconversion): Update description.
	* c-typeck.c (convert_arguments): Warnings for prototypes causing
	type conversions different from what would happen in the absence
	of prototype are now handled by Wtraditional-conversion.
	* doc/invoke.texi (Wtraditional-conversion): New.
	(Wconversion): Update description.
	* doc/trouble.texi (Wconversion): Replace Wconversion by
	Wtraditional-conversion.

testsuite/

	PR c/9072 
	* gcc.dg/builtin-protos-1.c: Replace Wconversion by
	Wtraditional-conversion.
	* gcc.dg/overflow-warn-2.c: Likewise.
	* gcc.dg/Wconversion.c: Likewise. Renamed as
	Wtraditional-conversion.c .
	* gcc.dg/Wconversion-2.c: Likewise. Renamed as
	Wtraditional-conversion-2.c .
	* gcc.dg/dfp/Wconversion-2.c: Likewise. Renamed as
	Wtraditional-conversion-2.c 
	* gcc.dg/Wconversion-negative-constants.c: New.

From-SVN: r119129
2006-11-23 18:39:32 +00:00
Andrew Pinski 61968738d5 predict.c (tree_estimate_probability): Check to make sure current_loops is non null before calling flow_loops_dump.
2006-11-23  Andrew Pinski  <pinskia@gmail.com>

        * predict.c (tree_estimate_probability): Check to make
        sure current_loops is non null before calling flow_loops_dump.
2006-11-23  Andrew Pinski  <pinskia@gmail.com>

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

From-SVN: r119128
2006-11-23 09:59:53 -08:00
David Ung 6f42806295 mips.h (ISA_HAS_FP4): Add MIPS32R2 + 64bit fpu combination.
gcc:
	* config/mips/mips.h (ISA_HAS_FP4): Add MIPS32R2 + 64bit fpu
	combination.
	(ISA_HAS_MXHC1): True if ISA supports mfhc1 and mthc1 opcodes.
	(ASM_SPEC): Pass along -mfp32 and -mfp64.
	* config/mips/mips.c (mips_split_64bit_move): Use gen_mthc1 to set
	high part of FP register when in 64-bit FP register mode.  Similarly
	use gen_mfhc1 to load high part of FP register.
	(override_options): Allow -mgp32 and -mfp64 combination if
	ISA_HAS_MXHC1 (currently for O32 only).
	(mips_cannot_change_mode_class): If floating-point registers are
	bigger than word size. disallow conversion of float register from a
	large integer mode to a float mode smaller than the float register
	size.
	(mips_class_max_nregs): Handle float registers case seperately.
	* config/mips/mips.md (define_constants): Add UNSPEC_MFHC1,
	UNSPEC_MTHC1.
	(movdi_32bit): Use !TARGET_FLOAT64 in condition pattern.
	(movdf_hardfloat_32bit): Similarly.
	(movdi_gp32_fp64): New DImode pattern for MIPS32R2 which optionally
	support a full 64-bit fpu.
	(mthc1): New pattern to generate MTHC1 instruction.
	(mfhc1): New pattern to generate MFHC1 instruction.
	* doc/invoke.texi (MIPS Options): Document the -mgp32 -mfp64
	option for the MIPS32R2 and mention its use under O32 ABI.

gcc/testsuite:
	* gcc.target/mips/mips.exp (dg-mips-options): Handle parsing of
	-mfp64, allowable when ISA >= 33 and float is enabled.
	* gcc.target/mips/mips32r2-mxhc1.c: New test for checking the use
	of mthc1 and mfhc1 patterns.

From-SVN: r119124
2006-11-23 16:13:46 +00:00
Zdenek Dvorak 0446c9f3a7 re PR tree-optimization/29921 (internal compiler error: in set_lattice_value, at tree-ssa-ccp.c:437)
PR tree-optimization/29921
	* fold-const.c (operand_equal_p): Without HONOR_SIGNED_ZEROS, consider
	signed and unsigned zero equal.

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

From-SVN: r119102
2006-11-22 23:11:15 +00:00
Tobias Schlüter cbad228156 re PR fortran/29441 ([4.1/4.2 only] non-constant parameter (constant) accepted)
fortran/
        PR fortran/29441
        * intrinsic.c (gfc_intrinsic_func_interface): Always check if
        intrinsic is allowed in initialization expression.
testsuite/
        PR fortran/29441
        * gfortran.dg/initialization_4.f90: New test.

From-SVN: r119101
2006-11-22 23:09:14 +01:00
Ira Rosen 98b44b0eea c-tree.texi: Document new tree codes.
* doc/c-tree.texi: Document new tree codes.
        * doc/md.texi: Document new optabs.
        * tree-pretty-print.c (dump_generic_node): Handle print of new tree
        codes.
        * optabs.c (optab_for_tree_code, init_optabs): Handle new optabs.
        * optabs.h (optab_index): Add new.
        (vec_extract_even_optab, vec_extract_odd_optab,
        vec_interleave_high_optab, vec_interleave_low_optab): New optabs.
        * genopinit.c (vec_extract_even_optab, vec_extract_odd_optab,
        vec_interleave_high_optab, vec_interleave_low_optab): Initialize
        new optabs.
        * expr.c (expand_expr_real_1): Add implementation for new tree codes.
        * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields.
        * tree-vectorizer.h (stmt_vec_info): Add new fields for interleaving
        along with macros for their access.
        * tree-data-ref.h (first_location_in_loop, data_reference): Update
        comment.
        * tree-vect-analyze.c (toplev.h): Include.
        (vect_determine_vectorization_factor): Fix indentation.
        (vect_insert_into_interleaving_chain,
        vect_update_interleaving_chain, vect_equal_offsets): New functions.
        (vect_analyze_data_ref_dependence): Add argument for interleaving
        check. Check for interleaving if it's true.
        (vect_check_dependences): New function.
        (vect_analyze_data_ref_dependences): Call vect_check_dependences for
        every ddr. Call vect_analyze_data_ref_dependence with new argument.
        (vect_update_misalignment_for_peel): Update for interleaving.
        (vect_verify_datarefs_alignment): Check only first data-ref for
        interleaving.
        (vect_enhance_data_refs_alignment): Update for interleaving. Check
        only first data-ref for interleaving.
        (vect_analyze_data_ref_access): Check interleaving, update
        interleaving data.
        (vect_analyze_data_refs): Call compute_data_dependences_for_loop
        with different parameters.
        * tree.def (VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR,
        VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR): New tree codes.
        * tree-inline.c (estimate_num_insns_1): Add cases for new codes.
        * tree-vect-transform.c (vect_create_addr_base_for_vector_ref):
        Update step in case of interleaving.
        (vect_strided_store_supported, vect_permute_store_chain): New
        functions.
        (vectorizable_store): Handle strided stores.
        (vect_strided_load_supported, vect_permute_load_chain,
        vect_transform_strided_load): New functions.
        (vectorizable_load): Handle strided loads.
        (vect_transform_stmt): Add argument. Handle strided stores. Check
        that vectorized stmt exists for patterns.
        (vect_gen_niters_for_prolog_loop): Update calculation for
        interleaving.
        (vect_transform_loop): Remove stmt_vec_info for strided stores after
        whole chain vectorization.
        * config/rs6000/altivec.md (UNSPEC_EXTEVEN, UNSPEC_EXTODD,
        UNSPEC_INTERHI, UNSPEC_INTERLO): New constants.
        (vpkuhum_nomode, vpkuwum_nomode, vec_extract_even<mode>,
        vec_extract_odd<mode>, altivec_vmrghsf, altivec_vmrglsf,
        vec_interleave_high<mode>, vec_interleave_low<mode>): Implement.

From-SVN: r119088
2006-11-22 08:46:03 +00:00
Paul Thomas 92c59193a1 re PR fortran/25087 (Error for missing explicit interface needed.)
2006-11-22 Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/25087
	* resolve.c (resolve_fl_procedure): Add an error if an external
	automatic character length function does not have an explicit
	interface.

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

	PR fortran/25087
	* gfortran.dg/auto_char_len_4.f90: New test.

From-SVN: r119077
2006-11-22 00:05:10 +00:00
Paul Thomas 991f3b1289 re PR fortran/29652 (ambiguous interface declaration undetected)
2006-11-22 Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/29652
	* interface.c (check_interface1): Use a local value, instead of
	the dummy, as the inner iterator over interface symbols.

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

	PR fortran/29652
	* gfortran.dg/generic_7.f90: New test.
	* gfortran.dg/defined_operators_1.f90: Add new error.

From-SVN: r119076
2006-11-22 00:02:02 +00:00
Zdenek Dvorak bf8dbe3863 re PR tree-optimization/29902 (ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:644)
PR tree-optimization/29902
	* tree-ssa-loop-manip.c (can_unroll_loop_p): Return false if
	any involved ssa name appears in abnormal phi node.

	* g++.dg/tree-ssa/pr29902.C: New test.

From-SVN: r119074
2006-11-21 23:45:21 +00:00
Paul Thomas da2a24c3f6 re PR fortran/29820 (ICE in fold_convert, at fold-const.c:2146)
2006-11-21 Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/29820
	* trans-array.c (gfc_get_derived_type): Once done, spread the
	backend_decl to all identical derived types in all sibling
	namespaces.

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

	PR fortran/29820
	* gfortran.dg/used_types_13.f90: New test.

From-SVN: r119073
2006-11-21 23:42:17 +00:00
Janis Johnson d44963af3c decLibrary.c (__dec_type_swap): Add prototype.
decnumber/
	* decLibrary.c (__dec_type_swap): Add prototype.
	(__dfp_enable_traps, dfp_raise): Delete.
gcc/
	* config/dfp-bit.h (CONTEXT_TRAPS, CONTEXT_ERRORS, DFP_RAISE): Delete.
	* config/dfp-bit.c (dfp_unary_op, dfp_binary_op, dfp_compare_op,
	DFP_TO_DFP, INT_TO_DFP, BFP_TO_DFP): Remove calls to DFP_RAISE.
testsuite/
	* gcc.dg/dfp/snan.c: Delete.

From-SVN: r119068
2006-11-21 20:35:57 +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
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
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
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
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
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
Dorit Nuzman 9fe01de4e3 * gcc.dg/vect/vect-27.c: Fix initialization.
From-SVN: r118987
2006-11-19 11:11:57 +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
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
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
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
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
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
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
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
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
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 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
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
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
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
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
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