cp:
PR c++/21165
* init.c (integral_constant_value): Check the type of the
initializer, not the decl.
testsuite:
PR c++/21165
* g++.dg/template/init5.C: New.
From-SVN: r100402
2005-05-30 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/char_initialiser_actual.f90:
Test character initialisers as actual arguments.
* gfortran.dg/char_pointer_comp_assign.f90:
Test character pointer structure component assignments.
* gfortran.dg/char_array_structure_constructor.f90:
Test character components in structure constructors.
From-SVN: r100401
2005-05-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18109
PR fortran/18283
PR fortran/19107
* fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
string length from the expression typespec character length value
and set temp_ss->stringlength and backend_decl. Obtain the
tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
Dereference the expression to obtain the character.
* fortran/trans-expr.c (gfc_conv_component_ref): Remove the
dereference of scalar character pointer structure components.
* fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
string length for the structure component from the component
expression.
From-SVN: r100400
2005-05-31 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/21732
* tree-ssa-copy.c (dump_copy_of): Create a bitmap and don't visit a
SSA_NAME twice and cause the loop to become finite. Remove the test
for val.
From-SVN: r100396
* doc/tm.texi (TARGET_GET_PCH_VALIDITY, TARGET_PCH_VALID_P): Tweak
the documentation to make it more future-proof.
(TARGET_CHECK_PCH_TARGET_FLAGS): Document this new hook.
* target.h (gcc_target): Add check_pch_target_flags.
* target-def.h (TARGET_CHECK_PCH_TARGET_FLAGS): New macro.
(TARGET_INITIALIZER): Include it.
* toplev.c (default_pch_valid_p): Use targetm.check_pch_target_flags.
* config/sh/sh.h (sh_pch_valid_p): Delete.
* config/sh/sh.c (TARGET_PCH_VALID_P, sh_pch_valid_p): Delete.
(sh_check_pch_target_flags): New function.
(TARGET_CHECK_PCH_TARGET_FLAGS): Override default.
From-SVN: r100392
* fold-const.c (extract_array_ref): Handle more cases,
do some useful canonicalization of the base.
(fold_binary): Explicitly deal with arrays of zero-sized
structures during folding of &a[i] == &a[j].
* gcc.dg/tree-ssa/foldaddr-1.c: New test.
From-SVN: r100391
2005-05-30 Pat Haugen <pthaugen@us.ibm.com>
* loop.c (loop_invariant_p, valid_initial_value_p): Use
regs_invalidated_by_call instead of call_used_regs.
From-SVN: r100378
* gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
* options.c (gfc_init_options): By default, allow legacy extensions
but warn about them.
(gfc_post_options): Make -pedantic warn about legacy extensions
even with -std=legacy.
(gfc_handle_option): Make -std=gnu follow the default behaviour
of warning about legacy extensions, but allowing them. Make the
new -std=legacy accept everything and warn about nothing.
* lang.opt (std=legacy): New F95 command line option.
* invoke.texi: Document both -std=f2003 and -std=legacy.
* gfortran.texi: Explain the two types of extensions and document
how they are affected by the various -std= command line options.
From-SVN: r100377
2005-05-30 Paolo Carlini <pcarlini@suse.de>
* include/std/std_complex.h (log(const complex<_Tp>&)): When
_GLIBCXX_USE_C99_COMPLEX, forward to __builtin_clog/clogf/clogl.
From-SVN: r100376
PR rtl-optimization/15422
* reg-stack.c (starting_stack_p): New static global.
(straighten_stack): Delete prototype. Change to update the stack
before the current insn.
(subst_stack_regs): Update call to straighten stack.
(emit_swap_insn): Delete prototype. For the first insn in a
basic block, update stack_in instead of emitting a real swap.
(change_stack): When changing the stack before the first insn
in a basic block, update stack_in instead of emitting real code.
(compensate_edges): Clear starting_stack_p during compensation.
(convert_regs_1): Keep track of starting_stack_p whilst processing
a basic block.
From-SVN: r100370
PR c++/21784
* name-lookup.c (do_nonmember_using_decl): Ignore builtin
functions, even when the used name is not a function.
PR c++/21784
* g++.dg/lookup/using14.C: New test.
From-SVN: r100365
* tree-outof-ssa.c (_elim_graph): Change the type of edge_list
to VEC(int,heap)*.
(new_elim_graph, clear_elim_graph, delete_elim_graph,
elim_graph_add_edge, elim_graph_remove_succ_edge,
FOR_EACH_ELIM_GRAPH_SUCC, FOR_EACH_ELIM_GRAPH_PRED): Use VEC
instead of VARRAY.
From-SVN: r100349
* ifcvt.c (noce_emit_move_insn): Construct a SET pattern directly
if the RHS isn't suitable for calling emit_move_insn.
Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r100329
2005-05-29 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/char_pointer_assign.f90:
Test character-pointerassignments and pointer assignments.
* gfortran.dg/char_pointer_dummy.f90:
Test character-pointer dummy arguments.
* gfortran.dg/char_pointer_func.f90:
Test character-pointer function returns.
* gfortran.dg/char_pointer_dependency.f90:
Test character-pointer functions with dependencies.
From-SVN: r100325