76282 Commits

Author SHA1 Message Date
Jan Hubicka
1057fc810f re PR middle-end/28779 (internal compiler error: in cgraph_estimate_size_after_inlining, at ipa-inline.c:106)
PR middle-end/28779
	* ipa-inline.c (cgraph_decide_inlining, cgraph_early_inlining): Compute
	function body sizes.
	* cgraphunit.c (cgraph_analyze_function): Don't do so.

From-SVN: r116274
2006-08-20 18:46:54 +00:00
Paolo Carlini
96ddac7425 random (gamma_distribution<>::_M_initialize, [...]): Add.
2006-08-20  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/random (gamma_distribution<>::_M_initialize,
	gamma_distribution<>::_M_l_d): Add.
	(gamma_distribution<>::gamma_distribution(const result_type&),
	operator>>(std::basic_istream<>&, gamma_distribution&)): Use it.
	include/tr1/random.tcc (gamma_distribution<>::_M_initialize):
	Define.
	(gamma_distribution<>::operator()): Adjust.

	* include/tr1/random (geometric_distribution<>::_M_initialize): Add.
	(geometric_distribution<>::geometric_distribution(const _RealType&),
	operator>>(std::basic_istream<>&, geometric_distribution&)): Use it.

From-SVN: r116273
2006-08-20 16:05:05 +00:00
Janne Blomqvist
ffcba5714a re PR fortran/25828 ([f2003] ACCESS='STREAM' io support)
2006-08-20  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/25828
	* gfortran.texi: Mention STREAM I/O among supported F2003
	features.

From-SVN: r116271
2006-08-20 12:22:04 +03:00
Danny Smith
09416794b7 PR target/28648 c:
* tree.c (handle_dll_attribute): Return early if not a
   	var or function decl.

testsuite
	* gcc.dg/attr-invalid.c: Add tests for invalid dllimport.

From-SVN: r116270
2006-08-20 08:46:13 +00:00
Paul Thomas
3e978d3094 re PR fortran/28601 (ICE on reexport of renamed type)
2006-08-20 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/28601
	PR fortran/28630
	* gfortran.h : Eliminate gfc_dt_list structure and reference
	to it in gfc_namespace.
	* resolve.c (resolve_fl_derived): Remove the building of the
	list of derived types for the current namespace.
	* symbol.c (find_renamed_type): New function to find renamed
	derived types by symbol name rather than symtree name.
	(gfc_use_derived): Search parent namespace for identical
	derived type and use it, even if local version is complete,
	except in interface bodies. Ensure that renamed derived types
	are found by call to find_renamed_type. Recurse for derived
	type components.
	(gfc_free_dt_list): Remove.
	(gfc_free_namespace): Remove call to previous.
	* trans-types.c (copy_dt_decls_ifequal): Remove.
	(gfc_get_derived_type): Remove all the paraphenalia for
	association of derived types, including calls to previous.
	* match.c (gfc_match_allocate): Call gfc_use_derived to
	associate any derived types that are being allocated.

	PR fortran/20886
	* resolve.c (resolve_actual_arglist): The passing of
	a generic procedure name as an actual argument is an
	error.

	PR fortran/28735
	* resolve.c (resolve_variable): Check for a symtree before
	resolving references.

	PR fortran/28762
	* primary.c (match_variable): Return MATCH_NO if the symbol
	is that of the program.

	PR fortran/28425
	* trans-expr.c (gfc_trans_subcomponent_assign): Translate
	derived type component expressions other than another derived
	type constructor.

	PR fortran/28496
	* expr.c (find_array_section): Correct errors in
	the handling of a missing start value for the
	index triplet in an array reference.

	PR fortran/18111
	* trans-decl.c (gfc_build_dummy_array_decl): Before resetting
	reference to backend_decl, set it DECL_ARTIFICIAL.
	(gfc_get_symbol_decl): Likewise for original dummy decl, when
	a copy is made of an array.
	(create_function_arglist): Likewise for the _entry paramter
	in entry_masters.
	(build_entry_thunks): Likewise for dummies in entry thunks.

	PR fortran/28600
	* trans-decl.c (gfc_get_symbol_decl): Ensure that the
	DECL_CONTEXT of the length of a character dummy is the
	same as that of the symbol declaration.

	PR fortran/28771
	* decl.c (add_init_expr_to_sym): Remove setting of charlen for
	an initializer of an assumed charlen variable.

	PR fortran/28660
	* trans-decl.c (generate_expr_decls): New function.
	(generate_dependency_declarations): New function.
	(generate_local_decl): Call previous if not either a dummy or
	a declaration in an entry master.

