PR optimization/12440
* loop.c: Include ggc.h.
(loop_optimize): Run garbage collector between optimization of
loops.
* Makefile.in (loop.o): Add GGC_H dependency.
Paolo Carlini [Tue, 27 Jan 2004 09:29:36 +0000 (09:29 +0000)]
locale_facets.tcc (money_put::do_put(..., long double)): Use the basic_string constructor for char arrays...
2004-01-27 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc
(money_put::do_put(..., long double)): Use the basic_string
constructor for char arrays, not that for C-strings, to pass
__digits to do_put(..., const string_type&): __ws isn't
null-terminated.
2004-01-27 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (__pad<>::_S_pad):
Improve performance-wise: avoid one traits::copy, avoid
the __builtin_alloca, streamline.
Backport from mainline
2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10555, c++/10576
* pt.c (lookup_template_class): Handle class template with
multiple levels of parameters when one of the levels contain
errors.
* g++.dg/template/nontype4.C: New test.
* g++.dg/template/nontype5.C: Likewise.
* g++.dg/template/memclass1.C: New test.
Paolo Carlini [Sun, 25 Jan 2004 13:13:41 +0000 (13:13 +0000)]
re PR libstdc++/13650 (string::compare should not (always) use traits_type::length())
2004-01-25 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/13650
* include/bits/basic_string.tcc (compare(size_type, size_type,
const _CharT*, size_type)): Implement correctly the resolution
of DR 5: basically, s is a char array, -not- a C string.
combine.c (SHIFT_COUNT_TRUNCATED): Provide default value.
* combine.c (SHIFT_COUNT_TRUNCATED): Provide default value.
(simplify_comparison): Don't simplify (eq (zero_extract c 1 r) 0)
if SHIFT_COUNT_TRUNCATED is set.
J"orn Rennecke [Wed, 14 Jan 2004 18:11:36 +0000 (18:11 +0000)]
re PR target/9365 ([SH] segfault in gen_far_branch (config/sh/sh.c))
PR target/9365
* sh.c (gen_block_redirect): Add special handling of RETURN.
(gen_far_branch) Don't call gen_stuff_delay_slot if there is no
far branch target (i.e. it's a return).
Hartmut Penner [Wed, 14 Jan 2004 14:03:58 +0000 (14:03 +0000)]
* gcc/config/rs6000/rs6000.c (rs6000_stack_info)
Calculate always vrsave_mask if TARGET_ALTIVEC.
(rs6000_emit_prologue): Emit code for vrsave
only if TARGET_ALTIVEC_VRSAVE.
(rs6000_emit_epilogue): Likewise.
Nicola Pero [Wed, 14 Jan 2004 07:52:39 +0000 (08:52 +0100)]
re PR objc/7993 (private variables cannot be shadowed in subclasses)
PR objc/7993
* objc-act.c (is_private): Do not emit the 'instance variable %s
is declared private' error.
(is_public): Emit the error after calling is_private.
(lookup_objc_ivar): If the instance variable is private, return 0
- the instance variable is invisible here.
Matthias Klose [Mon, 12 Jan 2004 09:02:27 +0000 (09:02 +0000)]
backport: re PR rtl-optimization/12441 (Can't spill register bug)
2004-01-12 Matthias Klose <doko@debian.org>
Backport from mainline
2004-01-11 Richard Henderson <rth@redhat.com>
PR opt/12441
Revert: Sat Mar 30 14:08:55 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.c (aligned_operand): Be prepared for SUBREGed registers.
(ix86_decompose_address): Use REG_P instead of GET_CODE (...) == REG.
(ix86_address_cost): Be prepared for SUBREGed registers.
(legitimate_address_p): Accept SUBREGed registers.
alpha.c (alpha_encode_section_info): Use 'I' for TLS_MODEL_INITIAL_EXEC.
* config/alpha/alpha.c (alpha_encode_section_info): Use 'I'
for TLS_MODEL_INITIAL_EXEC.
(tls_symbolic_operand_1): Update to match.
(tls_symbolic_operand_type): Likewise.
Jakub Jelinek [Sun, 11 Jan 2004 19:13:12 +0000 (20:13 +0100)]
re PR middle-end/13392 (ICE in convert_from_eh_region_ranges_1, at except.c:1133)
PR middle-end/13392
* builtins.c (expand_builtin_expect_jump): Handle conditional jumps
to drop through label. Don't fall back to SCC even when conditional
jump has not been found.
Gabriel Dos Reis [Sun, 11 Jan 2004 00:56:01 +0000 (00:56 +0000)]
re PR c++/13544 ("conflicting types" for enums in different scopes)
PR c++/13544
* decl.c (build_enumerator): Set DECL_CONTEXT after the
enumerator
has been pushed.
(pushdecl): Don't use DECL_NAMESPACE_SCOPE_P to test whether a
decl has a namespace-scope; that isn't really what it means.
Nathanael Nerode [Sat, 10 Jan 2004 00:02:25 +0000 (00:02 +0000)]
backport: [multiple changes]
2004-01-02 Nathanael Nerode <neroden@gcc.gnu.org>
PR target/13069
Backport the following from mainline:
2003-03-08 Neil Booth <neil@daikokuya.co.uk>
* config/sh/rtemself.h (TARGET_OS_CPP_BUILTINS): Use instead of
CPP_PREDEFINES.
* config/sh/rtems.h (TARGET_OS_CPP_BUILTINS): Use instead of
CPP_PREDEFINES.
2003-09-27 Kelley Cook <kcook@gcc.gnu.org>
* config/sh/rtemself.h, config/sh/rtems.h: GNU CC -> GCC.
Paolo Carlini [Wed, 7 Jan 2004 11:57:35 +0000 (11:57 +0000)]
re PR libstdc++/13007 (basic_streambuf::pubimbue, imbue wrong)
2004-01-07 Paolo Carlini <pcarlini@suse.de>
Petur Runolfsson <peturr02@ru.is>
PR libstdc++/13007
* include/bits/fstream.tcc (imbue): Don't touch the stored
locale.
* include/std/std_streambuf.h (imbue): According to the
standard, base class version does nothing.
(pubimbue): Store the locale.
Roger Sayle [Thu, 1 Jan 2004 04:44:59 +0000 (04:44 +0000)]
re PR fortran/12632 ([g77 only] -fbounds-check ICE)
PR fortran/12632
* tree.c (integer_nonzerop): New predicate for nonzero integers.
* tree.h (integer_nonzerop): Add function prototype.
* fold-const.c (fold) <COND_EXPR>: Don't fold a constant condition,
if we'd replace a COND_EXPR of non-void type by one of its operands
of void type.
* com.c (ffecom_subscript_check_): Take as an extra argument the
(possibly NULL) decl of the array. Don't create unnecessary tree
nodes if the array index is known to be safe at compile-time.
If the array index is unsafe, force the array decl into memory to
avoid RTL expansion problems.
(ffecom_array_ref_): Update calls to ffecom_subscript_check_.
(ffecom_char_args_x_): Likewise.
Kazu Hirata [Thu, 1 Jan 2004 00:24:24 +0000 (00:24 +0000)]
backport: re PR target/13373 (optimization with -frerun-cse-after-loop -fexpensive-optimizations produces wrong code on mcore)
Backport from mainline:
2003-09-12 Richard Sandiford <rsandifo@redhat.com>
PR target/13373
* config/mcore/mcore-protos.h (mcore_r15_operand_p): Declare.
(mcore_secondary_reload_class): Declare.
(mcore_output_inline_const_forced): Remove.
* config/mcore/mcore.md (movsi): Remove the code that forced
non-inlineable constants into a register if the target was r15
or the stack pointer. Remove constant restrictions from the main
define_insn. Remove r <- I, r <- M and r <- N alternatives in favor
of an r <- P alternative. Remove fallback define_insn for reload.
(movhi, movqi): Use gen_lowpart rather than gen_SUBREG. Remove reload
define_insn. Use mcore_output_move in the remaining define_insn.
Adjust condition and constraints in the way as for movsi.
(movdi): Always split unacceptable constants into two. Use
simplify_gen_subreg instead of operand_subword{,_force}.
* config/mcore/mcore.c (mcore_output_inline_const_forced): Remove.
(mcore_output_move): Support HImode and QImode moves as well.
(mcore_m15_operand_p): New function.
(mcore_reload_class): Use it to detect cases where LRW_REGS are better.
(mcore_secondary_reload_class): New function.
* config/mcore/mcore.h (SECONDARY_RELOAD_CLASS): Redefine in
terms of mcore_secondary_reload_class.
Zack Weinberg [Wed, 31 Dec 2003 23:45:39 +0000 (23:45 +0000)]
ia64.c (ia64_va_arg): Pass pointer for variable-sized type through convert_memory_address.
* config/ia64/ia64.c (ia64_va_arg): Pass pointer for
variable-sized type through convert_memory_address.
(ia64_in_small_data_p): Always return false for FUNCTION_DECLs.