Commit Graph

87324 Commits

Author SHA1 Message Date
Janne Blomqvist
f6f9ac3159 Forgot ChangeLog of part1 pr25561.
From-SVN: r135374
2008-05-15 18:55:32 +03:00
Janne Blomqvist
15877a88eb Part 1 of PR 25561.
2008-05-15  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libfortran/25561
	* Makefile.am: Add fbuf.c to gfor_io_src.
	* Makefile.in: Regenerate.
	* io/io.h (read_block): Remove.
	(struct stream): Remove alloc_r_at function pointer.
	(salloc_r): Remove.
	(salloc_r_at): Remove.
	(salloc_w_at): Remove.
	(salloc_w): Remove offset argument.
	(struct fbuf): New struct for format buffer.
	(struct gfc_unit): Add fbuf.
	(read_block_form): New prototype.
	(fbuf_init): Likewise.
	(fbuf_destroy): Likewise.
	(fbuf_reset): Likewise.
	(fbuf_alloc): Likewise.
	(fbuf_flush): Likewise.
	(fbuf_seek): Likewise.
	* io/file_pos.c (formatted_backspace): Change to use sread.
	(unformatted_backspace): Likewise.
	(st_backspace): Flush format buffer.
	(st_rewind): Likewise.
	* io/list_read.c (next_char): Likewise.
	(nml_query): Tidying, flush format buffer.
	* io/open.c (new_unit): Init format buffer.
	* io/read.c (read_l): Change to use read_block_form.
	(read_a): Likewise.
	(read_decimal): Likewise.
	(read_radix): Likewise.
	(read_f): Likewise.
	(read_x): Empty reads also for stream I/O.
	* io/transfer.c (read_sf): Change to use sread.
	(read_block): Rename to read_block_form, change prototype, use sread.
	(read_block_direct): Don't seek stream files.
	(write_block): Change to use fbuf if external file, don't seek stream
	files.
	(write_buf): Don't seek stream files.
	(formatted_transfer_scalar): Use fbuf for external files.
	(us_read): Change to use sread.
	(pre_position): Do nothing for stream I/O.
	(data_transfer_init): Flush fbuf when switching from write to read, if
	POS is specified, seek stream file to correct offset.
	(skip_record): Change to use sread.
	(min_off): New function.
	(next_record_r): Change to use sread.
	(next_record_w): Change to use sset/sseek, flush fbuf.
	(finalize_transfer): Flush fbuf.
	* io/unit.c (init_units): Init fbuf for stdout, stderr.
	(close_unit_1): Destroy fbuf.
	(finish_last_advance_record): Flush fbuf, no need to seek.
	* io/unix.c (fd_alloc_r_at): Remove unused where argument.
	(fd_alloc_w_at): Likewise.
	(fd_read): Remove third argument to fd_alloc_r_at.
	(fd_write): Remove third argument to fd_alloc_w_at.
	(fd_sset): Likewise.
	(fd_open): Don't set alloc_r_at.
	(mem_alloc_r_at): Remove unused where argument.
	(mem_alloc_w_at): Likewise.
	(mem_read): Don't incorrectly return previous errno, remove unused
	third argument to alloc function.
	(mem_write): Likewise.
	(mem_set): Likewise.
	(open_internal): Don't set alloc_r_at pointer.
	* io/fbuf.c: New file.

From-SVN: r135373
2008-05-15 18:53:34 +03:00
Uros Bizjak
2819ae08d2 sse.md (*vec_concatv2sf_sse4_1): Add "m" constraint to alternative 4 of operand 2.
* config/i386/sse.md (*vec_concatv2sf_sse4_1): Add "m" constraint
	to alternative 4 of operand 2.

From-SVN: r135364
2008-05-15 16:38:23 +02:00
Richard Guenther
41d1c8ddaf re PR tree-optimization/36245 (internal compiler error: in build2_stat, at tree.c:3116)
2008-05-15  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/36245
	* tree-ssa-address.c (add_to_parts): Deal with non-pointer
	bases.

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

