* cp-demangle.c (d_encoding): Exit early on error.
(d_pointer_to_member_type): Exit early if cplus_demangle_type
returns NULL.
(cplus_demangle_type): Likewise.
* testsuite/demangle-expected: New testcase.
From-SVN: r122972
* tree-ssa-loop-niter.c (record_estimate): Add "upper" argument.
Update constant estimates of number of iterations.
(record_nonwrapping_iv): Add "upper" argument. "data_size_bounds_p"
argument renamed to "realistic".
(compute_estimated_nb_iterations): Removed.
(record_niter_bound): New function.
(idx_infer_loop_bounds): For possible but unlikely tail arrays,
call record_nonwrapping_iv with upper = false.
(infer_loop_bounds_from_signedness): Pass upper argument to
record_nonwrapping_iv.
(estimate_numbers_of_iterations_loop): Do not call
compute_estimated_nb_iterations. Record estimate based on profile
information. Initialize the constant estimates of number of
iterations.
* tree-data-ref.c (estimated_loop_iterations): Return the recorded
estimates.
* tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Add dump when
number of iterations is too small.
* cfgloop.h (struct nb_iter_bound): Remove "realistic" field.
(EST_NOT_AVAILABLE): Removed.
(struct loop): Replace estimated_nb_iterations by any_upper_bound,
nb_iterations_upper_bound, any_estimate and nb_iterations_estimate
fields.
* gcc.dg/tree-ssa/prefetch-5.c: New test.
From-SVN: r122969
2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/30891
cp/
* parser.c (cp_parser_statement): If 'namespace' is found, this
only can be a namespace alias definition, so parse it now.
(cp_parser_namespace_alias_definition): if we find an open brace
instead of '=', then this is actually a misplaced namespace
definition.
testsuite/
* g++.dg/parse/namespace-definition.C: New.
From-SVN: r122962
2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/24924
* c-opts.c (c_common_post_options): Handle C++ post-processing here.
Set also -pedantic-errors by default for the preprocessor unless
-fpermissive is given.
cp/
* decl.c (cxx_init_decl_processing): Move command-line options
processing to c-opts.c.
testsuite/
* g++.dg/cpp/pedantic-errors.C: New.
* g++.dg/cpp/permissive.C: New.
From-SVN: r122961
2007-03-15 Richard Guenther <rguenther@suse.de>
PR middle-end/29719
PR middle-end/31161
* builtins.c (expand_builtin_int_roundingfn): Always fall
back to floor/ceil and its variants even if they may be
not available.
(expand_builtin_cexpi): As a fallback if we
don't have builtins for sincos or cexp create a function
declaration for cexp and expand to a call to that.
From-SVN: r122958
* cfglayout.c (fixup_reorder_chain): Postpone deleting dead
jump tables, move the call to delete_dead_jumptables from here...
(cfg_layout_finalize): ...to here. But rebuild jump labels first.
* cfgrtl.c (cfg_layout_can_merge_blocks_p): When not optimizing,
don't allow merging of blocks that try_redirect_by_replacing_jump
also does not handle when not optimizing.
From-SVN: r122957
2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
* ptree.c (cxx_print_type): Use formatting markup for integers
when printing template parameter index/level/orig level.
(cxx_print_xnode): Ditto.
* cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
(struct template_parm_index_s): Remove the PARAMETER_PACK member.
Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
HOST_WIDE_INTs.
(struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
rather than a HOST_WIDE_INT.
Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
better bit-packing.
(struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
IN_BASE_INITIALIZER bool bitfields.
(struct cp_declarator): Make KIND a 4-bit field. Make
PARAMETER_PACK_P a bool bitfield just after KIND.
* pt.c (uses_parameter_packs): Destroy the pointer set.
(make_pack_expansion): Ditto.
(check_for_bare_parameter_packs): Ditto.
* name-lookup.c (push_to_top_level): Make need_pop a bool value.
From-SVN: r122955
2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/30922
* decl.c (gfc_match_import): If the parent of the current name-
space is null, try looking for an imported symbol in the parent
of the proc_name interface.
* resolve.c (resolve_fl_variable): Do not check for blocking of
host association by a same symbol, if the symbol is in an
interface body.
2007-03-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30879
* decl.c (match_data_constant): Before going on to try to match
a name, try to match a structure component.
PR fortran/30870
* resolve.c (resolve_actual_arglist): Do not reject a generic
actual argument if it has a same name specific interface.
PR fortran/31163
* trans-array.c (parse_interface): Do not nullify allocatable
components if the symbol has the saved attribute.
2007-03-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30922
* gfortran.dg/import5.f90.f90: New test.
PR fortran/30879
* gfortran.dg/data_components_1.f90: New test.
PR fortran/30870
* gfortran.dg/generic_13.f90: New test.
PR fortran/31163
* gfortran.dg/alloc_comp_basics_5.f90: New test.
From-SVN: r122944
2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c++/31165
* call.c (convert_default_arg): Instead of copying the node,
unshare it.
2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C++/31165
* g++.dg/other/default7.C: New test.
From-SVN: r122941
2007-03-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/31051
* io/transfer.c (formatted_transfer_scalar): Adjust position for pending
spaces when in writing mode. Clean up some formatting.
From-SVN: r122940
* tree-loop-linear.c (gather_interchange_stats): For multidimensional
arrays, multiply the access strides by the size of the sub-array.
* testsuite/gcc.dg/tree-ssa/ltrans-5.c: New.
From-SVN: r122935
gcc/
200x-xx-xx Richard Sandiford <richard@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
* gthr-vxworks.h: Add an extern "C" wrapper for C++.
(__gthread_once_t): Remove busy field for RTPs.
(__GTHREAD_ONCE_INIT): Update accordingly.
Co-Authored-By: Phil Edwards <phil@codesourcery.com>
From-SVN: r122923
* trans-array.c (gfc_trans_auto_array_allocation): Replace
fold(convert()) by fold_convert().
(gfc_duplicate_allocatable): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
build_int_cst instead of converting an integer_zero_node
to the final type.
From-SVN: r122921
* testsuite/lib/libstdc++.exp (check_v3_target_fileio,
check_v3_target_time): New.
* testsuite/lib/dg-options.exp (dg-require-fileio,
dg-require-time): New.
* testsuite/ext/stdio_sync_filebuf/char/12048-1.cc: Use it.
* testsuite/ext/stdio_sync_filebuf/char/12048-2.cc: Use it.
* testsuite/ext/stdio_sync_filebuf/char/12048-3.cc: Use it.
* testsuite/ext/stdio_sync_filebuf/char/12048-4.cc: Use it.
* testsuite/ext/stdio_sync_filebuf/char/1.cc: Use it.
* testsuite/ext/stdio_filebuf/char/2.cc: Use it.
* testsuite/ext/stdio_filebuf/char/10063-1.cc: Use it.
* testsuite/ext/stdio_filebuf/char/10063-2.cc: Use it.
* testsuite/ext/stdio_filebuf/char/10063-3.cc: Use it.
* testsuite/22_locale/time_put/put/char/12439_1.cc: Use it.
* testsuite/22_locale/time_put/put/char/12439_3.cc: Use it.
* testsuite/27_io/basic_ofstream/open/char/1.cc: Use it.
* testsuite/27_io/basic_ofstream/cons/char/2.cc: Use it.
* testsuite/27_io/objects/char/12048-2.cc: Use it.
* testsuite/27_io/objects/char/12048-4.cc: Use it.
* testsuite/27_io/objects/char/12048-1.cc: Use it.
* testsuite/27_io/objects/char/12048-3.cc: Use it.
* testsuite/27_io/objects/char/10.cc: Use it.
* testsuite/27_io/objects/char/12048-5.cc: Use it.
* testsuite/27_io/basic_istream/get/char/2.cc: Use it.
* testsuite/27_io/basic_istream/ignore/char/2.cc: Use it.
* testsuite/27_io/basic_istream/ignore/char/3.cc: Use it.
* testsuite/27_io/basic_istream/getline/char/5.cc: Use it.
* testsuite/27_io/basic_istream/seekg/char/sstream.cc: Use it.
* testsuite/27_io/basic_istream/seekg/char/fstream.cc: Use it.
* testsuite/27_io/basic_istream/readsome/char/6746-2.cc: Use it.
* testsuite/27_io/basic_istream/extractors_other/char/2.cc: Use it.
* testsuite/27_io/basic_istream/tellg/char/sstream.cc: Use it.
* testsuite/27_io/basic_istream/tellg/char/1.cc: Use it.
* testsuite/27_io/basic_istream/tellg/char/fstream.cc: Use it.
* testsuite/27_io/basic_istream/extractors_character/char/4.cc: Use it.
* testsuite/27_io/basic_ostream/inserters_other/char/1.cc: Use it.
* testsuite/27_io/basic_ostream/tellp/char/1.cc: Use it.
* testsuite/27_io/basic_ostream/seekp/char/2346-fstream.cc: Use it.
* testsuite/27_io/basic_ifstream/open/char/1.cc: Use it.
* testsuite/27_io/basic_ifstream/cons/char/1.cc: Use it.
* testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc: Use it.
* testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc: Use it.
* testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc: Use it.
* testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc: Use it.
* testsuite/27_io/basic_filebuf/sgetn/char/3.cc: Use it.
* testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: Use it.
* testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Use it.
* testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: Use it.
* testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/12790-1.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/12790-2.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/12790-3.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/12790-4.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/3-out.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/11543.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/12790-1.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/12790-2.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/12790-3.cc: Use it.
* testsuite/27_io/basic_filebuf/seekoff/char/12790-4.cc: Use it.
* testsuite/27_io/basic_filebuf/in_avail/char/1.cc: Use it.
* testsuite/27_io/basic_filebuf/in_avail/char/9701-3.cc: Use it.
* testsuite/27_io/basic_filebuf/setbuf/char/1.cc: Use it.
* testsuite/27_io/basic_filebuf/setbuf/char/2.cc: Use it.
* testsuite/27_io/basic_filebuf/setbuf/char/3.cc: Use it.
* testsuite/27_io/basic_filebuf/setbuf/char/12875-1.cc: Use it.
* testsuite/27_io/basic_filebuf/setbuf/char/12875-2.cc: Use it.
* testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc: Use it.
* testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc: Use it.
* testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc: Use it.
* testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc: Use it.
* testsuite/27_io/basic_filebuf/sbumpc/char/9825.cc: Use it.
* testsuite/27_io/basic_filebuf/is_open/char/1.cc: Use it.
* testsuite/27_io/basic_filebuf/sputc/char/1-io.cc: Use it.
* testsuite/27_io/basic_filebuf/sputc/char/1-out.cc: Use it.
* testsuite/27_io/basic_filebuf/sputc/char/2-io.cc: Use it.
* testsuite/27_io/basic_filebuf/sputc/char/2-out.cc: Use it.
* testsuite/27_io/basic_filebuf/open/12790-1.cc: Use it.
* testsuite/27_io/basic_filebuf/open/char/1.cc: Use it.
* testsuite/27_io/basic_filebuf/open/char/2.cc: Use it.
* testsuite/27_io/basic_filebuf/open/char/3.cc: Use it.
* testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc: Use it.
* testsuite/27_io/basic_filebuf/overflow/char/2.cc: Use it.
* testsuite/27_io/basic_filebuf/overflow/char/9988.cc: Use it.
* testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Use it.
* testsuite/27_io/basic_filebuf/overflow/char/9169.cc: Use it.
* testsuite/27_io/basic_filebuf/snextc/char/1-in.cc: Use it.
* testsuite/27_io/basic_filebuf/snextc/char/1-io.cc: Use it.
* testsuite/27_io/basic_filebuf/snextc/char/2-in.cc: Use it.
* testsuite/27_io/basic_filebuf/snextc/char/2-io.cc: Use it.
* testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc: Use it.
* testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc: Use it.
* testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc: Use it.
* testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc: Use it.
* testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc: Use it.
* testsuite/27_io/basic_filebuf/close/12790-1.cc: Use it.
* testsuite/27_io/basic_filebuf/close/char/1.cc: Use it.
* testsuite/27_io/basic_filebuf/close/char/12790-1.cc: Use it.
* testsuite/27_io/basic_filebuf/close/char/12790-2.cc: Use it.
* testsuite/27_io/basic_filebuf/close/char/2.cc: Use it.
* testsuite/27_io/basic_filebuf/close/char/12790-3.cc: Use it.
* testsuite/27_io/basic_filebuf/close/char/12790-4.cc: Use it.
* testsuite/27_io/basic_filebuf/close/char/4.cc: Use it.
* testsuite/27_io/basic_filebuf/underflow/10096.cc: Use it.
* testsuite/27_io/basic_filebuf/underflow/char/2.cc: Use it.
* testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc: Use it.
* testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc: Use it.
* testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc: Use it.
* testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/12790-1.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/12790-2.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/12790-3.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/char/12790-1.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/char/12790-2.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/char/12790-4.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc: Use it.
* testsuite/27_io/basic_filebuf/seekpos/char/3-out.cc: Use it.
* testsuite/27_io/basic_filebuf/sputn/char/1-io.cc: Use it.
* testsuite/27_io/basic_filebuf/sputn/char/1-out.cc: Use it.
* testsuite/27_io/basic_filebuf/sputn/char/2-io.cc: Use it.
* testsuite/27_io/basic_filebuf/sputn/char/2-out.cc: Use it.
* testsuite/27_io/basic_filebuf/sputn/char/9339.cc: Use it.
* testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc: Use it.
* testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Use it.
* testsuite/21_strings/basic_string/inserters_extractors/char/10.cc: Use it.
* testsuite/21_strings/basic_string/inserters_extractors/char/11.cc: Use it.
* testsuite/21_strings/basic_string/inserters_extractors/char/5.cc: Use it.
From-SVN: r122913
2007-03-13 Seongbae Park <seongbae.park@gmail.com>
PR tree-optimization/30590
* tree-nrv.c (tree_nrv): Check for the partial update of the
return value.
From-SVN: r122909