2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
PR C++/23426
* decl.c (start_decl): Check that the decl is an
error_mark_node before getting the type.
Remove the check for the decl's type being an
error_mark_node.
2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
PR C++/23426
* g++.dg/other/large-size-array.C: New test.
From-SVN: r105936
2005-10-28 Daniel Berlin <dberlin@dberlin.org>
Ben Elliston <bje@au1.ibm.com>
* gcc_update: Update for svn.
* newcvsroot: Ditto.
* gcc_build: Ditto.
Co-Authored-By: Ben Elliston <bje@au.ibm.com>
From-SVN: r105933
2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/24362
* g++.dg/opt/complex4.C: New test.
2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/24362
* tree-complex.c (extract_component): Treat RESULT_DECL
like the rest of the decls.
From-SVN: r105930
PR rtl-optimization/24460
* dwarf2out.c (have_switched_text_sections): New boolean variable.
(dwarf2out_switch_text_section): Set it to true instead of
incrementing separate_line_info_table_in_use.
(output_loc_list): Additionally test have_switched_text_sections.
(output_ranges): Likewise.
(dwarf2out_finish): Likewise.
* varasm.c (assemble_start_function): Do not call
insert_section_boundary_note.
(assemble_end_function): If flag_reorder_blocks_and_partition,
switch to the function's section before emitting the .size directive.
* bb-reorder.c (insert_section_boundary_note): Staticify.
(rest_of_handle_reorder_blocks): Call insert_section_boundary_note.
* output.h (insert_section_boundary_note): Delete.
Co-Authored-By: Caroline Tice <ctice@apple.com>
From-SVN: r105916
2005-10-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24158
* decl.c (gfc_match_data_decl): Correct broken bit of code
that prevents undefined derived types from being used as
components of another derived type.
* resolve.c (resolve_symbol): Add backstop error when derived
type variables arrive here with a type that has no components.
2005-10-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24158
gfortran.dg/derived_recursion.f90: New test.
gfortran.dg/implicit_actual.f90: New test.
From-SVN: r105913
2005-10-24 Andrew Pinski <pinskia@physics.uc.edu>
PR c/23103
* c-format.c (check_format_types): Use lang_hooks.types_compatible_p
instead of pointer equality when comparing types.
From-SVN: r105911
PR middle-end/24295, PR testsuite/24477
* g++.old-deja/g++.abi/vtable2.C: Require alias for now. Will be
removed when weakref hits the tree.
From-SVN: r105893
2005-10-25 Feng Wang <fengwang@nudt.edu.cn>
PR fortran/22290
* trans-decl.c (gfc_add_assign_aux_vars): New function. Add two
auxiliary variables.
(gfc_get_symbol_decl): Use it when a variable, including dummy
argument, is assigned a label.
(gfc_trans_assign_aux_var): New function. Set initial value of
the auxiliary variable explicitly.
(gfc_trans_deferred_vars): Use it.
* trans-stmt.c (gfc_conv_label_variable): Handle dummy argument.
2005-10-25 Feng Wang <fengwang@nudt.edu.cn>
PR fortran/22290
* gfortran.dg/assign_5.f90: New test.
* gfortran.dg/assign_6.f: New test.
From-SVN: r105887
2005-10-24 Jerry DeLisle <jvdelisle@verizon.net>
PR libgfortran/24224
* libgfortran.h: Remove array stride error code.
* runtime/error.c: Remove array stride error.
* io/io.h: Change name of 'nml_loop_spec' to 'array_loop_spec' to be
generic. Add pointer to array_loop_spec and rank to gfc_unit
structure.
* io/list_read.c: Revise nml_loop_spec references to array_loop_spec.
* io/transfer.c (init_loop_spec): New function to initialize
an array_loop_spec.
(next_array_record): New function to return the index to the next array
record by incrementing through the array_loop_spec.
(next_record_r): Use new function.
(next_record_w): Use new function.
(finalize_transfer): Free memory allocated for array_loop_spec.
* io/unit.c (get_array_unit_len): Delete this function. Use new
function init_loop_spec to initialize the array_loop_spec.
From-SVN: r105878
2005-10-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24416
* libgfortran/io/list_read.c (namelist_read): Exit with call to
free_saved () so that character strings do not accumulate.
2005-10-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24416
gfortran.dg/namelist_char_only.f90: New test.
From-SVN: r105862
PR fortran/17031
PR fortran/22282
fortran/
* check.c (gfc_check_loc) : New function
* decl.c (variable_decl): New variables cp_as and sym. Added a
check for variables that have already been declared as Cray
Pointers, so we can get the necessary attributes without adding
a new symbol.
(attr_decl1): Added code to catch pointee symbols and "fix"
their array specs.
(cray_pointer_decl): New method.
(gfc_match_pointer): Added Cray pointer parsing code.
(gfc_mod_pointee_as): New method.
* expr.c (gfc_check_assign): added a check to catch vector-type
assignments to pointees with an unspecified final dimension.
* gfortran.h: (GFC_ISYM_LOC): New.
(symbol_attribute): Added cray_pointer and cray_pointee bits.
(gfc_array_spec): Added cray_pointee and cp_was_assumed bools.
(gfc_symbol): Added gfc_symbol *cp_pointer.
(gfc_option): Added flag_cray_pointer.
(gfc_add_cray_pointee): Declare.
(gfc_add_cray_pointer ): Declare.
(gfc_mod_pointee_as): Declare.
* intrinsic.c (add_functions): Add code for loc() intrinsic.
* intrinsic.h (gfc_check_loc): Declare.
(gfc_resolve_loc): Declare.
* iresolve.c (gfc_resolve_loc): New.
* lang.opt: Added fcray-pointer flag.
* options.c (gfc_init_options): Intialized
gfc_match_option.flag_cray_pointer.
(gfc_handle_option): Deal with -fcray-pointer.
* parse.c:(resolve_equivalence): Added code prohibiting Cray
pointees in equivalence statements.
* resolve.c (resolve_array_ref): Added code to prevent bounds
checking for Cray Pointee arrays.
(resolve_equivalence): Prohibited pointees in equivalence
statements.
* symbol.c (check_conflict): Added Cray pointer/pointee
attribute checking.
(gfc_add_cray_pointer): New
(gfc_add_cray_pointee): New
(gfc_copy_attr): New code for Cray pointers and pointees
* trans-array.c (gfc_trans_auto_array_allocation): Added code to
prevent space from being allocated for pointees.
(gfc_conv_array_parameter): Added code to catch pointees and
correctly set their base address.
* trans-decl.c (gfc_finish_var_decl): Added code to prevent
pointee declarations from making it to the back end.
(gfc_create_module_variable): Same.
* trans-expr.c (gfc_conv_variable): added code to detect and
translate pointees.
(gfc_conv_cray_pointee): New.
* trans-intrinsic.c (gfc_conv_intrinsic_loc): New.
(gfc_conv_intrinsic_function): added entry point for loc
translation.
* trans.h (gfc_conv_cray_pointee): Declare.
* gfortran.texi: Added section on Cray pointers, removed Cray
pointers from list of proposed extensions
* intrinsic.texi: Added documentation for loc intrinsic.
* invoke.texi: Documented -fcray-pointer flag
testsuite/
PR fortran/17031
PR fortran/22282
* gfortran.dg/cray_pointers_1.f90: New test.
* gfortran.dg/cray_pointers_2.f90: New test.
* gfortran.dg/cray_pointers_3.f90: New test.
* gfortran.dg/loc_1.f90: New test.
* gfortran.dg/loc_2.f90: New test.
From-SVN: r105859
PR tree-optimization/24225
gcc/
* profile.c (branch_prob): Look from end to start through a
basic block when looking for a locus.
testsuite/
* gcc.dg/pr24225.c: New test.
From-SVN: r105857
* pa-linux.h (NO_PROFILE_COUNTERS): Delete define.
(NO_DEFERRED_PROFILE_COUNTERS): Define.
* pa.h (NO_PROFILE_COUNTERS): Define.
* pa.c (NO_DEFERRED_PROFILE_COUNTERS): Define if not defined.
(funcdef_nos): New vector to hold label numbers of deferred profile
counters.
(output_deferred_profile_counters): New function.
(hppa_profile_hook): Push label number onto funcdef_nos.
(pa_hpux_file_end): Call output_deferred_profile_counters if
NO_DEFERRED_PROFILE_COUNTERS is false.
From-SVN: r105854
fortran/
* decl.c (gfc_match_save): Changed duplicate SAVE errors to
warnings in the absence of strict standard conformance
* symbol.c (gfc_add_save): Same.
testsuite/
* gfortran.dg/dup_save_1.f90: New test.
* gfortran.dg/dup_save_2.f90: New test.
From-SVN: r105850
PR fortran/15586
* arith.c (gfc_arith_error): Change message to include locus.
(check_result, eval_intrinsic, gfc_int2int, gfc_real2real,
gfc_real2complex, gfc_complex2real, gfc_complex2complex): Use
the new gfc_arith_error.
(arith_error): Rewrite full error messages instead of building
them from pieces.
* check.c (must_be): Removed.
(type_check, numeric_check, int_or_real_check, real_or_complex_check,
kind_check, double_check, logical_array_check, array_check,
scalar_check, same_type_check, rank_check, kind_value_check,
variable_check, gfc_check_allocated, gfc_check_associated,
gfc_check_cmplx, gfc_check_dcmplx, gfc_check_dot_product,
gfc_check_index, gfc_check_kind, gfc_check_matmul, gfc_check_null,
gfc_check_pack, gfc_check_precision, gfc_check_present,
gfc_check_spread): Rewrite full error messages instead of
building them from pieces.
* decl.c (gfc_match_entry): Rewrite full error messages instead
of building them from pieces.
* parse.c (gfc_state_name): Remove.
* parse.h: Remove prototype for gfc_state_name.
From-SVN: r105844
2005-10-23 Jerry DeLisle <jvdelisle@verizon.net>
PR libgfortran/24489
* io/transfer.c (read_block): Change the order of execution to not read
past end-of-record.
(read_block_direct): Same change.
From-SVN: r105840
2005-10-23 Andrew Pinski <pinskia@physics.uc.edu>
PR fortran/23635
* gfortran.dg/ichar_1.f90: Add tests for derived types.
2005-10-23 Andrew Pinski <pinskia@physics.uc.edu>
PR fortran/23635
* check.c (gfc_check_ichar_iachar): Move the code around so
that the check on the length is after check for
references.
From-SVN: r105829
PR libfortran/23272
* acinclude.m4 (LIBGFOR_CHECK_WORKING_STAT): New check.
* configure.ac: Use LIBGFOR_CHECK_WORKING_STAT.
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
* io/unix.c (compare_file_filename): Add fallback case for
systems without working stat.
* io/open.c (already_open): Correct call to
compare_file_filename.
* io/io.h: Correct proto for compare_file_filename.
From-SVN: r105824
gcc/
* decl.c (match_type_spec): Add a BYTE type as an extension.
testsuite/
* gfortran.dg/byte_1.f90: New test.
* gfortran.dg/byte_2.f90: New test.
From-SVN: r105823