From-SVN: r135361
2008-05-15 14:09:11 +00:00
Richard Biener
82e6d02f7b statistics.c: New file.
2008-05-15  Richard Guenther  <rguenther@suse.de>

        * statistics.c: New file.

From-SVN: r135359
2008-05-15 14:00:22 +00:00
Richard Guenther
9fe0cb7d88 tree-pass.h (current_pass): Declare.
2008-05-15  Richard Guenther  <rguenther@suse.de>

	* tree-pass.h (current_pass): Declare.
	(get_pass_for_id): Likewise.
	* passes.c (passes_by_id, passes_by_id_size): New globals.
	(set_pass_for_id): New function.
	(get_pass_for_id): Likewise.
	(register_one_dump_file): Use set_pass_for_id to populate passes_by_id.
	(execute_function_todo): Flush per function statistics.
	* toplev.c (compile_file): Init statistics.
	(general_init): Do early statistics initialization.
	(finalize): Finish statistics.
	* statistics.h (statistics_early_init): Declare.
	(statistics_init): Likewise.
	(statistics_fini): Likewise.
	(statistics_fini_pass): Likewise.
	(statistics_counter_event): Likewise.
	(statistics_histogram_event): Likewise.
	* statistics.c: New file.
	* Makefile.in (OBJS-common): Add statistics.o.
	(statistics.o): Add dependencies.
	* doc/invoke.texi (-fdump-statistics): Document.

	* tree-ssa-pre.c (compute_antic): Use statistics_histogram_event.
	(insert): Likewise.
	(execute_pre): Use statistics_counter_event.
	* tree-ssa-propagate.c (struct prop_stats_d): Add num_dce field.
	(substitute_and_fold): Increment it.  Use statistics_counter_event.

	* gcc.dg/tree-ssa/loadpre7.c: Adjust scan for not performed
	transformation.
	* gcc.dg/tree-ssa/ssa-fre-10.c: Likewise.

From-SVN: r135358
2008-05-15 13:39:39 +00:00
Diego Novillo
77f377f70e treestruct.def (TS_STRUCT_FIELD_TAG): Remove.
2008-05-15  Diego Novillo  <dnovillo@google.com>

	http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00893.html

	* treestruct.def (TS_STRUCT_FIELD_TAG): Remove.
	* tree-ssa-alias.c (new_type_alias): Remove references to
	sub-variables from comment.
	* tree-ssa-operands.c (swap_tree_operands): Likewise.

From-SVN: r135357
2008-05-15 09:34:51 -04:00
H.J. Lu
89b7851e06 sse.md (*vec_concatv2sf_sse4_1): Set prefix_extra attribute to 1 only for insertps alternative.
2008-05-15  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/sse.md (*vec_concatv2sf_sse4_1): Set prefix_extra
	attribute to 1 only for insertps alternative.

From-SVN: r135353
2008-05-15 06:29:11 -07:00
Bernd Schmidt
8fa477f7d5 bfin.md (loadbytes): New pattern.
* config/bfin/bfin.md (loadbytes): New pattern.
	* config/bfin/bfin.c (enum bfin_builtins): Add BFIN_BUILTIN_LOADBYTES.
	(bfin_init_builtins): Initialize it.
	(bdesc_1arg): Add it.

