Commit Graph

92400 Commits

Author SHA1 Message Date
Arnaud Charlet
9d00840d08 * gnatvsn.ads: Bump version number.
From-SVN: r145671
2009-04-07 15:37:49 +02:00
Arnaud Charlet
5f143024b7 [multiple changes]
2009-04-07  Thomas Quinot  <quinot@adacore.com>

	* exp_ch3.adb: Minor rewording (comments)

2009-04-07  Robert Dewar  <dewar@adacore.com>

	* exp_disp.adb: Minor reformatting

From-SVN: r145670
2009-04-07 15:21:50 +02:00
Paolo Bonzini
d8e535fa82 expr.c (do_store_flag): Remove last argument.
2009-04-07  Paolo Bonzini  <bonzini@gnu.org>

	* expr.c (do_store_flag): Remove last argument.  Simplify code
	to avoid duplication of tests already done by can_compare_p.
	(expand_expr_real_1): Adjust caller.

From-SVN: r145668
2009-04-07 12:48:16 +00:00
Paolo Bonzini
c3c64f5002 optabs.c (can_compare_p): Test the predicate of a cbranch and cstore pattern.
2009-04-07  Paolo Bonzini  <bonzini@gnu.org>

        * optabs.c (can_compare_p): Test the predicate of a
        cbranch and cstore pattern.

From-SVN: r145667
2009-04-07 12:39:37 +00:00
Paolo Bonzini
9a53bc17c4 expr.c (convert_move): Use emit_store_flag instead of "emulating" it.
2009-04-07  Paolo Bonzini  <bonzini@gnu.org>

        * expr.c (convert_move): Use emit_store_flag instead of
        "emulating" it.

From-SVN: r145666
2009-04-07 12:30:59 +00:00
Paolo Bonzini
67b8f1c149 i386.c (ix86_compare_emitted): Remove.
2009-04-07  Paolo Bonzini  <bonzini@gnu.org>

        * config/i386/i386.c (ix86_compare_emitted): Remove.
        (ix86_expand_compare, ix86_expand_branch): Handle MODE_CC
        ix86_compare_op0 like ix86_compare_emitted used to be handled.
        * config/i386/i386.h (ix86_compare_emitted): Remove.
        * config/i386/i386.md (stack_protect_test): Set ix86_compare_op0
        instead of ix86_compare_emitted.
        * config/i386/sync.md (sync_compare_and_swap_cc): Likewise.

From-SVN: r145665
2009-04-07 12:26:23 +00:00
Eric Botcazou
d5859bf49d decl.c (gnat_to_gnu_entity): Test the underlying type.
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Test the
	underlying type.
	* gcc-interface/trans.c (lvalue_required_p): Likewise.

From-SVN: r145663
2009-04-07 10:58:37 +00:00
Eric Botcazou
c86f07f6bf trans.c (Attribute_to_gnu): Do not convert the result.
2009-04-07  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Attribute_to_gnu) <Max_Size_In_Storage_Elmts>:
	Do not convert the result.  Remove obsolete comment.

From-SVN: r145662
2009-04-07 10:21:45 +00:00
Eric Botcazou
2d5be6c15d trans.c (establish_gnat_vms_condition_handler): Clear DECL_CONTEXT.
* gcc-interface/trans.c (establish_gnat_vms_condition_handler): Clear
	DECL_CONTEXT.
	(Subprogram_Body_to_gnu): Fix pasto.

