summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-02-10 05:41:50 +0000
committerkan <kan@FreeBSD.org>2003-02-10 05:41:50 +0000
commit793833d7a78bb624965885760593495e7079d705 (patch)
treef843ff90d71b900271088361ed96ff82eb2a365d
parent1b04fed26051ebc88f26a7bb93c63c270970e773 (diff)
downloadFreeBSD-src-793833d7a78bb624965885760593495e7079d705.zip
FreeBSD-src-793833d7a78bb624965885760593495e7079d705.tar.gz
Gcc 3.2.2-release.
-rw-r--r--contrib/gcc/ChangeLog528
-rw-r--r--contrib/gcc/Makefile.in249
-rw-r--r--contrib/gcc/alias.c17
-rw-r--r--contrib/gcc/basic-block.h3
-rw-r--r--contrib/gcc/builtin-types.def4
-rw-r--r--contrib/gcc/builtins.c9
-rw-r--r--contrib/gcc/c-common.c65
-rw-r--r--contrib/gcc/c-common.h5
-rw-r--r--contrib/gcc/c-decl.c54
-rw-r--r--contrib/gcc/c-format.c2
-rw-r--r--contrib/gcc/c-parse.in3
-rw-r--r--contrib/gcc/c-semantics.c3
-rw-r--r--contrib/gcc/c-typeck.c36
-rw-r--r--contrib/gcc/calls.c56
-rw-r--r--contrib/gcc/cfganal.c11
-rw-r--r--contrib/gcc/cfgbuild.c5
-rw-r--r--contrib/gcc/cfgcleanup.c2
-rw-r--r--contrib/gcc/combine.c9
-rw-r--r--contrib/gcc/config.gcc9
-rw-r--r--contrib/gcc/config/alpha/t-osf46
-rw-r--r--contrib/gcc/config/arm/t-netbsd6
-rw-r--r--contrib/gcc/config/i386/cygwin.h12
-rw-r--r--contrib/gcc/config/i386/i386.c2
-rw-r--r--contrib/gcc/config/i386/i386.h4
-rw-r--r--contrib/gcc/config/i386/mingw32.h4
-rw-r--r--contrib/gcc/config/rs6000/linux.h46
-rw-r--r--contrib/gcc/config/rs6000/rs6000-protos.h1
-rw-r--r--contrib/gcc/config/rs6000/rs6000.c116
-rw-r--r--contrib/gcc/config/rs6000/rs6000.md161
-rw-r--r--contrib/gcc/config/rs6000/rtems.h7
-rw-r--r--contrib/gcc/config/rs6000/sysv4.h18
-rw-r--r--contrib/gcc/config/rs6000/t-aix432
-rw-r--r--contrib/gcc/config/rs6000/t-rtems86
-rw-r--r--contrib/gcc/config/t-slibgcc-elf-ver8
-rw-r--r--contrib/gcc/config/t-slibgcc-sld8
-rwxr-xr-xcontrib/gcc/configure2
-rw-r--r--contrib/gcc/configure.in2
-rw-r--r--contrib/gcc/cp/ChangeLog117
-rw-r--r--contrib/gcc/cp/Make-lang.in83
-rw-r--r--contrib/gcc/cp/NEWS24
-rw-r--r--contrib/gcc/cp/cp-tree.h10
-rw-r--r--contrib/gcc/cp/cvt.c2
-rw-r--r--contrib/gcc/cp/decl.c12
-rw-r--r--contrib/gcc/cp/decl2.c73
-rw-r--r--contrib/gcc/cp/error.c28
-rw-r--r--contrib/gcc/cp/except.c2
-rw-r--r--contrib/gcc/cp/init.c2
-rw-r--r--contrib/gcc/cp/operators.def9
-rw-r--r--contrib/gcc/cp/parse.y4
-rw-r--r--contrib/gcc/cp/pt.c52
-rw-r--r--contrib/gcc/cp/rtti.c12
-rw-r--r--contrib/gcc/cp/search.c66
-rw-r--r--contrib/gcc/cp/semantics.c20
-rw-r--r--contrib/gcc/cp/tree.c15
-rw-r--r--contrib/gcc/cp/typeck.c16
-rw-r--r--contrib/gcc/cpplib.c45
-rw-r--r--contrib/gcc/dbxout.c60
-rw-r--r--contrib/gcc/doc/cpp.14
-rw-r--r--contrib/gcc/doc/gcc.124
-rw-r--r--contrib/gcc/doc/gcc.texi2
-rw-r--r--contrib/gcc/doc/gcov.14
-rw-r--r--contrib/gcc/doc/gcov.texi2
-rw-r--r--contrib/gcc/doc/include/gcc-common.texi4
-rw-r--r--contrib/gcc/doc/invoke.texi28
-rw-r--r--contrib/gcc/doc/passes.texi3
-rw-r--r--contrib/gcc/doc/tm.texi1
-rw-r--r--contrib/gcc/doloop.c18
-rw-r--r--contrib/gcc/emit-rtl.c96
-rw-r--r--contrib/gcc/expr.c16
-rw-r--r--contrib/gcc/expr.h6
-rw-r--r--contrib/gcc/f/ChangeLog15
-rw-r--r--contrib/gcc/f/Make-lang.in48
-rw-r--r--contrib/gcc/f/g77.131
-rw-r--r--contrib/gcc/f/invoke.texi27
-rw-r--r--contrib/gcc/f/root.texi2
-rw-r--r--contrib/gcc/f/version.c2
-rw-r--r--contrib/gcc/fold-const.c26
-rw-r--r--contrib/gcc/function.c5
-rw-r--r--contrib/gcc/gcc.c5
-rw-r--r--contrib/gcc/ginclude/stddef.h39
-rw-r--r--contrib/gcc/global.c19
-rw-r--r--contrib/gcc/gthr-rtems.h3
-rw-r--r--contrib/gcc/hashtab.c8
-rw-r--r--contrib/gcc/integrate.c7
-rw-r--r--contrib/gcc/jump.c29
-rw-r--r--contrib/gcc/loop.c11
-rw-r--r--contrib/gcc/mklibgcc.in8
-rw-r--r--contrib/gcc/optabs.c37
-rw-r--r--contrib/gcc/print-rtl.c6
-rw-r--r--contrib/gcc/recog.c4
-rw-r--r--contrib/gcc/rtlanal.c6
-rw-r--r--contrib/gcc/stmt.c25
-rw-r--r--contrib/gcc/tradcpp.c8
-rw-r--r--contrib/gcc/tree.c5
-rw-r--r--contrib/gcc/tree.def9
-rw-r--r--contrib/gcc/tree.h5
-rw-r--r--contrib/gcc/unwind-dw2.c5
-rw-r--r--contrib/gcc/version.c2
98 files changed, 2106 insertions, 712 deletions
diff --git a/contrib/gcc/ChangeLog b/contrib/gcc/ChangeLog
index e74c1ef..c8f8970 100644
--- a/contrib/gcc/ChangeLog
+++ b/contrib/gcc/ChangeLog
@@ -1,3 +1,530 @@
+2003-02-05 Release Manager
+
+ * GCC 3.2.2 Released.
+
+2003-02-03 Chris Lingard <chris@stockwith.co.uk>
+ Dan Osterrath <do3@mail.inf.tu-dresden.de>
+
+ * configure.in: Handle binutils versions with 4 dot separated
+ numbers.
+ * configure: Rebuilt.
+
+2003-02-03 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ Backport following patch:
+
+ 2002-08-01 Richard Henderson <rth@redhat.com>
+
+ * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it
+ refers to a subroutine parameter.
+
+2003-02-03 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR ice-on-legal-code/9493
+ * cfgcleanup.c (try_forward_edges): Check for null insn.
+
+2003-02-03 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+ Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR wrong-code/9492
+ Backport following patches:
+
+ 2002-09-16 Richard Henderson <rth@redhat.com>
+
+ * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE
+ as well as OFFSET for BITPOS.
+
+ 2002-09-08 Jan Hubicka <jh@suse.cz>
+
+ * emit-rtl.c (set_mem_attributes_minus_bitpos): Fix array_ref
+ handling.
+
+ 2002-07-29 Richard Henderson <rth@redhat.com>
+
+ * emit-rtl.c (set_mem_attributes_minus_bitpos): Rename from
+ set_mem_attributes and add BITPOS argument. Subtract it from
+ OFFSET when same is adjusted.
+ (set_mem_attributes): New wrapper function.
+ * expr.c (expand_assignment): Use set_mem_attributes_minus_bitpos;
+ remove offset adjustment hack.
+ * expr.h (set_mem_attributes_minus_bitpos): Declare.
+
+ 2002-07-25 Richard Henderson <rth@redhat.com>
+
+ * emit-rtl.c (set_mem_attributes): Fix size and alignment thinkos
+ in ARRAY_REF of DECL_P case.
+
+ 2002-07-21 Richard Henderson <rth@redhat.com>
+
+ * emit-rtl.c (set_mem_attributes): Preserve indirection of PARM_DECL
+ when flag_argument_noalias == 2.
+ * alias.c (nonoverlapping_memrefs_p): Handle that.
+ * print-rtl.c (print_mem_expr): Likewise.
+
+ 2002-06-03 Dan Nicolaescu <dann@godzilla.ics.uci.edu>
+
+ * alias.c (nonoverlapping_memrefs_p): Fix off by one error.
+
+2003-02-03 Steve Ellcey <sje@cup.hp.com>
+
+ * config/pa/pa64-hpux.h (INIT_ENVIRONMENT): New.
+
+2003-02-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/9465
+ * tradcpp.c (fixup_newlines): Use memchr instead of strchr.
+
+2003-01-31 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * pa.c (pa_output_function_prologue, pa_output_function_epilogue): Move
+ updating of total_code_bytes from prologue to epilogue.
+ (get_last_nonnote_insn): New function.
+
+2003-01-31 Jan Hubicka <jh@suse.cz>
+
+ PR c/9506
+ * i386.c (override_options): Use DEFAULT_PCC_STRUCT_RETURN.
+
+2003-01-30 Andreas Schwab <schwab@suse.de>
+
+ * config/m68k/m68k.md (tablejump+2): Don't sign extend an address
+ register.
+ * config/m68k/apollo68.h (ASM_RETURN_CASE_JUMP): Likewise.
+ * config/m68k/coff.h (ASM_RETURN_CASE_JUMP): Likewise.
+ * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Likewise.
+ * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
+ * config/m68k/mot3300.h (ASM_RETURN_CASE_JUMP): Likewise.
+ * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
+ * config/m68k/pbb.h (ASM_RETURN_CASE_JUMP): Likewise.
+
+2003-01-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ PR target/9316
+ * config/rs6000/rtems.h: Add CPP_OS_DEFAULT_SPEC.
+ * config/rs6000/sysv4.h: Add CPP_OS_RTEMS_SPEC.
+ * config/rs6000/t-rtems: New file. multilib variants to match OS.
+ * config.gcc (powerpc-*-rtems*): Use rs6000/t-rtems instead of
+ rs6000/t-ppcgas so we get the desired multilibs.
+
+2003-01-29 Joel Sherrill <joel@OARcorp.com>
+
+ PR bootstrap/9296
+ * gthr-rtems.h: Define __GTHREAD_MUTEX_INIT. Apparently no code
+ depended on it being defined until now.
+
+2003-01-29 Joel Sherrill <joel@OARcorp.com>
+
+ PR target/9295
+ * config/mips/rtems.h: Predefine __USE_INIT_FINI__ so generic
+ RTEMS code knows which C++ initialization style the toolset
+ configuration is using.
+
+2003-01-29 Joel Sherrill <joel@OARcorp.com>
+
+ PR bootstrap/9293
+ * config/m68k/t-crtstuff: Replace spaces with tabs, add
+ $(MULTILIB_CFLAGS) as compiler option and multilib crtbegin/end.o.
+
+2003-01-29 Joel Sherrill <joel@OARcorp.com>
+
+ PR bootstrap/9292
+ * config.gcc (hppa1.1-rtems): Did not include t-rtems nor enable
+ RTEMS threads.
+ * config/pa/rtems.h (LIB_SPEC): Use -N when linking.
+
+2003-01-28 Christian Cornelssen <ccorn@cs.tu-berlin.de>
+
+ * doc/install.texi: Add documentation for installation into
+ tooldirs and with DESTDIR.
+
+ * Makefile.in (ORDINARY_FLAGS_TO_PASS): Also pass DESTDIR.
+ (install-cpp, uninstall-cpp, installdirs, install-common)
+ (install-driver, install-info, install-man)
+ (install-headers, install-include-dir, install-headers-tar)
+ (install-headers-cpio, install-headers-cp, install-collect2)
+ (uninstall): Prepend $(DESTDIR) to destination paths in all
+ (un)installation commands.
+ (install-driver): Rewrite $(LN) commands to support DESTDIR
+ with "ln" as well as with "ln -s".
+ (installdirs): Simply use mkinstalldirs.
+ (install-libgcc, install-multilib): Also pass DESTDIR.
+ * mklibgcc.in: Prepend $(DESTDIR) to $(libsubdir) in the
+ installation destination variable ldir.
+ * config/alpha/t-osf4 (SHLIB_INSTALL): Prepend $$(DESTDIR)
+ to $$(slibdir) in the installation commands.
+ * config/arm/t-netbsd (SHLIB_INSTALL): Likewise.
+ * config/mips/t-iris6 (SHLIB_INSTALL): Likewise.
+ * config/pa/t-hpux-shlib (SHLIB_INSTALL): Likewise.
+ * config/rs6000/t-aix43 (SHLIB_INSTALL): Likewise.
+ * config/t-slibgcc-elf-ver (SHLIB_INSTALL): Likewise.
+ * config/t-slibgcc-sld (SHLIB_INSTALL): Likewise.
+ * config/arc/t-arc (install-multilib-arc): Prepend $(DESTDIR) to
+ $(libsubdir) in the installation commands.
+
+2003-01-28 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
+ Backport patches
+
+ 2002-10-04 Loren J. Rittle <ljrittle@acm.org>
+
+ * gcc/ginclude/stddef.h: Support the FreeBSD 5 typedef system.
+
+ 2002-08-01 Stan Shebs <shebs@apple.com>
+ Andreas Tobler <toa@pop.agri.ch>
+
+ * ginclude/stddef.h (_BSD_SIZE_T_DEFINED_): Define if not defined,
+ plays nice with Darwin headers.
+ (_BSD_RUNE_T_DEFINED_): Likewise.
+
+2003-01-27 Gabriel Dos_Reis <gdosreis@sophia.inria.fr>
+
+ PR objc/9267
+ * c-parse.in: Remove '%expect 31' directive in objc mode.
+
+2003-01-27 Richard Earnshaw <rearnsha@arm.com>
+
+ * function.c (purge_addressof_1): After pushing anaddressed register
+ onto the stack, simplify the result.
+
+2003-01-25 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * combine.c (nonzero_bits): Revert 2003-01-25 change.
+ (num_sign_bit_copies): Likewise.
+
+2003-01-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ * doc/passes.texi: Fix typo.
+
+2003-01-25 Bruce Korb <bkorb@gnu.org>
+
+ * fixinc/fixfixes.c(wrap_fix): the wrapper guard must be a function
+ of *both* the file name and the fix name.
+
+2003-01-25 Eric Botcazou <ebotcazou@libertysurf.fr>
+ Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
+
+ PR optimization/9279
+
+ Merge from mainline:
+
+ 2002-07-10 Roger Sayle <roger@eyesopen.com>
+
+ PR c/2454
+ * combine.c (nonzero_bits): LOAD_EXTEND_OP should only apply
+ to SUBREGs of MEMs. (num_sign_bit_copies): Likewise.
+
+2003-01-25 Jan Hubicka <jh@suse.cz>
+
+ PR fortran/9258
+ * global.c (struct allocno): Add no_stack_reg.
+ (global_conflicts): Set no_stack_reg.
+ (find_reg): Use it.
+
+2003-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ * doc/passes.texi: Fix typo.
+
+2003-01-24 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * pa.md (call_internal_reg, call_value_internal_reg): If TARGET_GAS and
+ not TARGET_SOM, use $PIC_pcrel$0 rather than symbol difference for long
+ PIC calls to $$dyncall.
+ * pa.c (output_call): Likewise.
+
+2003-01-23 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ PR java/6748
+ * config/rs6000/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Don't destroy
+ regs->nip. Fix rt_sigreturn frame layout. Add support for newer
+ kernels.
+
+ * config/rs6000/rs6000.c (rs6000_binds_local_p): New functiion.
+ (rs6000_encode_section_info): Use it.
+
+2003-01-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR other/7341
+ * invoke.texi (ftest-coverage): Fix broken cross-reference.
+ Change @code to @command for gcov command.
+
+ * gcc.texi: Adjust title of gcov section.
+ * gcov.texi: Likewise.
+
+2003-01-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR other/7448
+ * doc/passes.texi (fssa-ccp): Remove misplaced line.
+
+2003-01-21 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
+
+ PR opt/7507
+ * calls.c (fix_unsafe_tree): Split out from ...
+ (expand_call): ... here. Use it on the function address too.
+
+2003-01-19 Roger Sayle <roger@eyesopen.com>
+
+ * config/pa/pa.md (muldi3): Avoid invalid sharing of SUBREG RTXs.
+
+2003-01-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * pa-linux.h (DWARF2_UNWIND_INFO, INCOMING_RETURN_ADDR_RTX,
+ DWARF_FRAME_RETURN_COLUMN): Delete defines.
+ (FUNCTION_OK_FOR_SIBCALL): Define to 1.
+
+2003-01-17 Jim Wilson <wilson@redhat.com>
+
+ * dbxout.c (dbxout_fptype_value): New.
+ (dbxout_type, case COMPLEX_TYPE): Call it. Use 'R' instead of 'r'.
+
+2003-01-15 Stephane Carrez <stcarrez@nerim.fr>
+
+ * config/m68hc11/m68hc11.md ("return"): Use emit_jump_insn to emit
+ the return code.
+
+2003-01-12 Alan Modra <amodra@bigpond.net.au>
+
+ * expr.c (expand_expr <RDIV_EXPR>): Correct recursive call args.
+
+2003-01-10 Josef Zlomek <zlomekj@suse.cz>
+
+ * jump.c (next_nonnote_insn_in_loop): New function.
+ (copy_loop_headers): Use next_nonnote_insn_in_loop instead of
+ next_nonnote_insn.
+ (duplicate_loop_exit_test). Likewise.
+
+2003-01-10 Josef Zlomek <zlomj9am@artax.karlin.mff.cuni.cz>
+
+ * Makefile.in (optabs.o): Add dependencies on basic-block.h and
+ hard-reg-set.h.
+ * basic-block.h (control_flow_insn_p): Fuction was exported.
+ * cfgbuild.c (control_flow_insn_p): Fuction was made non-static.
+ * optabs.c (emit_libcall_block): Emit REG_LIBCALL and REG_RETVAL
+ notes only when the region is contained in a single basic block.
+
+2003-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR inline-asm/8832
+ * tree.h (expand_asm): New prototype.
+ * stmt.c (expand_asm): Set the MEM_VOLATILE_P flag if instructed
+ to do so.
+ * c-semantics (genrtl_asm_stmt): Pass the RID_VOLATILE qualifier
+ down to expand_asm.
+ * c-typeck.c (simple_asm_stmt): Set the RID_VOLATILE qualifier.
+ * rtlanal.c (volatile_insn_p) [ASM_INPUT]: Test the MEM_VOLATILE_P flag.
+ (volatile_refs_p) [ASM_INPUT]: Likewise.
+ (side_effects_p) [ASM_INPUT]: Likewise.
+
+2003-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR c/8032
+ * c-typeck.c (process_init_element) [RECORD_TYPE]: For
+ an empty element, do not advance the pointer to unfilled
+ fields if there are pending initializers.
+
+2003-01-07 Janis Johnson <janis187@us.ibm.com>
+
+ PR other/8947
+ * doc/invoke.texi (-malign-double): Explain that the option breaks
+ binary compatibility.
+
+2003-01-07 Benjamin Kosnik <bkoz@redhat.com>
+ Sunil Davasam <sunil.k.davasam@intel.com>
+
+ PR libstdc++/9076
+ * unwind-dw2.c (execute_cfa_program): DW_CFA_undefined,
+ DW_CFA_same_value, read next and ignore.
+
+2003-01-07 Richard Henderson <rth@redhat.com>
+
+ * cfganal.c (flow_call_edges_add): Don't crash on noreturn call.
+
+2003-01-01 Neil Booth <neil@daikokuya.co.uk>
+
+ PR preprocessor/8880
+ * gcc.c (cpp_unique_options): Handle -fshort-wchar later so it
+ overrides any target CPU specs.
+
+2002-12-28 John David Anglin <dave.anglin@nrc.ca>
+
+ * pa.h (TARGET_SOM): Define if not defined.
+ * som.h (OBJ_SOM): Rename to TARGET_SOM.
+ * pa.c (pa_output_function_prologue): Don't accumulate the total code
+ bytes in the translation unit when using gas, som and not the portable
+ runtime, or when using function sections.
+
+2002-12-21 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR optimization/8599
+ * doloop.c (doloop_modify_runtime): Fix loop count computation
+ for preconditioned unrolled loops.
+
+2002-12-21 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR optimization/8599
+ * doloop.c (doloop_modify_runtime): Revert 2002-11-22 change.
+ * loop.c (loop_invariant_p): Likewise.
+
+2002-12-19 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR optimization/8988
+ * loop.c (maybe_eliminate_biv): Kill REG_EQUAL notes mentioning
+ the biv when eliminating.
+
+2002-12-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR opt/8794
+ * combine.c (force_to_mode) [MINUS]: Only replace with (not Y) if all
+ bits in fuller_mask (not just mask) are set in C.
+
+2002-12-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * pa.h (BIGGEST_ALIGNMENT): Change 32-bit value to 64 bits.
+ (MAX_PARM_BOUNDARY, STACK_BOUNDARY): Express in terms of
+ BIGGEST_ALIGNMENT.
+ (PREFERRED_STACK_BOUNDARY): Express in terms of STACK_BOUNDARY.
+ (FUNCTION_BOUNDARY): Express in terms of BITS_PER_WORD.
+
+2002-12-10 Janis Johnson <janis187@us.ibm.com>
+
+ PR other/8882
+ * doc/tm.texi (PUSH_ARGS): Remove misplaced line.
+
+2002-12-05 Dale Johannesen <dalej@apple.com>
+
+ * tree.c (unsafe_for_reeval): Consider callee child of CALL_EXPR.
+
+2002-12-05 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * config/i386/cygwin.h (SUBTARGET_PROLOGUE): Replace with
+ PROFILE_HOOK.
+ * config/i386/mingw32.h (SUBTARGET_PROLOGUE): Don't undef.
+
+2002-12-05 Nick Clifton <nickc@redhat.com>
+
+ * config/fr30/fr30.h (GO_IF_LEGITIMATE_ADDRESS): Check for frame
+ pointer and arg pointer by examining the register number.
+
+2002-12-05 Matthias Klose <doko@debian.org>
+
+ * doc/invoke.texi: Remove last reference to -a.
+
+2002-12-04 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR c/7622
+ * c-semantics (genrtl_scope_stmt): Do not output inlined
+ nested functions that contain no code.
+
+2002-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ * fold-const.c (associate_trees): Only optimize NEGATE_EXPR in one
+ of the operands into MINUS_EXPR if code is PLUS_EXPR.
+
+2002-12-02 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa/xtensa.c (xtensa_emit_call): Use a static buffer.
+ * config/xtensa/xtensa.h (MAX_WCHAR_TYPE_SIZE): Delete.
+
+2002-12-01 Mark Mitchell <mark@codesourcery.com>
+
+ * builtin-types.def (BT_SIZE): Use size_type_node.
+ * builtins.c (fold_builtin): Make the builtin strlen returns a
+ size_t, not a sizetype.
+ * c-common.c (c_alignof): Use size_type_node, not c_size_type_node.
+ (c_alignof_expr): Likewise.
+ (c_common_nodes_and_builtins): Likewise.
+ * c-common.h (CTI_C_SIZE_TYPE): Remove.
+ (c_size_type_node): Likewise.
+ * c-format.c (T_ST): Use size_type_node, not c_size_type_node.
+ * tree.h (TI_SIZE_TYPE): New enumeral.
+ (size_type_node): Likewise.
+
+2002-11-26 Neil Booth <neil@daikokuya.co.uk>
+
+ PR preprocessor/8524
+ * cpplib.c (run_directive): Remove previous kludge to _Pragma.
+ Add a new one in its place, which hopefully works.
+ (skip_rest_of_line): Change test for bottom-of-context-stack.
+
+2002-11-26 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/rs6000.c (rs6000_flag_pic): New variable.
+ (rs6000_override_options): Save original flag_pic value.
+ (rs6000_encode_section_info): More accurate test for "local" symbol.
+
+ PR 8362
+ * config/rs6000/rs6000.c (rs6000_outout_load_multiple): New function.
+ * config/rs6000/rs6000.md (ldmsi[3-8]): New patterns.
+
+2002-11-25 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
+
+ PR c/8639
+ * fold-const.c (extract_muldiv): Don't propagate division unless
+ both arguments are multiples of C.
+
+2002-11-24 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR optimization/8275
+
+ Merge from mainline:
+ 2002-09-19 Dale Johannesen <dalej@apple.com>
+
+ * combine.c (make_extraction): Don't create
+ invalid subreg.
+
+2002-11-23 Marek Michalkiewicz <marekm@amelek.gda.pl>
+
+ 2002-09-26 Theodore A. Roth <troth@verinet.com>
+ * config/avr/avr.c: Eliminate use of _PC_ in pc relative insns.
+ * config/avr/avr.md: Ditto.
+
+2002-11-23 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR c/8588
+ * optabs.c (expand_binop): Convert CONST_INTs in shift
+ operations too.
+
+2002-11-23 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR c/8518
+ * c-decl.c (duplicate_decls): Outline the second definition
+ of an extern inline function in all cases.
+
+2002-11-22 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR c/8439
+ * recog.c (validate_replace_rtx_1) [PLUS]: Simplify only
+ if there is something new to be simplified.
+
+2002-11-22 Toon Moene <toon@moene.indiv.nluug.nl>
+
+ * c-decl.c (c_init_decl_processing): Move generation of
+ decls for g77_integer_type_node and friends from here ...
+ * c-common.c (c_common_nodes_and_builtins): ... to here.
+
+2002-11-22 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR optimization/8599
+
+ Merge from mainline:
+ 2002-11-04 Dale Johannesen <dalej@apple.com>
+
+ * doloop.c (doloop_modify_runtime): Fix loop count computation
+ for unrolled loops.
+ * loop.c (loop_invariant_p): Support calling from unroller.
+
+2002-11-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on
+ reload_completed.
+
+2002-11-21 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa/xtensa-protos.h (xtensa_copy_incoming_a7): Declare.
+ * config/xtensa/xtensa.c (struct machine_function): Add
+ incoming_a7_copied flag.
+ (xtensa_copy_incoming_a7): Define.
+ (xtensa_emit_move_sequence): Use xtensa_copy_incoming_a7.
+ * config/xtensa/xtensa.md (movdi, movsf, movdf): Ditto.
+
2002-11-19 Release Manager
* GCC 3.2.1 Released.
@@ -170,6 +697,7 @@ Thu Oct 31 18:31:22 CET 2002 Jan Hubicka <jh@suse.cz>
2002-10-29 Eric Botcazou <ebotcazou@libertysurf.fr>
+ PR optimization/8334
* expr.c (expand_expr) [PLUS]: Don't use simplify_binary_operation;
check for zero operands explicitly.
diff --git a/contrib/gcc/Makefile.in b/contrib/gcc/Makefile.in
index 366919b..e7c29b9e 100644
--- a/contrib/gcc/Makefile.in
+++ b/contrib/gcc/Makefile.in
@@ -1,6 +1,6 @@
# Makefile for GNU C compiler.
# Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
-# 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
#This file is part of GCC.
@@ -656,6 +656,7 @@ ORDINARY_FLAGS_TO_PASS = \
"BISON=$(BISON)" \
"BISONFLAGS=$(BISONFLAGS)" \
"CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
+ "DESTDIR=$(DESTDIR)" \
"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
"LDFLAGS=$(LDFLAGS)" \
"FLEX=$(FLEX)" \
@@ -1410,7 +1411,7 @@ explow.o : explow.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
toplev.h function.h ggc.h $(TM_P_H)
optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
insn-config.h $(EXPR_H) $(OPTABS_H) libfuncs.h $(RECOG_H) reload.h \
- toplev.h $(GGC_H) real.h $(TM_P_H) except.h
+ toplev.h $(GGC_H) real.h $(TM_P_H) except.h hard-reg-set.h $(BASIC_BLOCK_H)
dbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
$(REGS_H) debug.h $(TM_P_H) $(TARGET_H) function.h langhooks.h \
insn-config.h reload.h gstab.h xcoffout.h output.h dbxout.h toplev.h
@@ -2537,180 +2538,168 @@ install: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
# Handle cpp installation.
install-cpp: cpp$(exeext)
-if [ -f gcc-cross$(exeext) ] ; then \
- rm -f $(bindir)/$(CPP_CROSS_NAME)$(exeext); \
- $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(bindir)/$(CPP_CROSS_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext); \
if [ x$(cpp_install_dir) != x ]; then \
- rm -f $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \
- $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \
else true; fi; \
else \
- rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext); \
- $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(bindir)/$(CPP_INSTALL_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \
if [ x$(cpp_install_dir) != x ]; then \
- rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
- $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
else true; fi; \
fi
uninstall-cpp:
- -rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext)
- -rm -f $(bindir)/$(CPP_CROSS_NAME)$(exeext)
+ -rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext)
+ -rm -f $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext)
-if [ x$(cpp_install_dir) != x ]; then \
- rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
- rm -f $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \
else true; fi
# Create the installation directories.
+# $(libdir)/gcc-lib/include isn't currently searched by cpp.
installdirs:
- -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi
- -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi
- -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
- -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
-# This dir isn't currently searched by cpp.
-# -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
- -fdir= ; for dir in `echo $(libsubdir) | tr '/' ' '`; do \
- fdir=$${fdir}/$${dir}; \
- if [ -d $${fdir} ] ; then true ; else mkdir $${fdir}; chmod a+rx $${fdir}; fi ; \
- done
- -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
- -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
- -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
- -if [ -d $(slibdir) ] ; then true ; else mkdir $(slibdir) ; chmod a+rx $(slibdir) ; fi
-# We don't use mkdir -p to create the parents of man1dir,
-# because some systems don't support it.
-# Instead, we use this technique to create the immediate parent of man1dir.
- -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
- if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
- -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi
- -if [ -d $(man7dir) ] ; then true ; else mkdir $(man7dir) ; chmod a+rx $(man7dir) ; fi
+ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(libsubdir)
+ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(bindir)
+ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(includedir)
+ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(infodir)
+ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(slibdir)
+ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(man1dir)
+ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(man7dir)
# Install the compiler executables built during cross compilation.
install-common: native $(EXTRA_PARTS) lang.install-common
for file in $(COMPILERS); do \
if [ -f $$file ] ; then \
- rm -f $(libsubdir)/$$file; \
- $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
+ rm -f $(DESTDIR)$(libsubdir)/$$file; \
+ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(libsubdir)/$$file; \
else true; \
fi; \
done
for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
if [ x"$$file" != x.. ]; then \
- rm -f $(libsubdir)/$$file; \
- $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
+ rm -f $(DESTDIR)$(libsubdir)/$$file; \
+ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(libsubdir)/$$file; \
else true; fi; \
done
for file in $(EXTRA_PARTS) ..; do \
if [ x"$$file" != x.. ]; then \
- rm -f $(libsubdir)/$$file; \
- $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
- chmod a-x $(libsubdir)/$$file; \
+ rm -f $(DESTDIR)$(libsubdir)/$$file; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(libsubdir)/$$file; \
+ chmod a-x $(DESTDIR)$(libsubdir)/$$file; \
else true; fi; \
done
# Don't mess with specs if it doesn't exist yet.
-if [ -f specs ] ; then \
- rm -f $(libsubdir)/specs; \
- $(INSTALL_DATA) specs $(libsubdir)/specs; \
- chmod a-x $(libsubdir)/specs; \
+ rm -f $(DESTDIR)$(libsubdir)/specs; \
+ $(INSTALL_DATA) specs $(DESTDIR)$(libsubdir)/specs; \
+ chmod a-x $(DESTDIR)$(libsubdir)/specs; \
fi
# Install protoize if it was compiled.
-if [ -f protoize$(exeext) ]; \
then \
if [ -f gcc-cross$(exeext) ] ; then \
- rm -f $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
- $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
- rm -f $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
- $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
else \
- rm -f $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
- $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
- rm -f $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
- $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
fi ; \
- rm -f $(libsubdir)/SYSCALLS.c.X; \
- $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
- chmod a-x $(libsubdir)/SYSCALLS.c.X; \
+ rm -f $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
+ $(INSTALL_DATA) SYSCALLS.c.X $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
+ chmod a-x $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
fi
- -rm -f $(libsubdir)/cpp0$(exeext)
- $(INSTALL_PROGRAM) cpp0$(exeext) $(libsubdir)/cpp0$(exeext)
- -rm -f $(libsubdir)/tradcpp0$(exeext)
- $(INSTALL_PROGRAM) tradcpp0$(exeext) $(libsubdir)/tradcpp0$(exeext)
+ -rm -f $(DESTDIR)$(libsubdir)/cpp0$(exeext)
+ $(INSTALL_PROGRAM) cpp0$(exeext) $(DESTDIR)$(libsubdir)/cpp0$(exeext)
+ -rm -f $(DESTDIR)$(libsubdir)/tradcpp0$(exeext)
+ $(INSTALL_PROGRAM) tradcpp0$(exeext) $(DESTDIR)$(libsubdir)/tradcpp0$(exeext)
# Install gcov if it was compiled.
-if [ -f gcov$(exeext) ]; \
then \
- rm -f $(bindir)/gcov$(exeext); \
- $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/gcov$(exeext); \
+ $(INSTALL_PROGRAM) gcov$(exeext) $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \
fi
- $(INSTALL_SCRIPT) gccbug $(bindir)/$(GCCBUG_INSTALL_NAME)
+ $(INSTALL_SCRIPT) gccbug $(DESTDIR)$(bindir)/$(GCCBUG_INSTALL_NAME)
# Install the driver program as $(target_alias)-gcc
# and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
install-driver: installdirs xgcc$(exeext)
-if [ -f gcc-cross$(exeext) ] ; then \
- rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
- $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
- if [ -d $(gcc_tooldir)/bin/. ] ; then \
- rm -f $(gcc_tooldir)/bin/gcc$(exeext); \
- $(INSTALL_PROGRAM) gcc-cross$(exeext) $(gcc_tooldir)/bin/gcc$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \
+ if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
+ rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
+ $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
else true; fi; \
else \
- rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
- $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
- rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \
- $(LN) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \
- mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(GCC_TARGET_INSTALL_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-1$(exeext); \
+ ( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_alias)-gcc-1$(exeext) && \
+ mv -f $(target_alias)-gcc-1$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \
fi
# Install the info files.
# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
# to do the install.
install-info: doc installdirs lang.install-info
- -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
- -rm -f $(infodir)/cppinternals.info* $(infodir)/gccint.info*
+ -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
+ -rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info*
if [ -f $(docdir)/gcc.info ]; then \
for f in $(docdir)/cpp.info* $(docdir)/gcc.info* \
$(docdir)/cppinternals.info* $(docdir)/gccint.info*; do \
realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
- $(INSTALL_DATA) $$f $(infodir)/$$realfile; \
+ $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$realfile; \
done; \
else true; fi
-if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
- if [ -f $(infodir)/dir ] ; then \
+ if [ -f $(DESTDIR)$(infodir)/dir ] ; then \
for f in cpp.info gcc.info gccint.info cppinternals.info; do \
- if [ -f $(infodir)/$$f ]; then \
- install-info --dir-file=$(infodir)/dir $(infodir)/$$f; \
+ if [ -f $(DESTDIR)$(infodir)/$$f ]; then \
+ install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/$$f; \
else true; fi; \
done; \
else true; fi; \
else true; fi;
- -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
- -chmod a-x $(infodir)/cppinternals.info* $(infodir)/gccint.info*
+ -chmod a-x $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
+ -chmod a-x $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info*
# Install the man pages.
install-man: installdirs $(GENERATED_MANPAGES) lang.install-man
-if [ -f gcc-cross$(exeext) ] ; then \
- rm -f $(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
- $(INSTALL_DATA) $(docdir)/gcc.1 $(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
- chmod a-x $(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
+ rm -f $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
+ $(INSTALL_DATA) $(docdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
+ chmod a-x $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
else \
- rm -f $(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
- $(INSTALL_DATA) $(docdir)/gcc.1 $(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
- chmod a-x $(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
+ rm -f $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
+ $(INSTALL_DATA) $(docdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
+ chmod a-x $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
fi
- -rm -f $(man1dir)/cpp$(man1ext)
- -$(INSTALL_DATA) $(docdir)/cpp.1 $(man1dir)/cpp$(man1ext)
- -chmod a-x $(man1dir)/cpp$(man1ext)
- -rm -f $(man1dir)/gcov$(man1ext)
- -$(INSTALL_DATA) $(docdir)/gcov.1 $(man1dir)/gcov$(man1ext)
- -chmod a-x $(man1dir)/gcov$(man1ext)
- -rm -f $(man7dir)/fsf-funding$(man7ext)
- -$(INSTALL_DATA) $(docdir)/fsf-funding.7 $(man7dir)/fsf-funding$(man7ext)
- -chmod a-x $(man7dir)/fsf-funding$(man7ext)
- -rm -f $(man7dir)/gfdl$(man7ext)
- -$(INSTALL_DATA) $(docdir)/gfdl.7 $(man7dir)/gfdl$(man7ext)
- -chmod a-x $(man7dir)/gfdl$(man7ext)
- -rm -f $(man7dir)/gpl$(man7ext)
- -$(INSTALL_DATA) $(docdir)/gpl.7 $(man7dir)/gpl$(man7ext)
- -chmod a-x $(man7dir)/gpl$(man7ext)
+ -rm -f $(DESTDIR)$(man1dir)/cpp$(man1ext)
+ -$(INSTALL_DATA) $(docdir)/cpp.1 $(DESTDIR)$(man1dir)/cpp$(man1ext)
+ -chmod a-x $(DESTDIR)$(man1dir)/cpp$(man1ext)
+ -rm -f $(DESTDIR)$(man1dir)/gcov$(man1ext)
+ -$(INSTALL_DATA) $(docdir)/gcov.1 $(DESTDIR)$(man1dir)/gcov$(man1ext)
+ -chmod a-x $(DESTDIR)$(man1dir)/gcov$(man1ext)
+ -rm -f $(DESTDIR)$(man7dir)/fsf-funding$(man7ext)
+ -$(INSTALL_DATA) $(docdir)/fsf-funding.7 $(DESTDIR)$(man7dir)/fsf-funding$(man7ext)
+ -chmod a-x $(DESTDIR)$(man7dir)/fsf-funding$(man7ext)
+ -rm -f $(DESTDIR)$(man7dir)/gfdl$(man7ext)
+ -$(INSTALL_DATA) $(docdir)/gfdl.7 $(DESTDIR)$(man7dir)/gfdl$(man7ext)
+ -chmod a-x $(DESTDIR)$(man7dir)/gfdl$(man7ext)
+ -rm -f $(DESTDIR)$(man7dir)/gpl$(man7ext)
+ -$(INSTALL_DATA) $(docdir)/gpl.7 $(DESTDIR)$(man7dir)/gpl$(man7ext)
+ -chmod a-x $(DESTDIR)$(man7dir)/gpl$(man7ext)
# Install the library.
install-libgcc: libgcc.mk libgcc.a installdirs
@@ -2734,6 +2723,7 @@ install-libgcc: libgcc.mk libgcc.a installdirs
MAKEOVERRIDES= \
INSTALL_DATA="$(INSTALL_DATA)" \
RANLIB_FOR_TARGET="$$r_f_t" \
+ DESTDIR="$(DESTDIR)" \
libsubdir="$(libsubdir)" \
slibdir="$(slibdir)" \
-f libgcc.mk install
@@ -2760,6 +2750,7 @@ install-multilib: stmp-multilib installdirs
MAKEOVERRIDES= \
INSTALL_DATA="$(INSTALL_DATA)" \
RANLIB_FOR_TARGET="$$r_f_t" \
+ DESTDIR="$(DESTDIR)" \
libsubdir="$(libsubdir)" \
slibdir="$(slibdir)" \
-f libgcc.mk install
@@ -2769,23 +2760,23 @@ install-headers: $(INSTALL_HEADERS_DIR)
# Fix symlinks to absolute paths in the installed include directory to
# point to the installed directory, not the build directory.
# Don't need to use LN_S here since we really do need ln -s and no substitutes.
- -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
+ -files=`cd $(DESTDIR)$(libsubdir)/include; find . -type l -print 2>/dev/null`; \
if [ $$? -eq 0 ]; then \
dir=`cd include; pwd`; \
for i in $$files; do \
- dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
+ dest=`ls -ld $(DESTDIR)$(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
if expr "$$dest" : "$$dir.*" > /dev/null; then \
- rm -f $(libsubdir)/include/$$i; \
- ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
+ rm -f $(DESTDIR)$(libsubdir)/include/$$i; \
+ ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(DESTDIR)$(libsubdir)/include/$$i; \
fi; \
done; \
fi
# Create or recreate the gcc private include file directory.
install-include-dir: installdirs
- -rm -rf $(libsubdir)/include
- mkdir $(libsubdir)/include
- -chmod a+rx $(libsubdir)/include
+ -rm -rf $(DESTDIR)$(libsubdir)/include
+ mkdir $(DESTDIR)$(libsubdir)/include
+ -chmod a+rx $(DESTDIR)$(libsubdir)/include
# Install the include directory using tar.
install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
@@ -2794,7 +2785,7 @@ install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
# found in CDPATH, corrupting the output. We could just redirect the
# output of `cd', but some shells lose on redirection within `()'s
(cd `pwd`/include ; \
- tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar xpf - )
+ tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar xpf - )
# /bin/sh on some systems returns the status of the first tar,
# and that can lose with GNU tar which always writes a full block.
# So use `exit 0' to ignore its exit status.
@@ -2803,35 +2794,35 @@ install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
# See discussion about the use of `pwd` above
cd `pwd`/include ; \
- find . -print | cpio -pdum $(libsubdir)/include
+ find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include
# Install the include directory using cp.
install-headers-cp: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
- cp -p -r include $(libsubdir)
+ cp -p -r include $(DESTDIR)$(libsubdir)
# Use this target to install the program `collect2' under the name `collect2'.
install-collect2: collect2 installdirs
- $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/collect2$(exeext)
+ $(INSTALL_PROGRAM) collect2$(exeext) $(DESTDIR)$(libsubdir)/collect2$(exeext)
# Install the driver program as $(libsubdir)/gcc for collect2.
- $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
+ $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(libsubdir)/gcc$(exeext)
# Cancel installation by deleting the installed files.
uninstall: intl.uninstall lang.uninstall $(UNINSTALL_CPP)
- -rm -rf $(libsubdir)
- -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
- -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
- -rm -rf $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext)
- -rm -rf $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext)
- -rm -rf $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext)
- -rm -rf $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext)
- -rm -rf $(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
- -rm -rf $(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
- -rm -rf $(man1dir)/$(GCC_CROSS_NAME)$(man1ext)
- -rm -rf $(man1dir)/cpp$(man1ext)
- -rm -rf $(man1dir)/protoize$(man1ext)
- -rm -rf $(man1dir)/unprotoize$(man1ext)
- -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
- -rm -f $(infodir)/cppinternals.info* $(infodir)/gccint.info*
+ -rm -rf $(DESTDIR)$(libsubdir)
+ -rm -rf $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
+ -rm -rf $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext)
+ -rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext)
+ -rm -rf $(DESTDIR)$(man1dir)/protoize$(man1ext)
+ -rm -rf $(DESTDIR)$(man1dir)/unprotoize$(man1ext)
+ -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
+ -rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info*
#
# These targets are for the dejagnu testsuites. The file site.exp
# contains global variables that all the testsuites will use.
diff --git a/contrib/gcc/alias.c b/contrib/gcc/alias.c
index 15f2d7b..db9dc07 100644
--- a/contrib/gcc/alias.c
+++ b/contrib/gcc/alias.c
@@ -1935,6 +1935,14 @@ nonoverlapping_memrefs_p (x, y)
moffsetx = adjust_offset_for_component_ref (exprx, moffsetx);
exprx = t;
}
+ else if (TREE_CODE (exprx) == INDIRECT_REF)
+ {
+ exprx = TREE_OPERAND (exprx, 0);
+ if (flag_argument_noalias < 2
+ || TREE_CODE (exprx) != PARM_DECL)
+ return 0;
+ }
+
moffsety = MEM_OFFSET (y);
if (TREE_CODE (expry) == COMPONENT_REF)
{
@@ -1944,6 +1952,13 @@ nonoverlapping_memrefs_p (x, y)
moffsety = adjust_offset_for_component_ref (expry, moffsety);
expry = t;
}
+ else if (TREE_CODE (expry) == INDIRECT_REF)
+ {
+ expry = TREE_OPERAND (expry, 0);
+ if (flag_argument_noalias < 2
+ || TREE_CODE (expry) != PARM_DECL)
+ return 0;
+ }
if (! DECL_P (exprx) || ! DECL_P (expry))
return 0;
@@ -2012,7 +2027,7 @@ nonoverlapping_memrefs_p (x, y)
/* If we don't know the size of the lower-offset value, we can't tell
if they conflict. Otherwise, we do the test. */
- return sizex >= 0 && offsety > offsetx + sizex;
+ return sizex >= 0 && offsety >= offsetx + sizex;
}
/* True dependence: X is read after store in MEM takes place. */
diff --git a/contrib/gcc/basic-block.h b/contrib/gcc/basic-block.h
index f5bbd26..aa78b45 100644
--- a/contrib/gcc/basic-block.h
+++ b/contrib/gcc/basic-block.h
@@ -1,5 +1,5 @@
/* Define control and data flow tables, and regsets.
- Copyright (C) 1987, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright (C) 1987, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GCC.
@@ -692,6 +692,7 @@ extern conflict_graph conflict_graph_compute
extern bool mark_dfs_back_edges PARAMS ((void));
extern void update_br_prob_note PARAMS ((basic_block));
extern void fixup_abnormal_edges PARAMS ((void));
+extern bool control_flow_insn_p PARAMS ((rtx));
/* In dominance.c */
diff --git a/contrib/gcc/builtin-types.def b/contrib/gcc/builtin-types.def
index 6cefb32..c594bd2 100644
--- a/contrib/gcc/builtin-types.def
+++ b/contrib/gcc/builtin-types.def
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of GCC.
@@ -76,7 +76,7 @@ DEF_PRIMITIVE_TYPE (BT_CONST_PTR, const_ptr_type_node)
DEF_PRIMITIVE_TYPE (BT_TRAD_PTR, traditional_ptr_type_node)
DEF_PRIMITIVE_TYPE (BT_TRAD_CONST_PTR, traditional_cptr_type_node)
DEF_PRIMITIVE_TYPE (BT_PTRMODE, type_for_mode (ptr_mode, 0))
-DEF_PRIMITIVE_TYPE (BT_SIZE, c_size_type_node)
+DEF_PRIMITIVE_TYPE (BT_SIZE, size_type_node)
DEF_PRIMITIVE_TYPE (BT_STRING, string_type_node)
DEF_PRIMITIVE_TYPE (BT_CONST_STRING, const_string_type_node)
DEF_PRIMITIVE_TYPE (BT_LEN, traditional_len_type_node)
diff --git a/contrib/gcc/builtins.c b/contrib/gcc/builtins.c
index 7eb878f7..d8874d6 100644
--- a/contrib/gcc/builtins.c
+++ b/contrib/gcc/builtins.c
@@ -4068,8 +4068,13 @@ fold_builtin (exp)
if (validate_arglist (arglist, POINTER_TYPE, VOID_TYPE))
{
tree len = c_strlen (TREE_VALUE (arglist));
- if (len != 0)
- return len;
+ if (len)
+ {
+ /* Convert from the internal "sizetype" type to "size_t". */
+ if (size_type_node)
+ len = convert (size_type_node, len);
+ return len;
+ }
}
break;
diff --git a/contrib/gcc/c-common.c b/contrib/gcc/c-common.c
index 066cb7c..3511f15 100644
--- a/contrib/gcc/c-common.c
+++ b/contrib/gcc/c-common.c
@@ -2425,7 +2425,7 @@ c_alignof (type)
else
t = size_int (TYPE_ALIGN (type) / BITS_PER_UNIT);
- return fold (build1 (NOP_EXPR, c_size_type_node, t));
+ return fold (build1 (NOP_EXPR, size_type_node, t));
}
/* Implement the __alignof keyword: Return the minimum required
@@ -2473,7 +2473,7 @@ c_alignof_expr (expr)
else
return c_alignof (TREE_TYPE (expr));
- return fold (build1 (NOP_EXPR, c_size_type_node, t));
+ return fold (build1 (NOP_EXPR, size_type_node, t));
}
/* Give the specifications for the format attributes, used by C and all
@@ -2601,12 +2601,12 @@ c_common_nodes_and_builtins ()
/* `unsigned long' is the standard type for sizeof.
Note that stddef.h uses `unsigned long',
and this must agree, even if long and int are the same size. */
- c_size_type_node =
+ size_type_node =
TREE_TYPE (identifier_global_value (get_identifier (SIZE_TYPE)));
- signed_size_type_node = signed_type (c_size_type_node);
+ signed_size_type_node = signed_type (size_type_node);
if (flag_traditional)
- c_size_type_node = signed_size_type_node;
- set_sizetype (c_size_type_node);
+ size_type_node = signed_size_type_node;
+ set_sizetype (size_type_node);
build_common_tree_nodes_2 (flag_short_double);
@@ -2623,6 +2623,59 @@ c_common_nodes_and_builtins ()
pushdecl (build_decl (TYPE_DECL, get_identifier ("complex long double"),
complex_long_double_type_node));
+ /* Types which are common to the fortran compiler and libf2c. When
+ changing these, you also need to be concerned with f/com.h. */
+
+ if (TYPE_PRECISION (float_type_node)
+ == TYPE_PRECISION (long_integer_type_node))
+ {
+ g77_integer_type_node = long_integer_type_node;
+ g77_uinteger_type_node = long_unsigned_type_node;
+ }
+ else if (TYPE_PRECISION (float_type_node)
+ == TYPE_PRECISION (integer_type_node))
+ {
+ g77_integer_type_node = integer_type_node;
+ g77_uinteger_type_node = unsigned_type_node;
+ }
+ else
+ g77_integer_type_node = g77_uinteger_type_node = NULL_TREE;
+
+ if (g77_integer_type_node != NULL_TREE)
+ {
+ pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("__g77_integer"),
+ g77_integer_type_node));
+ pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("__g77_uinteger"),
+ g77_uinteger_type_node));
+ }
+
+ if (TYPE_PRECISION (float_type_node) * 2
+ == TYPE_PRECISION (long_integer_type_node))
+ {
+ g77_longint_type_node = long_integer_type_node;
+ g77_ulongint_type_node = long_unsigned_type_node;
+ }
+ else if (TYPE_PRECISION (float_type_node) * 2
+ == TYPE_PRECISION (long_long_integer_type_node))
+ {
+ g77_longint_type_node = long_long_integer_type_node;
+ g77_ulongint_type_node = long_long_unsigned_type_node;
+ }
+ else
+ g77_longint_type_node = g77_ulongint_type_node = NULL_TREE;
+
+ if (g77_longint_type_node != NULL_TREE)
+ {
+ pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("__g77_longint"),
+ g77_longint_type_node));
+ pushdecl (build_decl (TYPE_DECL,
+ get_identifier ("__g77_ulongint"),
+ g77_ulongint_type_node));
+ }
+
record_builtin_type (RID_VOID, NULL, void_type_node);
void_zero_node = build_int_2 (0, 0);
diff --git a/contrib/gcc/c-common.h b/contrib/gcc/c-common.h
index 61a7f10..f5e4659 100644
--- a/contrib/gcc/c-common.h
+++ b/contrib/gcc/c-common.h
@@ -136,10 +136,6 @@ enum c_tree_index
CTI_SIGNED_WCHAR_TYPE,
CTI_UNSIGNED_WCHAR_TYPE,
CTI_WINT_TYPE,
- CTI_C_SIZE_TYPE, /* The type used for the size_t typedef and the
- result type of sizeof (an ordinary type without
- TYPE_IS_SIZETYPE set, unlike the internal
- sizetype). */
CTI_SIGNED_SIZE_TYPE, /* For format checking only. */
CTI_UNSIGNED_PTRDIFF_TYPE, /* For format checking only. */
CTI_INTMAX_TYPE,
@@ -193,7 +189,6 @@ struct c_common_identifier
#define signed_wchar_type_node c_global_trees[CTI_SIGNED_WCHAR_TYPE]
#define unsigned_wchar_type_node c_global_trees[CTI_UNSIGNED_WCHAR_TYPE]
#define wint_type_node c_global_trees[CTI_WINT_TYPE]
-#define c_size_type_node c_global_trees[CTI_C_SIZE_TYPE]
#define signed_size_type_node c_global_trees[CTI_SIGNED_SIZE_TYPE]
#define unsigned_ptrdiff_type_node c_global_trees[CTI_UNSIGNED_PTRDIFF_TYPE]
#define intmax_type_node c_global_trees[CTI_INTMAX_TYPE]
diff --git a/contrib/gcc/c-decl.c b/contrib/gcc/c-decl.c
index 765dc03..2c8857f 100644
--- a/contrib/gcc/c-decl.c
+++ b/contrib/gcc/c-decl.c
@@ -1997,9 +1997,10 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
inline, make sure we emit debug info for the inline before we
throw it away, in case it was inlined into a function that hasn't
been written out yet. */
- if (new_is_definition && DECL_INITIAL (olddecl) && TREE_USED (olddecl))
+ if (new_is_definition && DECL_INITIAL (olddecl))
{
- (*debug_hooks->outlining_inline_function) (olddecl);
+ if (TREE_USED (olddecl))
+ (*debug_hooks->outlining_inline_function) (olddecl);
/* The new defn must not be inline. */
DECL_INLINE (newdecl) = 0;
@@ -3097,55 +3098,6 @@ c_init_decl_processing ()
= build_function_type (ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node, endlink));
- /* Types which are common to the fortran compiler and libf2c. When
- changing these, you also need to be concerned with f/com.h. */
-
- if (TYPE_PRECISION (float_type_node)
- == TYPE_PRECISION (long_integer_type_node))
- {
- g77_integer_type_node = long_integer_type_node;
- g77_uinteger_type_node = long_unsigned_type_node;
- }
- else if (TYPE_PRECISION (float_type_node)
- == TYPE_PRECISION (integer_type_node))
- {
- g77_integer_type_node = integer_type_node;
- g77_uinteger_type_node = unsigned_type_node;
- }
- else
- g77_integer_type_node = g77_uinteger_type_node = NULL_TREE;
-
- if (g77_integer_type_node != NULL_TREE)
- {
- pushdecl (build_decl (TYPE_DECL, get_identifier ("__g77_integer"),
- g77_integer_type_node));
- pushdecl (build_decl (TYPE_DECL, get_identifier ("__g77_uinteger"),
- g77_uinteger_type_node));
- }
-
- if (TYPE_PRECISION (float_type_node) * 2
- == TYPE_PRECISION (long_integer_type_node))
- {
- g77_longint_type_node = long_integer_type_node;
- g77_ulongint_type_node = long_unsigned_type_node;
- }
- else if (TYPE_PRECISION (float_type_node) * 2
- == TYPE_PRECISION (long_long_integer_type_node))
- {
- g77_longint_type_node = long_long_integer_type_node;
- g77_ulongint_type_node = long_long_unsigned_type_node;
- }
- else
- g77_longint_type_node = g77_ulongint_type_node = NULL_TREE;
-
- if (g77_longint_type_node != NULL_TREE)
- {
- pushdecl (build_decl (TYPE_DECL, get_identifier ("__g77_longint"),
- g77_longint_type_node));
- pushdecl (build_decl (TYPE_DECL, get_identifier ("__g77_ulongint"),
- g77_ulongint_type_node));
- }
-
pedantic_lvalues = pedantic;
make_fname_decl = c_make_fname_decl;
diff --git a/contrib/gcc/c-format.c b/contrib/gcc/c-format.c
index d52cfba..658ca30 100644
--- a/contrib/gcc/c-format.c
+++ b/contrib/gcc/c-format.c
@@ -750,7 +750,7 @@ static const format_flag_pair strfmon_flag_pairs[] =
#define T_WI &wint_type_node
#define T94_WI { STD_C94, "wint_t", T_WI }
#define TEX_WI { STD_EXT, "wint_t", T_WI }
-#define T_ST &c_size_type_node
+#define T_ST &size_type_node
#define T99_ST { STD_C99, "size_t", T_ST }
#define T_SST &signed_size_type_node
#define T99_SST { STD_C99, "signed size_t", T_SST }
diff --git a/contrib/gcc/c-parse.in b/contrib/gcc/c-parse.in
index 2fc4359..0b4bde3 100644
--- a/contrib/gcc/c-parse.in
+++ b/contrib/gcc/c-parse.in
@@ -28,9 +28,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* To whomever it may concern: I have heard that such a thing was once
written by AT&T, but I have never seen it. */
-ifobjc
-%expect 31 /* shift/reduce conflicts, and 1 reduce/reduce conflict. */
-end ifobjc
ifc
%expect 10 /* shift/reduce conflicts, and no reduce/reduce conflicts. */
end ifc
diff --git a/contrib/gcc/c-semantics.c b/contrib/gcc/c-semantics.c
index 030a04c..eaa4452 100644
--- a/contrib/gcc/c-semantics.c
+++ b/contrib/gcc/c-semantics.c
@@ -615,6 +615,7 @@ genrtl_scope_stmt (t)
{
if (TREE_CODE (fn) == FUNCTION_DECL
&& DECL_CONTEXT (fn) == current_function_decl
+ && DECL_SAVED_INSNS (fn)
&& !TREE_ASM_WRITTEN (fn)
&& TREE_ADDRESSABLE (fn))
{
@@ -727,7 +728,7 @@ genrtl_asm_stmt (cv_qualifier, string, output_operands,
emit_line_note (input_filename, lineno);
if (asm_input_p)
- expand_asm (string);
+ expand_asm (string, cv_qualifier != NULL_TREE);
else
c_expand_asm_operands (string, output_operands, input_operands,
clobbers, cv_qualifier != NULL_TREE,
diff --git a/contrib/gcc/c-typeck.c b/contrib/gcc/c-typeck.c
index d400f39..17e3144 100644
--- a/contrib/gcc/c-typeck.c
+++ b/contrib/gcc/c-typeck.c
@@ -752,7 +752,7 @@ c_sizeof (type)
TYPE_IS_SIZETYPE means that certain things (like overflow) will
never happen. However, this node should really have type
`size_t', which is just a typedef for an ordinary integer type. */
- return fold (build1 (NOP_EXPR, c_size_type_node, size));
+ return fold (build1 (NOP_EXPR, size_type_node, size));
}
tree
@@ -776,7 +776,7 @@ c_sizeof_nowarn (type)
TYPE_IS_SIZETYPE means that certain things (like overflow) will
never happen. However, this node should really have type
`size_t', which is just a typedef for an ordinary integer type. */
- return fold (build1 (NOP_EXPR, c_size_type_node, size));
+ return fold (build1 (NOP_EXPR, size_type_node, size));
}
/* Compute the size to increment a pointer by. */
@@ -2888,9 +2888,6 @@ build_unary_op (code, xarg, flag)
tree inc;
tree result_type = TREE_TYPE (arg);
- arg = get_unwidened (arg, 0);
- argtype = TREE_TYPE (arg);
-
/* Compute the increment. */
if (typecode == POINTER_TYPE)
@@ -2919,6 +2916,9 @@ build_unary_op (code, xarg, flag)
else
inc = integer_one_node;
+ arg = get_unwidened (arg, 0);
+ argtype = TREE_TYPE (arg);
+
inc = convert (argtype, inc);
/* Handle incrementing a cast-expression. */
@@ -6645,13 +6645,18 @@ process_init_element (value)
bit_position (constructor_fields),
DECL_SIZE (constructor_fields));
- constructor_unfilled_fields = TREE_CHAIN (constructor_fields);
- /* Skip any nameless bit fields. */
- while (constructor_unfilled_fields != 0
- && DECL_C_BIT_FIELD (constructor_unfilled_fields)
- && DECL_NAME (constructor_unfilled_fields) == 0)
- constructor_unfilled_fields =
- TREE_CHAIN (constructor_unfilled_fields);
+ /* If the current field was the first one not yet written out,
+ it isn't now, so update. */
+ if (constructor_unfilled_fields == constructor_fields)
+ {
+ constructor_unfilled_fields = TREE_CHAIN (constructor_fields);
+ /* Skip any nameless bit fields. */
+ while (constructor_unfilled_fields != 0
+ && DECL_C_BIT_FIELD (constructor_unfilled_fields)
+ && DECL_NAME (constructor_unfilled_fields) == 0)
+ constructor_unfilled_fields =
+ TREE_CHAIN (constructor_unfilled_fields);
+ }
}
constructor_fields = TREE_CHAIN (constructor_fields);
@@ -6886,9 +6891,10 @@ simple_asm_stmt (expr)
if (TREE_CHAIN (expr))
expr = combine_strings (expr);
- stmt = add_stmt (build_stmt (ASM_STMT, NULL_TREE, expr,
- NULL_TREE, NULL_TREE,
- NULL_TREE));
+
+ /* Simple asm statements are treated as volatile. */
+ stmt = add_stmt (build_stmt (ASM_STMT, ridpointers[(int) RID_VOLATILE],
+ expr, NULL_TREE, NULL_TREE, NULL_TREE));
ASM_INPUT_P (stmt) = 1;
return stmt;
}
diff --git a/contrib/gcc/calls.c b/contrib/gcc/calls.c
index a40b466..9a059a0 100644
--- a/contrib/gcc/calls.c
+++ b/contrib/gcc/calls.c
@@ -2064,6 +2064,35 @@ check_sibcall_argument_overlap (insn, arg)
return insn != NULL_RTX;
}
+static tree
+fix_unsafe_tree (t)
+ tree t;
+{
+ switch (unsafe_for_reeval (t))
+ {
+ case 0: /* Safe. */
+ break;
+
+ case 1: /* Mildly unsafe. */
+ t = unsave_expr (t);
+ break;
+
+ case 2: /* Wildly unsafe. */
+ {
+ tree var = build_decl (VAR_DECL, NULL_TREE,
+ TREE_TYPE (t));
+ SET_DECL_RTL (var,
+ expand_expr (t, NULL_RTX, VOIDmode, EXPAND_NORMAL));
+ t = var;
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ return t;
+}
+
/* Generate all the code for a function call
and return an rtx for its value.
Store the value in TARGET (specified as an rtx) if convenient.
@@ -2506,35 +2535,16 @@ expand_call (exp, target, ignore)
for (; i != end; i += inc)
{
- switch (unsafe_for_reeval (args[i].tree_value))
- {
- case 0: /* Safe. */
- break;
-
- case 1: /* Mildly unsafe. */
- args[i].tree_value = unsave_expr (args[i].tree_value);
- break;
-
- case 2: /* Wildly unsafe. */
- {
- tree var = build_decl (VAR_DECL, NULL_TREE,
- TREE_TYPE (args[i].tree_value));
- SET_DECL_RTL (var,
- expand_expr (args[i].tree_value, NULL_RTX,
- VOIDmode, EXPAND_NORMAL));
- args[i].tree_value = var;
- }
- break;
-
- default:
- abort ();
- }
+ args[i].tree_value = fix_unsafe_tree (args[i].tree_value);
/* We need to build actparms for optimize_tail_recursion. We can
safely trash away TREE_PURPOSE, since it is unused by this
function. */
if (try_tail_recursion)
actparms = tree_cons (NULL_TREE, args[i].tree_value, actparms);
}
+ /* Do the same for the function address if it is an expression. */
+ if (!fndecl)
+ TREE_OPERAND (exp, 0) = fix_unsafe_tree (TREE_OPERAND (exp, 0));
/* Expanding one of those dangerous arguments could have added
cleanups, but otherwise give it a whirl. */
if (any_pending_cleanups (1))
diff --git a/contrib/gcc/cfganal.c b/contrib/gcc/cfganal.c
index 8aba231..f0ca224 100644
--- a/contrib/gcc/cfganal.c
+++ b/contrib/gcc/cfganal.c
@@ -1,6 +1,6 @@
/* Control flow graph analysis code for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GCC.
@@ -328,10 +328,11 @@ flow_call_edges_add (blocks)
for (e = bb->succ; e; e = e->succ_next)
if (e->dest == EXIT_BLOCK_PTR)
- break;
-
- insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
- commit_edge_insertions ();
+ {
+ insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
+ commit_edge_insertions ();
+ break;
+ }
}
}
diff --git a/contrib/gcc/cfgbuild.c b/contrib/gcc/cfgbuild.c
index 136ec07..3a5af2d 100644
--- a/contrib/gcc/cfgbuild.c
+++ b/contrib/gcc/cfgbuild.c
@@ -1,6 +1,6 @@
/* Control flow graph building code for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GCC.
@@ -57,7 +57,6 @@ static void make_eh_edge PARAMS ((sbitmap *, basic_block, rtx));
static void find_bb_boundaries PARAMS ((basic_block));
static void compute_outgoing_frequencies PARAMS ((basic_block));
static bool inside_basic_block_p PARAMS ((rtx));
-static bool control_flow_insn_p PARAMS ((rtx));
/* Return true if insn is something that should be contained inside basic
block. */
@@ -95,7 +94,7 @@ inside_basic_block_p (insn)
/* Return true if INSN may cause control flow transfer, so it should be last in
the basic block. */
-static bool
+bool
control_flow_insn_p (insn)
rtx insn;
{
diff --git a/contrib/gcc/cfgcleanup.c b/contrib/gcc/cfgcleanup.c
index 12be4f5..9589d1f 100644
--- a/contrib/gcc/cfgcleanup.c
+++ b/contrib/gcc/cfgcleanup.c
@@ -469,7 +469,7 @@ try_forward_edges (mode, b)
&& NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG)
break;
- if (GET_CODE (insn) == NOTE)
+ if (insn && GET_CODE (insn) == NOTE)
break;
}
diff --git a/contrib/gcc/combine.c b/contrib/gcc/combine.c
index acaf3b1..5e8ad1a 100644
--- a/contrib/gcc/combine.c
+++ b/contrib/gcc/combine.c
@@ -6016,6 +6016,11 @@ make_extraction (mode, inner, pos, pos_rtx, len,
final_word += (GET_MODE_SIZE (inner_mode)
- GET_MODE_SIZE (tmode)) % UNITS_PER_WORD;
+ /* Avoid creating invalid subregs, for example when
+ simplifying (x>>32)&255. */
+ if (final_word >= GET_MODE_SIZE (inner_mode))
+ return NULL_RTX;
+
new = gen_rtx_SUBREG (tmode, inner, final_word);
}
else
@@ -6852,10 +6857,10 @@ force_to_mode (x, mode, mask, reg, just_select)
return force_to_mode (x, mode, mask, reg, next_select);
}
- /* Similarly, if C contains every bit in the mask, then we may
+ /* Similarly, if C contains every bit in the fuller_mask, then we may
replace with (not Y). */
if (GET_CODE (XEXP (x, 0)) == CONST_INT
- && ((INTVAL (XEXP (x, 0)) | (HOST_WIDE_INT) mask)
+ && ((INTVAL (XEXP (x, 0)) | (HOST_WIDE_INT) fuller_mask)
== INTVAL (XEXP (x, 0))))
{
x = simplify_gen_unary (NOT, GET_MODE (x),
diff --git a/contrib/gcc/config.gcc b/contrib/gcc/config.gcc
index 73441e8..bb71f51 100644
--- a/contrib/gcc/config.gcc
+++ b/contrib/gcc/config.gcc
@@ -1,5 +1,5 @@
# GCC build-, host- and target-specific configuration file.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
#This file is part of GCC.
@@ -900,8 +900,11 @@ hppa1.1-*-rtems*)
xm_defines=POSIX
target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
tm_file="${tm_file} pa/pa32-regs.h dbxelf.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h rtems.h"
- tmake_file="pa/t-bsd pa/t-pro"
+ tmake_file="pa/t-bsd pa/t-pro t-rtems"
xmake_file="pa/x-ada"
+ if test x$enable_threads = xyes; then
+ thread_file='rtems'
+ fi
;;
hppa1.0-*-osf*)
tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
@@ -2836,7 +2839,7 @@ powerpc-*-eabi*)
powerpc-*-rtems*)
xm_defines=POSIX
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h rtems.h"
- tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
+ tmake_file="rs6000/t-rtems t-rtems rs6000/t-ppccomm"
if test x$enable_threads = xyes; then
thread_file='rtems'
fi
diff --git a/contrib/gcc/config/alpha/t-osf4 b/contrib/gcc/config/alpha/t-osf4
index e9c451b..0525d61 100644
--- a/contrib/gcc/config/alpha/t-osf4
+++ b/contrib/gcc/config/alpha/t-osf4
@@ -17,6 +17,6 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
# $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time.
-SHLIB_INSTALL = $(INSTALL_DATA) $(SHLIB_NAME) $$(slibdir)/$(SHLIB_SONAME); \
- rm -f $$(slibdir)/$(SHLIB_NAME); \
- $(LN_S) $(SHLIB_SONAME) $$(slibdir)/$(SHLIB_NAME)
+SHLIB_INSTALL = $(INSTALL_DATA) $(SHLIB_NAME) $$(DESTDIR)$$(slibdir)/$(SHLIB_SONAME); \
+ rm -f $$(DESTDIR)$$(slibdir)/$(SHLIB_NAME); \
+ $(LN_S) $(SHLIB_SONAME) $$(DESTDIR)$$(slibdir)/$(SHLIB_NAME)
diff --git a/contrib/gcc/config/arm/t-netbsd b/contrib/gcc/config/arm/t-netbsd
index 511b015..76e431b 100644
--- a/contrib/gcc/config/arm/t-netbsd
+++ b/contrib/gcc/config/arm/t-netbsd
@@ -16,9 +16,9 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
# $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time.
-SHLIB_INSTALL = $(INSTALL_DATA) $(SHLIB_NAME) $$(slibdir)/$(SHLIB_SONAME); \
- rm -f $$(slibdir)/$(SHLIB_NAME); \
- $(LN_S) $(SHLIB_SONAME) $$(slibdir)/$(SHLIB_NAME)
+SHLIB_INSTALL = $(INSTALL_DATA) $(SHLIB_NAME) $$(DESTDIR)$$(slibdir)/$(SHLIB_SONAME); \
+ rm -f $$(DESTDIR)$$(slibdir)/$(SHLIB_NAME); \
+ $(LN_S) $(SHLIB_SONAME) $$(DESTDIR)$$(slibdir)/$(SHLIB_NAME)
# Don't build enquire
ENQUIRE=
diff --git a/contrib/gcc/config/i386/cygwin.h b/contrib/gcc/config/i386/cygwin.h
index 35f8209..a0b8834 100644
--- a/contrib/gcc/config/i386/cygwin.h
+++ b/contrib/gcc/config/i386/cygwin.h
@@ -431,15 +431,15 @@ extern void i386_pe_unique_section PARAMS ((TREE, int));
/* Don't assume anything about the header files. */
#define NO_IMPLICIT_EXTERN_C
-#define SUBTARGET_PROLOGUE \
- if (current_function_profile \
- && MAIN_NAME_P (DECL_NAME (current_function_decl))) \
- { \
- emit_call_insn (gen_rtx (CALL, VOIDmode, \
+#undef PROFILE_HOOK
+#define PROFILE_HOOK(LABEL) \
+ if (MAIN_NAME_P (DECL_NAME (current_function_decl))) \
+ { \
+ emit_call_insn (gen_rtx (CALL, VOIDmode, \
gen_rtx_MEM (FUNCTION_MODE, \
gen_rtx_SYMBOL_REF (Pmode, "_monstartup")), \
const0_rtx)); \
- }
+ }
/* External function declarations. */
diff --git a/contrib/gcc/config/i386/i386.c b/contrib/gcc/config/i386/i386.c
index c476406..054a925 100644
--- a/contrib/gcc/config/i386/i386.c
+++ b/contrib/gcc/config/i386/i386.c
@@ -924,7 +924,7 @@ override_options ()
if (flag_asynchronous_unwind_tables == 2)
flag_asynchronous_unwind_tables = 0;
if (flag_pcc_struct_return == 2)
- flag_pcc_struct_return = 1;
+ flag_pcc_struct_return = DEFAULT_PCC_STRUCT_RETURN;
}
#ifdef SUBTARGET_OVERRIDE_OPTIONS
diff --git a/contrib/gcc/config/i386/i386.h b/contrib/gcc/config/i386/i386.h
index db6970e..7ab9063 100644
--- a/contrib/gcc/config/i386/i386.h
+++ b/contrib/gcc/config/i386/i386.h
@@ -524,11 +524,11 @@ extern int ix86_arch;
#define CPP_CPU_DEFAULT_SPEC "-D__tune_i686__ -D__tune_pentiumpro__"
#endif
#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium2
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_i686__ -D__tune_pentiumpro__\
+#define CPP_CPU_DEFAULT_SPEC "-D__tune_i686__ -D__tune_pentiumpro__ \
-D__tune_pentium2__"
#endif
#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium3
-#define CPP_CPU_DEFAULT_SPEC "-D__tune_i686__ -D__tune_pentiumpro__\
+#define CPP_CPU_DEFAULT_SPEC "-D__tune_i686__ -D__tune_pentiumpro__ \
-D__tune_pentium2__ -D__tune_pentium3__"
#endif
#if TARGET_CPU_DEFAULT == TARGET_CPU_DEFAULT_pentium4
diff --git a/contrib/gcc/config/i386/mingw32.h b/contrib/gcc/config/i386/mingw32.h
index b93e856..629328e 100644
--- a/contrib/gcc/config/i386/mingw32.h
+++ b/contrib/gcc/config/i386/mingw32.h
@@ -106,7 +106,3 @@ do { \
putc ('\"', asm_file); \
} while (0)
-/* Override Cygwin's definition. This is necessary now due to the way
- Cygwin profiling code is written. Once "fixed", we can remove this. */
-#undef SUBTARGET_PROLOGUE
-
diff --git a/contrib/gcc/config/rs6000/linux.h b/contrib/gcc/config/rs6000/linux.h
index 99c0453..f5cbd7a 100644
--- a/contrib/gcc/config/rs6000/linux.h
+++ b/contrib/gcc/config/rs6000/linux.h
@@ -1,7 +1,7 @@
/* Definitions of target machine for GNU compiler,
for powerpc machines running Linux.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation,
- Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Free Software Foundation, Inc.
Contributed by Michael Meissner (meissner@cygnus.com).
This file is part of GNU CC.
@@ -91,12 +91,34 @@ enum { SIGNAL_FRAMESIZE = 64 };
long new_cfa_; \
int i_; \
\
- /* li r0, 0x7777; sc (rt_sigreturn) */ \
- /* li r0, 0x6666; sc (sigreturn) */ \
- if (((*(unsigned int *) (pc_+0) == 0x38007777) \
- || (*(unsigned int *) (pc_+0) == 0x38006666)) \
- && (*(unsigned int *) (pc_+4) == 0x44000002)) \
- sc_ = (CONTEXT)->cfa + SIGNAL_FRAMESIZE; \
+ /* li r0, 0x7777; sc (sigreturn old) */ \
+ /* li r0, 0x0077; sc (sigreturn new) */ \
+ /* li r0, 0x6666; sc (rt_sigreturn old) */ \
+ /* li r0, 0x00AC; sc (rt_sigreturn new) */ \
+ if (*(unsigned int *) (pc_+4) != 0x44000002) \
+ break; \
+ if (*(unsigned int *) (pc_+0) == 0x38007777 \
+ || *(unsigned int *) (pc_+0) == 0x38000077) \
+ { \
+ struct sigframe { \
+ char gap[SIGNAL_FRAMESIZE]; \
+ struct sigcontext sigctx; \
+ } *rt_ = (CONTEXT)->cfa; \
+ sc_ = &rt_->sigctx; \
+ } \
+ else if (*(unsigned int *) (pc_+0) == 0x38006666 \
+ || *(unsigned int *) (pc_+0) == 0x380000AC) \
+ { \
+ struct rt_sigframe { \
+ char gap[SIGNAL_FRAMESIZE]; \
+ unsigned long _unused[2]; \
+ struct siginfo *pinfo; \
+ void *puc; \
+ struct siginfo info; \
+ struct ucontext uc; \
+ } *rt_ = (CONTEXT)->cfa; \
+ sc_ = &rt_->uc.uc_mcontext; \
+ } \
else \
break; \
\
@@ -119,11 +141,13 @@ enum { SIGNAL_FRAMESIZE = 64 };
\
/* The unwinder expects the IP to point to the following insn, \
whereas the kernel returns the address of the actual \
- faulting insn. */ \
- sc_->regs->nip += 4; \
+ faulting insn. We store NIP+4 in an unused register slot to \
+ get the same result for multiple evaluation of the same signal \
+ frame. */ \
+ sc_->regs->gpr[47] = sc_->regs->nip + 4; \
(FS)->regs.reg[CR0_REGNO].how = REG_SAVED_OFFSET; \
(FS)->regs.reg[CR0_REGNO].loc.offset \
- = (long)&(sc_->regs->nip) - new_cfa_; \
+ = (long)&(sc_->regs->gpr[47]) - new_cfa_; \
(FS)->retaddr_column = CR0_REGNO; \
goto SUCCESS; \
} while (0)
diff --git a/contrib/gcc/config/rs6000/rs6000-protos.h b/contrib/gcc/config/rs6000/rs6000-protos.h
index 19aeb07..f6024ec 100644
--- a/contrib/gcc/config/rs6000/rs6000-protos.h
+++ b/contrib/gcc/config/rs6000/rs6000-protos.h
@@ -77,6 +77,7 @@ extern int constant_pool_expr_p PARAMS ((rtx));
extern int toc_relative_expr_p PARAMS ((rtx));
extern int expand_block_move PARAMS ((rtx[]));
extern int load_multiple_operation PARAMS ((rtx, enum machine_mode));
+extern const char * rs6000_output_load_multiple PARAMS ((rtx[]));
extern int store_multiple_operation PARAMS ((rtx, enum machine_mode));
extern int branch_comparison_operator PARAMS ((rtx, enum machine_mode));
extern int branch_positive_comparison_operator
diff --git a/contrib/gcc/config/rs6000/rs6000.c b/contrib/gcc/config/rs6000/rs6000.c
index 2adb119..89808cc 100644
--- a/contrib/gcc/config/rs6000/rs6000.c
+++ b/contrib/gcc/config/rs6000/rs6000.c
@@ -1,6 +1,6 @@
/* Subroutines used for code generation on IBM RS/6000.
Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
@@ -77,6 +77,9 @@ int rs6000_altivec_abi;
/* Set to non-zero once AIX common-mode calls have been defined. */
static int common_mode_defined;
+/* Private copy of original value of flag_pic for ABI_AIX. */
+static int rs6000_flag_pic;
+
/* Save information from a "cmpxx" operation until the branch or scc is
emitted. */
rtx rs6000_compare_op0, rs6000_compare_op1;
@@ -152,6 +155,7 @@ static void rs6000_elf_asm_out_destructor PARAMS ((rtx, int));
#ifdef OBJECT_FORMAT_COFF
static void xcoff_asm_named_section PARAMS ((const char *, unsigned int));
#endif
+static bool rs6000_binds_local_p PARAMS ((tree));
static int rs6000_adjust_cost PARAMS ((rtx, rtx, rtx, int));
static int rs6000_adjust_priority PARAMS ((rtx, int));
static int rs6000_issue_rate PARAMS ((void));
@@ -484,11 +488,8 @@ rs6000_override_options (default_cpu)
if (flag_pic != 0 && DEFAULT_ABI == ABI_AIX)
{
+ rs6000_flag_pic = flag_pic;
flag_pic = 0;
-
- if (extra_warnings)
- warning ("-f%s ignored (all code is position independent)",
- (flag_pic > 1) ? "PIC" : "pic");
}
#ifdef XCOFF_DEBUGGING_INFO
@@ -5220,6 +5221,64 @@ store_multiple_operation (op, mode)
return 1;
}
+/* Return a string to perform a load_multiple operation.
+ operands[0] is the vector.
+ operands[1] is the source address.
+ operands[2] is the first destination register. */
+
+const char *
+rs6000_output_load_multiple (operands)
+ rtx operands[3];
+{
+ /* We have to handle the case where the pseudo used to contain the address
+ is assigned to one of the output registers. */
+ int i, j;
+ int words = XVECLEN (operands[0], 0);
+ rtx xop[10];
+
+ if (XVECLEN (operands[0], 0) == 1)
+ return "{l|lwz} %2,0(%1)";
+
+ for (i = 0; i < words; i++)
+ if (refers_to_regno_p (REGNO (operands[2]) + i,
+ REGNO (operands[2]) + i + 1, operands[1], 0))
+ {
+ if (i == words-1)
+ {
+ xop[0] = GEN_INT (4 * (words-1));
+ xop[1] = operands[1];
+ xop[2] = operands[2];
+ output_asm_insn ("{lsi|lswi} %2,%1,%0\n\t{l|lwz} %1,%0(%1)", xop);
+ return "";
+ }
+ else if (i == 0)
+ {
+ xop[0] = GEN_INT (4 * (words-1));
+ xop[1] = operands[1];
+ xop[2] = gen_rtx_REG (SImode, REGNO (operands[2]) + 1);
+ output_asm_insn ("{cal %1,4(%1)|addi %1,%1,4}\n\t{lsi|lswi} %2,%1,%0\n\t{l|lwz} %1,-4(%1)", xop);
+ return "";
+ }
+ else
+ {
+ for (j = 0; j < words; j++)
+ if (j != i)
+ {
+ xop[0] = GEN_INT (j * 4);
+ xop[1] = operands[1];
+ xop[2] = gen_rtx_REG (SImode, REGNO (operands[2]) + j);
+ output_asm_insn ("{l|lwz} %2,%0(%1)", xop);
+ }
+ xop[0] = GEN_INT (i * 4);
+ xop[1] = operands[1];
+ output_asm_insn ("{l|lwz} %1,%0(%1)", xop);
+ return "";
+ }
+ }
+
+ return "{lsi|lswi} %2,%1,%N0";
+}
+
/* Return 1 for a parallel vrsave operation. */
int
@@ -10881,7 +10940,45 @@ rs6000_unique_section (decl, reloc)
DECL_SECTION_NAME (decl) = build_string (len, string);
}
-
+
+static bool
+rs6000_binds_local_p (exp)
+ tree exp;
+{
+ bool local_p;
+ tree attr;
+
+ /* A non-decl is an entry in the constant pool. */
+ if (!DECL_P (exp))
+ local_p = true;
+ /* Static variables are always local. */
+ else if (! TREE_PUBLIC (exp))
+ local_p = true;
+ /* Otherwise, variables defined outside this object may not be local. */
+ else if (DECL_EXTERNAL (exp))
+ local_p = false;
+ /* Linkonce and weak data are never local. */
+ else if (DECL_ONE_ONLY (exp) || DECL_WEAK (exp))
+ local_p = false;
+ /* If PIC, then assume that any global name can be overridden by
+ * symbols resolved from other modules. */
+ else if (flag_pic || rs6000_flag_pic)
+ local_p = false;
+ /* Uninitialized COMMON variable may be unified with symbols
+ * resolved from other modules. */
+ else if (DECL_COMMON (exp)
+ && (DECL_INITIAL (exp) == NULL
+ || DECL_INITIAL (exp) == error_mark_node))
+ local_p = false;
+ /* Otherwise we're left with initialized (or non-common) global data
+ * which is of necessity defined locally. */
+ else
+ local_p = true;
+
+ return local_p;
+}
+
+
/* If we are referencing a function that is static or is known to be
in this file, make the SYMBOL_REF special. We can use this to indicate
that we can branch to this function without emitting a no-op after the
@@ -10897,8 +10994,7 @@ rs6000_encode_section_info (decl)
if (TREE_CODE (decl) == FUNCTION_DECL)
{
rtx sym_ref = XEXP (DECL_RTL (decl), 0);
- if ((TREE_ASM_WRITTEN (decl) || ! TREE_PUBLIC (decl))
- && ! DECL_WEAK (decl))
+ if (rs6000_binds_local_p (decl))
SYMBOL_REF_FLAG (sym_ref) = 1;
if (DEFAULT_ABI == ABI_AIX)
@@ -10917,11 +11013,15 @@ rs6000_encode_section_info (decl)
&& DEFAULT_ABI == ABI_V4
&& TREE_CODE (decl) == VAR_DECL)
{
+ rtx sym_ref = XEXP (DECL_RTL (decl), 0);
int size = int_size_in_bytes (TREE_TYPE (decl));
tree section_name = DECL_SECTION_NAME (decl);
const char *name = (char *)0;
int len = 0;
+ if (rs6000_binds_local_p (decl))
+ SYMBOL_REF_FLAG (sym_ref) = 1;
+
if (section_name)
{
if (TREE_CODE (section_name) == STRING_CST)
diff --git a/contrib/gcc/config/rs6000/rs6000.md b/contrib/gcc/config/rs6000/rs6000.md
index 6e86d73..ec16c19 100644
--- a/contrib/gcc/config/rs6000/rs6000.md
+++ b/contrib/gcc/config/rs6000/rs6000.md
@@ -8734,65 +8734,120 @@
adjust_address (op1, SImode, i * 4));
}")
-(define_insn ""
+(define_insn "*ldmsi8"
[(match_parallel 0 "load_multiple_operation"
- [(set (match_operand:SI 1 "gpc_reg_operand" "=r")
- (mem:SI (match_operand:SI 2 "gpc_reg_operand" "b")))])]
- "TARGET_STRING"
+ [(set (match_operand:SI 2 "gpc_reg_operand" "")
+ (mem:SI (match_operand:SI 1 "gpc_reg_operand" "b")))
+ (set (match_operand:SI 3 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 4))))
+ (set (match_operand:SI 4 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 8))))
+ (set (match_operand:SI 5 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 12))))
+ (set (match_operand:SI 6 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 16))))
+ (set (match_operand:SI 7 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 20))))
+ (set (match_operand:SI 8 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 24))))
+ (set (match_operand:SI 9 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 28))))])]
+ "TARGET_STRING && XVECLEN (operands[0], 0) == 8"
"*
-{
- /* We have to handle the case where the pseudo used to contain the address
- is assigned to one of the output registers. */
- int i, j;
- int words = XVECLEN (operands[0], 0);
- rtx xop[10];
+{ return rs6000_output_load_multiple (operands); }"
+ [(set_attr "type" "load")
+ (set_attr "length" "32")])
- if (XVECLEN (operands[0], 0) == 1)
- return \"{l|lwz} %1,0(%2)\";
+(define_insn "*ldmsi7"
+ [(match_parallel 0 "load_multiple_operation"
+ [(set (match_operand:SI 2 "gpc_reg_operand" "")
+ (mem:SI (match_operand:SI 1 "gpc_reg_operand" "b")))
+ (set (match_operand:SI 3 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 4))))
+ (set (match_operand:SI 4 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 8))))
+ (set (match_operand:SI 5 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 12))))
+ (set (match_operand:SI 6 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 16))))
+ (set (match_operand:SI 7 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 20))))
+ (set (match_operand:SI 8 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 24))))])]
+ "TARGET_STRING && XVECLEN (operands[0], 0) == 7"
+ "*
+{ return rs6000_output_load_multiple (operands); }"
+ [(set_attr "type" "load")
+ (set_attr "length" "32")])
- for (i = 0; i < words; i++)
- if (refers_to_regno_p (REGNO (operands[1]) + i,
- REGNO (operands[1]) + i + 1, operands[2], 0))
- {
- if (i == words-1)
- {
- xop[0] = operands[1];
- xop[1] = operands[2];
- xop[2] = GEN_INT (4 * (words-1));
- output_asm_insn (\"{lsi|lswi} %0,%1,%2\;{l|lwz} %1,%2(%1)\", xop);
- return \"\";
- }
- else if (i == 0)
- {
- xop[0] = operands[1];
- xop[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1);
- xop[2] = GEN_INT (4 * (words-1));
- output_asm_insn (\"{cal %0,4(%0)|addi %0,%0,4}\;{lsi|lswi} %1,%0,%2\;{l|lwz} %0,-4(%0)\", xop);
- return \"\";
- }
- else
- {
- for (j = 0; j < words; j++)
- if (j != i)
- {
- xop[0] = gen_rtx_REG (SImode, REGNO (operands[1]) + j);
- xop[1] = operands[2];
- xop[2] = GEN_INT (j * 4);
- output_asm_insn (\"{l|lwz} %0,%2(%1)\", xop);
- }
- xop[0] = operands[2];
- xop[1] = GEN_INT (i * 4);
- output_asm_insn (\"{l|lwz} %0,%1(%0)\", xop);
- return \"\";
- }
- }
+(define_insn "*ldmsi6"
+ [(match_parallel 0 "load_multiple_operation"
+ [(set (match_operand:SI 2 "gpc_reg_operand" "")
+ (mem:SI (match_operand:SI 1 "gpc_reg_operand" "b")))
+ (set (match_operand:SI 3 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 4))))
+ (set (match_operand:SI 4 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 8))))
+ (set (match_operand:SI 5 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 12))))
+ (set (match_operand:SI 6 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 16))))
+ (set (match_operand:SI 7 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 20))))])]
+ "TARGET_STRING && XVECLEN (operands[0], 0) == 6"
+ "*
+{ return rs6000_output_load_multiple (operands); }"
+ [(set_attr "type" "load")
+ (set_attr "length" "32")])
- return \"{lsi|lswi} %1,%2,%N0\";
-}"
+(define_insn "*ldmsi5"
+ [(match_parallel 0 "load_multiple_operation"
+ [(set (match_operand:SI 2 "gpc_reg_operand" "")
+ (mem:SI (match_operand:SI 1 "gpc_reg_operand" "b")))
+ (set (match_operand:SI 3 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 4))))
+ (set (match_operand:SI 4 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 8))))
+ (set (match_operand:SI 5 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 12))))
+ (set (match_operand:SI 6 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 16))))])]
+ "TARGET_STRING && XVECLEN (operands[0], 0) == 5"
+ "*
+{ return rs6000_output_load_multiple (operands); }"
+ [(set_attr "type" "load")
+ (set_attr "length" "32")])
+
+(define_insn "*ldmsi4"
+ [(match_parallel 0 "load_multiple_operation"
+ [(set (match_operand:SI 2 "gpc_reg_operand" "")
+ (mem:SI (match_operand:SI 1 "gpc_reg_operand" "b")))
+ (set (match_operand:SI 3 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 4))))
+ (set (match_operand:SI 4 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 8))))
+ (set (match_operand:SI 5 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 12))))])]
+ "TARGET_STRING && XVECLEN (operands[0], 0) == 4"
+ "*
+{ return rs6000_output_load_multiple (operands); }"
+ [(set_attr "type" "load")
+ (set_attr "length" "32")])
+
+(define_insn "*ldmsi3"
+ [(match_parallel 0 "load_multiple_operation"
+ [(set (match_operand:SI 2 "gpc_reg_operand" "")
+ (mem:SI (match_operand:SI 1 "gpc_reg_operand" "b")))
+ (set (match_operand:SI 3 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 4))))
+ (set (match_operand:SI 4 "gpc_reg_operand" "")
+ (mem:SI (plus:SI (match_dup 1) (const_int 8))))])]
+ "TARGET_STRING && XVECLEN (operands[0], 0) == 3"
+ "*
+{ return rs6000_output_load_multiple (operands); }"
[(set_attr "type" "load")
(set_attr "length" "32")])
-
(define_expand "store_multiple"
[(match_par_dup 3 [(set (match_operand:SI 0 "" "")
(match_operand:SI 1 "" ""))
@@ -8837,7 +8892,7 @@
gen_rtx_REG (SImode, regno + i));
}")
-(define_insn ""
+(define_insn "*store_multiple_power"
[(match_parallel 0 "store_multiple_operation"
[(set (match_operand:SI 1 "indirect_operand" "=Q")
(match_operand:SI 2 "gpc_reg_operand" "r"))
@@ -8846,7 +8901,7 @@
"{stsi|stswi} %2,%P1,%O0"
[(set_attr "type" "store")])
-(define_insn ""
+(define_insn "*store_multiple_string"
[(match_parallel 0 "store_multiple_operation"
[(set (mem:SI (match_operand:SI 1 "gpc_reg_operand" "b"))
(match_operand:SI 2 "gpc_reg_operand" "r"))
diff --git a/contrib/gcc/config/rs6000/rtems.h b/contrib/gcc/config/rs6000/rtems.h
index aa68130..cc8295a 100644
--- a/contrib/gcc/config/rs6000/rtems.h
+++ b/contrib/gcc/config/rs6000/rtems.h
@@ -1,5 +1,5 @@
/* Definitions for rtems targeting a PowerPC using elf.
- Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Joel Sherrill (joel@OARcorp.com).
This file is part of GNU CC.
@@ -22,5 +22,8 @@ Boston, MA 02111-1307, USA. */
/* Specify predefined symbols in preprocessor. */
#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-DPPC -D__rtems__ \
+#define CPP_PREDEFINES "-DPPC -D__rtems__ -D__USE_INIT_FINI__ \
-Asystem=rtems -Acpu=powerpc -Amachine=powerpc"
+
+#undef CPP_OS_DEFAULT_SPEC
+#define CPP_OS_DEFAULT_SPEC "%(cpp_os_rtems)"
diff --git a/contrib/gcc/config/rs6000/sysv4.h b/contrib/gcc/config/rs6000/sysv4.h
index 635e926..ecc37ee 100644
--- a/contrib/gcc/config/rs6000/sysv4.h
+++ b/contrib/gcc/config/rs6000/sysv4.h
@@ -1,5 +1,5 @@
/* Target definitions for GNU compiler for PowerPC running System V.4
- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -1318,6 +1318,21 @@ ncrtn.o%s"
#define CPP_OS_NETBSD_SPEC "\
-D__powerpc__ -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__"
+/* RTEMS support. */
+
+#define CPP_OS_RTEMS_SPEC "\
+%{!mcpu*: %{!Dppc*: %{!Dmpc*: -Dmpc750} } }\
+%{mcpu=403: %{!Dppc*: %{!Dmpc*: -Dppc403} } } \
+%{mcpu=505: %{!Dppc*: %{!Dmpc*: -Dmpc505} } } \
+%{mcpu=601: %{!Dppc*: %{!Dmpc*: -Dppc601} } } \
+%{mcpu=602: %{!Dppc*: %{!Dmpc*: -Dppc602} } } \
+%{mcpu=603: %{!Dppc*: %{!Dmpc*: -Dppc603} } } \
+%{mcpu=603e: %{!Dppc*: %{!Dmpc*: -Dppc603e} } } \
+%{mcpu=604: %{!Dppc*: %{!Dmpc*: -Dmpc604} } } \
+%{mcpu=750: %{!Dppc*: %{!Dmpc*: -Dmpc750} } } \
+%{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \
+%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } }"
+
/* VxWorks support. */
/* VxWorks does all the library stuff itself. */
#define LIB_VXWORKS_SPEC ""
@@ -1439,6 +1454,7 @@ ncrtn.o%s"
{ "cpp_os_linux", CPP_OS_LINUX_SPEC }, \
{ "cpp_os_netbsd", CPP_OS_NETBSD_SPEC }, \
{ "cpp_os_vxworks", CPP_OS_VXWORKS_SPEC }, \
+ { "cpp_os_rtems", CPP_OS_RTEMS_SPEC }, \
{ "cpp_os_default", CPP_OS_DEFAULT_SPEC },
/* Define this macro as a C expression for the initializer of an
diff --git a/contrib/gcc/config/rs6000/t-aix43 b/contrib/gcc/config/rs6000/t-aix43
index 7be8ebc..9bbfe00 100644
--- a/contrib/gcc/config/rs6000/t-aix43
+++ b/contrib/gcc/config/rs6000/t-aix43
@@ -58,7 +58,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
rm -f @multilib_dir@/shr.o
# $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time.
-SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.a $$(slibdir)/
+SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.a $$(DESTDIR)$$(slibdir)/
SHLIB_LIBS = -lc `case @shlib_base_name@ in *pthread*) echo -lpthread ;; esac`
SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
diff --git a/contrib/gcc/config/rs6000/t-rtems b/contrib/gcc/config/rs6000/t-rtems
new file mode 100644
index 0000000..364a22d
--- /dev/null
+++ b/contrib/gcc/config/rs6000/t-rtems
@@ -0,0 +1,86 @@
+# Multilibs for powerpc RTEMS targets.
+
+MULTILIB_OPTIONS = \
+mcpu=403/mcpu=505/mcpu=601/mcpu=602/mcpu=603/mcpu=603e/mcpu=604/mcpu=750/mcpu=821/mcpu=860 \
+Dmpc509/Dmpc8260 \
+D_OLD_EXCEPTIONS \
+msoft-float
+
+MULTILIB_DIRNAMES = \
+m403 m505 m601 m602 m603 m603e m604 m750 m821 m860 \
+mpc509 \
+mpc8260 \
+roe \
+nof
+
+MULTILIB_EXTRA_OPTS = mrelocatable-lib mno-eabi mstrict-align
+
+# MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT}
+MULTILIB_MATCHES = ${MULTILIB_MATCHES_ENDIAN} \
+ ${MULTILIB_MATCHES_SYSV} \
+ mcpu?505/Dmpc505=mcpu?505/Dmpc509
+
+#
+# RTEMS old/new-exceptions handling
+#
+# old-exception processing is depredicated, therefore
+#
+# * Cpu-variants supporting new exception processing are build
+# with new exception processing only
+# * Cpu-variants not having been ported to new exception processing are
+# build with old and new exception processing
+#
+
+# Cpu-variants supporting new exception processing only
+MULTILIB_NEW_EXCEPTIONS_ONLY = \
+*mcpu=604*/*D_OLD_EXCEPTIONS* \
+*mcpu=750*/*D_OLD_EXCEPTIONS* \
+*mcpu=821*/*D_OLD_EXCEPTIONS* \
+*Dmpc8260*/*D_OLD_EXCEPTIONS* \
+*mcpu=860*/*D_OLD_EXCEPTIONS*
+
+# Soft-float only, default implies msoft-float
+# NOTE: Must match with MULTILIB_MATCHES_FLOAT and MULTILIB_MATCHES
+MULTILIB_SOFTFLOAT_ONLY = \
+mcpu=403/*msoft-float* \
+mcpu=821/*msoft-float* \
+mcpu=860/*msoft-float*
+
+# Hard-float only, take out msoft-float
+MULTILIB_HARDFLOAT_ONLY = \
+mcpu=505/*msoft-float*
+
+MULTILIB_EXCEPTIONS =
+
+# Disallow -D_OLD_EXCEPTIONS without other options
+MULTILIB_EXCEPTIONS += D_OLD_EXCEPTIONS*
+
+# Disallow -Dppc and -Dmpc without other options
+MULTILIB_EXCEPTIONS += Dppc* Dmpc*
+
+MULTILIB_EXCEPTIONS += \
+${MULTILIB_NEW_EXCEPTIONS_ONLY} \
+${MULTILIB_SOFTFLOAT_ONLY} \
+${MULTILIB_HARDFLOAT_ONLY}
+
+# Special rules
+# Take out all variants we don't want
+MULTILIB_EXCEPTIONS += mcpu=403/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=403/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=505/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=505/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=601/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=601/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=602/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=602/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=603/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=603/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=603e/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=604/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=604/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=750/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=750/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=821/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=821/Dmpc8260*
+MULTILIB_EXCEPTIONS += mcpu=860/Dmpc509*
+MULTILIB_EXCEPTIONS += mcpu=860/Dmpc8260*
diff --git a/contrib/gcc/config/t-slibgcc-elf-ver b/contrib/gcc/config/t-slibgcc-elf-ver
index c02ff9d..a176b10 100644
--- a/contrib/gcc/config/t-slibgcc-elf-ver
+++ b/contrib/gcc/config/t-slibgcc-elf-ver
@@ -19,11 +19,11 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
# $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time.
SHLIB_INSTALL = \
- $$(SHELL) $$(srcdir)/mkinstalldirs $$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
+ $$(SHELL) $$(srcdir)/mkinstalldirs $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
$(INSTALL_DATA) $(SHLIB_NAME) \
- $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
- rm -f $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
+ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
+ rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
$(LN_S) $(SHLIB_SONAME) \
- $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
+ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
diff --git a/contrib/gcc/config/t-slibgcc-sld b/contrib/gcc/config/t-slibgcc-sld
index c11a572..6bdd521 100644
--- a/contrib/gcc/config/t-slibgcc-sld
+++ b/contrib/gcc/config/t-slibgcc-sld
@@ -17,11 +17,11 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
# $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time.
SHLIB_INSTALL = \
- $$(SHELL) $$(srcdir)/mkinstalldirs $$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
+ $$(SHELL) $$(srcdir)/mkinstalldirs $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
$(INSTALL_DATA) $(SHLIB_NAME) \
- $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
- rm -f $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
+ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
+ rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
$(LN_S) $(SHLIB_SONAME) \
- $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
+ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
diff --git a/contrib/gcc/configure b/contrib/gcc/configure
index ddb8975..89d3372 100755
--- a/contrib/gcc/configure
+++ b/contrib/gcc/configure
@@ -7216,7 +7216,7 @@ elif test x$gcc_cv_as != x; then
# the date string after the version number.
ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
if echo "$ld_ver" | grep GNU > /dev/null; then
- ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
+ ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'`
ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
if test 0"$ld_date" -lt 20020404; then
if test -n "$ld_date"; then
diff --git a/contrib/gcc/configure.in b/contrib/gcc/configure.in
index 69545a4..d9a0d29 100644
--- a/contrib/gcc/configure.in
+++ b/contrib/gcc/configure.in
@@ -1537,7 +1537,7 @@ elif test x$gcc_cv_as != x; then
ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
if echo "$ld_ver" | grep GNU > /dev/null; then
changequote(,)dnl
- ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
+ ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'`
ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
if test 0"$ld_date" -lt 20020404; then
if test -n "$ld_date"; then
diff --git a/contrib/gcc/cp/ChangeLog b/contrib/gcc/cp/ChangeLog
index 5a611ae..2fd119a 100644
--- a/contrib/gcc/cp/ChangeLog
+++ b/contrib/gcc/cp/ChangeLog
@@ -1,3 +1,120 @@
+2003-02-05 Release Manager
+
+ * GCC 3.2.2 Released.
+
+2003-02-03 Mark Mitchell <mark@codesourcery.com>
+
+ PR C++/7129
+ * operators.def: Add <?= and >?=.
+
+2003-01-28 Christian Cornelssen <ccorn@cs.tu-berlin.de>
+
+ * Make-lang.in (c++.install-common, c++.install-man)
+ (c++.uninstall): Prepend $(DESTDIR) to destination paths
+ in all (un)installation commands.
+ (c++.install-common): Rewrite $(LN) commands to support
+ DESTDIR with "ln" as well as with "ln -s".
+
+2003-01-22 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/9328
+ * error.c (dump_decl): For an OVERLOAD, just print the name of the
+ function; it doesn't make sense to try to print its type.
+ * semantics.c (finish_typeof): Issue errors about invalid uses.
+
+2003-01-21 Jeffrey D. Oldham <oldham@codesourcery.com>
+
+ PR c++/47
+ * cp-tree.h (lookup_nested_field): Add declaration.
+ * decl.c (lookup_name_real): Call lookup_nested_field.
+ * search.c (lookup_nested_field): Add function.
+
+2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/8503
+ Remove DR 295 implementation.
+ * pt.c (check_cv_quals_for_unify): Disable function & method cases.
+ * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
+ about ignoring volatile qualifiers.
+
+2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ * parse.y (bad_parm): Add missing argument to error function call.
+
+2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/8442
+ * decl2.c (handle_class_head): Verify if the looked up name is a
+ type or template.
+ * pt.c (convert_template_argument): Fix type or template template
+ parameter decision logic.
+
+2002-12-13 Joe Buck <jbuck@synopsys.com>
+
+ * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
+ anonymous structs.
+
+2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ PR C++/8031
+ * cvt.c (convert_to_pointer_force): Don't try comparing against
+ erronous type.
+
+2002-12-10 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/8372
+ * pt.c (tsubst_copy): Handle destructor names more correctly.
+
+2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * error.c (dump_expr): Fix format specifier warning.
+
+2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ PR C++/8799
+ * error.c (dump_expr): Don't ever try to dump a non-existent
+ expression.
+
+2002-12-02 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/8615
+ * error.c (dump_expr): Handle character constants with
+ TREE_OVERFLOW set.
+
+2002-12-01 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/5919
+ * pt.c (unify): Use variably_modified_type_p to test validity of
+ template argument types.
+
+2002-12-01 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/8727
+ * cp-tree.h (lang_type_class): Add typeinfo_var.
+ (CLASSTYPE_TYPEINFO_VAR): New macro.
+ * rtti.c (get_tinfo_decl): Use it.
+
+ PR c++/8663
+ * init.c (expand_member_init): Always get the main variant of a
+ base class.
+
+2002-12-01 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/8332
+ PR c++/8493
+ * decl.c (cxx_init_decl_processing): Use size_type_node, not
+ c_size_type_node.
+ * decl2.c (coerce_new_type): Likewise.
+ * except.c (do_allocate_exception): Likewise.
+ * typeck.c (c_sizeof): Likewise.
+ (c_sizeof_nowarn): Likewise.
+
+2002-11-30 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/8214
+ * typeck.c (convert_for_assignment): Do not use
+ decl_constant_value on the operand.
+
2002-11-19 Release Manager
* GCC 3.2.1 Released.
diff --git a/contrib/gcc/cp/Make-lang.in b/contrib/gcc/cp/Make-lang.in
index df2de35..aef2d35 100644
--- a/contrib/gcc/cp/Make-lang.in
+++ b/contrib/gcc/cp/Make-lang.in
@@ -155,37 +155,42 @@ c++.install-normal:
c++.install-common: installdirs
-if [ -f cc1plus$(exeext) ] ; then \
if [ -f g++-cross$(exeext) ] ; then \
- rm -f $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
- $(INSTALL_PROGRAM) g++-cross$(exeext) $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
- chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
- rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
- $(LN) $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
- if [ -d $(gcc_tooldir)/bin/. ] ; then \
- rm -f $(gcc_tooldir)/bin/g++$(exeext); \
- $(INSTALL_PROGRAM) g++-cross$(exeext) $(gcc_tooldir)/bin/g++$(exeext); \
- rm -f $(gcc_tooldir)/bin/c++$(exeext); \
- $(LN) $(gcc_tooldir)/bin/g++$(exeext) $(gcc_tooldir)/bin/c++$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
+ chmod a+x $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext); \
+ ( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(GXX_CROSS_NAME)$(exeext) $(CXX_CROSS_NAME)$(exeext) ); \
+ if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
+ rm -f $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext); \
+ $(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext); \
+ rm -f $(DESTDIR)$(gcc_tooldir)/bin/c++$(exeext); \
+ ( cd $(DESTDIR)$(gcc_tooldir)/bin && \
+ $(LN) g++$(exeext) c++$(exeext) ); \
else true; fi; \
else \
- rm -f $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
- $(INSTALL_PROGRAM) g++$(exeext) $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
- chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
- rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
- $(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
- rm -f $(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \
- $(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \
- rm -f $(bindir)/$(CXX_TARGET_INSTALL_NAME)$(exeext); \
- $(LN) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_TARGET_INSTALL_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) g++$(exeext) $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
+ chmod a+x $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
+ ( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(GXX_INSTALL_NAME)$(exeext) $(CXX_INSTALL_NAME)$(exeext) ); \
+ rm -f $(DESTDIR)$(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \
+ ( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(GXX_INSTALL_NAME)$(exeext) $(GXX_TARGET_INSTALL_NAME)$(exeext) ); \
+ rm -f $(DESTDIR)$(bindir)/$(CXX_TARGET_INSTALL_NAME)$(exeext); \
+ ( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(CXX_INSTALL_NAME)$(exeext) $(CXX_TARGET_INSTALL_NAME)$(exeext) ); \
fi ; \
if [ x$(DEMANGLER_PROG) != x ] && [ -x "$(DEMANGLER_PROG)" ]; then \
if [ -f g++-cross$(exeext) ] ; then \
- rm -f $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \
- $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \
- chmod a+x $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \
+ chmod a+x $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \
else \
- rm -f $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \
- $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \
- chmod a+x $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \
+ chmod a+x $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \
fi ; \
fi ; \
fi
@@ -195,25 +200,25 @@ c++.install-info:
c++.install-man: installdirs $(srcdir)/cp/g++.1
-if [ -f cc1plus$(exeext) ] ; then \
if [ -f g++-cross$(exeext) ] ; then \
- rm -f $(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
- $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
- chmod a-x $(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
+ rm -f $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
+ $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
+ chmod a-x $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
else \
- rm -f $(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
- $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
- chmod a-x $(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
+ rm -f $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
+ $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
+ chmod a-x $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
fi; \
else true; fi
c++.uninstall:
- -rm -rf $(bindir)/$(CXX_INSTALL_NAME)$(exeext)
- -rm -rf $(bindir)/$(CXX_CROSS_NAME)$(exeext)
- -rm -rf $(bindir)/$(GXX_INSTALL_NAME)$(exeext)
- -rm -rf $(bindir)/$(GXX_CROSS_NAME)$(exeext)
- -rm -rf $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext)
- -rm -rf $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext)
- -rm -rf $(man1dir)/$(GXX_INSTALL_NAME)$(man1ext)
- -rm -rf $(man1dir)/$(GXX_CROSS_NAME)$(man1ext)
+ -rm -rf $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext)
+ -rm -rf $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext)
+ -rm -rf $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext)
#
# Clean hooks:
# A lot of the ancillary files are deleted by the main makefile.
diff --git a/contrib/gcc/cp/NEWS b/contrib/gcc/cp/NEWS
index caee3fb..97d4cd8 100644
--- a/contrib/gcc/cp/NEWS
+++ b/contrib/gcc/cp/NEWS
@@ -1,3 +1,27 @@
+*** Changes in GCC 3.2.2:
+
+* G++ no longer allows in-class initializations of static data members
+ that do not have arithmetic or enumeration type. For example:
+
+ struct S {
+ static const char* const p = "abc";
+ };
+
+ is no longer accepted.
+
+ Use the standards-conformant form:
+
+ struct S {
+ static const char* const p;
+ };
+
+ const char* const S::p = "abc";
+
+ instead.
+
+ (ISO C++ is even stricter; it does not allow in-class
+ initializations of floating-point types.)
+
*** Changes in GCC 3.1:
* -fhonor-std and -fno-honor-std have been removed. -fno-honor-std was
diff --git a/contrib/gcc/cp/cp-tree.h b/contrib/gcc/cp/cp-tree.h
index 9e8199f..a2c0db1 100644
--- a/contrib/gcc/cp/cp-tree.h
+++ b/contrib/gcc/cp/cp-tree.h
@@ -1,6 +1,6 @@
/* Definitions for C++ parsing and type checking.
Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -1266,6 +1266,7 @@ struct lang_type
tree primary_base;
tree vfields;
+ tree typeinfo_var;
tree vbases;
tree tags;
tree size;
@@ -1686,6 +1687,12 @@ struct lang_type
/* Used by various search routines. */
#define IDENTIFIER_MARKED(NODE) TREE_LANG_FLAG_0 (NODE)
+/* The std::type_info variable representing this class, or NULL if no
+ such variable has been created. This field is only set for the
+ TYPE_MAIN_VARIANT of the class. */
+#define CLASSTYPE_TYPEINFO_VAR(NODE) \
+ (TYPE_LANG_SPECIFIC (NODE)->typeinfo_var)
+
/* Accessor macros for the vfield slots in structures. */
/* The virtual function pointer fields that this type contains. For a
@@ -4055,6 +4062,7 @@ extern tree get_dynamic_cast_base_type PARAMS ((tree, tree));
extern void type_access_control PARAMS ((tree, tree));
extern int accessible_p PARAMS ((tree, tree));
extern tree lookup_field PARAMS ((tree, tree, int, int));
+extern tree lookup_nested_field PARAMS ((tree, int));
extern int lookup_fnfields_1 PARAMS ((tree, tree));
extern tree lookup_fnfields PARAMS ((tree, tree, int));
extern tree lookup_member PARAMS ((tree, tree, int, int));
diff --git a/contrib/gcc/cp/cvt.c b/contrib/gcc/cp/cvt.c
index 5e6c92c..1603a2a 100644
--- a/contrib/gcc/cp/cvt.c
+++ b/contrib/gcc/cp/cvt.c
@@ -313,6 +313,8 @@ convert_to_pointer_force (type, expr)
if (binfo)
{
expr = build_base_path (code, expr, binfo, 0);
+ if (expr == error_mark_node)
+ return error_mark_node;
/* Add any qualifier conversions. */
if (!same_type_p (TREE_TYPE (TREE_TYPE (expr)),
TREE_TYPE (type)))
diff --git a/contrib/gcc/cp/decl.c b/contrib/gcc/cp/decl.c
index 06b081c..5c891a5 100644
--- a/contrib/gcc/cp/decl.c
+++ b/contrib/gcc/cp/decl.c
@@ -1,6 +1,6 @@
/* Process declarations and variables for C compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002 Free Software Foundation, Inc.
+ 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -6173,6 +6173,10 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only)
}
}
+ /* The name might be from an enclosing class of the current scope. */
+ if (!val && !nonclass && current_class_type)
+ val = qualify_lookup (lookup_nested_field (name, !yylex), flags);
+
/* Now lookup in namespace scopes. */
if (!val || val_is_implicit_typename)
{
@@ -6659,7 +6663,7 @@ cxx_init_decl_processing ()
ptr_ftype_sizetype
= build_function_type (ptr_type_node,
tree_cons (NULL_TREE,
- c_size_type_node,
+ size_type_node,
void_list_node));
newtype = build_exception_variant
(ptr_ftype_sizetype, add_exception_specifier
@@ -9402,10 +9406,10 @@ check_static_variable_definition (decl, type)
the definition, but not both. If it appears in the class, the
member is a member constant. The file-scope definition is always
required. */
- if (CLASS_TYPE_P (type) || TREE_CODE (type) == REFERENCE_TYPE)
+ if (!ARITHMETIC_TYPE_P (type) && TREE_CODE (type) != ENUMERAL_TYPE)
{
error ("invalid in-class initialization of static data member of non-integral type `%T'",
- type);
+ type);
/* If we just return the declaration, crashes will sometimes
occur. We therefore return void_type_node, as if this was a
friend declaration, to cause callers to completely ignore
diff --git a/contrib/gcc/cp/decl2.c b/contrib/gcc/cp/decl2.c
index 730bbfb..1dbaaf4 100644
--- a/contrib/gcc/cp/decl2.c
+++ b/contrib/gcc/cp/decl2.c
@@ -1583,30 +1583,32 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist)
else
init = digest_init (TREE_TYPE (value), init, (tree *)0);
}
-
- if (TREE_CODE (init) == CONST_DECL)
- init = DECL_INITIAL (init);
- else if (TREE_READONLY_DECL_P (init))
- init = decl_constant_value (init);
- else if (TREE_CODE (init) == CONSTRUCTOR)
- init = digest_init (TREE_TYPE (value), init, (tree *)0);
- if (init == error_mark_node)
- /* We must make this look different than `error_mark_node'
- because `decl_const_value' would mis-interpret it
- as only meaning that this VAR_DECL is defined. */
- init = build1 (NOP_EXPR, TREE_TYPE (value), init);
- else if (processing_template_decl)
- ;
- else if (! TREE_CONSTANT (init))
+
+ if (!processing_template_decl)
{
- /* We can allow references to things that are effectively
- static, since references are initialized with the address. */
- if (TREE_CODE (TREE_TYPE (value)) != REFERENCE_TYPE
- || (TREE_STATIC (init) == 0
- && (!DECL_P (init) || DECL_EXTERNAL (init) == 0)))
+ if (TREE_CODE (init) == CONST_DECL)
+ init = DECL_INITIAL (init);
+ else if (TREE_READONLY_DECL_P (init))
+ init = decl_constant_value (init);
+ else if (TREE_CODE (init) == CONSTRUCTOR)
+ init = digest_init (TREE_TYPE (value), init, (tree *)0);
+ if (init == error_mark_node)
+ /* We must make this look different than `error_mark_node'
+ because `decl_const_value' would mis-interpret it
+ as only meaning that this VAR_DECL is defined. */
+ init = build1 (NOP_EXPR, TREE_TYPE (value), init);
+ else if (! TREE_CONSTANT (init))
{
- error ("field initializer is not constant");
- init = error_mark_node;
+ /* We can allow references to things that are effectively
+ static, since references are initialized with the
+ address. */
+ if (TREE_CODE (TREE_TYPE (value)) != REFERENCE_TYPE
+ || (TREE_STATIC (init) == 0
+ && (!DECL_P (init) || DECL_EXTERNAL (init) == 0)))
+ {
+ error ("field initializer is not constant");
+ init = error_mark_node;
+ }
}
}
}
@@ -2062,17 +2064,17 @@ coerce_new_type (type)
e = 1, error ("`operator new' must return type `%T'", ptr_type_node);
if (!args || args == void_list_node
- || !same_type_p (TREE_VALUE (args), c_size_type_node))
+ || !same_type_p (TREE_VALUE (args), size_type_node))
{
e = 2;
if (args && args != void_list_node)
args = TREE_CHAIN (args);
- pedwarn ("`operator new' takes type `size_t' (`%T') as first parameter", c_size_type_node);
+ pedwarn ("`operator new' takes type `size_t' (`%T') as first parameter", size_type_node);
}
switch (e)
{
case 2:
- args = tree_cons (NULL_TREE, c_size_type_node, args);
+ args = tree_cons (NULL_TREE, size_type_node, args);
/* FALLTHROUGH */
case 1:
type = build_exception_variant
@@ -5239,6 +5241,7 @@ handle_class_head (aggr, scope, id, defn_p, new_type_p)
int *new_type_p;
{
tree decl = NULL_TREE;
+ tree type;
tree current = current_scope ();
bool xrefd_p = false;
@@ -5287,12 +5290,28 @@ handle_class_head (aggr, scope, id, defn_p, new_type_p)
xrefd_p = true;
}
- if (!TYPE_BINFO (TREE_TYPE (decl)))
+ type = TREE_TYPE (decl);
+
+ if (!TYPE_BINFO (type))
{
error ("`%T' is not a class or union type", decl);
return error_mark_node;
}
-
+
+ /* When `A' is a template class, using `class A' without template
+ argument is invalid unless
+ - we are inside the scope of the template class `A' or one of its
+ specialization.
+ - we are declaring the template class `A' itself. */
+ if (TREE_CODE (type) == RECORD_TYPE
+ && CLASSTYPE_IS_TEMPLATE (type)
+ && processing_template_decl <= template_class_depth (current)
+ && ! is_base_of_enclosing_class (type, current_class_type))
+ {
+ error ("template argument is required for `%T'", type);
+ return error_mark_node;
+ }
+
if (defn_p)
{
/* For a definition, we want to enter the containing scope
diff --git a/contrib/gcc/cp/error.c b/contrib/gcc/cp/error.c
index 8a05558..a0217ae 100644
--- a/contrib/gcc/cp/error.c
+++ b/contrib/gcc/cp/error.c
@@ -935,6 +935,25 @@ dump_decl (t, flags)
break;
case OVERLOAD:
+ if (OVL_CHAIN (t))
+ {
+ t = OVL_CURRENT (t);
+ if (DECL_CLASS_SCOPE_P (t))
+ {
+ dump_type (DECL_CONTEXT (t), flags);
+ output_add_string (scratch_buffer, "::");
+ }
+ else if (DECL_CONTEXT (t))
+ {
+ dump_decl (DECL_CONTEXT (t), flags);
+ output_add_string (scratch_buffer, "::");
+ }
+ dump_decl (DECL_NAME (t), flags);
+ break;
+ }
+
+ /* If there's only one function, just treat it like an ordinary
+ FUNCTION_DECL. */
t = OVL_CURRENT (t);
/* Fall through. */
@@ -1424,6 +1443,9 @@ dump_expr (t, flags)
tree t;
int flags;
{
+ if (t == 0)
+ return;
+
switch (TREE_CODE (t))
{
case VAR_DECL:
@@ -1473,7 +1495,11 @@ dump_expr (t, flags)
else if (type == char_type_node)
{
output_add_character (scratch_buffer, '\'');
- dump_char (tree_low_cst (t, 0));
+ if (host_integerp (t, TREE_UNSIGNED (type)))
+ dump_char (tree_low_cst (t, TREE_UNSIGNED (type)));
+ else
+ output_printf (scratch_buffer, "\\x%x",
+ (unsigned int) TREE_INT_CST_LOW (t));
output_add_character (scratch_buffer, '\'');
}
else
diff --git a/contrib/gcc/cp/except.c b/contrib/gcc/cp/except.c
index 3f3cdcf..5de9f4c 100644
--- a/contrib/gcc/cp/except.c
+++ b/contrib/gcc/cp/except.c
@@ -508,7 +508,7 @@ do_allocate_exception (type)
else
{
/* Declare void *__cxa_allocate_exception(size_t). */
- tree tmp = tree_cons (NULL_TREE, c_size_type_node, void_list_node);
+ tree tmp = tree_cons (NULL_TREE, size_type_node, void_list_node);
fn = push_library_fn (fn, build_function_type (ptr_type_node, tmp));
}
diff --git a/contrib/gcc/cp/init.c b/contrib/gcc/cp/init.c
index df63e67..1e08908 100644
--- a/contrib/gcc/cp/init.c
+++ b/contrib/gcc/cp/init.c
@@ -1062,7 +1062,7 @@ expand_member_init (exp, name, init)
}
else if (TYPE_P (name))
{
- basetype = name;
+ basetype = TYPE_MAIN_VARIANT (name);
name = TYPE_NAME (name);
}
else if (TREE_CODE (name) == TYPE_DECL)
diff --git a/contrib/gcc/cp/operators.def b/contrib/gcc/cp/operators.def
index 8504380..05a5a39 100644
--- a/contrib/gcc/cp/operators.def
+++ b/contrib/gcc/cp/operators.def
@@ -5,7 +5,7 @@
non-overloadable operators (like the `?:' ternary operator).
Writtey by Mark Mitchell <mark@codesourcery.com>
- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -40,7 +40,7 @@ Boston, MA 02111-1307, USA. */
assignment operators, the same tree-codes are reused; i.e.,
`operator +' will also have PLUS_EXPR as its CODE.
- NEW_MANGLING
+ MANGLING
The mangling prefix for the operator, as a C string, and as
mangled under the new ABI. For `operator +', for example, this
@@ -127,7 +127,7 @@ DEF_SIMPLE_OPERATOR ("->", COMPONENT_REF, "pt", 2)
DEF_SIMPLE_OPERATOR ("[]", ARRAY_REF, "ix", 2)
DEF_SIMPLE_OPERATOR ("++", POSTINCREMENT_EXPR, "pp", 2)
DEF_SIMPLE_OPERATOR ("--", POSTDECREMENT_EXPR, "mm", 2)
-/* These are extensions. */
+/* These operators are GNU extensions. */
DEF_SIMPLE_OPERATOR ("<?", MIN_EXPR, "v23min", 2)
DEF_SIMPLE_OPERATOR (">?", MAX_EXPR, "v23max", 2)
/* This one is needed for mangling. */
@@ -145,6 +145,9 @@ DEF_ASSN_OPERATOR ("|=", BIT_IOR_EXPR, "oR", 2)
DEF_ASSN_OPERATOR ("^=", BIT_XOR_EXPR, "eO", 2)
DEF_ASSN_OPERATOR ("<<=", LSHIFT_EXPR, "lS", 2)
DEF_ASSN_OPERATOR (">>=", RSHIFT_EXPR, "rS", 2)
+/* These operators are GNU extensions. */
+DEF_ASSN_OPERATOR ("<?=", MIN_EXPR, "v23miN", 2);
+DEF_ASSN_OPERATOR (">?=", MAX_EXPR, "v23maX", 2);
/* Ternary operators. */
DEF_SIMPLE_OPERATOR ("?:", COND_EXPR, "qu", 3)
diff --git a/contrib/gcc/cp/parse.y b/contrib/gcc/cp/parse.y
index 5328ed3..e929ebe 100644
--- a/contrib/gcc/cp/parse.y
+++ b/contrib/gcc/cp/parse.y
@@ -2521,6 +2521,8 @@ class_head_defn:
current_aggr = $1;
$$.t = TYPE_MAIN_DECL (xref_tag ($1, make_anon_name (), 0));
$$.new_type_flag = 0;
+ CLASSTYPE_DECLARED_CLASS (TREE_TYPE ($$.t))
+ = $1 == class_type_node;
yyungetc ('{', 1);
}
;
@@ -3823,7 +3825,7 @@ bad_parm:
{
if (TREE_CODE (TREE_OPERAND ($$, 0)) == TEMPLATE_TYPE_PARM
|| TREE_CODE (TREE_OPERAND ($$, 0)) == BOUND_TEMPLATE_TEMPLATE_PARM)
- error ("`%E' is not a type, use `typename %E' to make it one", $$);
+ error ("`%E' is not a type, use `typename %E' to make it one", $$, $$);
else
error ("no type `%D' in `%T'", TREE_OPERAND ($$, 1), TREE_OPERAND ($$, 0));
}
diff --git a/contrib/gcc/cp/pt.c b/contrib/gcc/cp/pt.c
index b8e9545..b751ad4 100644
--- a/contrib/gcc/cp/pt.c
+++ b/contrib/gcc/cp/pt.c
@@ -3303,17 +3303,12 @@ convert_template_argument (parm, arg, args, complain, i, in_decl)
&& TREE_CODE (DECL_TEMPLATE_RESULT (arg)) == TYPE_DECL)
|| TREE_CODE (arg) == TEMPLATE_TEMPLATE_PARM
|| TREE_CODE (arg) == UNBOUND_CLASS_TEMPLATE);
- else if (CLASSTYPE_TEMPLATE_INFO (arg) && !CLASSTYPE_USE_TEMPLATE (arg)
- && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (arg)))
- {
- if (is_base_of_enclosing_class (arg, current_class_type))
- /* This is a template name used within the scope of the
- template. It could be the template, or it could be the
- instantiation. Choose whichever makes sense. */
- is_tmpl_type = requires_tmpl_type;
- else
- is_tmpl_type = 1;
- }
+ else if (CLASSTYPE_IS_TEMPLATE (arg)
+ && is_base_of_enclosing_class (arg, current_class_type))
+ /* This is a template name used within the scope of the
+ template. It could be the template, or it could be the
+ instantiation. Choose whichever makes sense. */
+ is_tmpl_type = requires_tmpl_type;
else
/* It is a non-template class, or a specialization of a template
class, or a non-template member of a template class. */
@@ -7148,9 +7143,10 @@ tsubst_copy (t, args, complain, in_decl)
{
tree base = tsubst_copy (TREE_OPERAND (name, 0), args,
complain, in_decl);
- name = TREE_OPERAND (name, 1);
- name = tsubst_copy (TREE_OPERAND (name, 0), args,
- complain, in_decl);
+ name = TREE_OPERAND (TREE_OPERAND (name, 1), 0);
+ if (TREE_CODE (name) == TYPE_DECL)
+ name = TREE_TYPE (name);
+ name = tsubst_copy (name, args, complain, in_decl);
name = build1 (BIT_NOT_EXPR, NULL_TREE, name);
name = build_nt (SCOPE_REF, base, name);
}
@@ -8562,9 +8558,7 @@ check_cv_quals_for_unify (strict, arg, parm)
{
/* If the cvr quals of parm will not unify with ARG, they'll be
ignored in instantiation, so we have to do the same here. */
- if (TREE_CODE (arg) == REFERENCE_TYPE
- || TREE_CODE (arg) == FUNCTION_TYPE
- || TREE_CODE (arg) == METHOD_TYPE)
+ if (TREE_CODE (arg) == REFERENCE_TYPE)
parm_quals &= ~(TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE);
if (!POINTER_TYPE_P (arg) &&
TREE_CODE (arg) != TEMPLATE_TYPE_PARM)
@@ -8789,21 +8783,17 @@ unify (tparms, targs, parm, arg, strict)
return 0;
else if (targ)
return 1;
- }
- /* Make sure that ARG is not a variable-sized array. (Note that
- were talking about variable-sized arrays (like `int[n]'),
- rather than arrays of unknown size (like `int[]').) We'll
- get very confused by such a type since the bound of the array
- will not be computable in an instantiation. Besides, such
- types are not allowed in ISO C++, so we can do as we please
- here. */
- if (TREE_CODE (arg) == ARRAY_TYPE
- && !uses_template_parms (arg)
- && TYPE_DOMAIN (arg)
- && (TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (arg)))
- != INTEGER_CST))
- return 1;
+ /* Make sure that ARG is not a variable-sized array. (Note
+ that were talking about variable-sized arrays (like
+ `int[n]'), rather than arrays of unknown size (like
+ `int[]').) We'll get very confused by such a type since
+ the bound of the array will not be computable in an
+ instantiation. Besides, such types are not allowed in
+ ISO C++, so we can do as we please here. */
+ if (variably_modified_type_p (arg))
+ return 1;
+ }
TREE_VEC_ELT (targs, idx) = arg;
return 0;
diff --git a/contrib/gcc/cp/rtti.c b/contrib/gcc/cp/rtti.c
index 39cb1c6..fbb37fe 100644
--- a/contrib/gcc/cp/rtti.c
+++ b/contrib/gcc/cp/rtti.c
@@ -327,6 +327,15 @@ get_tinfo_decl (type)
type = build_function_type (TREE_TYPE (type),
TREE_CHAIN (TYPE_ARG_TYPES (type)));
+ /* For a class type, the variable is cached in the type node
+ itself. */
+ if (CLASS_TYPE_P (type))
+ {
+ d = CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type));
+ if (d)
+ return d;
+ }
+
name = mangle_typeinfo_for_type (type);
d = IDENTIFIER_GLOBAL_VALUE (name);
@@ -346,6 +355,9 @@ get_tinfo_decl (type)
pushdecl_top_level (d);
+ if (CLASS_TYPE_P (type))
+ CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d;
+
/* Remember the type it is for. */
TREE_TYPE (name) = type;
}
diff --git a/contrib/gcc/cp/search.c b/contrib/gcc/cp/search.c
index 9821907..38f4634 100644
--- a/contrib/gcc/cp/search.c
+++ b/contrib/gcc/cp/search.c
@@ -1,7 +1,7 @@
/* Breadth-first and depth-first routines for
searching multiple-inheritance lattice for GNU C++.
Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2002 Free Software Foundation, Inc.
+ 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -1513,6 +1513,70 @@ lookup_fnfields (xbasetype, name, protect)
return rval;
}
+/* Try to find NAME inside a nested class. */
+
+tree
+lookup_nested_field (name, complain)
+ tree name;
+ int complain;
+{
+ register tree t;
+
+ tree id = NULL_TREE;
+ if (TYPE_MAIN_DECL (current_class_type))
+ {
+ /* Climb our way up the nested ladder, seeing if we're trying to
+ modify a field in an enclosing class. If so, we should only
+ be able to modify if it's static. */
+ for (t = TYPE_MAIN_DECL (current_class_type);
+ t && DECL_CONTEXT (t);
+ t = TYPE_MAIN_DECL (DECL_CONTEXT (t)))
+ {
+ if (TREE_CODE (DECL_CONTEXT (t)) != RECORD_TYPE)
+ break;
+
+ /* N.B.: lookup_field will do the access checking for us */
+ id = lookup_field (DECL_CONTEXT (t), name, complain, 0);
+ if (id == error_mark_node)
+ {
+ id = NULL_TREE;
+ continue;
+ }
+
+ if (id != NULL_TREE)
+ {
+ if (TREE_CODE (id) == FIELD_DECL
+ && ! TREE_STATIC (id)
+ && TREE_TYPE (id) != error_mark_node)
+ {
+ if (complain)
+ {
+ /* At parse time, we don't want to give this error, since
+ we won't have enough state to make this kind of
+ decision properly. But there are times (e.g., with
+ enums in nested classes) when we do need to call
+ this fn at parse time. So, in those cases, we pass
+ complain as a 0 and just return a NULL_TREE. */
+ error ("assignment to non-static member `%D' of enclosing class `%T'",
+ id, DECL_CONTEXT (t));
+ /* Mark this for do_identifier(). It would otherwise
+ claim that the variable was undeclared. */
+ TREE_TYPE (id) = error_mark_node;
+ }
+ else
+ {
+ id = NULL_TREE;
+ continue;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ return id;
+}
+
/* TYPE is a class type. Return the index of the fields within
the method vector with name NAME, or -1 is no such field exists. */
diff --git a/contrib/gcc/cp/semantics.c b/contrib/gcc/cp/semantics.c
index a484203..a6f9afb 100644
--- a/contrib/gcc/cp/semantics.c
+++ b/contrib/gcc/cp/semantics.c
@@ -2079,20 +2079,28 @@ tree
finish_typeof (expr)
tree expr;
{
+ tree type;
+
if (processing_template_decl)
{
- tree t;
+ type = make_aggr_type (TYPEOF_TYPE);
+ TYPE_FIELDS (type) = expr;
- t = make_aggr_type (TYPEOF_TYPE);
- TYPE_FIELDS (t) = expr;
-
- return t;
+ return type;
}
if (TREE_CODE (expr) == OFFSET_REF)
expr = resolve_offset_ref (expr);
- return TREE_TYPE (expr);
+ type = TREE_TYPE (expr);
+
+ if (!type || type == unknown_type_node)
+ {
+ error ("type of `%E' is unknown", expr);
+ return error_mark_node;
+ }
+
+ return type;
}
/* Compute the value of the `sizeof' operator. */
diff --git a/contrib/gcc/cp/tree.c b/contrib/gcc/cp/tree.c
index 65dca00..cdfa49c 100644
--- a/contrib/gcc/cp/tree.c
+++ b/contrib/gcc/cp/tree.c
@@ -536,6 +536,11 @@ cp_build_qualified_type_real (type, type_quals, complain)
{
tree result;
int bad_quals = TYPE_UNQUALIFIED;
+ /* We keep bad function qualifiers separate, so that we can decide
+ whether to implement DR 295 or not. DR 295 break existing code,
+ unfortunately. Remove this variable to implement the defect
+ report. */
+ int bad_func_quals = TYPE_UNQUALIFIED;
if (type == error_mark_node)
return type;
@@ -551,6 +556,8 @@ cp_build_qualified_type_real (type, type_quals, complain)
|| TREE_CODE (type) == METHOD_TYPE))
{
bad_quals |= type_quals & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE);
+ if (TREE_CODE (type) != REFERENCE_TYPE)
+ bad_func_quals |= type_quals & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE);
type_quals &= ~(TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE);
}
@@ -569,21 +576,23 @@ cp_build_qualified_type_real (type, type_quals, complain)
/*OK*/;
else if (!(complain & (tf_error | tf_ignore_bad_quals)))
return error_mark_node;
+ else if (bad_func_quals && !(complain & tf_error))
+ return error_mark_node;
else
{
if (complain & tf_ignore_bad_quals)
/* We're not going to warn about constifying things that can't
be constified. */
bad_quals &= ~TYPE_QUAL_CONST;
+ bad_quals |= bad_func_quals;
if (bad_quals)
{
tree bad_type = build_qualified_type (ptr_type_node, bad_quals);
- if (!(complain & tf_ignore_bad_quals))
+ if (!(complain & tf_ignore_bad_quals)
+ || bad_func_quals)
error ("`%V' qualifiers cannot be applied to `%T'",
bad_type, type);
- else if (complain & tf_warning)
- warning ("ignoring `%V' qualifiers on `%T'", bad_type, type);
}
}
diff --git a/contrib/gcc/cp/typeck.c b/contrib/gcc/cp/typeck.c
index b019d0a..82867eb 100644
--- a/contrib/gcc/cp/typeck.c
+++ b/contrib/gcc/cp/typeck.c
@@ -1544,7 +1544,7 @@ c_sizeof (type)
TYPE_IS_SIZETYPE means that certain things (like overflow) will
never happen. However, this node should really have type
`size_t', which is just a typedef for an ordinary integer type. */
- size = fold (build1 (NOP_EXPR, c_size_type_node, size));
+ size = fold (build1 (NOP_EXPR, size_type_node, size));
my_friendly_assert (!TYPE_IS_SIZETYPE (TREE_TYPE (size)),
20001021);
return size;
@@ -1613,7 +1613,7 @@ c_sizeof_nowarn (type)
TYPE_IS_SIZETYPE means that certain things (like overflow) will
never happen. However, this node should really have type
`size_t', which is just a typedef for an ordinary integer type. */
- size = fold (build1 (NOP_EXPR, c_size_type_node, size));
+ size = fold (build1 (NOP_EXPR, size_type_node, size));
my_friendly_assert (!TYPE_IS_SIZETYPE (TREE_TYPE (size)),
20001021);
return size;
@@ -6195,8 +6195,16 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
/* Simplify the RHS if possible. */
if (TREE_CODE (rhs) == CONST_DECL)
rhs = DECL_INITIAL (rhs);
- else if (coder != ARRAY_TYPE)
- rhs = decl_constant_value (rhs);
+
+ /* We do not use decl_constant_value here because of this case:
+
+ const char* const s = "s";
+
+ The conversion rules for a string literal are more lax than for a
+ variable; in particular, a string literal can be converted to a
+ "char *" but the variable "s" cannot be converted in the same
+ way. If the conversion is allowed, the optimization should be
+ performed while creating the converted expression. */
/* [expr.ass]
diff --git a/contrib/gcc/cpplib.c b/contrib/gcc/cpplib.c
index cff9eeb..0f0063b 100644
--- a/contrib/gcc/cpplib.c
+++ b/contrib/gcc/cpplib.c
@@ -210,7 +210,7 @@ skip_rest_of_line (pfile)
cpp_reader *pfile;
{
/* Discard all stacked contexts. */
- while (pfile->context != &pfile->base_context)
+ while (pfile->context->prev)
_cpp_pop_context (pfile);
/* Sweep up all tokens remaining on the line. */
@@ -1224,9 +1224,6 @@ destringize_and_run (pfile, in)
{
const unsigned char *src, *limit;
char *dest, *result;
- cpp_context saved_context;
- cpp_context *saved_cur_context;
- unsigned int saved_line;
dest = result = alloca (in->len + 1);
for (src = in->text, limit = src + in->len; src < limit;)
@@ -1238,24 +1235,28 @@ destringize_and_run (pfile, in)
}
*dest = '\0';
- /* FIXME. All this saving is a horrible kludge to handle the case
- when we're in a macro expansion.
-
- A better strategy it to not convert _Pragma to #pragma if doing
- preprocessed output, but to just pass it through as-is, unless it
- is a CPP pragma in which case is should be processed normally.
- When compiling the preprocessed output the _Pragma should be
- handled. This will be become necessary when we move to
- line-at-a-time lexing since we will be macro-expanding the line
- before outputting / compiling it. */
- saved_line = pfile->line;
- saved_context = pfile->base_context;
- saved_cur_context = pfile->context;
- pfile->context = &pfile->base_context;
- run_directive (pfile, T_PRAGMA, result, dest - result);
- pfile->context = saved_cur_context;
- pfile->base_context = saved_context;
- pfile->line = saved_line;
+ /* Ugh; an awful kludge. We are really not set up to be lexing
+ tokens when in the middle of a macro expansion. Use a new
+ context to force cpp_get_token to lex, and so skip_rest_of_line
+ doesn't go beyond the end of the text. Also, remember the
+ current lexing position so we can return to it later.
+
+ Something like line-at-a-time lexing should remove the need for
+ this. */
+ {
+ cpp_context *saved_context = pfile->context;
+ cpp_token *saved_cur_token = pfile->cur_token;
+ tokenrun *saved_cur_run = pfile->cur_run;
+
+ pfile->context = xnew (cpp_context);
+ pfile->context->macro = 0;
+ pfile->context->prev = 0;
+ run_directive (pfile, T_PRAGMA, result, dest - result);
+ free (pfile->context);
+ pfile->context = saved_context;
+ pfile->cur_token = saved_cur_token;
+ pfile->cur_run = saved_cur_run;
+ }
/* See above comment. For the moment, we'd like
diff --git a/contrib/gcc/dbxout.c b/contrib/gcc/dbxout.c
index d2ae7fb..bd7f9a7 100644
--- a/contrib/gcc/dbxout.c
+++ b/contrib/gcc/dbxout.c
@@ -294,6 +294,7 @@ static void dbxout_finish PARAMS ((const char *));
static void dbxout_start_source_file PARAMS ((unsigned, const char *));
static void dbxout_end_source_file PARAMS ((unsigned));
static void dbxout_typedefs PARAMS ((tree));
+static void dbxout_fptype_value PARAMS ((tree));
static void dbxout_type_index PARAMS ((tree));
#if DBX_CONTIN_LENGTH > 0
static void dbxout_continue PARAMS ((void));
@@ -688,6 +689,61 @@ dbxout_finish (filename)
#endif /* DBX_OUTPUT_MAIN_SOURCE_FILE_END */
}
+/* Output floating point type values used by the 'R' stab letter.
+ These numbers come from include/aout/stab_gnu.h in binutils/gdb.
+
+ There are only 3 real/complex types defined, and we need 7/6.
+ We use NF_SINGLE as a generic float type, and NF_COMPLEX as a generic
+ complex type. Since we have the type size anyways, we don't really need
+ to distinguish between different FP types, we only need to distinguish
+ between float and complex. This works fine with gdb.
+
+ We only use this for complex types, to avoid breaking backwards
+ compatibility for real types. complex types aren't in ISO C90, so it is
+ OK if old debuggers don't understand the debug info we emit for them. */
+
+/* ??? These are supposed to be IEEE types, but we don't check for that.
+ We could perhaps add additional numbers for non-IEEE types if we need
+ them. */
+
+static void
+dbxout_fptype_value (type)
+ tree type;
+{
+ char value = '0';
+ enum machine_mode mode = TYPE_MODE (type);
+
+ if (TREE_CODE (type) == REAL_TYPE)
+ {
+ if (mode == SFmode)
+ value = '1';
+ else if (mode == DFmode)
+ value = '2';
+ else if (mode == TFmode || mode == XFmode)
+ value = '6';
+ else
+ /* Use NF_SINGLE as a generic real type for other sizes. */
+ value = '1';
+ }
+ else if (TREE_CODE (type) == COMPLEX_TYPE)
+ {
+ if (mode == SCmode)
+ value = '3';
+ else if (mode == DCmode)
+ value = '4';
+ else if (mode == TCmode || mode == XCmode)
+ value = '5';
+ else
+ /* Use NF_COMPLEX as a generic complex type for other sizes. */
+ value = '3';
+ }
+ else
+ abort ();
+
+ putc (value, asmfile);
+ CHARS (1);
+}
+
/* Output the index of a type. */
static void
@@ -1359,9 +1415,9 @@ dbxout_type (type, full)
if (TREE_CODE (TREE_TYPE (type)) == REAL_TYPE)
{
- fprintf (asmfile, "r");
+ putc ('R', asmfile);
CHARS (1);
- dbxout_type_index (type);
+ dbxout_fptype_value (type);
putc (';', asmfile);
CHARS (1);
print_wide_int (2 * int_size_in_bytes (TREE_TYPE (type)));
diff --git a/contrib/gcc/doc/cpp.1 b/contrib/gcc/doc/cpp.1
index 8774771..8b74123 100644
--- a/contrib/gcc/doc/cpp.1
+++ b/contrib/gcc/doc/cpp.1
@@ -1,5 +1,5 @@
.\" Automatically generated by Pod::Man version 1.15
-.\" Tue Nov 19 18:17:13 2002
+.\" Wed Feb 5 03:13:55 2003
.\"
.\" Standard preamble:
.\" ======================================================================
@@ -138,7 +138,7 @@
.\" ======================================================================
.\"
.IX Title "CPP 1"
-.TH CPP 1 "gcc-3.2.1" "2002-11-19" "GNU"
+.TH CPP 1 "gcc-3.2.2" "2003-02-05" "GNU"
.UC
.SH "NAME"
cpp \- The C Preprocessor
diff --git a/contrib/gcc/doc/gcc.1 b/contrib/gcc/doc/gcc.1
index dc43d23..16a2b28 100644
--- a/contrib/gcc/doc/gcc.1
+++ b/contrib/gcc/doc/gcc.1
@@ -1,5 +1,5 @@
.\" Automatically generated by Pod::Man version 1.15
-.\" Tue Nov 19 18:17:14 2002
+.\" Wed Feb 5 03:13:56 2003
.\"
.\" Standard preamble:
.\" ======================================================================
@@ -138,7 +138,7 @@
.\" ======================================================================
.\"
.IX Title "GCC 1"
-.TH GCC 1 "gcc-3.2.1" "2002-11-19" "GNU"
+.TH GCC 1 "gcc-3.2.2" "2003-02-05" "GNU"
.UC
.SH "NAME"
gcc \- \s-1GNU\s0 project C and \*(C+ compiler
@@ -2556,18 +2556,6 @@ Generate extra code to write profile information suitable for the
analysis program \f(CW\*(C`gprof\*(C'\fR. You must use this option when compiling
the source files you want data about, and you must also use it when
linking.
-.Ip "\fB\-a\fR" 4
-.IX Item "-a"
-Generate extra code to write profile information for basic blocks, which will
-record the number of times each basic block is executed, the basic block start
-address, and the function name containing the basic block. If \fB\-g\fR is
-used, the line number and filename of the start of the basic block will also be
-recorded. If not overridden by the machine description, the default action is
-to append to the text file \fIbb.out\fR.
-.Sp
-This data could be analyzed by a program like \f(CW\*(C`tcov\*(C'\fR. Note,
-however, that the format of the data is not what \f(CW\*(C`tcov\*(C'\fR expects.
-Eventually \s-1GNU\s0 \f(CW\*(C`gprof\*(C'\fR should be extended to process this data.
.Ip "\fB\-Q\fR" 4
.IX Item "-Q"
Makes the compiler print out each function name as it is compiled, and
@@ -2607,7 +2595,7 @@ instrumentation code can be added to the block; otherwise, a new basic
block must be created to hold the instrumentation code.
.Ip "\fB\-ftest-coverage\fR" 4
.IX Item "-ftest-coverage"
-Create data files for the \f(CW\*(C`gcov\*(C'\fR code-coverage utility.
+Create data files for the \fBgcov\fR code-coverage utility.
The data file names begin with the name of your source file:
.RS 4
.Ip "\fIsourcename\fR\fB.bb\fR" 4
@@ -6854,7 +6842,9 @@ expense of more memory.
.Sp
\&\fBWarning:\fR if you use the \fB\-malign-double\fR switch,
structures containing the above types will be aligned differently than
-the published application binary interface specifications for the 386.
+the published application binary interface specifications for the 386
+and will not be binary compatible with structures in code compiled
+without that switch.
.Ip "\fB\-m128bit-long-double\fR" 4
.IX Item "-m128bit-long-double"
Control the size of \f(CW\*(C`long double\*(C'\fR type. i386 application binary interface
@@ -9450,7 +9440,7 @@ for contributors to \s-1GCC\s0.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
-1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or
diff --git a/contrib/gcc/doc/gcc.texi b/contrib/gcc/doc/gcc.texi
index fe51216..631d56c 100644
--- a/contrib/gcc/doc/gcc.texi
+++ b/contrib/gcc/doc/gcc.texi
@@ -165,7 +165,7 @@ Introduction, gccint, GNU Compiler Collection (GCC) Internals}.
* C++ Extensions:: GNU extensions to the C++ language.
* Objective-C:: GNU Objective-C runtime features.
* Compatibility:: Binary Compatibility
-* Gcov:: gcov: a GCC test coverage program.
+* Gcov:: @command{gcov}---a test coverage program.
* Trouble:: If you have trouble using GCC.
* Bugs:: How, why and where to report bugs.
* Service:: How to find suppliers of support for GCC.
diff --git a/contrib/gcc/doc/gcov.1 b/contrib/gcc/doc/gcov.1
index 35871cc..44d1e33 100644
--- a/contrib/gcc/doc/gcov.1
+++ b/contrib/gcc/doc/gcov.1
@@ -1,5 +1,5 @@
.\" Automatically generated by Pod::Man version 1.15
-.\" Tue Nov 19 18:17:13 2002
+.\" Wed Feb 5 03:13:55 2003
.\"
.\" Standard preamble:
.\" ======================================================================
@@ -138,7 +138,7 @@
.\" ======================================================================
.\"
.IX Title "GCOV 1"
-.TH GCOV 1 "gcc-3.2.1" "2002-11-19" "GNU"
+.TH GCOV 1 "gcc-3.2.2" "2003-02-05" "GNU"
.UC
.SH "NAME"
gcov \- coverage testing tool
diff --git a/contrib/gcc/doc/gcov.texi b/contrib/gcc/doc/gcov.texi
index 86b64e0..78e6667 100644
--- a/contrib/gcc/doc/gcov.texi
+++ b/contrib/gcc/doc/gcov.texi
@@ -30,7 +30,7 @@ included in the gfdl(7) man page.
@end ignore
@node Gcov
-@chapter @command{gcov}: a Test Coverage Program
+@chapter @command{gcov}---a Test Coverage Program
@command{gcov} is a tool you can use in conjunction with GCC to
test code coverage in your programs.
diff --git a/contrib/gcc/doc/include/gcc-common.texi b/contrib/gcc/doc/include/gcc-common.texi
index f25eee1..f489693 100644
--- a/contrib/gcc/doc/include/gcc-common.texi
+++ b/contrib/gcc/doc/include/gcc-common.texi
@@ -1,10 +1,10 @@
-@c Copyright (C) 2001 Free Software Foundation, Inc.
+@c Copyright (C) 2001, 2002 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@c Common values used in the GCC manuals:
-@set version-GCC 3.2
+@set version-GCC 3.2.2
@c Common macros to support generating man pages:
diff --git a/contrib/gcc/doc/invoke.texi b/contrib/gcc/doc/invoke.texi
index 0b527b2..62785ff 100644
--- a/contrib/gcc/doc/invoke.texi
+++ b/contrib/gcc/doc/invoke.texi
@@ -1,12 +1,12 @@
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-@c 2000, 2001, 2002 Free Software Foundation, Inc.
+@c 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@ignore
@c man begin COPYRIGHT
Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
-1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -2887,20 +2887,6 @@ analysis program @code{gprof}. You must use this option when compiling
the source files you want data about, and you must also use it when
linking.
-@cindex @code{tcov}
-@item -a
-@opindex a
-Generate extra code to write profile information for basic blocks, which will
-record the number of times each basic block is executed, the basic block start
-address, and the function name containing the basic block. If @option{-g} is
-used, the line number and filename of the start of the basic block will also be
-recorded. If not overridden by the machine description, the default action is
-to append to the text file @file{bb.out}.
-
-This data could be analyzed by a program like @code{tcov}. Note,
-however, that the format of the data is not what @code{tcov} expects.
-Eventually GNU @code{gprof} should be extended to process this data.
-
@item -Q
@opindex Q
Makes the compiler print out each function name as it is compiled, and
@@ -2946,8 +2932,8 @@ block must be created to hold the instrumentation code.
@need 2000
@item -ftest-coverage
@opindex ftest-coverage
-Create data files for the @code{gcov} code-coverage utility
-(@pxref{Gcov,, @code{gcov}: a GCC Test Coverage Program}).
+Create data files for the @command{gcov} code-coverage utility
+(@pxref{Gcov,, @command{gcov}---a Test Coverage Program}).
The data file names begin with the name of your source file:
@table @gcctabopt
@@ -7511,9 +7497,11 @@ boundary. Aligning @code{double} variables on a two word boundary will
produce code that runs somewhat faster on a @samp{Pentium} at the
expense of more memory.
-@strong{Warning:} if you use the @samp{-malign-double} switch,
+@strong{Warning:} if you use the @option{-malign-double} switch,
structures containing the above types will be aligned differently than
-the published application binary interface specifications for the 386.
+the published application binary interface specifications for the 386
+and will not be binary compatible with structures in code compiled
+without that switch.
@item -m128bit-long-double
@opindex m128bit-long-double
diff --git a/contrib/gcc/doc/passes.texi b/contrib/gcc/doc/passes.texi
index 6ca5b85..1a5f8b0 100644
--- a/contrib/gcc/doc/passes.texi
+++ b/contrib/gcc/doc/passes.texi
@@ -286,10 +286,9 @@ the input file name.
@opindex fssa-ccp
@item
SSA Conditional Constant Propagation. Turned on by the @option{-fssa-ccp}
-SSA Aggressive Dead Code Elimination. Turned on by the @option{-fssa-dce}
option. This pass performs conditional constant propagation to simplify
instructions including conditional branches. This pass is more aggressive
-than the constant propgation done by the CSE and GCSE pases, but operates
+than the constant propagation done by the CSE and GCSE passes, but operates
in linear time.
@opindex dW
diff --git a/contrib/gcc/doc/tm.texi b/contrib/gcc/doc/tm.texi
index d8821c5..4b29d52 100644
--- a/contrib/gcc/doc/tm.texi
+++ b/contrib/gcc/doc/tm.texi
@@ -3145,7 +3145,6 @@ If the target machine does not have a push instruction, set it to zero.
That directs GCC to use an alternate strategy: to
allocate the entire argument block and then store the arguments into
it. When @code{PUSH_ARGS} is nonzero, @code{PUSH_ROUNDING} must be defined too.
-On some machines, the definition
@findex PUSH_ROUNDING
@item PUSH_ROUNDING (@var{npushed})
diff --git a/contrib/gcc/doloop.c b/contrib/gcc/doloop.c
index 06d8d57..25deb503 100644
--- a/contrib/gcc/doloop.c
+++ b/contrib/gcc/doloop.c
@@ -598,9 +598,13 @@ doloop_modify_runtime (loop, iterations_max,
If the loop has been unrolled, the full calculation is
- t1 = abs_inc * unroll_number; increment per loop
- n = abs (final - initial) / t1; full loops
- n += (abs (final - initial) % t1) != 0; partial loop
+ t1 = abs_inc * unroll_number; increment per loop
+ n = (abs (final - initial) + abs_inc - 1) / t1; full loops
+ n += ((abs (final - initial) + abs_inc - 1) % t1) >= abs_inc;
+ partial loop
+ which works out to be equivalent to
+
+ n = (abs (final - initial) + t1 - 1) / t1;
However, in certain cases the unrolled loop will be preconditioned
by emitting copies of the loop body with conditional branches,
@@ -682,13 +686,15 @@ doloop_modify_runtime (loop, iterations_max,
if (shift_count < 0)
abort ();
- if (!loop_info->preconditioned)
+ if (loop_info->preconditioned)
+ diff = expand_simple_binop (GET_MODE (diff), PLUS,
+ diff, GEN_INT (abs_inc - 1),
+ diff, 1, OPTAB_LIB_WIDEN);
+ else
diff = expand_simple_binop (GET_MODE (diff), PLUS,
diff, GEN_INT (abs_loop_inc - 1),
diff, 1, OPTAB_LIB_WIDEN);
- /* (abs (final - initial) + abs_inc * unroll_number - 1)
- / (abs_inc * unroll_number) */
diff = expand_simple_binop (GET_MODE (diff), LSHIFTRT,
diff, GEN_INT (shift_count),
diff, 1, OPTAB_LIB_WIDEN);
diff --git a/contrib/gcc/emit-rtl.c b/contrib/gcc/emit-rtl.c
index 49ad4e0..e2bbd85 100644
--- a/contrib/gcc/emit-rtl.c
+++ b/contrib/gcc/emit-rtl.c
@@ -1698,19 +1698,22 @@ component_ref_for_mem_expr (ref)
/* Given REF, a MEM, and T, either the type of X or the expression
corresponding to REF, set the memory attributes. OBJECTP is nonzero
- if we are making a new object of this type. */
+ if we are making a new object of this type. BITPOS is nonzero if
+ there is an offset outstanding on T that will be applied later. */
void
-set_mem_attributes (ref, t, objectp)
+set_mem_attributes_minus_bitpos (ref, t, objectp, bitpos)
rtx ref;
tree t;
int objectp;
+ HOST_WIDE_INT bitpos;
{
HOST_WIDE_INT alias = MEM_ALIAS_SET (ref);
tree expr = MEM_EXPR (ref);
rtx offset = MEM_OFFSET (ref);
rtx size = MEM_SIZE (ref);
unsigned int align = MEM_ALIGN (ref);
+ HOST_WIDE_INT apply_bitpos = 0;
tree type;
/* It can happen that type_for_mode was given a mode for which there
@@ -1779,6 +1782,7 @@ set_mem_attributes (ref, t, objectp)
{
expr = t;
offset = const0_rtx;
+ apply_bitpos = bitpos;
size = (DECL_SIZE_UNIT (t)
&& host_integerp (DECL_SIZE_UNIT (t), 1)
? GEN_INT (tree_low_cst (DECL_SIZE_UNIT (t), 1)) : 0);
@@ -1803,6 +1807,7 @@ set_mem_attributes (ref, t, objectp)
{
expr = component_ref_for_mem_expr (t);
offset = const0_rtx;
+ apply_bitpos = bitpos;
/* ??? Any reason the field size would be different than
the size we got from the type? */
}
@@ -1814,27 +1819,97 @@ set_mem_attributes (ref, t, objectp)
do
{
+ tree index = TREE_OPERAND (t, 1);
+ tree array = TREE_OPERAND (t, 0);
+ tree domain = TYPE_DOMAIN (TREE_TYPE (array));
+ tree low_bound = (domain ? TYPE_MIN_VALUE (domain) : 0);
+ tree unit_size = TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (array)));
+
+ /* We assume all arrays have sizes that are a multiple of a byte.
+ First subtract the lower bound, if any, in the type of the
+ index, then convert to sizetype and multiply by the size of the
+ array element. */
+ if (low_bound != 0 && ! integer_zerop (low_bound))
+ index = fold (build (MINUS_EXPR, TREE_TYPE (index),
+ index, low_bound));
+
+ /* If the index has a self-referential type, pass it to a
+ WITH_RECORD_EXPR; if the component size is, pass our
+ component to one. */
+ if (! TREE_CONSTANT (index)
+ && contains_placeholder_p (index))
+ index = build (WITH_RECORD_EXPR, TREE_TYPE (index), index, t);
+ if (! TREE_CONSTANT (unit_size)
+ && contains_placeholder_p (unit_size))
+ unit_size = build (WITH_RECORD_EXPR, sizetype,
+ unit_size, array);
+
off_tree
= fold (build (PLUS_EXPR, sizetype,
fold (build (MULT_EXPR, sizetype,
- TREE_OPERAND (t, 1),
- TYPE_SIZE_UNIT (TREE_TYPE (t)))),
+ index,
+ unit_size)),
off_tree));
t = TREE_OPERAND (t, 0);
}
while (TREE_CODE (t) == ARRAY_REF);
- if (TREE_CODE (t) == COMPONENT_REF)
+ if (DECL_P (t))
+ {
+ expr = t;
+ offset = NULL;
+ if (host_integerp (off_tree, 1))
+ {
+ HOST_WIDE_INT ioff = tree_low_cst (off_tree, 1);
+ HOST_WIDE_INT aoff = (ioff & -ioff) * BITS_PER_UNIT;
+ align = DECL_ALIGN (t);
+ if (aoff && aoff < align)
+ align = aoff;
+ offset = GEN_INT (ioff);
+ apply_bitpos = bitpos;
+ }
+ }
+ else if (TREE_CODE (t) == COMPONENT_REF)
{
expr = component_ref_for_mem_expr (t);
if (host_integerp (off_tree, 1))
- offset = GEN_INT (tree_low_cst (off_tree, 1));
+ {
+ offset = GEN_INT (tree_low_cst (off_tree, 1));
+ apply_bitpos = bitpos;
+ }
/* ??? Any reason the field size would be different than
the size we got from the type? */
}
+ else if (flag_argument_noalias > 1
+ && TREE_CODE (t) == INDIRECT_REF
+ && TREE_CODE (TREE_OPERAND (t, 0)) == PARM_DECL)
+ {
+ expr = t;
+ offset = NULL;
+ }
+ }
+
+ /* If this is a Fortran indirect argument reference, record the
+ parameter decl. */
+ else if (flag_argument_noalias > 1
+ && TREE_CODE (t) == INDIRECT_REF
+ && TREE_CODE (TREE_OPERAND (t, 0)) == PARM_DECL)
+ {
+ expr = t;
+ offset = NULL;
}
}
+ /* If we modified OFFSET based on T, then subtract the outstanding
+ bit position offset. Similarly, increase the size of the accessed
+ object to contain the negative offset. */
+ if (apply_bitpos)
+ {
+ offset = plus_constant (offset, -(apply_bitpos / BITS_PER_UNIT));
+ if (size)
+ size = plus_constant (size, apply_bitpos / BITS_PER_UNIT);
+ }
+
/* Now set the attributes we computed above. */
MEM_ATTRS (ref)
= get_mem_attrs (alias, expr, offset, size, align, GET_MODE (ref));
@@ -1851,6 +1926,15 @@ set_mem_attributes (ref, t, objectp)
MEM_IN_STRUCT_P (ref) = 1;
}
+void
+set_mem_attributes (ref, t, objectp)
+ rtx ref;
+ tree t;
+ int objectp;
+{
+ set_mem_attributes_minus_bitpos (ref, t, objectp, 0);
+}
+
/* Set the alias set of MEM to SET. */
void
diff --git a/contrib/gcc/expr.c b/contrib/gcc/expr.c
index 94a28e9..2a13cd4 100644
--- a/contrib/gcc/expr.c
+++ b/contrib/gcc/expr.c
@@ -1,6 +1,6 @@
/* Convert tree expression to rtl instructions, for GNU compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
@@ -3722,17 +3722,7 @@ expand_assignment (to, from, want_value, suggest_reg)
DECL_RTX of the parent struct. Don't munge it. */
to_rtx = shallow_copy_rtx (to_rtx);
- set_mem_attributes (to_rtx, to, 0);
-
- /* If we changed MEM_EXPR, that means we're now referencing
- the COMPONENT_REF, which means that MEM_OFFSET must be
- relative to that field. But we've not yet reflected BITPOS
- in TO_RTX. This will be done in store_field. Adjust for
- that by biasing MEM_OFFSET by -bitpos. */
- if (MEM_EXPR (to_rtx) != old_expr && MEM_OFFSET (to_rtx)
- && (bitpos / BITS_PER_UNIT) != 0)
- set_mem_offset (to_rtx, GEN_INT (INTVAL (MEM_OFFSET (to_rtx))
- - (bitpos / BITS_PER_UNIT)));
+ set_mem_attributes_minus_bitpos (to_rtx, to, 0, bitpos);
}
/* Deal with volatile and readonly fields. The former is only done
@@ -7847,7 +7837,7 @@ expand_expr (exp, target, tmode, modifier)
build (RDIV_EXPR, type,
build_real (type, dconst1),
TREE_OPERAND (exp, 1))),
- target, tmode, unsignedp);
+ target, tmode, modifier);
this_optab = sdiv_optab;
goto binop;
diff --git a/contrib/gcc/expr.h b/contrib/gcc/expr.h
index 4658a50..fb7c61d 100644
--- a/contrib/gcc/expr.h
+++ b/contrib/gcc/expr.h
@@ -677,6 +677,12 @@ extern void maybe_set_unchanging PARAMS ((rtx, tree));
corresponding to REF, set the memory attributes. OBJECTP is nonzero
if we are making a new object of this type. */
extern void set_mem_attributes PARAMS ((rtx, tree, int));
+
+/* Similar, except that BITPOS has not yet been applied to REF, so if
+ we alter MEM_OFFSET according to T then we should subtract BITPOS
+ expecting that it'll be added back in later. */
+extern void set_mem_attributes_minus_bitpos PARAMS ((rtx, tree, int,
+ HOST_WIDE_INT));
#endif
/* Assemble the static constant template for function entry trampolines. */
diff --git a/contrib/gcc/f/ChangeLog b/contrib/gcc/f/ChangeLog
index 729cfc9d..567bc7b 100644
--- a/contrib/gcc/f/ChangeLog
+++ b/contrib/gcc/f/ChangeLog
@@ -1,3 +1,18 @@
+2003-02-05 Release Manager
+
+ * GCC 3.2.2 Released.
+
+2003-01-28 Christian Cornelssen <ccorn@cs.tu-berlin.de>
+
+ * Make-lang.in (f77.install-common, f77.install-info)
+ (f77.install-man, f77.uninstall): Prepend $(DESTDIR) to
+ destination paths in all (un)installation commands.
+
+2002-11-22 Toon Moene <toon@moene.indiv.nluug.nl>
+
+ * invoke.texi: Explain the purpose of -fmove-all-movables,
+ -freduce-all-givs and -frerun-loop-opts better.
+
2002-11-19 Release Manager
* GCC 3.2.1 Released.
diff --git a/contrib/gcc/f/Make-lang.in b/contrib/gcc/f/Make-lang.in
index d2daf34..0bb5f20 100644
--- a/contrib/gcc/f/Make-lang.in
+++ b/contrib/gcc/f/Make-lang.in
@@ -246,13 +246,13 @@ f77.install-normal:
f77.install-common: installdirs
-if [ -f f771$(exeext) ] ; then \
if [ -f g77-cross$(exeext) ] ; then \
- rm -f $(bindir)/$(G77_CROSS_NAME)$(exeext); \
- $(INSTALL_PROGRAM) g77-cross$(exeext) $(bindir)/$(G77_CROSS_NAME)$(exeext); \
- chmod a+x $(bindir)/$(G77_CROSS_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) g77-cross$(exeext) $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
+ chmod a+x $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
else \
- rm -f $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
- $(INSTALL_PROGRAM) g77$(exeext) $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
- chmod a+x $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
+ rm -f $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
+ $(INSTALL_PROGRAM) g77$(exeext) $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
+ chmod a+x $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
fi ; \
else true; fi
@if [ -f f77-install-ok -o -f $(srcdir)/f77-install-ok ]; then \
@@ -269,43 +269,43 @@ f77.install-common: installdirs
# to do the install. The sed rule was copied from stmp-int-hdrs.
f77.install-info: f77.info installdirs
if [ -f $(srcdir)/f/g77.info ] ; then \
- rm -f $(infodir)/g77.info*; \
+ rm -f $(DESTDIR)$(infodir)/g77.info*; \
for f in $(srcdir)/f/g77.info*; do \
realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
- $(INSTALL_DATA) $$f $(infodir)/$$realfile; \
+ $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$realfile; \
done; \
- chmod a-x $(infodir)/g77.info*; \
+ chmod a-x $(DESTDIR)$(infodir)/g77.info*; \
else true; fi
@if [ -f $(srcdir)/f/g77.info ] ; then \
if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- echo " install-info --info-dir=$(infodir) $(infodir)/g77.info"; \
- install-info --info-dir=$(infodir) $(infodir)/g77.info || : ; \
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/g77.info"; \
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/g77.info || : ; \
else : ; fi; \
else : ; fi
f77.install-man: $(GENERATED_MANPAGES) installdirs
-if [ -f f771$(exeext) ] ; then \
if [ -f g77-cross$(exeext) ] ; then \
- rm -f $(man1dir)/$(G77_CROSS_NAME)$(man1ext); \
- $(INSTALL_DATA) $(srcdir)/f/g77.1 $(man1dir)/$(G77_CROSS_NAME)$(man1ext); \
- chmod a-x $(man1dir)/$(G77_CROSS_NAME)$(man1ext); \
+ rm -f $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(man1ext); \
+ $(INSTALL_DATA) $(srcdir)/f/g77.1 $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(man1ext); \
+ chmod a-x $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(man1ext); \
else \
- rm -f $(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
- $(INSTALL_DATA) $(srcdir)/f/g77.1 $(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
- chmod a-x $(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
+ rm -f $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
+ $(INSTALL_DATA) $(srcdir)/f/g77.1 $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
+ chmod a-x $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
fi; \
else true; fi
f77.uninstall: installdirs
if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- echo " install-info --delete --info-dir=$(infodir) $(infodir)/g77.info"; \
- install-info --delete --info-dir=$(infodir) $(infodir)/g77.info || : ; \
+ echo " install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/g77.info"; \
+ install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/g77.info || : ; \
else : ; fi
- rm -rf $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
- rm -rf $(bindir)/$(G77_CROSS_NAME)$(exeext); \
- rm -rf $(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
- rm -rf $(man1dir)/$(G77_CROSS_NAME)$(man1ext); \
- rm -rf $(infodir)/g77.info*
+ rm -rf $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
+ rm -rf $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
+ rm -rf $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
+ rm -rf $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(man1ext); \
+ rm -rf $(DESTDIR)$(infodir)/g77.info*
#
# Clean hooks:
# A lot of the ancillary files are deleted by the main makefile.
diff --git a/contrib/gcc/f/g77.1 b/contrib/gcc/f/g77.1
index b3e8394..91af9e0 100644
--- a/contrib/gcc/f/g77.1
+++ b/contrib/gcc/f/g77.1
@@ -1,5 +1,5 @@
.\" Automatically generated by Pod::Man version 1.15
-.\" Tue Nov 19 18:17:20 2002
+.\" Wed Feb 5 03:13:59 2003
.\"
.\" Standard preamble:
.\" ======================================================================
@@ -138,7 +138,7 @@
.\" ======================================================================
.\"
.IX Title "G77 1"
-.TH G77 1 "gcc-3.2.1" "2002-11-19" "GNU"
+.TH G77 1 "gcc-3.2.2" "2003-02-05" "GNU"
.UC
.SH "NAME"
g77 \- \s-1GNU\s0 project Fortran 77 compiler
@@ -1224,26 +1224,21 @@ but possibly slower.
.Ip "\fB\-fno-rerun-loop-opt\fR" 4
.IX Item "-fno-rerun-loop-opt"
.PD
-\&\fIVersion info:\fR
-These options are not supported by
-versions of \fBg77\fR based on \fBgcc\fR version 2.8.
+In general, the optimizations enabled with these options will lead to
+faster code being generated by \s-1GNU\s0 Fortran; hence they are enabled by default
+when issuing the \fBg77\fR command.
.Sp
-Each of these might improve performance on some code.
+\&\fB\-fmove-all-movables\fR and \fB\-freduce-all-givs\fR will enable
+loop optimization to move all loop-invariant index computations in nested
+loops over multi-rank array dummy arguments out of these loops.
.Sp
-Analysis of Fortran code optimization and the resulting
-optimizations triggered by the above options were
-contributed by Toon Moene (<\fBtoon@moene.indiv.nluug.nl\fR>).
+\&\fB\-frerun-loop-opt\fR will move offset calculations resulting
+from the fact that Fortran arrays by default have a lower bound of 1
+out of the loops.
.Sp
These three options are intended to be removed someday, once
-they have helped determine the efficacy of various
-approaches to improving the performance of Fortran code.
-.Sp
-Please let us know how use of these options affects
-the performance of your production code.
-We're particularly interested in code that runs faster
-when these options are \fIdisabled\fR, and in
-non-Fortran code that benefits when they are
-\&\fIenabled\fR via the above \fBgcc\fR command-line options.
+loop optimization is sufficiently advanced to perform all those
+transformations without help from these options.
.Sh "Options Controlling the Preprocessor"
.IX Subsection "Options Controlling the Preprocessor"
These options control the C preprocessor, which is run on each C source
diff --git a/contrib/gcc/f/invoke.texi b/contrib/gcc/f/invoke.texi
index d2d1ed1..5474eec 100644
--- a/contrib/gcc/f/invoke.texi
+++ b/contrib/gcc/f/invoke.texi
@@ -1638,26 +1638,21 @@ but possibly slower.
@item -fno-rerun-loop-opt
@cindex -fno-rerun-loop-opt option
@cindex options, -fno-rerun-loop-opt
-@emph{Version info:}
-These options are not supported by
-versions of @command{g77} based on @command{gcc} version 2.8.
+In general, the optimizations enabled with these options will lead to
+faster code being generated by GNU Fortran; hence they are enabled by default
+when issuing the @command{g77} command.
-Each of these might improve performance on some code.
+@option{-fmove-all-movables} and @option{-freduce-all-givs} will enable
+loop optimization to move all loop-invariant index computations in nested
+loops over multi-rank array dummy arguments out of these loops.
-Analysis of Fortran code optimization and the resulting
-optimizations triggered by the above options were
-contributed by Toon Moene (@email{toon@@moene.indiv.nluug.nl}).
+@option{-frerun-loop-opt} will move offset calculations resulting
+from the fact that Fortran arrays by default have a lower bound of 1
+out of the loops.
These three options are intended to be removed someday, once
-they have helped determine the efficacy of various
-approaches to improving the performance of Fortran code.
-
-Please let us know how use of these options affects
-the performance of your production code.
-We're particularly interested in code that runs faster
-when these options are @emph{disabled}, and in
-non-Fortran code that benefits when they are
-@emph{enabled} via the above @command{gcc} command-line options.
+loop optimization is sufficiently advanced to perform all those
+transformations without help from these options.
@end table
@xref{Optimize Options,,Options That Control Optimization,
diff --git a/contrib/gcc/f/root.texi b/contrib/gcc/f/root.texi
index 788084d..361e260 100644
--- a/contrib/gcc/f/root.texi
+++ b/contrib/gcc/f/root.texi
@@ -3,7 +3,7 @@
@c (e.g. a release branch in the CVS repository for gcc),
@c clear this and set the version information correctly.
@clear DEVELOPMENT
-@set version-gcc 3.2
+@set version-gcc 3.2.2
@set email-general gcc@@gcc.gnu.org
@set email-help gcc-help@@gcc.gnu.org
diff --git a/contrib/gcc/f/version.c b/contrib/gcc/f/version.c
index a34c990..16c33e7 100644
--- a/contrib/gcc/f/version.c
+++ b/contrib/gcc/f/version.c
@@ -1,4 +1,4 @@
#include "ansidecl.h"
#include "f/version.h"
-const char *const ffe_version_string = "3.2.1 20021119 (release)";
+const char *const ffe_version_string = "3.2.2 20030205 (release)";
diff --git a/contrib/gcc/fold-const.c b/contrib/gcc/fold-const.c
index 926581c..ef24717 100644
--- a/contrib/gcc/fold-const.c
+++ b/contrib/gcc/fold-const.c
@@ -1500,14 +1500,16 @@ associate_trees (t1, t2, code, type)
if (TREE_CODE (t1) == code || TREE_CODE (t2) == code
|| TREE_CODE (t1) == MINUS_EXPR || TREE_CODE (t2) == MINUS_EXPR)
{
- if (TREE_CODE (t1) == NEGATE_EXPR)
- return build (MINUS_EXPR, type, convert (type, t2),
- convert (type, TREE_OPERAND (t1, 0)));
- else if (TREE_CODE (t2) == NEGATE_EXPR)
- return build (MINUS_EXPR, type, convert (type, t1),
- convert (type, TREE_OPERAND (t2, 0)));
- else
- return build (code, type, convert (type, t1), convert (type, t2));
+ if (code == PLUS_EXPR)
+ {
+ if (TREE_CODE (t1) == NEGATE_EXPR)
+ return build (MINUS_EXPR, type, convert (type, t2),
+ convert (type, TREE_OPERAND (t1, 0)));
+ else if (TREE_CODE (t2) == NEGATE_EXPR)
+ return build (MINUS_EXPR, type, convert (type, t1),
+ convert (type, TREE_OPERAND (t2, 0)));
+ }
+ return build (code, type, convert (type, t1), convert (type, t2));
}
return fold (build (code, type, convert (type, t1), convert (type, t2)));
@@ -4617,10 +4619,10 @@ extract_muldiv (t, c, code, wide_type)
t2 = extract_muldiv (op1, c, code, wide_type);
if (t1 != 0 && t2 != 0
&& (code == MULT_EXPR
- /* If not multiplication, we can only do this if either operand
- is divisible by c. */
- || multiple_of_p (ctype, op0, c)
- || multiple_of_p (ctype, op1, c)))
+ /* If not multiplication, we can only do this if both operands
+ are divisible by c. */
+ || (multiple_of_p (ctype, op0, c)
+ && multiple_of_p (ctype, op1, c))))
return fold (build (tcode, ctype, convert (ctype, t1),
convert (ctype, t2)));
diff --git a/contrib/gcc/function.c b/contrib/gcc/function.c
index b326d10..f733076 100644
--- a/contrib/gcc/function.c
+++ b/contrib/gcc/function.c
@@ -3071,10 +3071,7 @@ purge_addressof_1 (loc, insn, force, store, ht)
rtx sub, insns;
if (GET_CODE (XEXP (x, 0)) != MEM)
- {
- put_addressof_into_stack (x, ht);
- return true;
- }
+ put_addressof_into_stack (x, ht);
/* We must create a copy of the rtx because it was created by
overwriting a REG rtx which is always shared. */
diff --git a/contrib/gcc/gcc.c b/contrib/gcc/gcc.c
index 8a5bfee..7845fc3 100644
--- a/contrib/gcc/gcc.c
+++ b/contrib/gcc/gcc.c
@@ -688,10 +688,11 @@ static const char *cpp_unique_options =
%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
%{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{fno-inline|O0|!O*:-D__NO_INLINE__} %{ffast-math:-D__FAST_MATH__}\
- %{fshort-wchar:-U__WCHAR_TYPE__ -D__WCHAR_TYPE__=short\\ unsigned\\ int}\
%{ffreestanding:-D__STDC_HOSTED__=0} %{fno-hosted:-D__STDC_HOSTED__=0}\
%{!ffreestanding:%{!fno-hosted:-D__STDC_HOSTED__=1}} %{remap}\
- %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i\
+ %{g3:-dD} %{H} %C\
+ %{fshort-wchar:-U__WCHAR_TYPE__ -D__WCHAR_TYPE__=short\\ unsigned\\ int}\
+ %{D*&U*&A*} %{i*} %Z %i\
%{E|M|MM:%W{o*}}";
/* This contains cpp options which are common with cc1_options and are passed
diff --git a/contrib/gcc/ginclude/stddef.h b/contrib/gcc/ginclude/stddef.h
index 78a048b..2cd1589 100644
--- a/contrib/gcc/ginclude/stddef.h
+++ b/contrib/gcc/ginclude/stddef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1989, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -53,9 +53,13 @@ Boston, MA 02111-1307, USA. */
/* On 4.3bsd-net2, make sure ansi.h is included, so we have
one less case to deal with in the following. */
-#if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__)
+#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
#include <machine/ansi.h>
#endif
+/* On FreeBSD 5, machine/ansi.h does not exist anymore... */
+#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
+#include <sys/_types.h>
+#endif
/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
defined if the corresponding type is *not* defined.
@@ -175,6 +179,8 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
#ifndef _BSD_SIZE_T_
#ifndef _SIZE_T_DEFINED_
#ifndef _SIZE_T_DEFINED
+#ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */
+#ifndef _SIZE_T_DECLARED /* FreeBSD 5 */
#ifndef ___int_size_t_h
#ifndef _GCC_SIZE_T
#ifndef _SIZET_
@@ -190,10 +196,16 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define _BSD_SIZE_T_
#define _SIZE_T_DEFINED_
#define _SIZE_T_DEFINED
+#define _BSD_SIZE_T_DEFINED_ /* Darwin */
+#define _SIZE_T_DECLARED /* FreeBSD 5 */
#define ___int_size_t_h
#define _GCC_SIZE_T
#define _SIZET_
+#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
+/* __size_t is a typedef on FreeBSD 5!, must not trash it. */
+#else
#define __size_t
+#endif
#ifndef __SIZE_TYPE__
#define __SIZE_TYPE__ long unsigned int
#endif
@@ -207,6 +219,8 @@ typedef long ssize_t;
#endif /* _SIZET_ */
#endif /* _GCC_SIZE_T */
#endif /* ___int_size_t_h */
+#endif /* _SIZE_T_DECLARED */
+#endif /* _BSD_SIZE_T_DEFINED_ */
#endif /* _SIZE_T_DEFINED */
#endif /* _SIZE_T_DEFINED_ */
#endif /* _BSD_SIZE_T_ */
@@ -239,6 +253,8 @@ typedef long ssize_t;
#ifndef _WCHAR_T_
#ifndef _BSD_WCHAR_T_
#ifndef _BSD_WCHAR_T_DEFINED_ /* Darwin */
+#ifndef _BSD_RUNE_T_DEFINED_ /* Darwin */
+#ifndef _WCHAR_T_DECLARED /* FreeBSD 5 */
#ifndef _WCHAR_T_DEFINED_
#ifndef _WCHAR_T_DEFINED
#ifndef _WCHAR_T_H
@@ -259,6 +275,7 @@ typedef long ssize_t;
#define ___int_wchar_t_h
#define __INT_WCHAR_T_H
#define _GCC_WCHAR_T
+#define _WCHAR_T_DECLARED
/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
@@ -276,7 +293,8 @@ typedef long ssize_t;
#if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
typedef _BSD_RUNE_T_ rune_t;
#define _BSD_WCHAR_T_DEFINED_
-#if defined (__FreeBSD__)
+#define _BSD_RUNE_T_DEFINED_ /* Darwin */
+#if defined (__FreeBSD__) && (__FreeBSD__ < 5)
/* Why is this file so hard to maintain properly? In constrast to
the comment above regarding BSD/386 1.1, on FreeBSD for as long
as the symbol has existed, _BSD_RUNE_T_ must not stay defined or
@@ -286,6 +304,19 @@ typedef _BSD_RUNE_T_ rune_t;
#endif
#endif
#endif
+/* FreeBSD 5 can't be handled well using "traditional" logic above
+ since it no longer defines _BSD_RUNE_T_ yet still desires to export
+ rune_t in some cases... */
+#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
+#if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
+#if __BSD_VISIBLE
+#ifndef _RUNE_T_DECLARED
+typedef __rune_t rune_t;
+#define _RUNE_T_DECLARED
+#endif
+#endif
+#endif
+#endif
#ifndef __WCHAR_TYPE__
#define __WCHAR_TYPE__ int
@@ -299,6 +330,8 @@ typedef __WCHAR_TYPE__ wchar_t;
#endif
#endif
#endif
+#endif /* _WCHAR_T_DECLARED */
+#endif /* _BSD_RUNE_T_DEFINED_ */
#endif
#endif
#endif
diff --git a/contrib/gcc/global.c b/contrib/gcc/global.c
index 0d9618c..383f6c4 100644
--- a/contrib/gcc/global.c
+++ b/contrib/gcc/global.c
@@ -130,6 +130,11 @@ struct allocno
/* Set of hard registers that some later allocno has a preference for. */
HARD_REG_SET regs_someone_prefers;
+
+#ifdef STACK_REGS
+ /* Set to true if allocno can't be allocated in the stack register. */
+ bool no_stack_reg;
+#endif
};
static struct allocno *allocno;
@@ -717,8 +722,14 @@ global_conflicts ()
if (e->flags & EDGE_ABNORMAL)
break;
if (e != NULL)
- for (ax = FIRST_STACK_REG; ax <= LAST_STACK_REG; ax++)
- record_one_conflict (ax);
+ {
+ EXECUTE_IF_SET_IN_ALLOCNO_SET (allocnos_live, ax,
+ {
+ allocno[ax].no_stack_reg = 1;
+ });
+ for (ax = FIRST_STACK_REG; ax <= LAST_STACK_REG; ax++)
+ record_one_conflict (ax);
+ }
}
#endif
}
@@ -1217,6 +1228,10 @@ find_reg (num, losers, alt_regs_p, accept_call_clobbered, retrying)
(reg_class_contents[(int) CLASS_CANNOT_CHANGE_MODE],
regno)))
#endif
+#ifdef STACK_REGS
+ && (!allocno[num].no_stack_reg
+ || regno < FIRST_STACK_REG || regno > LAST_STACK_REG)
+#endif
)
{
/* We explicitly evaluate the divide results into temporary
diff --git a/contrib/gcc/gthr-rtems.h b/contrib/gcc/gthr-rtems.h
index b3a1d68..3c6c0c5 100644
--- a/contrib/gcc/gthr-rtems.h
+++ b/contrib/gcc/gthr-rtems.h
@@ -1,7 +1,7 @@
/* RTEMS threads compatibily routines for libgcc2 and libobjc.
by: Rosimildo da Silva( rdasilva@connecttel.com ) */
/* Compile this one with gcc. */
-/* Copyright (C) 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
@@ -37,6 +37,7 @@ extern "C" {
#define __GTHREADS 1
#define __GTHREAD_ONCE_INIT 0
+#define __GTHREAD_MUTEX_INIT 0
#define __GTHREAD_MUTEX_INIT_FUNCTION rtems_gxx_mutex_init
/* avoid depedency on rtems specific headers */
diff --git a/contrib/gcc/hashtab.c b/contrib/gcc/hashtab.c
index 7477c35..37230d9 100644
--- a/contrib/gcc/hashtab.c
+++ b/contrib/gcc/hashtab.c
@@ -302,22 +302,24 @@ htab_expand (htab)
PTR *oentries;
PTR *olimit;
PTR *p;
+ size_t nsize;
oentries = htab->entries;
olimit = oentries + htab->size;
- htab->size = higher_prime_number (htab->size * 2);
+ nsize = higher_prime_number (htab->size * 2);
if (htab->return_allocation_failure)
{
- PTR *nentries = (PTR *) calloc (htab->size, sizeof (PTR *));
+ PTR *nentries = (PTR *) calloc (nsize, sizeof (PTR));
if (nentries == NULL)
return 0;
htab->entries = nentries;
}
else
- htab->entries = (PTR *) xcalloc (htab->size, sizeof (PTR *));
+ htab->entries = (PTR *) xcalloc (nsize, sizeof (PTR));
+ htab->size = nsize;
htab->n_elements -= htab->n_deleted;
htab->n_deleted = 0;
diff --git a/contrib/gcc/integrate.c b/contrib/gcc/integrate.c
index d90e776..ce2962d 100644
--- a/contrib/gcc/integrate.c
+++ b/contrib/gcc/integrate.c
@@ -2320,6 +2320,13 @@ copy_rtx_and_substitute (orig, map, for_lhs)
if (inlining && !for_lhs)
RTX_UNCHANGING_P (copy) = 0;
+ /* If inlining, squish aliasing data that references the subroutine's
+ parameter list, since that's no longer applicable. */
+ if (inlining && MEM_EXPR (copy)
+ && TREE_CODE (MEM_EXPR (copy)) == INDIRECT_REF
+ && TREE_CODE (TREE_OPERAND (MEM_EXPR (copy), 0)) == PARM_DECL)
+ set_mem_expr (copy, NULL_TREE);
+
return copy;
default:
diff --git a/contrib/gcc/jump.c b/contrib/gcc/jump.c
index 14baeed..f60e169 100644
--- a/contrib/gcc/jump.c
+++ b/contrib/gcc/jump.c
@@ -1,6 +1,6 @@
/* Optimize jump instructions, for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997
- 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
@@ -59,6 +59,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
or even change what is live at any point.
So perhaps let combiner do it. */
+static rtx next_nonnote_insn_in_loop PARAMS ((rtx));
static int init_label_info PARAMS ((rtx));
static void mark_all_labels PARAMS ((rtx));
static int duplicate_loop_exit_test PARAMS ((rtx));
@@ -119,6 +120,27 @@ cleanup_barriers ()
}
}
+/* Return the next insn after INSN that is not a NOTE and is in the loop,
+ i.e. when there is no such INSN before NOTE_INSN_LOOP_END return NULL_RTX.
+ This routine does not look inside SEQUENCEs. */
+
+static rtx
+next_nonnote_insn_in_loop (insn)
+ rtx insn;
+{
+ while (insn)
+ {
+ insn = NEXT_INSN (insn);
+ if (insn == 0 || GET_CODE (insn) != NOTE)
+ break;
+ if (GET_CODE (insn) == NOTE
+ && NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END)
+ return NULL_RTX;
+ }
+
+ return insn;
+}
+
void
copy_loop_headers (f)
rtx f;
@@ -137,7 +159,7 @@ copy_loop_headers (f)
the values of regno_first_uid and regno_last_uid. */
if (GET_CODE (insn) == NOTE
&& NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG
- && (temp1 = next_nonnote_insn (insn)) != 0
+ && (temp1 = next_nonnote_insn_in_loop (insn)) != 0
&& any_uncondjump_p (temp1) && onlyjump_p (temp1))
{
temp = PREV_INSN (insn);
@@ -293,7 +315,8 @@ duplicate_loop_exit_test (loop_start)
rtx insn, set, reg, p, link;
rtx copy = 0, first_copy = 0;
int num_insns = 0;
- rtx exitcode = NEXT_INSN (JUMP_LABEL (next_nonnote_insn (loop_start)));
+ rtx exitcode
+ = NEXT_INSN (JUMP_LABEL (next_nonnote_insn_in_loop (loop_start)));
rtx lastexit;
int max_reg = max_reg_num ();
rtx *reg_map = 0;
diff --git a/contrib/gcc/loop.c b/contrib/gcc/loop.c
index 149e7d1..58e0255 100644
--- a/contrib/gcc/loop.c
+++ b/contrib/gcc/loop.c
@@ -8514,11 +8514,12 @@ maybe_eliminate_biv (loop, bl, eliminate_p, threshold, insn_count)
enum rtx_code code = GET_CODE (p);
basic_block where_bb = 0;
rtx where_insn = threshold >= insn_count ? 0 : p;
+ rtx note;
/* If this is a libcall that sets a giv, skip ahead to its end. */
if (GET_RTX_CLASS (code) == 'i')
{
- rtx note = find_reg_note (p, REG_LIBCALL, NULL_RTX);
+ note = find_reg_note (p, REG_LIBCALL, NULL_RTX);
if (note)
{
@@ -8536,6 +8537,8 @@ maybe_eliminate_biv (loop, bl, eliminate_p, threshold, insn_count)
}
}
}
+
+ /* Closely examine the insn if the biv is mentioned. */
if ((code == INSN || code == JUMP_INSN || code == CALL_INSN)
&& reg_mentioned_p (reg, PATTERN (p))
&& ! maybe_eliminate_biv_1 (loop, PATTERN (p), p, bl,
@@ -8547,6 +8550,12 @@ maybe_eliminate_biv (loop, bl, eliminate_p, threshold, insn_count)
bl->regno, INSN_UID (p));
break;
}
+
+ /* If we are eliminating, kill REG_EQUAL notes mentioning the biv. */
+ if (eliminate_p
+ && (note = find_reg_note (p, REG_EQUAL, NULL_RTX)) != NULL_RTX
+ && reg_mentioned_p (reg, XEXP (note, 0)))
+ remove_note (p, note);
}
if (p == loop->end)
diff --git a/contrib/gcc/mklibgcc.in b/contrib/gcc/mklibgcc.in
index 30f660c..cde9443 100644
--- a/contrib/gcc/mklibgcc.in
+++ b/contrib/gcc/mklibgcc.in
@@ -436,10 +436,10 @@ for ml in $MULTILIBS; do
dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
if [ $dir != . ]; then
- ldir='$(libsubdir)'/$dir
+ ldir='$(DESTDIR)$(libsubdir)'/$dir
echo " if [ -d $ldir ]; then true; else mkdir $ldir; chmod a+rx $ldir; fi;"
else
- ldir='$(libsubdir)'
+ ldir='$(DESTDIR)$(libsubdir)'
fi
echo ' $(INSTALL_DATA)' ${dir}/libgcc.a ${ldir}/
echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc.a
@@ -495,10 +495,10 @@ for f in $EXTRA_MULTILIB_PARTS; do
dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
if [ $dir != . ]; then
out=${dir}/$f
- ldir='$(libsubdir)'/$dir
+ ldir='$(DESTDIR)$(libsubdir)'/$dir
else
out=$f
- ldir='$(libsubdir)'
+ ldir='$(DESTDIR)$(libsubdir)'
fi
echo ' $(INSTALL_DATA)' $out $ldir/
done
diff --git a/contrib/gcc/optabs.c b/contrib/gcc/optabs.c
index 1cf2803..7e14ceb 100644
--- a/contrib/gcc/optabs.c
+++ b/contrib/gcc/optabs.c
@@ -1,6 +1,6 @@
/* Expand the basic unary and binary arithmetic operations, for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GCC.
@@ -40,6 +40,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "reload.h"
#include "ggc.h"
#include "real.h"
+#include "hard-reg-set.h"
+#include "basic-block.h"
/* Each optab contains info on how this target machine
can perform a particular operation
@@ -754,9 +756,8 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
/* In case the insn wants input operands in modes different from
those of the actual operands, convert the operands. It would
seem that we don't need to convert CONST_INTs, but we do, so
- that they're properly zero-extended or sign-extended for their
- modes; shift operations are an exception, because the second
- operand needs not be extended to the mode of the result. */
+ that they're properly zero-extended, sign-extended or truncated
+ for their mode. */
if (GET_MODE (op0) != mode0
&& mode0 != VOIDmode)
@@ -771,9 +772,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
xop1 = convert_modes (mode1,
GET_MODE (op1) != VOIDmode
? GET_MODE (op1)
- : ! shift_op
- ? mode
- : mode1,
+ : mode,
xop1, unsignedp);
/* Now, if insn's predicates don't allow our operands, put them into
@@ -2981,10 +2980,26 @@ emit_libcall_block (insns, target, result, equiv)
/* Encapsulate the block so it gets manipulated as a unit. */
if (!flag_non_call_exceptions || !may_trap_p (equiv))
{
- REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last,
- REG_NOTES (first));
- REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first,
- REG_NOTES (last));
+ /* We can't attach the REG_LIBCALL and REG_RETVAL notes
+ when the encapsulated region would not be in one basic block,
+ i.e. when there is a control_flow_insn_p insn between FIRST and LAST.
+ */
+ bool attach_libcall_retval_notes = true;
+ next = NEXT_INSN (last);
+ for (insn = first; insn != next; insn = NEXT_INSN (insn))
+ if (control_flow_insn_p (insn))
+ {
+ attach_libcall_retval_notes = false;
+ break;
+ }
+
+ if (attach_libcall_retval_notes)
+ {
+ REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last,
+ REG_NOTES (first));
+ REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first,
+ REG_NOTES (last));
+ }
}
}
diff --git a/contrib/gcc/print-rtl.c b/contrib/gcc/print-rtl.c
index a93a99b..28f6066 100644
--- a/contrib/gcc/print-rtl.c
+++ b/contrib/gcc/print-rtl.c
@@ -92,6 +92,12 @@ print_mem_expr (outfile, expr)
fprintf (outfile, ".%s",
IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (expr, 1))));
}
+ else if (TREE_CODE (expr) == INDIRECT_REF)
+ {
+ fputs (" (*", outfile);
+ print_mem_expr (outfile, TREE_OPERAND (expr, 0));
+ fputs (")", outfile);
+ }
else if (DECL_NAME (expr))
fprintf (outfile, " %s", IDENTIFIER_POINTER (DECL_NAME (expr)));
else if (TREE_CODE (expr) == RESULT_DECL)
diff --git a/contrib/gcc/recog.c b/contrib/gcc/recog.c
index d9848dd..41193db 100644
--- a/contrib/gcc/recog.c
+++ b/contrib/gcc/recog.c
@@ -507,10 +507,10 @@ validate_replace_rtx_1 (loc, from, to, object)
{
case PLUS:
/* If we have a PLUS whose second operand is now a CONST_INT, use
- plus_constant to try to simplify it.
+ simplify_gen_binary to try to simplify it.
??? We may want later to remove this, once simplification is
separated from this function. */
- if (GET_CODE (XEXP (x, 1)) == CONST_INT)
+ if (GET_CODE (XEXP (x, 1)) == CONST_INT && XEXP (x, 1) == to)
validate_change (object, loc,
simplify_gen_binary
(PLUS, GET_MODE (x), XEXP (x, 0), XEXP (x, 1)), 1);
diff --git a/contrib/gcc/rtlanal.c b/contrib/gcc/rtlanal.c
index d6efc74..2380599 100644
--- a/contrib/gcc/rtlanal.c
+++ b/contrib/gcc/rtlanal.c
@@ -2054,7 +2054,6 @@ volatile_insn_p (x)
case REG:
case SCRATCH:
case CLOBBER:
- case ASM_INPUT:
case ADDR_VEC:
case ADDR_DIFF_VEC:
case CALL:
@@ -2065,6 +2064,7 @@ volatile_insn_p (x)
/* case TRAP_IF: This isn't clear yet. */
return 1;
+ case ASM_INPUT:
case ASM_OPERANDS:
if (MEM_VOLATILE_P (x))
return 1;
@@ -2121,7 +2121,6 @@ volatile_refs_p (x)
case REG:
case SCRATCH:
case CLOBBER:
- case ASM_INPUT:
case ADDR_VEC:
case ADDR_DIFF_VEC:
return 0;
@@ -2132,6 +2131,7 @@ volatile_refs_p (x)
return 1;
case MEM:
+ case ASM_INPUT:
case ASM_OPERANDS:
if (MEM_VOLATILE_P (x))
return 1;
@@ -2187,7 +2187,6 @@ side_effects_p (x)
case PC:
case REG:
case SCRATCH:
- case ASM_INPUT:
case ADDR_VEC:
case ADDR_DIFF_VEC:
return 0;
@@ -2210,6 +2209,7 @@ side_effects_p (x)
return 1;
case MEM:
+ case ASM_INPUT:
case ASM_OPERANDS:
if (MEM_VOLATILE_P (x))
return 1;
diff --git a/contrib/gcc/stmt.c b/contrib/gcc/stmt.c
index 4ba3021..05705e7 100644
--- a/contrib/gcc/stmt.c
+++ b/contrib/gcc/stmt.c
@@ -1281,18 +1281,25 @@ n_occurrences (c, s)
}
/* Generate RTL for an asm statement (explicit assembler code).
- BODY is a STRING_CST node containing the assembler code text,
- or an ADDR_EXPR containing a STRING_CST. */
-
+ STRING is a STRING_CST node containing the assembler code text,
+ or an ADDR_EXPR containing a STRING_CST. VOL nonzero means the
+ insn is volatile; don't optimize it. */
void
-expand_asm (body)
- tree body;
+expand_asm (string, vol)
+ tree string;
+ int vol;
{
- if (TREE_CODE (body) == ADDR_EXPR)
- body = TREE_OPERAND (body, 0);
+ rtx body;
+
+ if (TREE_CODE (string) == ADDR_EXPR)
+ string = TREE_OPERAND (string, 0);
+
+ body = gen_rtx_ASM_INPUT (VOIDmode, TREE_STRING_POINTER (string));
+
+ MEM_VOLATILE_P (body) = vol;
+
+ emit_insn (body);
- emit_insn (gen_rtx_ASM_INPUT (VOIDmode,
- TREE_STRING_POINTER (body)));
last_expr_type = 0;
}
diff --git a/contrib/gcc/tradcpp.c b/contrib/gcc/tradcpp.c
index 979179c..f277eba 100644
--- a/contrib/gcc/tradcpp.c
+++ b/contrib/gcc/tradcpp.c
@@ -1,5 +1,5 @@
/* C Compatible Compiler Preprocessor (CCCP)
-Copyright (C) 1986, 1987, 1989, 2000, 2001 Free Software Foundation, Inc.
+Copyright (C) 1986, 1987, 1989, 2000, 2001, 2003 Free Software Foundation, Inc.
Written by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
Dusted off, polished, and adapted for use as traditional
@@ -2604,10 +2604,8 @@ fixup_newlines (fp)
return;
end = fp->buf + fp->length;
- *end = '\r';
- p = (U_CHAR *) strchr ((const char *) fp->buf, '\r');
- *end = '\0';
- if (p == end)
+ p = (U_CHAR *) memchr ((const char *) fp->buf, '\r', fp->length);
+ if (p == NULL)
return;
if (p > fp->buf && p[-1] == '\n')
diff --git a/contrib/gcc/tree.c b/contrib/gcc/tree.c
index 5ffb010..6c0c7dc 100644
--- a/contrib/gcc/tree.c
+++ b/contrib/gcc/tree.c
@@ -1801,7 +1801,7 @@ unsafe_for_reeval (expr)
{
int unsafeness = 0;
enum tree_code code;
- int i, tmp;
+ int i, tmp, tmp2;
tree exp;
int first_rtl;
@@ -1827,8 +1827,9 @@ unsafe_for_reeval (expr)
return unsafeness;
case CALL_EXPR:
+ tmp2 = unsafe_for_reeval (TREE_OPERAND (expr, 0));
tmp = unsafe_for_reeval (TREE_OPERAND (expr, 1));
- return MAX (tmp, 1);
+ return MAX (MAX (tmp, 1), tmp2);
case TARGET_EXPR:
unsafeness = 1;
diff --git a/contrib/gcc/tree.def b/contrib/gcc/tree.def
index 9cfe139..f0f43a7 100644
--- a/contrib/gcc/tree.def
+++ b/contrib/gcc/tree.def
@@ -757,9 +757,12 @@ DEFTREECODE (CONJ_EXPR, "conj_expr", '1', 1)
DEFTREECODE (REALPART_EXPR, "realpart_expr", '1', 1)
DEFTREECODE (IMAGPART_EXPR, "imagpart_expr", '1', 1)
-/* Nodes for ++ and -- in C.
- The second arg is how much to increment or decrement by.
- For a pointer, it would be the size of the object pointed to. */
+/* The first argument is the lvalue to be incremented or decremented.
+ The second argument is the value that should be added or
+ subtracted. If the first argument has pointer type, the second
+ argument is interpreted as the number of bytes to add or subtract
+ from the address. The second argument must not be a constant
+ zero. */
DEFTREECODE (PREDECREMENT_EXPR, "predecrement_expr", 'e', 2)
DEFTREECODE (PREINCREMENT_EXPR, "preincrement_expr", 'e', 2)
DEFTREECODE (POSTDECREMENT_EXPR, "postdecrement_expr", 'e', 2)
diff --git a/contrib/gcc/tree.h b/contrib/gcc/tree.h
index 03724e1..4a05eff 100644
--- a/contrib/gcc/tree.h
+++ b/contrib/gcc/tree.h
@@ -1915,6 +1915,7 @@ enum tree_index
TI_VOID_TYPE,
TI_PTR_TYPE,
TI_CONST_PTR_TYPE,
+ TI_SIZE_TYPE,
TI_PTRDIFF_TYPE,
TI_VA_LIST_TYPE,
@@ -1985,6 +1986,8 @@ extern tree global_trees[TI_MAX];
#define ptr_type_node global_trees[TI_PTR_TYPE]
/* The C type `const void *'. */
#define const_ptr_type_node global_trees[TI_CONST_PTR_TYPE]
+/* The C type `size_t'. */
+#define size_type_node global_trees[TI_SIZE_TYPE]
#define ptrdiff_type_node global_trees[TI_PTRDIFF_TYPE]
#define va_list_type_node global_trees[TI_VA_LIST_TYPE]
@@ -2790,7 +2793,7 @@ extern void expand_decl_init PARAMS ((tree));
extern void clear_last_expr PARAMS ((void));
extern void expand_label PARAMS ((tree));
extern void expand_goto PARAMS ((tree));
-extern void expand_asm PARAMS ((tree));
+extern void expand_asm PARAMS ((tree, int));
extern void expand_start_cond PARAMS ((tree, int));
extern void expand_end_cond PARAMS ((void));
extern void expand_start_else PARAMS ((void));
diff --git a/contrib/gcc/unwind-dw2.c b/contrib/gcc/unwind-dw2.c
index d3828e9..8151d69 100644
--- a/contrib/gcc/unwind-dw2.c
+++ b/contrib/gcc/unwind-dw2.c
@@ -1,5 +1,5 @@
/* DWARF2 exception handling and frame unwind runtime interface routines.
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GCC.
@@ -769,6 +769,9 @@ execute_cfa_program (const unsigned char *insn_ptr,
case DW_CFA_undefined:
case DW_CFA_same_value:
+ insn_ptr = read_uleb128 (insn_ptr, &reg);
+ break;
+
case DW_CFA_nop:
break;
diff --git a/contrib/gcc/version.c b/contrib/gcc/version.c
index b685237..a2d5c35 100644
--- a/contrib/gcc/version.c
+++ b/contrib/gcc/version.c
@@ -1,4 +1,4 @@
#include "ansidecl.h"
#include "version.h"
-const char *const version_string = "3.2.1";
+const char *const version_string = "3.2.2";
OpenPOWER on IntegriCloud