From-SVN: r135351
2008-05-15 13:25:26 +00:00
Sa Liu
4e8c438fe7 Add test cases for Fortran C binding with 128-bit integer.
From-SVN: r135350
2008-05-15 13:14:18 +00:00
Sa Liu
d06abff533 Add support to C binding with 128-bit integer.
From-SVN: r135349
2008-05-15 13:11:52 +00:00
Sa Liu
0891fd8f7f Test int128 when -std=gnu
From-SVN: r135348
2008-05-15 13:00:08 +00:00
Sa Liu
96d5b5284e Test int128 when -std=f2003
From-SVN: r135347
2008-05-15 12:59:49 +00:00
Sa Liu
c129abb407 Add check_effective_target_fortran_integer_16.
From-SVN: r135346
2008-05-15 12:57:41 +00:00
Bernd Schmidt
7ba20e60eb bfin.h (TARGET_RETURN_IN_MEMORY): Don't define here.
* config/bfin/bfin.h (TARGET_RETURN_IN_MEMORY): Don't define here.
	* config/bfin/bfin-protos.h (bfin_return_in_memory): Don't declare.
	* config/bfin/bfin.c (bfin_return_in_memory): Now static.  Return bool.
	(TARGET_RETURN_IN_MEMORY): Define.

From-SVN: r135344
2008-05-15 12:56:18 +00:00
Sa Liu
8d3bc02b9a Documented new types C_INT128_T, C_INT_LEASE128_T and C_INT_FAST128_T.
From-SVN: r135343
2008-05-15 12:55:03 +00:00
Sa Liu
21684705d1 Add new parameter to NAMED_INTCST.
From-SVN: r135342
2008-05-15 12:53:12 +00:00
Sa Liu
05e73743d5 New helper function to return the standard that supports this isocbinding symbol.Do not generate GNU extension symbols if std=f2003. Add new parameter to NAMED_INTCST.
From-SVN: r135341
2008-05-15 12:51:56 +00:00
Sa Liu
ec9231857b Add new parameter to NAMED_INTCST and new field standard to struct intmod_sym.
From-SVN: r135340
2008-05-15 12:49:16 +00:00
Sa Liu
521914528d Add standard parameter to macro NAMED_INTCST.
From-SVN: r135339
2008-05-15 12:47:36 +00:00
Sa Liu
eca63c6a36 Add standard parameter to macro NAMED_INTCST.
From-SVN: r135338
2008-05-15 12:46:54 +00:00
Sa Liu
7306b62814 Add new parameter to NAMED_INTCST.
From-SVN: r135337
2008-05-15 12:45:49 +00:00
Richard Guenther
81d19c06fc re PR middle-end/36244 (-ftree-parallelize-loops=4, vectorizer enabled, ICE)
2008-05-15  Richard Guenther  <rguenther@suse.de>

	PR middle-end/36244
	* tree-ssa-alias.c (new_type_alias): Do not set TREE_READONLY.
	* tree-flow-inline.h (unmodifiable_var_p): Memory tags never
	represent unmodifiable vars.

	* gcc.dg/torture/pr36244.c: New testcase.

From-SVN: r135336
2008-05-15 12:44:42 +00:00
Eric Botcazou
f730e42f04 trans.c (add_decl_expr): At toplevel, mark the TYPE_ADA_SIZE field of records and unions.
* trans.c (add_decl_expr): At toplevel, mark the TYPE_ADA_SIZE field
	of records and unions.
	(gnat_to_gnu) <N_Validate_Unchecked_Conversion>: Fix formatting.

From-SVN: r135333
2008-05-15 10:53:49 +00:00
Richard Guenther
9f59420d5c tree-dfa.c (refs_may_alias_p): Allow all kinds of INDIRECT_REF and TARGET_MEM_REF.
2008-05-15  Richard Guenther  <rguenther@suse.de>

	* tree-dfa.c (refs_may_alias_p): Allow all kinds of
	INDIRECT_REF and TARGET_MEM_REF.
	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle
	TARGET_MEM_REF.

From-SVN: r135332
2008-05-15 10:36:18 +00:00
Uros Bizjak
6784c6e033 sse.md (*vec_concatv2sf_sse4_1): New insn pattern.
* config/i386/sse.md (*vec_concatv2sf_sse4_1): New insn pattern.
	(*vec_concatv2si_sse4_1): Use vector_move_operand predicate
	for operand 2.  Remove pinsr{q,d} with 0x0 immediate operand from
	insn alternatives.  Add missing alternatives.
	(*vec_concatv2di_rex64_sse4_1): Likewise.
	(*vec_concatv2si_sse2): Use "x" register constraint instead of "Y2".
	(*vec_concatv2di_rex64_sse): Rename from *vec_concatv2di_rex64.
	Require TARGET_SSE.