From-SVN: r145661
2009-04-07 09:57:06 +00:00
Eric Botcazou
10069d53fb gigi.h (standard_datatypes): Remove ADT_void_type_decl.
* gcc-interface/gigi.h (standard_datatypes): Remove ADT_void_type_decl.
	(void_type_decl_node): Remove.
	(init_gigi_decls): Likewise.
	(gnat_install_builtins): Declare.
	(record_builtin_type): Likewise.
	(create_type_stub_decl): Likewise.
	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Void>: Use void_type.
	(gnat_to_gnu_entity) <E_Array_Type>: Make fat and thin pointer types
	artificial.
	<E_Array_Subtype>: Use the index types, not only their name, in the
	record giving the names of the bounds, if any.
	For a packed array type, make it artificial only if the base type
	was artificial as well.  Remove redundant statement.
	(gnat_to_gnu_entity) <E_Incomplete_Type>: Do not create TYPE_DECL for
	dummy types.
	Use create_type_stub_decl to build the TYPE_STUB_DECL of types.
	(rest_of_type_decl_compilation_no_defer): Likewise.
	* gcc-interface/misc.c (gnat_printable_name): Add missing guard.
	* gcc-interface/utils.c (make_dummy_type): Always create TYPE_STUB_DECL
	and use create_type_stub_decl to build it.
	(gnat_pushdecl): Rewrite condition.
	(gnat_install_builtins): Remove bogus declaration.
	(record_builtin_type): New function.
	(finish_record_type): Use create_type_stub_decl to build TYPE_STUB_DECL
	of types.
	(create_type_stub_decl): New function.
	(create_type_decl): Assert that the type is not dummy.  If the type
	hasn't been named yet, equate the TYPE_STUB_DECL to the created node.
	(build_vms_descriptor32): Do not create TYPE_DECL for the descriptor.
	(build_vms_descriptor): Likewise.
	(init_gigi_decls): Delete and move bulk of code to...
	* gcc-interface/trans.c (gigi): ...here.  Use record_builtin_type.
	(emit_range_check): Add gnat_node parameter.
	(emit_index_check): Likewise.
	(emit_check): Likewise.
	(build_unary_op_trapv): Likewise.
	(build_binary_op_trapv): Likewise.
	(convert_with_check): Likewise.
	(Attribute_to_gnu): Adjust calls for above changes.
	(call_to_gnu): Likewise.
	(gnat_to_gnu): Likewise.
	(assoc_to_constructor): Likewise.
	(pos_to_constructor): Likewise.
	(Sloc_to_locus): Set BUILTINS_LOCATION for Standard_Location nodes.
	(process_type): Do not create TYPE_DECL for dummy types.

From-SVN: r145660
2009-04-07 09:41:40 +00:00
Eric Botcazou
1e17ef870e decl.c (gnat_to_gnu_entity): Reorder local variables.
* gcc-interface/decl.c (gnat_to_gnu_entity): Reorder local variables.
	* gcc-interface/trans.c: Fix formatting throughout.  Fix comments.
	* gcc-interface/utils.c: Fix comments.

From-SVN: r145658
2009-04-07 08:26:08 +00:00
Eric Botcazou
229077b0b4 decl.c (compile_time_known_address_p): Rewrite and move around.
* decl.c (compile_time_known_address_p): Rewrite and move around.
	(gnat_to_gnu_type): Move around.
	(get_unpadded_type): Likewise.
	* utils.c (update_pointer_to): Use synthetic macro.  Tidy comments.

From-SVN: r145654
2009-04-07 07:56:11 +00:00
Janus Weil
c22ba5ffd4 repairing ChangeLog for my last commit
From-SVN: r145653
2009-04-07 09:43:16 +02:00
Eric Botcazou
aa1aa786c9 trans.c (check_for_eliminated_entity): New function.
* gcc-interface/trans.c (check_for_eliminated_entity): New function.
	(Attribute_to_gnu): Invoke it for Access- and Address-like attributes.
	(call_to_gnu): Invoke it instead of manually checking.