2006-08-20 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/28630
	* gfortran.dg/used_types_2.f90: New test.

	PR fortran/28601
	* gfortran.dg/used_types_3.f90: New test.

	PR fortran/20886
	* gfortran.dg/generic_actual_arg.f90: New test.

	PR fortran/28735
	* gfortran.dg/module_private_array_refs_1.f90: New test.

	PR fortran/28762
	* gfortran.dg/program_name_1.f90: New test.

	PR fortran/28425
	* gfortran.dg/derived_constructor_comps_1.f90: New test.

	PR fortran/28496
	* gfortran.dg/array_initializer_2.f90: New test.

	PR fortran/18111
	* gfortran.dg/unused_artificial_dummies_1.f90: New test. 

	PR fortran/28600
	* gfortran.dg/assumed_charlen_function_4.f90: New test.

	PR fortran/28771
	* gfortran.dg/assumed_charlen_in_main.f90: New test.

	PR fortran/28660
	* gfortran.dg/dependent_decls_1.f90: New test.

From-SVN: r116268
2006-08-20 05:45:43 +00:00
GCC Administrator
84572ba5d3 Daily bump.
From-SVN: r116266
2006-08-20 00:17:25 +00:00
Erik Edelmann
6df364d720 re PR fortran/25217 (Derived type dummy argument having intent(out) attribute)
fortran/
2006-08-19  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/25217
        * resolve.c (resolve_fl_variable): Set a default initializer for
        derived types with INTENT(OUT) even if 'flag' is true.
        * trans-expr.c (gfc_conv_function_call): Insert code to
        reinitialize INTENT(OUT) arguments of derived type with default
        initializers.


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

        PR fortran/25217
        * gfortran.dg/derived_init_2.f90: New.

From-SVN: r116261
2006-08-19 21:05:59 +00:00
Ranjit Mathew
d58b0443ec backtrace.h (fallback_backtrace): Add "0x55 0x8B 0xEC" as another sequence that can indicate a "pushl %ebp...
* sysdep/i386/backtrace.h (fallback_backtrace): Add "0x55 0x8B 0xEC"
	as another sequence that can indicate a "pushl %ebp; movl %esp, %ebp"
	function prologue.

From-SVN: r116258
2006-08-19 15:35:11 +00:00
GCC Administrator
4f8e2b0e6e Daily bump.
From-SVN: r116255
2006-08-19 00:17:45 +00:00
Roger Sayle
fcf9a55870 check_jni_methods.sh: Don't use the "set -C" command which isn't available in all shells.
2006-08-18  Roger Sayle  <roger@eyesopen.com>

	* scripts/check_jni_methods.sh: Don't use the "set -C" command
	which isn't available in all shells.

From-SVN: r116251
2006-08-18 19:58:06 +00:00
Joseph Myers
16e7a51f3a re PR target/27565 (ICE in assign_stack_temp_for_type for vectors with SPE)
PR target/27565
	* config/rs6000/rs6000.h (LOCAL_ALIGNMENT): For SPE, only adjust
	alignment of SPE vector types.

From-SVN: r116249
2006-08-18 20:15:31 +01:00
Tom Tromey
fb2323eb40 NodeWriter.java (writeParents): Removed debugging prints.
* gnu/java/util/prefs/NodeWriter.java (writeParents): Removed
	debugging prints.
	* gnu/java/util/prefs/NodeReader.java (readNodes): Removed debugging
	print.
	(readEntries): Likewise.