testsuite/ChangeLog:

	* gcc.target/i386/sse-set-ps-1.c: New.
	* gcc.target/i386/sse4_1-set-ps-1.c: Likewise.

From-SVN: r135331
2008-05-15 12:17:45 +02:00
Richard Guenther
8ded35f90c re PR tree-optimization/36009 (PRE causes missed loop store motion, store sinking doesn't work)
2008-05-15  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/36009
	PR tree-optimization/36204
	* tree-ssa-loop-im.c (tree-ssa-propagate.h): Include.
	(determine_invariantness_stmt): Record the loop a store is
	always executed in.
	* Makefile.in (tree-ssa-loop-im.o): Add tree-ssa-propagate.h
	dependency.

	* gcc.dg/tree-ssa/ssa-lim-5.c: New testcase.
	* gcc.dg/tree-ssa/ssa-lim-6.c: Likewise..

From-SVN: r135330
2008-05-15 08:37:22 +00:00
Richard Guenther
45ff5edaea re PR tree-optimization/34330 (-ftree-parallelize-loops=4 ICE with the vectorizer also)
2008-05-15  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/34330
	* tree-ssa-alias.c (get_smt_for): Only assert that accesses
	through the pointer will alias the SMT.

	* gcc.dg/torture/pr34330.c: New testcase.

From-SVN: r135329
2008-05-15 08:21:32 +00:00
Johannes Singler
e491ed09b3 parallel_mode.xml: General revision and documentation of new compile-time options for sorting.
2008-05-15  Johannes Singler  <singler@ira.uka.de>

           * doc/xml/manual/parallel_mode.xml:
           General revision and documentation of new compile-time 
           options for sorting.

From-SVN: r135327
2008-05-15 07:31:50 +00:00
Benjamin Kosnik
22ac021be4 mutex (mutex::try_lock): Eat errors.
2008-05-14  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/mutex (mutex::try_lock): Eat errors.
	(mutex::unlock): Same.
	(recursive_mutex::try_lock): Eat errors.
	(recursive_mutex::unlock): Same.
	* testsuite/30_threads/mutex/dest/destructor_locked.cc: Add
	-pthreads, adjust line numbers.
	* testsuite/30_threads/mutex/native_handle/1.cc: Same.
	* testsuite/30_threads/mutex/cons/1.cc: Same.
	* testsuite/30_threads/mutex/try_lock/1.cc: Same.
	* testsuite/30_threads/mutex/try_lock/2.cc: Same.
	* testsuite/30_threads/mutex/lock/1.cc: Same.
	* testsuite/30_threads/mutex/unlock/1.cc: Same.
	* testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Same.
	* testsuite/30_threads/recursive_mutex/native_handle/1.cc: Same.
	* testsuite/30_threads/recursive_mutex/cons/1.cc: Same.

From-SVN: r135321
2008-05-15 00:52:48 +00:00
GCC Administrator
2fa9f315d4 Daily bump.
From-SVN: r135319
2008-05-15 00:18:05 +00:00
Francois-Xavier Coudert
4b267817ff libgfortran.h (gfc_char4_t): New type.
2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	* libgfortran.h (gfc_char4_t): New type.
	(GFC_SIZE_OF_CHAR_KIND): New macro.
	(compare_string): Adjust prototype.
	(compare_string_char4): New prototype.
	* gfortran.map (GFORTRAN_1.1): Add _gfortran_adjustl_char4,
	_gfortran_adjustr_char4, _gfortran_compare_string_char4,
	_gfortran_concat_string_char4, _gfortran_string_index_char4,
	_gfortran_string_len_trim_char4, _gfortran_string_minmax_char4,
	_gfortran_string_scan_char4, _gfortran_string_trim_char4 and
	_gfortran_string_verify_char4.
	* intrinsics/string_intrinsics_inc.c: New file from content of
	string_intrinsics.c with types replaced by macros.
	* intrinsics/string_intrinsics.c: Move content to
	string_intrinsics_inc.c.

From-SVN: r135313
2008-05-14 21:51:27 +00:00
Andreas Tobler
c5fcd67041 sparc.h (NO_PROFILE_COUNTERS): Define as 0.
2008-05-14  Andreas Tobler  <a.tobler@schweiz.org>

	* config/sparc/sparc.h (NO_PROFILE_COUNTERS): Define as 0.

From-SVN: r135312
2008-05-14 23:49:41 +02:00
H.J. Lu
a3f63c2864 sse.md (*sse4_1_pinsrq): Make it 64bit only.
2008-05-14  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/sse.md (*sse4_1_pinsrq): Make it 64bit only.

From-SVN: r135311
2008-05-14 14:46:12 -07:00
Francois-Xavier Coudert
1c3339af10 re PR fortran/36059 (-frepack-arrays: symbols w/ TARGET should not be repacked)
PR fortran/36059

        * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
        arrays that have the TARGET attribute.

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

From-SVN: r135310
2008-05-14 21:44:36 +00:00
François-Xavier Coudert
6401bf9cad re PR fortran/36186 (Wrong handling of BOZ in CMPLX)
PR fortran/36186

	* simplify.c (only_convert_cmplx_boz): New function.
	(gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
	Call only_convert_cmplx_boz.

	* gfortran.dg/boz_11.f90: New test.
	* gfortran.dg/boz_12.f90: New test.

From-SVN: r135308
2008-05-14 21:36:26 +00:00
Paul Thomas
16f2a7a4a5 re PR fortran/36233 (Array valued actual procedure argument rejected)
2008-05-14  Paul Thomas  <pault@gcc.gnu.org>

       PR fortran/36233
       * interface.c (compare_actual_formal): Do not check sizes if the
       actual is BT_PROCEDURE.

2008-05-14  Paul Thomas  <pault@gcc.gnu.org>

       PR fortran/36233
       * gfortran.dg/actual_procedure_1.f90: New test

From-SVN: r135307
2008-05-14 21:32:53 +00:00
Francois-Xavier Coudert
4c7382bba9 re PR fortran/35682 (assignment to run-time zero-sized complex section stores a value)
PR fortran/35682

	* trans-array.c (gfc_conv_ss_startstride): Any negative size is
	the same as zero size.
	(gfc_conv_loop_setup): Fix size calculation.

	* gfortran.dg/bound_4.f90: New test.
	* gfortran.dg/bounds_check_14.f90: New test.

From-SVN: r135306
2008-05-14 21:20:10 +00:00
Francois-Xavier Coudert
f10827b13b re PR fortran/35685 (UBOUND incorrect for run-time zero-sized section)
PR fortran/35685

        * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
        handle zero-size sections.

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

From-SVN: r135305
2008-05-14 21:17:54 +00:00
Michael Meissner
71d46ca56c Add SSE5 vector shift/rotate; Update SSE5 vector multiply
Co-Authored-By: Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
Co-Authored-By: Paolo Bonzini <bonzini@gnu.org>

From-SVN: r135304
2008-05-14 20:07:53 +00:00
Michael Meissner
550c9cf0fe Fix pr36224
From-SVN: r135302
2008-05-14 18:02:56 +00:00
Rafael Avila de Espindola
61ab1651b9 config-ml.in: don't handle --enable-shared and --enable-static.
2008-05-14  Rafael Espindola  <espindola@google.com>

	* config-ml.in: don't handle --enable-shared and --enable-static.

From-SVN: r135300
2008-05-14 17:15:51 +00:00
Kenneth Zadeck
84b8030f0e optabs.c (prepare_cmp_insn): Changed LCT_PURE_MAKE_BLOCK to LCT_PURE and LCT_CONST_MAKE_BLOCK to LCT_CONST...
2008-05-14  Kenneth Zadeck <zadeck@naturalbridge.com>

	* optabs.c (prepare_cmp_insn): Changed LCT_PURE_MAKE_BLOCK to
	LCT_PURE and LCT_CONST_MAKE_BLOCK to LCT_CONST in calls to
	emit_library_call_value. 
	* builtins.c (expand_builtin_powi, expand_builtin_memcmp): Ditto.
	* tree.h (ECF_LIBCALL_BLOCK): Removed.
	* calls.c (initialize_argument_information, precompute_arguments, 
	expand_call, emit_library_call_value_1): Remove ECF_LIBCALL_BLOCK.
	(precompute_arguments): Removed flags parameter.
	* rtl.h (LCT_CONST_MAKE_BLOCK, LCT_PURE_MAKE_BLOCK): Removed.

From-SVN: r135299
2008-05-14 17:05:13 +00:00
Richard Guenther
f403a4a270 tree-ssa-dse.c (dse_possible_dead_store_p): Remove dead code.
2008-05-14  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-dse.c (dse_possible_dead_store_p): Remove dead code.
	Make sure to register the store if the use is a PHI_NODE.

From-SVN: r135298
2008-05-14 15:30:14 +00:00
Joseph Myers
2627042d9a inclhack.def (AAB_fd_zero_asm_posix_types_h): Bypass on posix_types_64.
* inclhack.def (AAB_fd_zero_asm_posix_types_h): Bypass on
	posix_types_64.
	* fixincl.x: Regenerate.

From-SVN: r135297
2008-05-14 16:13:40 +01:00
Olivier Hainque
da19297d25 expr.c (expand_expr_real_1): Force op0 to memory if the component is to be referenced in BLKmode according...
* expr.c (expand_expr_real_1) <normal_inner_ref>: Force op0 to
        memory if the component is to be referenced in BLKmode according
        to get_inner_reference.

        testsuite/
        * gnat.dg/blkextract_from_reg.adb: New test.

From-SVN: r135296
2008-05-14 15:05:16 +00:00
Adam Nemet
1fd03c7021 calls.c (emit_library_call_value_1): Restore code clearing ECF_LIBCALL_BLOCK to ensure that we only call...
* calls.c (emit_library_call_value_1): Restore code clearing
	ECF_LIBCALL_BLOCK to ensure that we only call end_sequence
	once.

From-SVN: r135295
2008-05-14 14:27:06 +00:00
Francois-Xavier Coudert
b0b14c7b87 re PR fortran/36215 (Fortran bootstrap fails on _abs_c4.F90)
PR fortran/36215

        * scanner.c (preprocessor_line): Allocate enough memory for a
        wide string.

        * gfortran.dg/include_3.f95: New test.

From-SVN: r135294
2008-05-14 14:23:01 +00:00
Olivier Hainque
349c316697 configure.ac: Add support for a "gcc_subdir" variable in config-lang.in...
* configure.ac: Add support for a "gcc_subdir" variable in
        config-lang.in, to denote a subdirectory where the language/GCC
        integration files are to be found.
        * configure: Regenerate.


Co-Authored-By: Nicolas Roche <roche@adacore.com>

From-SVN: r135292
2008-05-14 13:20:43 +00:00
Benjamin Kosnik
d9cdfe6a7f sstream: Adjust braces.
2008-05-14  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/sstream: Adjust braces.
	* include/bits/fstream.tcc: Same.
	* testsuite/29_atomics/atomic_flag/test_and_set/explicit.c: Add
	-shared-libgcc.
	* testsuite/29_atomics/atomic_flag/test_and_set/implicit.c: Same.

	* doc/doxygen/user.cfg.in: Remove thread include.

From-SVN: r135291
2008-05-14 13:12:02 +00:00