Jerry DeLisle [Sun, 23 Apr 2006 02:04:58 +0000 (02:04 +0000)]
re PR libfortran/20257 (Fortran runtime error: End of record occurs when writing large arrays)
2006-04-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/20257
* io/io.h: Add prototypes for get_internal_unit and free_internal_unit.
* io/unit.c (get_internal_unit): Initialize unit number, not zero.
(free_internal_unit): New function to consolidate freeing memory.
(get_unit): Initialize internal_unit_desc to NULL when unit is
external.
* io/unix.c (mem_close): Check for not NULL before freeing memory.
* io/transfer.c (read_block): Reset bytes_left and skip error if unit
is preconnected and default record length is reached.
(read_block_direct): Ditto.
(write_block): Ditto.
(write_buf): Ditto.
(data_transfer_init): Only flush if not internal unit.
(finalize_transfer): Ditto and delete code to free memory used by
internal units.
(st_read_done): Use new function - free_internal_unit.
(st_write_done): Use new function - free_internal unit.
Paul Thomas [Fri, 21 Apr 2006 05:10:22 +0000 (05:10 +0000)]
re PR fortran/27122 (binary operator functions should require intent(in))
2006-04-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/27122
* resolve.c (resolve_function): Remove general restriction on auto
character length function interfaces.
(gfc_resolve_uops): Check restrictions on defined operator
procedures.
(resolve_types): Call the check for defined operators.
PR fortran/27122
* gfortran.dg/defined_operators_1.f90: New test.
* gfortran.dg/assumed_charlen_function_1.f90: Add new error and
remove old ones associated, incorrectly, with Note 5.46.
PR fortran/27113
* gfortran.dg/character_array_constructor_1.f90: New test.
Carlos O'Donell [Thu, 20 Apr 2006 00:21:51 +0000 (00:21 +0000)]
re PR c/26774 (Out of memory compiling 9-line Delta-reduced Linux kernel driver msp3400.c)
gcc/
2006-04-19 Carlos O'Donell <carlos@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
PR c/26774
* stor-layout.c (update_alignment_for_field): Do not align
ERROR_MARK nodes.
(place_union_field): Place union field at the start of the union.
(place_field): Move ERROR_MARK check later, and use the current
allocation position to maintain monotonicity.
gcc/testsuite/
2006-04-19 Carlos O'Donell <carlos@codesourcery.com>
PR c/26774
* gcc.dg/struct-parse-1.c: New test case.
re PR c++/10385 (Internal compiler error in build_up_reference, at cp/cvt.c:353, on invalid dynamic_cast)
PR c++/10385
* rtti.c (build_dynamic_cast_1): Check for invalid conversions
before calling convert_to_reference.
* cvt.c (convert_to_reference): Assert that reftype is a
REFERENCE_TYPE.
Mark Mitchell [Wed, 19 Apr 2006 16:58:23 +0000 (16:58 +0000)]
re PR c++/27102 (ICE with invalid class name in function template)
PR c++/27102
* class.c (currently_open_class): Tidy.
* decl.c (grokdeclarator): If we encounter an erroneous
declarator, assume that we have already issued an error message
and return. Return error_mark_node instead of NULL_TREE in more
places. Issue errors about function definitions that do not have
a function declarator. Check for complete types for all function
definitions.
* cp-tree.h (cp_error_declarator): Remove.
(currently_open_class): Change return type.
* parser.c (cp_parser_id_expression): Add optional_p parameter.
(cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
(cp_parser_id_expression): Likewise.
(cp_parser_unqualified_id): If the name is optional, return
NULL_TREE.
(cp_parser_postfix_dot_deref_expression): Adjust calls.
(cp_parser_type_parameter): Likewise.
(cp_parser_unqualified_id): Likewise.
(cp_parser_direct_declarator): Likewise.
(cp_parser_declarator_id): Add optional_p parameter.
(cp_parser_function_definition_from_specifiers_and_declarator):
Assume that start_function indicates failure only if it has issued
an error.
(cp_parser_omp_var_list_no_open): Adjust calls.
Andreas Krebbel [Wed, 19 Apr 2006 11:45:41 +0000 (11:45 +0000)]
ifcvt.c (noce_emit_move_insn): Call store_bit_field if the resulting move would be an INSV insn.
2006-04-19 Andreas Krebbel <krebbel1@de.ibm.com>
* ifcvt.c (noce_emit_move_insn): Call store_bit_field if the resulting
move would be an INSV insn.
(noce_process_if_block): Don't optimize if the destination is a
ZERO_EXTRACT which can't be handled by noce_emit_move_insn.
Bernhard Fischer [Tue, 18 Apr 2006 17:58:41 +0000 (19:58 +0200)]
parse.c (next_free): Use consistent error string between free-form and fixed-form for illegal...
fortran/
* parse.c (next_free): Use consistent error string between
free-form and fixed-form for illegal statement label of zero.
(next_fixed): Use consistent warning string between free-form
and fixed-form for statement labels for empty statements.
Nick Clifton [Tue, 18 Apr 2006 14:48:36 +0000 (14:48 +0000)]
t-symbian: Add rule to build sh-c.o
* config/sh/t-symbian: Add rule to build sh-c.o
* config/sh/symbian.c (sh_symbian_mark_dllexport): Replace use
of DECL_NON_ADDR_CONST_P with DECL_DLLIMPORT_P.
(sh_symbian_encode_section_info): Likewise.
function.c (temp_slots_at_level, [...]): Use VEC instead of VARRAY.
* function.c (temp_slots_at_level, max_slot_level): Use VEC
instead of VARRAY.
* function.h (temp_slot_p): New.
(function): Change the type of x_used_temp_slots to
VEC(temp_slot_p,gc) *.
Paolo Bonzini [Tue, 18 Apr 2006 08:23:39 +0000 (08:23 +0000)]
re PR target/27117 (SH backend cheats to reload -- disables indexed addressing but uses it internally)
2006-04-18 Paolo Bonzini <bonzini@gnu.org>
PR target/27117
Partial revert of revision 112637
2006-04-03 Paolo Bonzini <bonzini@gnu.org>
Dale Johannesen <dalej@apple.com>
PR target/19653
* regclass.c (struct reg_pref): Update documentation.
(regclass): Set prefclass to NO_REGS if memory is the best option.
(record_reg_classes): Cope with a prefclass set to NO_REGS.
Tom Tromey [Mon, 17 Apr 2006 21:41:47 +0000 (21:41 +0000)]
re PR libgcj/27171 (UTF8 PrintWriter goes haywire)
PR libgcj/27171:
* testsuite/libjava.lang/pr27171.java: New file.
* testsuite/libjava.lang/pr27171.out: New file.
* gnu/gcj/convert/Output_UTF8.java (havePendingBytes): Return
true if we've seen a high surrogate.
(write): Handle high surrogates at the end of the stream.
Properly emit isolated low surrogates.
alias.c (alias_sets): Change the type to VEC(alias_set_entry,gc) *.
* alias.c (alias_sets): Change the type to
VEC(alias_set_entry,gc) *.
(get_alias_set_entry, new_alias_set, record_alias_subset): Use
VEC instead of VARRAY.
(last_alias_set): Remove.
alias.c (reg_base_value, [...]): Change the type to VEC(rtx,gc) *.
* alias.c (reg_base_value, old_reg_base_value): Change the
type to VEC(rtx,gc) *.
(REG_BASE_VALUE, find_base_value, record_set,
init_alias_analysis): Use VEC instead of VARRAY.
Roger Sayle [Mon, 17 Apr 2006 02:38:50 +0000 (02:38 +0000)]
re PR target/26961 (ICE simplify_subreg:3813)
PR target/26961
* fold-const.c (fold_ternary): When converting "A ? B : C" into either
"A op B" or "A op C", we may need to convert A to the type of B and C.
* gcc.dg/fold-cond-1.c: New test case.
* gcc.dg/pr26961-1.c: Likewise.
Jerry DeLisle [Mon, 17 Apr 2006 02:33:51 +0000 (02:33 +0000)]
re PR fortran/27138 (gfortran: read(*,*) myInt advances only one character on error)
2006-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/27138
* io/list_read.c (eat_line): New function.
(parse_repeat): Use new function and free_saved.
(read_logical): Same.
(read_integer): Use new function.
(parse_real): Use nml_bad_return and new function.
(read_complex): Use new function and free_saved.
(read_real): Same.
* target.h (struct gcc_target): Add mode_rep_extended.
* rtlanal.c (num_sign_bit_copies_in_rep): New global.
(init_num_sign_bit_copies_in_rep): Initialize it using
mode_rep_extended.
(truncate_to_mode): Use it.
(init_rtlanal): Call init_num_sign_bit_copies_in_rep.
* targhooks.h (default_mode_rep_extended): Declare it.
* targhooks.c (default_mode_rep_extended): Define it.
* target-def.h (TARGET_MODE_REP_EXTENDED): New macro. Default to
default_mode_rep_extended.
(TARGET_INITIALIZER): Include it.
* doc/tm.texi (Misc): Document it.
* config/mips/mips.c (TARGET_TRUNCATED_TO_MODE): Override it.
(mips_truncated_to_mode): New function.
Thomas Koenig [Sun, 16 Apr 2006 20:29:24 +0000 (20:29 +0000)]
re PR fortran/26017 (allocate (a(1:-1)) should yield zero-sized array)
2006-04-16 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/26017
* trans-array.c(gfc_array_init_size): Introduce or_expr
which is true if the size along any dimension
is negative. Create a temporary variable with base
name size. If or_expr is true, set the temporary to 0,
to the normal size otherwise.
2006-04-16 Thomas Koenig <Thomas.Koenig@online.de>
Paul Thomas [Sun, 16 Apr 2006 03:45:24 +0000 (03:45 +0000)]
re PR fortran/26822 (Scalarization of non-elemental intrinsic: __logical_4_l4)
2006-04-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/26822
* intrinsic.c (add_functions): Mark LOGICAL as elemental.
PR fortran/26787
* expr.c (gfc_check_assign): Extend scope of error to include
assignments to a procedure in the main program or, from a
module or internal procedure that is not that represented by
the lhs symbol. Use VARIABLE rather than l-value in message.
PR fortran/27096
* trans-array.c (gfc_trans_deferred_array): If the backend_decl
is not a descriptor, dereference and then test and use the type.
PR fortran/25597
* trans-decl.c (gfc_trans_deferred_vars): Check if an array
result, is also automatic character length. If so, process
the character length.
PR fortran/18803
PR fortran/25669
PR fortran/26834
* trans_intrinsic.c (gfc_walk_intrinsic_bound): Set
data.info.dimen for bound intrinsics.
* trans_array.c (gfc_conv_ss_startstride): Pick out LBOUND and
UBOUND intrinsics and supply their shape information to the ss
and the loop.
PR fortran/27124
* trans_expr.c (gfc_trans_function_call): Add a new block, post,
in to which all the argument post blocks are put. Add this block
to se->pre after a byref call or to se->post, otherwise.
2006-04-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/26787
* gfortran.dg/proc_assign_1.f90: New test.
* gfortran.dg/procedure_lvalue.f90: Change message.
* gfortran.dg/namelist_4.f90: Add new error.
pa.md (output_bb patterns): Shorten long branch alternatives by 4.
* pa.md (output_bb patterns): Shorten long branch alternatives by 4.
(output_bvb patterns): Likewise.
* pa.c (output_bb): Use 'bb' insn for long branch case.
(output_bvb): Likewise use '{bvb|bb}' for long branch case.
(output_dbra): Use '{comb|cmpb}' for long branch case for alternative
1. Correct length operand for alternatives 1 and 2.
(output_movb): Use '{comb|cmpb}' for long branch case for alternatives
1, 2 and 3. Correct length operand for alternatives 1, 2 and 3.
* Make-lang.in (cp/pt.o): Depend on vecprim.h.
* pt.c: Include vecprim.h.
(inline_parm_levels): Change the type to VEC(int,heap) *.
(inline_parm_levels_used): Remove.
(maybe_begin_member_template_processing,
maybe_end_member_template_processing): Use VEC instead of
VARRAY.