From-SVN: r116247
2006-08-18 17:27:29 +00:00
Paolo Carlini
42031254bf random (class binomial_distribution<>): Add.
2006-08-18  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/random (class binomial_distribution<>): Add.
	* include/tr1/random.tcc (binomial_distribution<>::operator(),
	operator<<(std::basic_ostream<>&, const binomial_distribution<>&),
	operator>>(std::basic_istream<>&, binomial_distribution<>&,
	binomial_distribution<>::_M_waiting(), binomial_distribution<>::
	_M_initialize()): Define.
	* testsuite/tr1/5_numerical_facilities/random/binomial_distribution/
	requirements/typedefs.cc: New.

	* include/tr1/random (geometric_distribution<>::
	geometric_distribution(const _RealType&)): Fix DEBUG_ASSERT
	limits.

	* include/tr1/random (poisson_distribution): Add normal_distribution
	member, adjust consistently; minor tweaks and rearrangements of the
	arithmetic.
	(operator>>(std::basic_istream<>&, poisson_distribution<>&)): Move
	out of line.
	* include/tr1/random.tcc: Adjust.

	* include/tr1/random.tcc (normal_distribution<>::operator()): Minor
	tweaks.

From-SVN: r116245
2006-08-18 17:15:43 +00:00
Paolo Carlini
7867a3f739 re PR libstdc++/28765 (__gnu_cxx::__vstring::clear() is slow)
2006-08-18  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/28765
	* include/ext/rc_string_base.h (_M_clear): New.
	* include/ext/sso_string_base.h (_M_clear): Likewise.
	* include/ext/vstring.h (clear): Use it.

From-SVN: r116240
2006-08-18 15:42:05 +00:00
Christophe Jaillet
0a56514751 tree.c (is_attribute_with_length_p): Remove a duplicated assert.
2006-08-18  Christophe Jaillet  <christophe.jaillet@wanadoo.fr>

	* tree.c (is_attribute_with_length_p): Remove a duplicated assert.

From-SVN: r116237
2006-08-18 07:48:13 +02:00
GCC Administrator
dab65c7581 Daily bump.
From-SVN: r116235
2006-08-18 00:17:29 +00:00
Andreas Tobler
110b2db465 ffi_common.h (struct): Revert accidental commit.
2006-08-17  Andreas Tobler  <a.tobler@schweiz.ch>

	* include/ffi_common.h (struct): Revert accidental commit.

From-SVN: r116230
2006-08-17 21:07:29 +02:00
H.J. Lu
891339702c Makefile.am (install-exec-hook): Support $(DESTDIR).
2006-08-17  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.am (install-exec-hook): Support $(DESTDIR).
	* Makefile.in: Regenerated.

From-SVN: r116227
2006-08-17 10:03:34 -07:00
J"orn Rennecke
25ff07eb3a * gcc.c-torture/execute/pr28289.c: New test.
From-SVN: r116224
2006-08-17 14:28:03 +01:00
Jakub Jelinek
343d4b27bf re PR c/28744 (externally_visible attribute not effective with prior declaration of symbol.)
PR c/28744
	* cgraph.h (struct cgraph_node): Remove externally_visible
	bitfield.
	* cgraphunit.c (process_function_and_variable_attributes): Set
	local.externally_visible rather than externally_visible.

	PR c/28744
	* c-common.c (handle_externally_visible_attribute): First look
	at TREE_CODE and only if it is function or var decl, check for
	non-public objects.  Don't warn for DECL_EXTERNAL.
	* cgraphunit.c (process_function_and_variable_attributes): Warn
	if externally_visible attribute is used on non-public object.

	* gcc.dg/attr-externally-visible-1.c: New test.
	* gcc.dg/attr-externally-visible-2.c: New test.
	* g++.dg/parse/attr-externally-visible-1.C: New test.
	* g++.dg/parse/attr-externally-visible-2.C: New test.

From-SVN: r116222
2006-08-17 13:52:26 +02:00
Jan Hubicka
7ffaaddcda Fix typo in previously applied patch.
From-SVN: r116221
2006-08-17 10:08:31 +00:00
Jan Hubicka
db4c738615 re PR tree-optimization/27865 (tree check failure building FreePOOMA)
PR tree-optimization/27865
	* reload1.c (forget_marked_reloads): New function.
	(forget_old_reloads_1): When data are passed, just mark the registers
	for later removal.
	(reload_as_needed): Use the new mechanizm.

From-SVN: r116220
2006-08-17 09:44:12 +00:00
Volker Reichelt
04499540e2 re PR c++/28606 (Destructor accepted as return-type of constructor)
PR c++/28606
	* parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
	Fix formatting.
	(cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
	for valid type-names.
	(cp_parser_unqualified_id): Fix error handling for destructors.

	* g++.dg/parse/dtor11.C: New test.

From-SVN: r116217
2006-08-17 09:07:39 +00:00
Alexandre Oliva
3f1e3e7010 re PR target/28146 (-O2 produces invalid code on s390-linux-gnu: gcc-4.1.2 20060608)
PR target/28146
* reload.h (reg_equiv_alt_mem_list): New declaration.
* reload1.c (reg_equiv_alt_mem_list): New definition.
(reload): Initialize it and release it.
(delete_output_reload): Use it.
* reload.c (push_reg_equiv_alt_mem): New function.
(find_reloads_toplev): Call it.
(find_reloads_address, find_reloads_address_1): Likewise.
(find_reloads_subreg_address): Likewise.

From-SVN: r116215
2006-08-17 08:55:02 +00:00
Maxim Kuvyrkov
d3b30e42b7 re PR rtl-optimization/28489 (ICE in move_insn, at haifa-sched.c:1968)
2006-08-17  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	PR rtl-optimization/28489
	* sched-ebb.c (begin_schedule_ready): Create basic block
	at the right place.
	(advance_target_bb): Skip empty blocks.
	* haifa-sched.c (bb_note): Make global.
	* sched-int.h (bb_note): Add prototype.

2006-08-17  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	PR rtl-optimization/28489
	* gcc.c-torture/compile/pr28489.c: New test.

From-SVN: r116214
2006-08-17 08:48:37 +00:00
Zdenek Dvorak
2052721560 re PR tree-optimization/27865 (tree check failure building FreePOOMA)
PR tree-optimization/27865
	* tree-vrp.c (adjust_range_with_scev): Do not use TYPE_{MIN,MAX}_VALUE
	for pointer types.
	* tree-scalar-evolution.c (fold_used_pointer_cast, pointer_offset_p,
	fold_used_pointer, pointer_used_p): New functions.
	(analyze_scalar_evolution_1): Use fold_used_pointer.
	* tree-chrec.c (convert_affine_scev): Convert no-op casts correctly.
	* tree-ssa-loop-ivopts.c (generic_type_for): Return integral type
	for pointers.

From-SVN: r116213
2006-08-17 08:22:05 +00:00
Volker Reichelt
b646edb85c re PR c++/28710 (ICE redeclaring template as non-template)
PR c++/28710
	* decl.c (xref_tag): Improve error message.  Return early on error.

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

From-SVN: r116211
2006-08-17 08:06:27 +00:00
Volker Reichelt
a97728cfa9 re PR c++/28711 (ICE on invalid initializer for multidimensional array)
PR c++/28711
	* pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.

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

From-SVN: r116210
2006-08-17 08:02:39 +00:00
Jakub Jelinek
89b3e3cda1 re PR libgomp/28725 (Case Sensitive OpenMP environment variables and patch)
PR libgomp/28725
	* env.c: Include ctype.h.
	(parse_schedule, parse_unsigned_long, parse_boolean): Allow
	leading and/or trailing whitespace and compare strings case
	insensitively.

From-SVN: r116209
2006-08-17 09:58:02 +02:00
Paolo Bonzini
6d4d7b0eed [multiple changes]
2006-08-17  Paolo Bonzini <bonzini@gnu.org>

	PR c++/28573
	* c-common.c (fold_offsetof_1): Add an argument and recurse down to it
	or the INTEGER_CST.  Fail on a CALL_EXPR. 
	(fold_offsetof): Pass new argument to fold_offsetof_1.
	* c-parser.c (c_parser_postfix_expression): Don't include a NULL
	operand into an INDIRECT_REF. 
	* c-typeck.c (build_unary_op): Adjust call to fold_offsetof.

cp:
2006-08-17  Paolo Bonzini  <bonzini@gnu.org>

	PR c++/28573
	* semantics.c (finish_offsetof): Add new argument to fold_offsetof.

testsuite:
2006-08-17  Paolo Bonzini  <bonzini@gnu.org>

	PR c++/28573
	* g++.dg/parse/offsetof6.C: New test.
	* g++.dg/parse/offsetof7.C: New test.

From-SVN: r116208
2006-08-17 07:02:55 +00:00
John David Anglin
e98a430b85 re PR testsuite/28602 (All gfortran.dg/gomp tests fail)
PR testsuite/28602
	* gfortran.dg/gomp/gomp.exp: Return if check_effective_target_fopenmp
	is false.

From-SVN: r116207
2006-08-17 02:26:59 +00:00
Tom Tromey
74c8bcd136 * libtool-version: Updated.
From-SVN: r116206
2006-08-17 01:57:55 +00:00
Andrew Pinski
bd289f543a re PR c++/28302 (ICE with bit-complement for vectors)
2006-08-16  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c++/28302
        * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
        perform_integral_promotions for non integral type
2006-08-16  Andrew Pinski  <pinskia@physics.uc.edu>

        PR C++/28302
        * g++.dg/ext/vector3.C: New test.

From-SVN: r116205
2006-08-16 18:56:47 -07:00
Jakub Jelinek
97c074fd44 jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
gcc/java/ChangeLog
	* jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
libjava/ChangeLog
	* configure, Makefile.in: Rebuilt.
	* Makefile.am (toolexeclib_LTLIBRARIES): Add libgcj_bc.la.
	(libgcj_bc_la_SOURCES): New variable.
	(libgcj_bc_la_LDFLAGS): Likewise.
	(libgcj_bc_la_LIBADD): Likewise.
	(libgcj_bc_la_DEPENDENCIES): Likewise.
	(libgcj_bc_la_LINK): Likewise.
	(libgcj_bc_dummy_LINK): Likewise.
	(libgcj_bc.la): New target.
	(install-exec-hook): Likewise.
	* libgcj.spec.in (*lib): Use LIBGCJ_SPEC.
	* libgcj_bc.c: New file.
	* configure.ac (LIBGCJ_SPEC): New subst.
	* configure.host (use_libgcj_bc): New variable.

Co-Authored-By: Bryce McKinlay <bryce@mckinlay.net.nz>

From-SVN: r116204
2006-08-17 01:03:21 +00:00
Jason Merrill
9180c238de re PR c++/28385 (templated function call goes awry)
PR c++/28385
        * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
        if arg is a function.

From-SVN: r116203
2006-08-16 20:51:37 -04:00
GCC Administrator
4cb55a5ae0 Daily bump.
From-SVN: r116201
2006-08-17 00:17:17 +00:00
Zdenek Dvorak
7e2f40afd4 PR gcov/profile/26570
PR gcov/profile/26570
	* value-prof.c (static_values): Removed.
	(tree_find_values_to_profile): Do not set static_values.
	(find_values_to_profile): Do not free static_values.
	* profile.c (instrument_values): Do not free the values.
	(branch_prob): Free the values.

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

From-SVN: r116197
2006-08-17 00:13:24 +00:00
Naveen.H.S
d8db3756c9 * config/m32c/m32c_lib1.S (__mulsi3): Use only registers for dest.
From-SVN: r116196
2006-08-16 20:05:07 -04:00
Joseph Myers
efed193e0a re PR c/27697 (incorrect warning about constness of pointer to an array in a const struct)
PR c/27697
	* c-typeck.c (build_component_ref): Combine qualifiers of
	structure or union and field.

testsuite:
	* gcc.dg/qual-component-1.c: New test.

From-SVN: r116194
2006-08-17 00:10:46 +01:00
Volker Reichelt
d5d1d25696 re PR c++/28593 (ICE on invalid operator new)
PR c++/28593
	* init.c (build_new): Return early on invalid placement.

	* g++.dg/parse/new3.C: New test.

From-SVN: r116191
2006-08-16 21:35:18 +00:00
Zdenek Dvorak
f074ff6cc0 re PR middle-end/28071 (A file that can not be compiled in reasonable time/space)
PR rtl-optimization/28071
	* basic-block.h (bb_dom_dfs_in, bb_dom_dfs_out): Declare.
	* dominance.c (bb_dom_dfs_in, bb_dom_dfs_out): New functions.
	* tree-into-ssa.c (struct dom_dfsnum): New.
	(cmp_dfsnum, find_dfsnum_interval, prune_unused_phi_nodes): New
	functions.
	(insert_phi_nodes_for): Use prune_unused_phi_nodes instead of
	compute_global_livein.
	(prepare_block_for_update, prepare_use_sites_for): Mark the uses
	in phi nodes in the correct blocks.

From-SVN: r116190
2006-08-16 21:25:39 +00:00
Zdenek Dvorak
b43a2366d6 re PR tree-optimization/28364 (poor optimization choices when iterating over a std::string (probably not c++-specific))
PR tree-optimization/28364
	* tree-ssa-loop-ivopts.c (aff_combination_to_tree): Handle zero
	correctly.
	(fold_affine_expr): New function.
	(may_eliminate_iv): Use fold_affine_expr.

From-SVN: r116189
2006-08-16 21:14:11 +00:00
Volker Reichelt
c58e8676dd re PR c/27489 (ICE on broken switch condition)
PR c/27489
	* c-typeck.c (c_start_case): Handle invalid orig_type correctly.
	Clean up.

From-SVN: r116188
2006-08-16 20:50:18 +00:00
Mike Stump
e8c96d0901 invoke.texi (-Wno-deprecated-declarations): Fixup use of pxref.
* doc/invoke.texi (-Wno-deprecated-declarations): Fixup use of pxref.
	* doc/cppopts.texi (-MD): Likewise.

From-SVN: r116187
2006-08-16 20:36:23 +00:00
Nick Clifton
e1a1c424d2 Oops - this should have been part of r116159, but I forgot to include it on the commit command line. Doh!
From-SVN: r116180
2006-08-16 08:20:51 +00:00
GCC Administrator
3956955041 Daily bump.
From-SVN: r116177
2006-08-16 00:18:02 +00:00
Jerry DeLisle
e524a2763c re PR fortran/25828 ([f2003] ACCESS='STREAM' io support)
2006-08-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/25828
	* gfortran.dg/streamio_1.f90: New test.
	* gfortran.dg/streamio_2.f90: New test.
	* gfortran.dg/streamio_3.f90: New test.
	* gfortran.dg/streamio_4.f90: New test.
	* gfortran.dg/streamio_5.f90: New test.
	* gfortran.dg/streamio_6.f90: New test.
	* gfortran.dg/streamio_7.f90: New test.
	* gfortran.dg/streamio_8.f90: New test.

From-SVN: r116173
2006-08-15 23:14:03 +00:00
Jerry DeLisle
91b30ee5b9 re PR fortran/25828 ([f2003] ACCESS='STREAM' io support)
2006-08-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25828
	* libgfortran.h: Rename GFC_LARGE_IO_INT to GFC_IO_INT.
	* io/file_pos.c (st_backspace): Ignore if access=STREAM.
	(st_rewind): Handle case of access=STREAM.
	* io/open.c (access_opt): Add STREAM_ACCESS.
	(edit_modes): Set current_record to zero only if not STREAM.
	(new_unit): Initialize maxrec, recl, and last_record for STREAM.
	* io/read.c (read_x): Advance file position for STREAM.
	* io/io.h (enum unit_access): Align IOPARM flags with frontend.
	Add ACCESS_STREAM. Add prototype for is_stream_io () function.
	Use GFC_IO_INT.
	* io/inquire.c (inquire_via_unit): Add text for access = "STREAM".
	* io/unit.c (is_stream_io): New function to return true if access =
	STREAM.
	* io/transfer.c (file_mode): Add modes for unformatted stream and
	formatted stream. (current_mode): Return appropriate file mode based
	on access flags.
	(read_block): Handle formatted stream reads.
	(read_block_direct): Handle unformatted stream reads.
	(write_block): Handle formatted stream writes.
	(write_buf): Handle unformatted stream writes.
	(unformatted_read): Fix up, use temporary for size.
	(pre_position): Position file for STREAM access.
	(data_transfer_init): Initialize for stream access, skip irrelevent
	error checks.
	(next_record_r),(next_record_w), and (next_record): Do nothing for
	stream I/O.
	(finalize_transfer): Flush when all done if stream I/O.

From-SVN: r116172
2006-08-15 23:06:44 +00:00
Jerry DeLisle
014ec6ee5f re PR fortran/25828 ([f2003] ACCESS='STREAM' io support)
2006-08-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/25828
	* gfortran.h: Add new pointer for stream position to st_inquire.
	Rename gfc_large_io_int_kind to gfc_intio_kind.
	* trans-types.c (gfc_init_kinds): use gfc_intio_kind.
	* io.c: Add new IO tag for file position going in and another for out.
	(match_dt_element): Match new tag_spos.
	(gfc_resolve_dt): Resolve new tag_spos.
	(gfc_free_inquire): Free inquire->strm_pos.
	(match_inquire_element): Match new tag_strm_out.
	(gfc_resolve_inquire): Resolve new tag_strm_out.
	* trans-io.c: Rename IOPARM_type_large_io_int to IOPARM_type_intio.
	(gfc_build_st_parameter): Same.
	(gfc_build_io_library_fndecls) Same. and add build pointer type pintio.
	(gfc_trans_inquire): Translate strm_pos for inquire.
	* ioparm.def: Reorder flags to accomodate addition of new inquire
	flag for strm_pos_out and add it in.

From-SVN: r116171
2006-08-15 23:03:28 +00:00
Danny Smith
55af93a8a3 re PR c/28287 (ICE with misplaced attribute weak)
gcc
	PR c/28287
	* c-common.c (handle_weak_attribute): Ignore and warn if
	not a FUNCTION_ or VAR_DECL

testsuite

	* gcc.dg/attr-invalid.c: Add tests for invalid weak attribute.

From-SVN: r116170
2006-08-15 21:46:30 +00:00