summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-02-10 05:57:03 +0000
committerkan <kan@FreeBSD.org>2003-02-10 05:57:03 +0000
commitbb9b382fea4fa3d2fe33c4a9d966b363347afcef (patch)
tree3a7c89db0003b063b5dafd1f6e976cdf70346bda /contrib
parent09014fac80bdcf5130fb2835c511337d9433d980 (diff)
downloadFreeBSD-src-bb9b382fea4fa3d2fe33c4a9d966b363347afcef.zip
FreeBSD-src-bb9b382fea4fa3d2fe33c4a9d966b363347afcef.tar.gz
Update HEAD with stock GCC 3.2.2 release files.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/gcc/Makefile.in249
-rw-r--r--contrib/gcc/builtins.c9
-rw-r--r--contrib/gcc/c-common.c65
-rwxr-xr-xcontrib/gcc/configure2
-rw-r--r--contrib/gcc/cp/except.c2
-rw-r--r--contrib/gcc/dbxout.c60
-rw-r--r--contrib/gcc/emit-rtl.c96
-rw-r--r--contrib/gcc/function.c5
-rw-r--r--contrib/gcc/ginclude/stddef.h39
-rw-r--r--contrib/gcc/recog.c4
10 files changed, 375 insertions, 156 deletions
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/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/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/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/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/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/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/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/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);
OpenPOWER on IntegriCloud