Paul Thomas [Fri, 16 May 2008 21:12:04 +0000 (21:12 +0000)]
re PR fortran/35756 (incorrect WHERE for functions in ELSEWHERE and overlaps)
2008-05-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35756
PR fortran/35759
* trans-stmt.c (gfc_trans_where): Tighten up the dependency
check for calling gfc_trans_where_3.
PR fortran/35743
* trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
if it is calculated to be negative.
PR fortran/35745
* trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
ss->where for scalar right hand sides.
* trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
not evaluate scalars outside the loop. Clean up whitespace.
* trans.h : Add a bitfield 'where' to gfc_ss.
2008-05-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35756
PR fortran/35759
* gfortran.dg/where_1.f90: New test.
PR fortran/35743
PR fortran/35745
* gfortran.dg/where_2.f90: New test.
Daniel Kraft [Fri, 16 May 2008 19:50:04 +0000 (21:50 +0200)]
re PR fortran/27997 (Fortran 2003: Support type-spec for array constructor)
2008-04-16 Daniel Kraft <d@domob.eu>
PR fortran/27997
* gfortran.h: Added field "length_from_typespec" to gfc_charlength.
* aray.c (gfc_match_array_constructor): Added code to parse
* typespec.
(check_element_type, check_constructor_type, gfc_check_constructor_type):
Extended to support explicit typespec on constructor.
(gfc_resolve_character_array_constructor): Pad strings correctly for
explicit, constant character length.
* trans-array.c: New static global variable
* "typespec_chararray_ctor"
(gfc_trans_array_constructor): New code to support explicit but dynamic
character lengths.
2008-04-16 Daniel Kraft <d@domob.eu>
PR fortran/27997
* gfortran.dg/array_constructor_type_1.f03: New test
* gfortran.dg/array_constructor_type_2.f03: New test
* gfortran.dg/array_constructor_type_3.f03: New test
* gfortran.dg/array_constructor_type_4.f03: New test
* gfortran.dg/array_constructor_type_5.f03: New test
* gfortran.dg/array_constructor_type_6.f03: New test
* gfortran.dg/array_constructor_type_7.f03: New test
* gfortran.dg/array_constructor_type_8.f03: New test
* gfortran.dg/array_constructor_type_9.f: New test
* gfortran.dg/array_constructor_type_10.f03: New test
* gfortran.dg/array_constructor_type_11.f03: New test
* gfortran.dg/array_constructor_type_12.f03: New test
* gfortran.dg/array_constructor_type_13.f90: New test
* gfortran.dg/array_constructor_type_14.f03: New test
* gfortran.dg/array_constructor_type_15.f03: New test
* gfortran.dg/array_constructor_type_16.f03: New test
* gfortran.dg/array_constructor_type_17.f03: New test
* gfortran.dg/array_constructor_type_18.f03: New test
Janne Blomqvist [Fri, 16 May 2008 17:42:44 +0000 (20:42 +0300)]
Part 1.1 of PR25561.
2008-05-15 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/25561
* io/io.h (struct fbuf): Change pointer to position offset.
* io/fbuf.c (fbuf_init): Reduce default size of buffer, ptr=>pos
changes.
(fbuf_reset): ptr=>pos changes.
(fbuf_alloc): If the request doesn't fit, don't waste memory by
keeping flushed bytes. ptr=>pos changes.
(fbuf_flush): ptr=>pos changes.
(fbuf_seek): Don't seek past the left tab limit, don't update active
byte count.
* io/open.c (new_unit): If RECL has been specified, used that as
initial buffer size.
Jerry DeLisle [Fri, 16 May 2008 16:44:28 +0000 (16:44 +0000)]
re PR fortran/34325 (Wrong error message for syntax error)
2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/34325
* decl.c (match_attr_spec): Check for matching pairs of parenthesis.
* expr.c (gfc_specification_expr): Supplement the error message with the
type that was found.
* resolve.c (gfc_resolve_index): Likewise.
* match.c (gfc_match_parens): Clarify error message with "at or before".
(gfc_match_do): Check for matching pairs of parenthesis.
Tobias Burnus [Fri, 16 May 2008 16:29:36 +0000 (18:29 +0200)]
intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95...
2008-05-16 Tobias Burnus <burnus@net-b.de
* intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
add missing KIND argument to ACHAR and NINT; and state that
the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
Sebastian Pop [Fri, 16 May 2008 16:02:02 +0000 (16:02 +0000)]
re PR tree-optimization/36228 (redundant runtime check while vectorizing)
2008-05-16 Sebastian Pop <sebastian.pop@amd.com>
Jan Sjodin <jan.sjodin@amd.com>
PR tree-optimization/36228
* tree-data-ref.c (initialize_data_dependence_relation): Fast dependence
test when the references are the same, call compute_self_dependence.
* tree-data-ref.h (struct data_dependence_relation): Add self_reference_p.
(DDR_SELF_REFERENCE): New.
* testsuite/gcc.dg/vect/pr36228.c: New.
Co-Authored-By: Jan Sjodin <jan.sjodin@amd.com>
From-SVN: r135426
Bernd Schmidt [Fri, 16 May 2008 10:28:50 +0000 (10:28 +0000)]
From Jie Zhang <jie.zhang@analog.com>
* config/bfin/t-bfin-elf (MULTILIB_OPTIONS, MULTILIB_DIRNAMES,
MULTILIB_MATCHES, MULTILIB_EXCEPTIONS): Remove mcpu=bf532-0.3,
mcpu=bf561-none and mcpu=bf561-0.2.
* config/bfin/t-bfin-uclinux (MULTILIB_OPTIONS, MULTILIB_DIRNAMES,
MULTILIB_MATCHES, MULTILIB_EXCEPTIONS): Likewise.
* config/bfin/t-bfin-linux (MULTILIB_OPTIONS, MULTILIB_DIRNAMES,
MULTILIB_MATCHES, MULTILIB_EXCEPTIONS): Likewise.
* config/bfin/bfin-protos.h (enum bfin_cpu_type): Add
BFIN_CPU_UNKNOWN.
* config/bfin/elf.h (STARTFILE_SPEC): Use specific CRT for
BF561.
(LIB_SPEC): Use proper linker script for bf561. Error if no mcpu
option.
* config/bfin/bfin.c (bfin_cpu_type): Set to BFIN_CPU_UNKNOWN.
(cputype_selected): Remove.
(bfin_handle_option): Don't use cputype_selected.
(override_options): When no mcpu option, enable all workarounds.
Don't use bfin_workarounds.
* config/bfin/bfin.h (DRIVER_SELF_SPECS): Don't set default
processor type.
(DEFAULT_CPU_TYPE): Don't define.
Johannes Singler [Fri, 16 May 2008 07:10:26 +0000 (07:10 +0000)]
parallel_mode.xml: Documented the new choices, factoring out common tags.
2008-05-16 Johannes Singler <singler@ira.uka.de>
* doc/xml/manual/parallel_mode.xml:
Documented the new choices, factoring out common tags.
* include/parallel/multiway_merge.h:
Place comparison functor at the end, to comply with
established convention.
(parallel_multiway_merge) Pass number of threads explicitly.
Introduce new compile-time variants, make exact splitting the
default.
* include/parallel/tags.h:
Extend exact_tag, introduce sampling_tag.
* include/parallel/merge.h:
(parallel_merge_advance) Adapt to changed interface.
* include/parallel/multiway_mergesort.h: Likewise.
Daniel Kraft [Fri, 16 May 2008 06:52:14 +0000 (08:52 +0200)]
primary.c: New private structure "gfc_structure_ctor_component".
2008-05-16 Daniel Kraft <d@domob.eu>
* primary.c: New private structure "gfc_structure_ctor_component".
(gfc_free_structure_ctor_component): New helper function.
(gfc_match_structure_constructor): Extended largely to support named
arguments and default initialization for structure constructors.
2008-05-16 Daniel Kraft <d@domob.eu>
* gfortran.dg/private_type_6.f90: Adapted expected error messages.
* gfortran.dg/structure_constructor_1.f03: New test.
* gfortran.dg/structure_constructor_2.f03: New test.
* gfortran.dg/structure_constructor_3.f03: New test.
* gfortran.dg/structure_constructor_4.f03: New test.
* gfortran.dg/structure_constructor_5.f03: New test.
* gfortran.dg/structure_constructor_6.f03: New test.
* gfortran.dg/structure_constructor_7.f03: New test.
* gfortran.dg/structure_constructor_8.f03: New test.
* gfortran.dg/structure_constructor_9.f90: New test.
Steven G. Kargl [Fri, 16 May 2008 03:41:17 +0000 (03:41 +0000)]
[multiple changes]
2008-05-15 Steven G. Kargl <kargls@comcast.net>
* simplify.c (gfc_simplify_dble, gfc_simplify_float,
simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
possible memory leaks.
(gfc_simplify_reshape): Plug possible memory leaks and dereferencing
of NULL pointers.
2008-05-15 Steven G. Kargl <kargls@comcast.net>
PR fortran/36239
* simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
rolled integer conversion with gfc_int2int, gfc_real2int, and
gfc_complex2int.
(gfc_simplify_intconv): Renamed to simplify_intconv.
2008-05-15 Steven G. Kargl, <kargl@comcast.net>
* gfortran.dg/and_or_xor.f90: New test
* fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
gfc_simplify_xor): Don't range check logical results.
* cgraph.h (compute_inline_parameters): Made public.
* tree-pass.h (ipa_opt_pass): Removed function_generate_summary,
variable_generate_summary, function_write_summary,
variable_write_summary, variable_read_summary. Added
generate_summary, write_summary, read_summary.
* cgraphunit.c (cgraph_process_new_functions): Changed call from
pass_ipa_inline.function_generate_summary, to
compute_inline_parameters.
* ipa-inline.c (compute_inline_parameters): Made public and added
node parameter.
(compute_inline_parameters_for_current): New function.
(pass_inline_param): Now calls
compute_inline_parameters_for_current.
(inline_generate_summary): Removed parameter and made to loop over
all cgraph nodes.
(pass_ipa_inline): Updated for new IPA_PASS structure.
* passes.c (execute_ipa_summary_passes): Now is called once per
pass rather than once per node*pass.
trans-expr.c (gfc_conv_concat_op): Take care of nondefault character kinds.
* trans-expr.c (gfc_conv_concat_op): Take care of nondefault
character kinds.
(gfc_build_compare_string): Add kind argument and use it.
(gfc_conv_statement_function): Fix indentation.
* gfortran.h (gfc_character_info): New structure.
(gfc_character_kinds): New array.
* trans-types.c (gfc_character_kinds, gfc_character_types,
gfc_pcharacter_types): New array.
(gfc_init_kinds): Fill character kinds array.
(validate_character): Take care of nondefault character kinds.
(gfc_build_uint_type): New function.
(gfc_init_types): Take care of nondefault character kinds.
(gfc_get_char_type, gfc_get_pchar_type): New functions.
(gfc_get_character_type_len): Use gfc_get_char_type.
* trans.h (gfc_build_compare_string): Adjust prototype.
(gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
prototypes.
* trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
prototypes.
* trans-decl.c (gfor_fndecl_compare_string_char4,
gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
gfor_fndecl_concat_string_char4): New function decls.
(gfc_build_intrinsic_function_decls): Define new *_char4 function
decls.
* trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
gfc_conv_intrinsic_function): Deal with nondefault character kinds.
Adam Nemet [Thu, 15 May 2008 19:25:53 +0000 (19:25 +0000)]
re PR middle-end/36194 (Truncation optimization in combine can remove necessary truncations)
PR middle-end/36194
* combine.c (check_conversion): Rename to check_promoted_subreg.
Don't call record_truncated_value from here.
(record_truncated_value): Turn it into a for_each_rtx callback.
(record_truncated_values): New function.
(combine_instructions): Call note_uses with
record_truncated_values. Change name of check_conversion to
check_promoted_subreg.
Sa Liu [Thu, 15 May 2008 12:51:56 +0000 (12:51 +0000)]
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.
Richard Guenther [Thu, 15 May 2008 12:44:42 +0000 (12:44 +0000)]
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.
Eric Botcazou [Thu, 15 May 2008 10:53:49 +0000 (10:53 +0000)]
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.
Richard Guenther [Thu, 15 May 2008 10:36:18 +0000 (10:36 +0000)]
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.
Uros Bizjak [Thu, 15 May 2008 10:17:45 +0000 (12:17 +0200)]
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.
Richard Guenther [Thu, 15 May 2008 08:37:22 +0000 (08:37 +0000)]
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..
* 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.
Olivier Hainque [Wed, 14 May 2008 15:05:16 +0000 (15:05 +0000)]
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.
Olivier Hainque [Wed, 14 May 2008 13:20:43 +0000 (13:20 +0000)]
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
Ira Rosen [Wed, 14 May 2008 12:28:53 +0000 (12:28 +0000)]
re PR tree-optimization/36098 (435.gromacs miscompares at -O3)
PR tree-optimization/36098
* tree-vect-analyze.c (vect_analyze_group_access): Set the gap
value for the first load in the group in case of a gap.
(vect_build_slp_tree): Check that there are no gaps in loads.
David S. Miller [Wed, 14 May 2008 08:39:46 +0000 (08:39 +0000)]
sparc.c (sparc_profile_hook): If NO_PROFILE_COUNTERS, don't generate and pass a label into mcount.
* config/sparc/sparc.c (sparc_profile_hook): If
NO_PROFILE_COUNTERS, don't generate and pass a label
into mcount.
* config/sparc/linux.h (NO_PROFILE_COUNTERS): Define as 1.
* config/sparc/linux64.h (NO_PROFILE_COUNTERS): Likewise.
Samuel Tardieu [Wed, 14 May 2008 07:07:24 +0000 (07:07 +0000)]
sem_attr.adb (Analyze_Attribute, [...]): Add restrictions to the prefix of 'Old.
gcc/ada/
* sem_attr.adb (Analyze_Attribute, Attribute_Old case): Add
restrictions to the prefix of 'Old.
* sem_util.ads, sem_util.adb (In_Parameter_Specification): New.
* gnat_rm.texi ('Old): Note that 'Old cannot be applied to local
variables.