From-SVN: r145652
2009-04-07 07:36:31 +00:00
Janus Weil
3afadac3ca re PR other/38920 (dw2 exceptions don't work.)
2009-04-07  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/38920
	* expr.c (gfc_check_pointer_assign): Enable interface check for
	procedure pointers.
	* gfortran.h: Add copy_formal_args_intr.
	* interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
	if second argument is an intrinsic.
	(compare_intr_interfaces): Correctly set attr.function, attr.subroutine
	and ts.
	(compare_parameter): Call gfc_compare_interfaces also for intrinsics.
	* resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
	intrinsic interfaces here. Must happen earlier.
	(resolve_symbol): Resolution of intrinsic interfaces moved here from
	resolve_specific_..., and formal args are now copied from intrinsic
	interfaces.
	* symbol.c (copy_formal_args_intr): New function to copy the formal
	arguments from an intinsic procedure.


2009-04-07  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/38920
	* gfortran.dg/proc_decl_1.f90: Modified.
	* gfortran.dg/proc_ptr_11.f90: Extended.
	* gfortran.dg/proc_ptr_13.f90: Modified.

From-SVN: r145651
2009-04-07 09:24:37 +02:00
Andrew Stubbs
445099463a config.gcc (sh-*-*): Add sysroot-suffix.h to tm_file.
2009-04-07  Andrew Stubbs  <ams@codesourcery.com>

	* config.gcc (sh-*-*): Add sysroot-suffix.h to tm_file.
	Add t-sysroot-suffix to tmake_file.
	* config/print-sysroot-suffix.sh: New file.
	* config/t-sysroot-suffix: New file.

From-SVN: r145650
2009-04-07 07:10:43 +00:00
Ben Elliston
ca22d88280 libgcc2.c (INFINITY): Use __builtin_huge_val...
* libgcc2.c (INFINITY): Use __builtin_huge_val, not __builtin_inf,
	as the latter produces a warning when the target does not support
	infinity.

From-SVN: r145646
2009-04-07 13:26:32 +10:00
Benjamin Kosnik
04b7027180 Makefile.am (${pch1a_output}): Use gnu++0x flags instead of debug.
2009-04-06  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (${pch1a_output}): Use gnu++0x flags instead
	of debug.
	* include/Makefile.in: Regenerate.
	* include/precompiled/stdc++.h: Add.

	* doc/xml/api.xml: Add gcc-4.4 link.
	* doc/html/api.html: Regenerate.

2009-04-06  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/random.h: Adjust doxygen markup.
	* doc/doxygen/user.cfg.in: Prefer C++0x to tr1 includes.

	* testsuite/26_numerics/random/piecewise_linear_distribution/
	operators/serialize.cc: Use typedefs.

From-SVN: r145645
2009-04-07 01:46:45 +00:00
Ben Elliston
95aac11b84 dfp.c: Replace type punning assignments with memcpy throughout.
* dfp.c: Replace type punning assignments with memcpy throughout.
	* Makefile.in (dfp.o-warn): Remove.

From-SVN: r145644
2009-04-07 11:29:54 +10:00
Alan Modra
633dd06142 re PR target/39634 (powerpc64 libgcc contains useless softfp functions)
PR target/39634
	* config.gcc: Merge powerpc-*-linux* and powerpc64-*-linux*.
	Include soft-fp/t-softfp after rs6000/t-linux64.
	* config.host: Reorder and merge to match config.gcc change.

From-SVN: r145641
2009-04-07 10:17:21 +09:30
GCC Administrator
dacfd234ff Daily bump.
From-SVN: r145640
2009-04-07 00:16:48 +00:00
H.J. Lu
4197c13d08 re PR libfortran/39664 (Revision 145571 breaks stdio)
2009-04-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR libgfortran/39664
	* io/unix.c (raw_close): Don't close STDOUT_FILENO,
	STDERR_FILENO nor STDIN_FILENO.

From-SVN: r145636
2009-04-06 16:07:51 -07:00
Eric Botcazou
fe0a25ec79 stor-layout.c (set_sizetype): Use the full precision of their machine mode for bitsize types.
* stor-layout.c (set_sizetype): Use the full precision of their
	machine mode for bitsize types.

From-SVN: r145631
2009-04-06 21:16:00 +00:00
H.J. Lu
0c011bc3b3 i386.md: Revert 2 accidental checkins.
2009-04-06  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.md: Revert 2 accidental checkins.

From-SVN: r145630
2009-04-06 14:13:20 -07:00
Jason Merrill
463ecaca84 re PR c++/35146 (weird error in template function specialization)
PR c++/35146
	* pt.c (fn_type_unification): For DEDUCE_EXACT check that
	the deduced template arguments give us the parameter types
	we're looking for.

From-SVN: r145625
2009-04-06 16:55:04 -04:00
Joey Ye
b6837b94d9 Atom pipeline model, tuning and insn selection.
2009-04-06  Joey Ye  <joey.ye@intel.com>
	    Xuepeng Guo <xuepeng.guo@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	Atom pipeline model, tuning and insn selection.
	* config.gcc (atom): Add atom config options and target.

	* config/i386/atom.md: New.

	* config/i386/i386.c (atom_cost): New cost.
	(m_ATOM): New macro flag.
	(initial_ix86_tune_features): Set m_ATOM.
	(x86_accumulate_outgoing_args): Likewise.
	(x86_arch_always_fancy_math_387): Likewise.
	(processor_target): Add Atom cost.
	(cpu_names): Add Atom cpu name.
	(override_options): Set Atom ISA.
	(ix86_issue_rate): New case PROCESSOR_ATOM.
	(ix86_adjust_cost): Likewise.

	* config/i386/i386.h (TARGET_ATOM): New target macro.
	(ix86_tune_indices): Add X86_TUNE_OPT_AGU.
	(TARGET_OPT_AGU): New target option.
	(target_cpu_default): Add TARGET_CPU_DEFAULT_atom.
	(processor_type): Add PROCESSOR_ATOM.

	* config/i386/i386.md (cpu): Add new value "atom".
	(use_carry, movu): New attr.
	(atom.md): Include atom.md.
	(adddi3_carry_rex64): Set attr "use_carry".
	(addqi3_carry): Likewise.
	(addhi3_carry): Likewise.
	(addsi3_carry): Likewise.
	(*addsi3_carry_zext): Likewise.
	(subdi3_carry_rex64): Likewise.
	(subqi3_carry): Likewise.
	(subhi3_carry): Likewise.
	(subsi3_carry): Likewise.
	(x86_movdicc_0_m1_rex64): Likewise.
	(*x86_movdicc_0_m1_se): Likewise.
	(x86_movsicc_0_m1): Likewise.
	(*x86_movsicc_0_m1_se): Likewise.
	(*adddi_1_rex64): Emit add insn as much as possible.
	(*addsi_1): Likewise.
	(return_internal): Set atom_unit.
	(return_internal_long): Likewise.
	(return_pop_internal): Likewise.
	(*rcpsf2_sse): Set atom_sse_attr attr.
	(*qrt<mode>2_sse): Likewise.
	(*prefetch_sse): Likewise.

	* config/i386/i386-c.c (ix86_target_macros_internal): New case
	PROCESSOR_ATOM.
	(ix86_target_macros_internal): Likewise.

	* config/i386/sse.md (cpu): Set attr "atom_sse_attr".
	(*prefetch_sse_rex): Likewise.
	(sse_rcpv4sf2): Likewise.
	(sse_vmrcpv4sf2): Likewise.
	(sse_sqrtv4sf2): Likewise.
	(<sse>_vmsqrt<mode>2): Likewise.
	(sse_ldmxcsr): Likewise.
	(sse_stmxcsr): Likewise.
	(*sse_sfence): Likewise.
	(sse2_clflush): Likewise.
	(*sse2_mfence): Likewise.
	(*sse2_lfence): Likewise.
	(avx_movup<avxmodesuffixf2c><avxmodesuffix>): Set attr "movu".
	(<sse>_movup<ssemodesuffixf2c>): Likewise.
	(avx_movdqu<avxmodesuffix>): Likewise.
	(avx_lddqu<avxmodesuffix>): Likewise.
	(sse2_movntv2di): Change attr "type" to "ssemov".
	(sse2_movntsi): Likewise.
	(rsqrtv8sf2): Change attr "type" to "sseadd".
	(sse3_addsubv2df3): Set attr "atom_unit".
	(sse3_h<plusminus_insn>v4sf3): Likewise.
	(*sse2_pmaddwd): Likewise.
	(*vec_extractv2di_1_rex64): Likewise.
	(*vec_extractv2di_1_avx): Likewise.
	(sse2_psadbw): Likewise.
	(ssse3_phaddwv8hi3): Likewise.
	(ssse3_phaddwv4hi3): Likewise.
	(ssse3_phadddv4si3): Likewise.
	(ssse3_phadddv2si3): Likewise.
	(ssse3_phaddswv8hi3): Likewise.
	(ssse3_phaddswv4hi3): Likewise.
	(ssse3_phsubwv8hi3): Likewise.
	(ssse3_phsubwv4hi3): Likewise.
	(ssse3_phsubdv4si3): Likewise.
	(ssse3_phsubdv2si3): Likewise.
	(ssse3_phsubswv8hi3): Likewise.
	(ssse3_phsubswv4hi3): Likewise.
	(ssse3_pmaddubsw128): Likewise.
	(sse3_pmaddubsw: Likewise.
	(ssse3_palignrti): Likewise.
	(ssse3_palignrdi): Likewise.

Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com>
Co-Authored-By: Xuepeng Guo <xuepeng.guo@intel.com>

From-SVN: r145624
2009-04-06 13:53:33 -07:00
Laurent GUERBY
6d63ea7513 gnat.exp: Handle multilib.
testsuite/
2009-04-06  Laurent GUERBY  <laurent@guerby.net>

        * lib/gnat.exp: Handle multilib.
        
libada/
2009-04-06  Laurent GUERBY  <laurent@guerby.net>

        * Makefile.in (ADA_RTS_DIR): Define.
        * Makefile.in (gnatlib-*): Link adainclude and adalib to it.

From-SVN: r145622
2009-04-06 20:18:10 +00:00
Paul Thomas
ea0a374b2c re PR fortran/38863 (WHERE with multiple elemental defined assignments gives wrong answer)
2009-04-06  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/38863
	* dependency.c (ref_same_as_full_array): New function.
	(gfc_dep_resolver): Call it.

2009-04-06  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/38863
	* gfortran.dg/dependency_23.f90: New test.

From-SVN: r145621
2009-04-06 20:13:39 +00:00
Gerald Pfeifer
53e350d382 * doc/install.texi (Specific): Fix two cross-references to MinGW.
From-SVN: r145619
2009-04-06 19:38:39 +00:00
Andrew Stubbs
8f2b104d09 atomicity.h: Put the SH4A specific functions in the __gnu_cxx namespace.
2009-04-06  Andrew Stubbs  <ams@codesourcery.com>

	* config/cpu/sh/atomicity.h: Put the SH4A specific functions in the
	__gnu_cxx namespace.  Remove "static inline".

From-SVN: r145613
2009-04-06 16:47:32 +00:00
David Edelsohn
d26014d24e io.h (struct stream): Rename truncate to trunc.
* io/io.h (struct stream): Rename truncate to trunc.
        (struncate): Same.
        * io/unix.c (raw_init): Rename truncate to trunc.
        (buf_init): Same.
        (open_internal): Same.

From-SVN: r145608
2009-04-06 11:32:03 -04:00
Richard Guenther
439ef907ae re PR tree-optimization/28868 (Not eliminating the PHIs which have the same arguments)
2009-04-06  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/28868
	* tree-ssa-pre.c (inserted_phi_names): New bitmap to keep track
	of which PHI results we inserted.
	(insert_into_preds_of_block): Record inserted PHIs.
	(eliminate): Eliminate redundant PHI nodes.
	(init_pre): Init inserted_phi_names.

	* gcc.dg/tree-ssa/ssa-fre-21.c: New testcase.
	* gcc.dg/tree-ssa/ssa-sccvn-1.c: Adjust.
	* gcc.dg/tree-ssa/ssa-sccvn-2.c: Likewise.
	* gcc.dg/tree-ssa/ssa-sccvn-4.c: Likewise.

From-SVN: r145607
2009-04-06 14:55:31 +00:00
Paolo Carlini
1ae3576fa4 random.tcc (linear_congruential_engine<>:: seed(seed_seq&)): Fix typo in last fix for __m == 0.
2009-04-06  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.tcc (linear_congruential_engine<>::
	seed(seed_seq&)): Fix typo in last fix for __m == 0.

From-SVN: r145605
2009-04-06 14:50:06 +00:00
Richard Guenther
4bad83f55a re PR tree-optimization/39643 (cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one)
2009-04-06  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/39643
	* tree-ssa-ccp.c (ccp_fold): Fold REALPART_EXPRs and
	IMAGPART_EXPRs of complex constants.
	(execute_fold_all_builtins): If we folded a call queue
	TODO_update_address_taken.

From-SVN: r145604
2009-04-06 14:16:15 +00:00
Paolo Carlini
94986f6d35 random.h (operator==): Mark all inline.
2009-04-06  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.h (operator==): Mark all inline.
	(mersenne_twister_engine): Enable #if 0 checks.

	* include/bits/random.h: Formatting tweaks.

From-SVN: r145602
2009-04-06 13:31:12 +00:00
Andrew Stubbs
2e698f677d pragma-isr-trapa2.c: Skip test for FPU-less architectures.
2009-04-06  Andrew Stubbs  <ams@codesourcery.com>

	gcc/testsuite/
	* gcc.dg/pragma-isr-trapa2.c: Skip test for FPU-less architectures.

From-SVN: r145590
2009-04-06 11:29:51 +00:00
Jan Hubicka
570c4247a2 re PR middle-end/39659 (ICE building libstdc++v3 functexcept.cc)
PR middle-end/39659
	* except.c (remove_unreachable_regions): Propagate may_contain_throw
	flag.

From-SVN: r145589
2009-04-06 11:24:32 +00:00
Andrew Stubbs
a460d7a147 lib1funcs.asm (ic_invalidate): Move ICBI out of the delay slot.
2009-04-06  Andrew Stubbs  <ams@codesourcery.com>

	* config/sh/lib1funcs.asm (ic_invalidate): Move ICBI out of the
	delay slot.
	(ic_invalidate_array): Likewise.

From-SVN: r145588
2009-04-06 11:22:09 +00:00
Andrew Stubbs
5020dbd68d sh4a-memmovua.c: Include string.h instead of stdlib.h.
2009-04-06  Andrew Stubbs  <ams@codesourcery.com>

	* gcc.target/sh/sh4a-memmovua.c: Include string.h instead of stdlib.h.

2009-04-06  Andrew Stubbs  <ams@codesourcery.com>

	* gcc.target/sh/sh4a-bitmovua.c (y0): Rename to y_0 to avoid a clash
	with the built-in y0, and the subsequent warning.
	(y1): Likewise, rename to y_1.

From-SVN: r145587
2009-04-06 11:17:36 +00:00
Hariharan Sandanagobalane
6bdf8c2e53 calls.c (emit_library_call_value_1): Fix a problem with parameter alignment for library calls.
* calls.c (emit_library_call_value_1): Fix a problem with parameter
alignment for library calls.

From-SVN: r145586
2009-04-06 10:54:42 +00:00
Janus Weil
1d146030e2 re PR fortran/39414 (PROCEDURE statement double declaration bug)
2009-04-06  Janus Weil  <janus@gcc.gnu.org>

       PR fortran/39414
       * decl.c (match_procedure_decl): Fix double declaration problems with
       PROCEDURE statements.
       * symbol.c (gfc_add_type): Ditto.


2009-04-06  Janus Weil  <janus@gcc.gnu.org>

       PR fortran/39414
       * gfortran.dg/proc_decl_21.f90: New.

From-SVN: r145583
2009-04-06 10:33:31 +02:00
Danny Smith
7d253f6e46 config.gcc (mingw32 tm_file): Add mingw-stdint.h.
* config.gcc (mingw32 tm_file):  Add mingw-stdint.h.
       (mingw32 tm clause use_gcc_stdint):  Set to wrap.
       * config/i386/mingw-stdint.h:  New file.

From-SVN: r145582
2009-04-06 07:25:36 +00:00
Paul Thomas
59e36b7221 re PR fortran/36091 (false positive in bounds checking with forall)
2009-04-06  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/36091
        * trans-array.c (gfc_conv_array_ref): If the symbol has the
	temporary attribute use the array_spec for the bounds.
	* gfortran.h : Add the temporary field to the structure
	'symbol_attribute'.
	* trans-stmt.c (forall_make_variable_temp): Set the symbol's
	temporary attribute.

2009-04-06  Paul Thomas  <pault@gcc.gnu.org

        PR fortran/36091
        * gfortran.dg/forall_13.f90: Add -fbounds-check option.

From-SVN: r145581
2009-04-06 05:25:46 +00:00
Hans-Peter Nilsson
ecef6119ce namelist_51.f90, [...]: Gate test on effective_target fd_truncate.
* gfortran.dg/namelist_51.f90, gfortran.dg/utf8_2.f03,
	gfortran.dg/namelist_48.f90, gfortran.dg/read_repeat.f90,
	gfortran.dg/streamio_9.f90, gfortran.dg/widechar_IO_1.f90,
	gfortran.dg/namelist_50.f90, gfortran.dg/namelist_52.f90,
	gfortran.dg/utf8_1.f03, gfortran.dg/namelist_56.f90,
	gfortran.dg/namelist_49.f90: Gate test on effective_target
	fd_truncate.
	* gfortran.dg/widechar_IO_3.f90: Ditto.  Fix typo in comment.

From-SVN: r145580
2009-04-06 03:41:44 +00:00
Jason Merrill
c450fb8b66 fix markup
From-SVN: r145579
2009-04-05 20:55:30 -04:00
GCC Administrator
66375fe2b5 Daily bump.
From-SVN: r145578
2009-04-06 00:16:44 +00:00
Paolo Carlini
9769c19080 random.tcc (piecewise_linear_distribution<>:: operator()(_UniformRandomNumberGenerator&, const param_type&)): Remove spurious closed parenthesis.
2009-04-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.tcc (piecewise_linear_distribution<>::
	operator()(_UniformRandomNumberGenerator&, const param_type&)):
	Remove spurious closed parenthesis.

From-SVN: r145575
2009-04-05 22:51:37 +00:00
Daniel Kraft
e462f7274c re PR libfortran/38654 (Fortran I/O speedup)
2009-04-05  Daniel Kraft  <d@domob.eu>

	PR fortran/38654
	* gfortran.dg/read_float_2.f03
	* gfortran.dg/read_float_3.f90

From-SVN: r145572
2009-04-05 20:23:21 +00:00
Jerry DeLisle
7812c78c34 [multiple changes]
2009-04-05  Daniel Kraft  <d@domob.eu>

	PR fortran/38654
	* io/read.c (read_f): Reworked to speed up floating point parsing.
	(convert_real): Use pointer-casting instead of memcpy and temporaries.

2009-04-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libfortran/37754
	* io/io.h (format_hash_entry): New structure for hash table.
	(format_hash_table): The hash table itself.
	(free_format_data): Revise function prototype.
	(free_format_hash_table, init_format_hash,
	free_format_hash): New function prototypes.
	* io/unit.c (close_unit_1): Use free_format_hash_table.
	* io/transfer.c (st_read_done, st_write_done): Free format data if
	internal unit.
	* io/format.c (free_format_hash_table): New function that frees any
	memory allocated previously for cached format data.
	(reset_node): New static helper function to reset the format counters
	for a format node.
	(reset_fnode_counters): New static function recursively calls reset_node
	to traverse the	fnode tree.
	(format_hash): New simple hash function based on XOR, probabalistic,
	tosses collisions.
	(save_parsed_format): New static function to save the parsed format
	data to use again.
	(find_parsed_format): New static function searches the hash table
	looking for a match.
	(free_format_data): Revised to accept pointer to format data rather than
	the dtp pointer so that the function can be used in more places.
	(format_lex): Editorial.
	(parse_format_list): Set flag used to determine of format data hashing
	is to be used.  Internal units are not persistent enough for this.
	(revert): Move to ne location in file.
	(parse_format): Use new functions to look for previously parsed
	format strings and use them rather than re-parse.  If not found, saves
	the parsed format data for later use.
	
2009-04-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libfortran/37754
	* io/transfer.c (formatted_transfer_scalar): Remove this function by
	factoring it into two new functions, one for read and one for write,
	eliminating all the conditionals for read or write mode.
	(formatted transfer_scalar_read): New function.
	(formatted transfer_scalar_write): New function.
	(formatted_transfer): Use new functions.

2009-04-05  Janne Blomqvist  <jb@gcc.gnu.org>

        PR libfortran/25561 libfortran/37754
	* io/io.h (struct stream): Define new stream interface function
	pointers, and inline functions for accessing it.
	(struct fbuf): Use int instead of size_t, remove flushed element.
	(mem_alloc_w): New prototype.
	(mem_alloc_r): New prototype.
	(stream_at_bof): Remove prototype.
	(stream_at_eof): Remove prototype.
	(file_position): Remove prototype.
	(flush): Remove prototype.
	(stream_offset): Remove prototype.
	(unit_truncate): New prototype.
	(read_block_form): Change to return pointer, int* argument.
	(hit_eof): New prototype.
	(fbuf_init): Change prototype.
	(fbuf_reset): Change prototype.
	(fbuf_alloc): Change prototype.
	(fbuf_flush): Change prototype.
	(fbuf_seek): Change prototype.
	(fbuf_read): New prototype.
	(fbuf_getc_refill): New prototype.
	(fbuf_getc): New inline function.
        * io/fbuf.c (fbuf_init): Use int, get rid of flushed.
	(fbuf_debug): New function.
	(fbuf_reset): Flush, and return position offset.
	(fbuf_alloc): Simplify, don't flush, just realloc.
	(fbuf_flush): Make usable for read mode, salvage remaining bytes.
	(fbuf_seek): New whence argument.
	(fbuf_read): New function.
	(fbuf_getc_refill): New function.
	* io/file_pos.c (formatted_backspace): Use new stream interface.
	(unformatted_backspace): Likewise.
	(st_backspace): Make sure format buffer is reset, use new stream
	interface, use unit_truncate.
	(st_endfile): Likewise.
	(st_rewind): Likewise.
	* io/intrinsics.c: Use new stream interface.
	* io/list_read.c (push_char): Don't use u.p.scratch, use realloc
	to resize.
	(free_saved): Don't check u.p.scratch.
	(next_char): Use new stream interface, use fbuf_getc() for external files.
	(finish_list_read): flush format buffer.
	(nml_query): Update to use modified interface:s
	* io/open.c (test_endfile): Use new stream interface.
	(edit_modes): Likewise.
	(new_unit): Likewise, set bytes_left to 1 for stream files.
	* io/read.c (read_l): Use new read_block_form interface.
	(read_utf8): Likewise.
	(read_utf8_char1): Likewise.
	(read_default_char1): Likewise.
	(read_utf8_char4): Likewise.
	(read_default_char4): Likewise.
	(read_a): Likewise.
	(read_a_char4): Likewise.
	(read_decimal): Likewise.
	(read_radix): Likewise.
	(read_f): Likewise.
	* io/transfer.c (read_sf): Use fbuf_read and mem_alloc_r, remove
	usage of u.p.line_buffer.
	(read_block_form): Update interface to return pointer, use
	fbuf_read for direct access.
	(read_block_direct): Update to new stream interface.
	(write_block): Use mem_alloc_w for internal I/O.
	(write_buf): Update to new stream interface.
	(formatted_transfer_scalar): Don't use u.p.line_buffer, use
	fbuf_seek for external files.
	(us_read): Update to new stream interface.
	(us_write): Likewise.
	(data_transfer_init): Always check if we switch modes and flush.
	(skip_record): Use new stream interface, fix comparison.
	(next_record_r): Check for and reset u.p.at_eof, use new stream
	interface, use fbuf_getc for spacing.
	(write_us_marker): Update to new stream interface, don't inline.
	(next_record_w_unf): Likewise.
	(sset): New function.
	(next_record_w): Use new stream interface, use fbuf for printing
	newline.
	(next_record): Use new stream interface.
	(finalize_transfer): Remove sfree call, use new stream interface.
	(st_iolength_done): Don't use u.p.scratch.
	(st_read): Don't check for end of file.
	(st_read_done): Don't use u.p.scratch, use unit_truncate.
	(hit_eof): New function.
	* io/unit.c (init_units): Always init fbuf for formatted units.
	(update_position): Use new stream interface.
	(unit_truncate): New function.
	(finish_last_advance_record): Use fbuf to print newline.
	* io/unix.c: Remove unused SSIZE_MAX macro.
	(BUFFER_SIZE): Make static const variable rather than macro.
	(struct unix_stream): Remove dirty_offset, len, method,
	small_buffer. Order elements by decreasing size.
	(struct int_stream): Remove.
	(move_pos_offset): Remove usage of dirty_offset.
	(reset_stream): Remove.
	(do_read): Rename to raw_read, update to match new stream
	interface.
	(do_write): Rename to raw_write, update to new stream interface.
	(raw_seek): New function.
	(raw_tell): New function.
	(raw_truncate): New function.
	(raw_close): New function.
	(raw_flush): New function.
	(raw_init): New function.
	(fd_alloc): Remove.
	(fd_alloc_r_at): Remove.
	(fd_alloc_w_at): Remove.
	(fd_sfree): Remove.
	(fd_seek): Remove.
	(fd_truncate): Remove.
	(fd_sset): Remove.
	(fd_read): Remove.
	(fd_write): Remove.
	(fd_close): Remove.
	(fd_open): Remove.
	(fd_flush): Rename to buf_flush, update to new stream interface
	and unix_stream.
	(buf_read): New function.
	(buf_write): New function.
	(buf_seek): New function.
	(buf_tell): New function.
	(buf_truncate): New function.
	(buf_close): New function.
	(buf_init): New function.
	(mem_alloc_r_at): Rename to mem_alloc_r, change prototype.
	(mem_alloc_w_at): Rename to mem_alloc_w, change prototype.
	(mem_read): Change to match new stream interface.
	(mem_write): Likewise.
	(mem_seek): Likewise.
	(mem_tell): Likewise.
	(mem_truncate): Likewise.
	(mem_close): Likewise.
	(mem_flush): New function.
	(mem_sfree): Remove.
	(empty_internal_buffer): Cast to correct type.
	(open_internal): Use correct type, init function pointers.
	(fd_to_stream): Test whether to open file as buffered or raw.
	(output_stream): Remove mode set.
	(error_stream): Likewise.
	(flush_all_units_1): Use new stream interface.
	(flush_all_units): Likewise.
	(stream_at_bof): Remove.
	(stream_at_eof): Remove.
	(file_position): Remove.
	(file_length): Update logic to use stream interface.
	(flush): Remove.
	(stream_offset): Remove.
	* io/write.c (write_utf8_char4): Use int instead of size_t.
	(write_x): Extra safety check.
	(namelist_write_newline): Use new stream interface.

From-SVN: r145571
2009-04-05 20:13:56 +00:00
Richard Biener
941c3614de re PR c/39648 (internal compiler error: in fold_convert, at fold-const.c:2506)
2009-04-05  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/39648
	* tree-ssa-sccvn.c (vn_reference_fold_indirect): Work around
	our &A vs. &A[0] IL deficiencies.

	* gcc.c-torture/compile/pr39648.c: New testcase.

From-SVN: r145569
2009-04-05 19:50:28 +00:00