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.
* g++.dg/conversion/dynamic1.C: New test.
From-SVN: r113084
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.
PR c++/27102
* g++.dg/template/crash35.C: Tweak error markers.
* g++.dg/template/crash46.C: New test.
* g++.old-deja/g++.brendan/friend4.C: Tweak error markers.
* g++.old-deja/g++.pt/incomplete1.C: Likewise.
From-SVN: r113081
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.
2006-04-19 Andreas Krebbel <krebbel1@de.ibm.com>
* gcc.c-torture/compile/20060419-1.c: Added.
From-SVN: r113072
2006-04-19 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.md: Add comments with the instructions emitted
by an insn pattern if macros are used.
From-SVN: r113071
* configure.in (m32c): Build libstdc++-v3. Pass flags to
reference libgloss so that libssp can be built in a combined
tree.
* configure: Regenerate.
From-SVN: r113066
PR rtl-optimization/26026
* fold-const.c (fold_binary): Optimize div and mod where the divisor
is a known power of two shifted left a variable amount.
From-SVN: r113060
* dwarf2out.c (prune_unused_types_update_strings): Don't add strings
to hash table twice when the debug_str section has SECTION_MERGE.
From-SVN: r113057
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.
testsuite/
* gfortran.dg/label_1.f90: Adjust dg-error.
From-SVN: r113053
* 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.
From-SVN: r113042
2006-04-18 Paolo Carlini <pcarlini@suse.de>
* docs/html/faq/index.html ([5.5]): Adjust to mention function
objects and reference_wrapper; minor tweaks.
* docs/html/faq/index.txt: Regenerate.
From-SVN: r113031
* 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) *.
From-SVN: r113029
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.
From-SVN: r113026
2006-04-18 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/26821
* tree-ssa-math-opts.c (get_constant_one): New.
(insert_reciprocals): Use it.
From-SVN: r113025
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.
From-SVN: r113013
* 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.
From-SVN: r113005
* 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.
From-SVN: r113004
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.
From-SVN: r113001
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.
From-SVN: r112999
* 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.
From-SVN: r112998
PR middle-end/25474
* expr.c (compress_float_constant): Copy the narrow constant into
a new pseudo before extending it to its final width.
From-SVN: r112991
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>
* gfortran.dg/allocate_zerosize_1.f90: New test.
From-SVN: r112988