2010-06-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/42051
PR fortran/43896
* trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
functions with CLASS formal arguments.
2010-06-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/42051
PR fortran/43896
* gfortran.dg/class_23.f03: New test.
From-SVN: r160622
2010-06-11 Jonathan Wakely <jwakely.gcc@gmail.com>
* doc/xml/manual/appendix_contributing.xml: Indent code examples
to match original C++STYLE document. Fix typos and syntax errors.
Add some basic docbook markup.
* doc/html/*: Regenerate.
From-SVN: r160620
* ipa-pure-const.c (special_builtlin_state): New function.
(check_call): Use it instead of special casign BUILT_IN_RETURN.
(propagate_pure_const): Use it.
* gcc.dg/ipa/pure-const-2.c: New testcase.
From-SVN: r160615
2010-06-11 Kai Tietz <kai.tietz@onevision.com>
* system.h (helper_const_non_const_cast): New inline for
gcc version <= 4.0.
(CONST_CAST2): For gcc version <= 4.0 use
new helper to do const/non-const casting.
From-SVN: r160598
2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
* cp-tree.h (expr_list_kind): New type.
(impl_conv_rhs): New type.
(build_x_compound_expr_from_list, convert_for_initialization): Adjust
prototype.
(typeck.c (convert_arguments): Use impl_conv_rhs and emit the
diagnostics for easy translation. Change caller.
(convert_for_initialization): Use impl_conv_rhs and change caller.
(build_x_compound_expr_from_list): Use expr_list_kind and emit the
diagnostics for easy translation. Change caller.
* decl.c (bad_spec_place): New enum.
(bad_specifiers): Use it and emit the diagnostics for easy
translation. Change caller.
* pt.c (coerce_template_parms): Put the diagnostics in full sentence.
From-SVN: r160591
* configure.ac: Set SYSTEMSPEC so that -allow_stack_execute is not
passed to the linker for -dynamiclib or -bundle on darwin.
* configure: Regenerate.
From-SVN: r160583
gcc/
* doc/md.texi: Document the "unspec" and "unspecv" enum names.
* Makefile.in (OBJS-common): Include insn-enums.o.
(insn-enums.o): New rule.
(simple_generated_c): Add insn-enums.c.
(build/genenums.o): New rule.
(genprogmd): Add "enums".
* genconstants.c (print_enum_type): Declare a C string array
for each enum.
* genenums.c: New file.
* print-rtl.c (print_rtx): If defined, use the "unspecv" enum
for UNSPEC_VOLATILE. If defined, use the "unspec" enum for both
UNSPEC and (as a fallback) for UNSPEC_VOLATILE.
From-SVN: r160582
gcc/
* doc/md.texi (define_enum_attr): Document.
* rtl.def (DEFINE_ENUM_ATTR): New rtx.
* read-md.h (lookup_enum_type): Declare.
* read-md.c (lookup_enum_type): New function.
* genattr.c (gen_attr, main): Handle DEFINE_ENUM_ATTR.
* genattrtab.c (attr_desc): Add an enum_name field.
(evaluate_eq_attr): Take the associated attribute as argument.
Get the enum prefix from the enum_name field, if defined.
Use ACONCAT rather than a fixed-length buffer. Update recursive calls.
(simplify_test_exp): Pass attr to evaluate_eq_attr.
(add_attr_value): New function, split out from...
(gen_attr): ...here. Handle DEFINE_ENUM_ATTR.
(write_test_expr): Pass attr to evaluate_eq_attr.
(write_attr_get): Use the enum_name as the enum tag, if defined.
(write_attr_valueq): Use the enum_name as a prefix, if defined.
(find_attr): Initialize enum_name.
(main): Handle DEFINE_ENUM_ATTR.
* gensupport.c (process_rtx): Likewise.
* config/mips/mips.h (mips_tune_attr): Delete.
* config/mips/mips.md (cpu): Use define_attr_enum.
From-SVN: r160581
gcc/
* Makefile.in (BUILD_RTL): Move build/read-md.o to...
(BUILD_MD): ...this new variable.
(simple_generated_rtl_h, simple_generated_rtl_c): New variables
that include the old contents of simple_generated_h and
simple_generated_c.
(simple_generated_h, simple_generated_c): Include them. Add
insn-constants.h.
(s-%): Make simple_generated_{h,c} stamps depend on $(MD_DEPS)
and simple_generated_rtl_{h,c} stamps depend on insn-conditions.md.
Remove these dependencies from the main rule and include
insn-conditions.md in the command line only if it appears
in the dependency list.
(insn-constants.h, s-constants): Delete.
(build/genconstants.o): Don't depend on $(RTL_BASE_H), $(GTM_H)
or gensupport.h.
(build/genmddeps.o): Likewise.
(genprogrtl): New variable that contains everything from genprogmd
except mddeps and constants.
(genprogmd): Redefine in terms of genprogrtl. Make these programs
depend on $(BUILD_MD)
(genprog): New variable. Make these programs depend on
$(BUILD_ERRORS).
* genmddeps.c: Don't include tm.h, rtl.h or gensupport.h.
(main): Use read_md_files instead of init_rtx_reader_args.
* genconstants.c: As for genmddeps.c.
* read-md.h (read_skip_construct): Declare.
* read-md.c (read_skip_construct): New function.
(handle_file): Allow a null handle_directive, skipping the
construct if so.
(parse_include): Update the comment accordingly.
From-SVN: r160578
gcc/
* read-md.h (read_char): Increment read_md_lineno after reading '\n'.
(unread_char): Decrement read_md_lineno after putting back '\n'.
* read-md.c (fatal_with_file_and_line): Push back any characters
that we decide not to add to the context.
(read_skip_spaces): Don't increment read_md_lineno here. Avoid using
fatal_expected_char in cases where '/' ends a line (for example).
(read_name): Don't increment read_md_lineno here.
(read_escape): Likewise.
(read_quoted_string): Likewise.
(read_braced_string): Likewise.
From-SVN: r160576
gcc/
* Makefile.in (READ_MD_H): Add $(HASHTAB_H).
(build/genconstants.o): Depend on $(READ_MD_H) gensupport.h.
* genconstants.c: Include read-md.h.
* read-rtl.c (md_constants): Move to read-md.c.
(md_name): Move to read-md.h.
(initialize_iterators): Use leading_string_hash instead of def_hash
and leading_string_eq_p instead of def_name_eq_p.
(read_name): Move to read-md.c.
(def_hash, def_name_eq_p): Delete.
(read_constants, traverse_md_constants): Move to read-md.c.
* rtl.h (md_constant, traverse_md_constants): Move to read-md.h.
* read-md.h: Include hashtab.h.
(md_name): Moved from read-rtl.c.
(md_constant): Moved from read-md.h.
(leading_string_hash, leading_string_eq_p, read_name)
(read_constants, traverse_md_constants): Declare.
* read-md.c (md_constants): Moved from read-rtl.c.
(leading_string_hash, leading_string_eq_p): New functions.
(read_name, read_constants, traverse_md_constants): Moved from
read-rtl.c.
From-SVN: r160575
gcc/
* read-rtl.c (md_name): New structure.
(read_name): Take an md_name instead of a buffer pointer.
Use the "string" field instead of strcpy when expanding constants.
(read_constants): Remove the tmp_char argument. Update the calls
to read_name, using two local name buffers instead of the tmp_char
argument. Merge the constant-creation code.
(read_conditions): Remove the tmp_char argument. Update the calls
to read_name, using a local name buffer instead of the tmp_char
argument.
(read_mapping): Replace tmp_char variable with a local name buffer.
Update the calls to read_name.
(read_rtx_1): Likewise. Update the calls to read_constants and
read_conditions.
From-SVN: r160574
gcc/
* Makefile.in (build/read-md.o): Depend on errors.h.
* read-md.h (error_with_line): Declare.
* read-md.c: Include errors.h.
(message_with_line_1): New function, extracted from...
(message_with_line): ...here.
(error_with_line): New function.
* genattrtab.c: If a call to message_with_line is followed by
"have_error = 1;", replace both statements with a call to
error_with_line.
* genoutput.c: Likewise.
* genpreds.c: Likewise.
* genrecog.c: If a call to message_with_line is followed by
"error_count++;", replace both statements with a call to
error_with_line.
(errorcount): Delete.
(main): Don't check it.
* gensupport.c: If a call to message_with_line is followed by
"errors = 1;", replace both statements with a call to error_with_line.
(errors): Delete.
(process_define_cond_exec): Check have_error instead of errors.
(init_md_reader_args_cb): Likewise. Don't set errors.
From-SVN: r160573
gcc/
* read-md.h (read_md_file): Declare.
(read_char, unread_char): New functions.
(fatal_with_file_and_line, fatal_expected_char, read_skip_spaces)
(read_quoted_string, read_string): Remove FILE * argument.
* read-md.c (read_md_file): New variable.
(read_md_filename, read_md_lineno): Update comments and remove
unnecessary initialization.
(fatal_with_file_and_line, fatal_expected_char, read_skip_spaces)
(read_escape, read_quoted_string, read_braced_string, read_string):
Remove FILE * argument. Update calls accordingly, using read_char
and unread_char instead of getc and ungetc.
* rtl.h (read_rtx): Remove FILE * argument.
* read-rtl.c (iterator_group): Remove FILE * argument from
"find_builtin".
(iterator_traverse_data): Remove "infile" field.
(find_mode, find_code, apply_mode_maps, apply_iterator_to_rtx)
(add_mapping, read_name, read_constants, read_conditions)
(validate_const_int, find_iterator, read_mapping, check_code_iterator)
(read_rtx, read_rtx_1, read_rtx_variadic): Remove FILE * argument.
Remove file arguments from all calls, using read_char and unread_char
instead of getc and ungetc.
* gensupport.c (process_include): Preserve read_md_file around
the include. Set read_md_file to the handle of the included file.
Update call to read_rtx.
(init_md_reader_args_cb): Set read_md_file to the handle of the file
and remove local FILE *. Update calls to read_rtx.
From-SVN: r160572
PR fortran/38273
* gfortran.texi: Document that Cray pointers cannot be function
results.
PR fortran/36234
* gfortran.texi: Document lack of support for syntax
"complex FUNCTION name*16()", and existence of alternative
legacy syntax "complex*16 FUNCTION name()".
From-SVN: r160569
PR fortran/43032
* intrinsic.texi (FLUSH): Note the difference between FLUSH and
POSIX's fsync(), and how to call the latter from Fortran code.
From-SVN: r160568
2010-06-10 Changpeng Fang <changpeng.fang@amd.com>
PR middle-end/44185
* gcc.dg/tree-ssa/prefetch-7.c: take the loops that will generate
non-temporal stores out of the tests to form new test cases. As a
result, no non-temporal store should be generated in this case.
* gcc.dg/tree-ssa/prefetch-8.c: New. Test from original
prefetch-7.c that generate one non-temporal store.
* gcc.dg/tree-ssa/prefetch-9.c: New. Test from original
prefetch-7.c that generate one non-temporal store and one
one-temporal prefetch.
From-SVN: r160566
2010-06-10 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/44258
* tree-sra.c (build_access_subtree): Return false iff there is a
partial overlap.
(build_access_trees): Likewise.
(analyze_all_variable_accesses): Disqualify candidates if
build_access_trees returns true for them.
* testsuite/gcc.dg/tree-ssa/pr44258.c: New test.
From-SVN: r160561
PR other/43838
* cp-demangle.c (struct d_print_info): Add flush_count field.
(d_print_init): Initialize it to 0.
(d_print_flush): Increment it.
(d_print_comp): If needed flush before appending ", ". Only
decrement dpi->len if no flushes happened during the recursive
call.
* testsuite/demangle-expected: Add a test for this.
From-SVN: r160554