Merge branch 'f14'

Conflicts:
	gcc.spec
This commit is contained in:
Dennis Gilmore 2010-08-31 09:26:05 -05:00
commit 25220f3a3f
7 changed files with 58 additions and 331 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
fastjar-0.97.tar.gz fastjar-0.97.tar.gz
gcc-4.5.0-20100716.tar.bz2 gcc-4.5.0-20100716.tar.bz2
gcc-4.5.0-20100730.tar.bz2
gcc-4.5.1-20100812.tar.bz2

View File

@ -1,9 +1,9 @@
%global DATE 20100716 %global DATE 20100812
%global SVNREV 162258 %global SVNREV 163197
%global gcc_version 4.5.0 %global gcc_version 4.5.1
# Note, gcc_release must be integer, if you want to add suffixes to # Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line. # %{release}, append them after %{gcc_release} on Release: line.
%global gcc_release 3 %global gcc_release 2
%global _unpackaged_files_terminate_build 0 %global _unpackaged_files_terminate_build 0
%global multilib_64_archs sparc64 ppc64 s390x x86_64 %global multilib_64_archs sparc64 ppc64 s390x x86_64
%ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha %ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha
@ -12,11 +12,7 @@
%global build_ada 0 %global build_ada 0
%endif %endif
%global build_java 1 %global build_java 1
%ifarch %{sparc}
%global build_cloog 0
%else
%global build_cloog 1 %global build_cloog 1
%endif
%global build_libstdcxx_docs 1 %global build_libstdcxx_docs 1
# If you don't have already a usable gcc-java and libgcj for your arch, # If you don't have already a usable gcc-java and libgcj for your arch,
# do on some arch which has it rpmbuild -bc --with java_tar gcc41.spec # do on some arch which has it rpmbuild -bc --with java_tar gcc41.spec
@ -143,7 +139,6 @@ Requires(preun): /sbin/install-info
AutoReq: true AutoReq: true
Patch0: gcc45-hack.patch Patch0: gcc45-hack.patch
Patch1: gcc45-build-id.patch
Patch2: gcc45-c++-builtin-redecl.patch Patch2: gcc45-c++-builtin-redecl.patch
Patch4: gcc45-java-nomulti.patch Patch4: gcc45-java-nomulti.patch
Patch5: gcc45-ppc32-retaddr.patch Patch5: gcc45-ppc32-retaddr.patch
@ -157,8 +152,6 @@ Patch12: gcc45-cloog-dl.patch
Patch14: gcc45-pr38757.patch Patch14: gcc45-pr38757.patch
Patch15: gcc45-libstdc++-docs.patch Patch15: gcc45-libstdc++-docs.patch
Patch17: gcc45-no-add-needed.patch Patch17: gcc45-no-add-needed.patch
Patch18: gcc45-pr44542.patch
Patch19: gcc45-pr44942.patch
Patch1000: fastjar-0.97-segfault.patch Patch1000: fastjar-0.97-segfault.patch
Patch1001: fastjar-0.97-len1.patch Patch1001: fastjar-0.97-len1.patch
@ -471,7 +464,6 @@ GNAT is a GNU Ada 95 front-end to GCC. This package includes static libraries.
%prep %prep
%setup -q -n gcc-%{version}-%{DATE} %setup -q -n gcc-%{version}-%{DATE}
%patch0 -p0 -b .hack~ %patch0 -p0 -b .hack~
%patch1 -p0 -b .build-id~
%patch2 -p0 -b .c++-builtin-redecl~ %patch2 -p0 -b .c++-builtin-redecl~
%patch4 -p0 -b .java-nomulti~ %patch4 -p0 -b .java-nomulti~
%patch5 -p0 -b .ppc32-retaddr~ %patch5 -p0 -b .ppc32-retaddr~
@ -489,8 +481,6 @@ GNAT is a GNU Ada 95 front-end to GCC. This package includes static libraries.
%patch15 -p0 -b .libstdc++-docs~ %patch15 -p0 -b .libstdc++-docs~
%endif %endif
%patch17 -p0 -b .no-add-needed~ %patch17 -p0 -b .no-add-needed~
%patch18 -p0 -b .pr44542~
%patch19 -p0 -b .pr44942~
# This testcase doesn't compile. # This testcase doesn't compile.
rm libjava/testsuite/libjava.lang/PR35020* rm libjava/testsuite/libjava.lang/PR35020*
@ -507,12 +497,12 @@ tar xzf %{SOURCE4}
tar xjf %{SOURCE10} tar xjf %{SOURCE10}
%endif %endif
sed -i -e 's/4\.5\.1/4.5.0/' gcc/BASE-VER sed -i -e 's/4\.5\.2/4.5.1/' gcc/BASE-VER
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
# Default to -gdwarf-3 rather than -gdwarf-2 # Default to -gdwarf-3 rather than -gdwarf-2
sed -i '/UInteger Var(dwarf_version)/s/Init(2)/Init(3)/' gcc/common.opt sed -i '/UInteger Var(dwarf_version)/s/Init(2)/Init(3)/' gcc/common.opt
sed -i 's/\(may be either 2 or 3; the default version is \)2\./\13./' gcc/doc/invoke.texi sed -i 's/\(may be either 2, 3 or 4; the default version is \)2\./\13./' gcc/doc/invoke.texi
cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
@ -632,7 +622,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`"
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap \ --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap \
--enable-shared --enable-threads=posix --enable-checking=release \ --enable-shared --enable-threads=posix --enable-checking=release \
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \ --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \
--enable-gnu-unique-object \ --enable-gnu-unique-object --enable-linker-build-id \
%if !%{build_ada} %if !%{build_ada}
--enable-languages=c,c++,objc,obj-c++,java,fortran,lto \ --enable-languages=c,c++,objc,obj-c++,java,fortran,lto \
%else %else
@ -964,9 +954,9 @@ ln -sf ../../../libgomp.so.1.* libgomp.so
ln -sf ../../../libmudflap.so.0.* libmudflap.so ln -sf ../../../libmudflap.so.0.* libmudflap.so
ln -sf ../../../libmudflapth.so.0.* libmudflapth.so ln -sf ../../../libmudflapth.so.0.* libmudflapth.so
%if %{build_java} %if %{build_java}
ln -sf ../../../libgcj.so.10.* libgcj.so ln -sf ../../../libgcj.so.11.* libgcj.so
ln -sf ../../../libgcj-tools.so.10.* libgcj-tools.so ln -sf ../../../libgcj-tools.so.11.* libgcj-tools.so
ln -sf ../../../libgij.so.10.* libgij.so ln -sf ../../../libgij.so.11.* libgij.so
%endif %endif
else else
ln -sf ../../../../%{_lib}/libobjc.so.2 libobjc.so ln -sf ../../../../%{_lib}/libobjc.so.2 libobjc.so
@ -976,9 +966,9 @@ ln -sf ../../../../%{_lib}/libgomp.so.1.* libgomp.so
ln -sf ../../../../%{_lib}/libmudflap.so.0.* libmudflap.so ln -sf ../../../../%{_lib}/libmudflap.so.0.* libmudflap.so
ln -sf ../../../../%{_lib}/libmudflapth.so.0.* libmudflapth.so ln -sf ../../../../%{_lib}/libmudflapth.so.0.* libmudflapth.so
%if %{build_java} %if %{build_java}
ln -sf ../../../../%{_lib}/libgcj.so.10.* libgcj.so ln -sf ../../../../%{_lib}/libgcj.so.11.* libgcj.so
ln -sf ../../../../%{_lib}/libgcj-tools.so.10.* libgcj-tools.so ln -sf ../../../../%{_lib}/libgcj-tools.so.11.* libgcj-tools.so
ln -sf ../../../../%{_lib}/libgij.so.10.* libgij.so ln -sf ../../../../%{_lib}/libgij.so.11.* libgij.so
%endif %endif
fi fi
%if %{build_java} %if %{build_java}
@ -1041,9 +1031,9 @@ echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libmudflapth.so.0.* | sed 's
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libmudflap.so.0.* | sed 's,^.*libm,libm,'`' )' > 64/libmudflap.so echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libmudflap.so.0.* | sed 's,^.*libm,libm,'`' )' > 64/libmudflap.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libmudflapth.so.0.* | sed 's,^.*libm,libm,'`' )' > 64/libmudflapth.so echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libmudflapth.so.0.* | sed 's,^.*libm,libm,'`' )' > 64/libmudflapth.so
%if %{build_java} %if %{build_java}
ln -sf ../`echo ../../../../lib/libgcj.so.10.* | sed s~/lib/~/lib64/~` 64/libgcj.so ln -sf ../`echo ../../../../lib/libgcj.so.11.* | sed s~/lib/~/lib64/~` 64/libgcj.so
ln -sf ../`echo ../../../../lib/libgcj-tools.so.10.* | sed s~/lib/~/lib64/~` 64/libgcj-tools.so ln -sf ../`echo ../../../../lib/libgcj-tools.so.11.* | sed s~/lib/~/lib64/~` 64/libgcj-tools.so
ln -sf ../`echo ../../../../lib/libgij.so.10.* | sed s~/lib/~/lib64/~` 64/libgij.so ln -sf ../`echo ../../../../lib/libgij.so.11.* | sed s~/lib/~/lib64/~` 64/libgij.so
ln -sf lib32/libgcj_bc.so libgcj_bc.so ln -sf lib32/libgcj_bc.so libgcj_bc.so
ln -sf ../lib64/libgcj_bc.so 64/libgcj_bc.so ln -sf ../lib64/libgcj_bc.so 64/libgcj_bc.so
%endif %endif
@ -1077,9 +1067,9 @@ echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libmudflapth.so.0.* | se
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libmudflap.so.0.* | sed 's,^.*libm,libm,'`' )' > 32/libmudflap.so echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libmudflap.so.0.* | sed 's,^.*libm,libm,'`' )' > 32/libmudflap.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libmudflapth.so.0.* | sed 's,^.*libm,libm,'`' )' > 32/libmudflapth.so echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libmudflapth.so.0.* | sed 's,^.*libm,libm,'`' )' > 32/libmudflapth.so
%if %{build_java} %if %{build_java}
ln -sf ../`echo ../../../../lib64/libgcj.so.10.* | sed s~/../lib64/~/~` 32/libgcj.so ln -sf ../`echo ../../../../lib64/libgcj.so.11.* | sed s~/../lib64/~/~` 32/libgcj.so
ln -sf ../`echo ../../../../lib64/libgcj-tools.so.10.* | sed s~/../lib64/~/~` 32/libgcj-tools.so ln -sf ../`echo ../../../../lib64/libgcj-tools.so.11.* | sed s~/../lib64/~/~` 32/libgcj-tools.so
ln -sf ../`echo ../../../../lib64/libgij.so.10.* | sed s~/../lib64/~/~` 32/libgij.so ln -sf ../`echo ../../../../lib64/libgij.so.11.* | sed s~/../lib64/~/~` 32/libgij.so
%endif %endif
mv -f %{buildroot}%{_prefix}/lib/libgfortran.*a 32/ mv -f %{buildroot}%{_prefix}/lib/libgfortran.*a 32/
mv -f %{buildroot}%{_prefix}/lib/libobjc.*a 32/ mv -f %{buildroot}%{_prefix}/lib/libobjc.*a 32/
@ -1962,6 +1952,34 @@ fi
%endif %endif
%changelog %changelog
* Tue Aug 31 2010 Dennis Gilmore <dennis@ausil.us> 4.5.1-2
- enable cloog on sparc arches
* Thu Aug 12 2010 Jakub Jelinek <jakub@redhat.com> 4.5.1-1
- update from gcc-4_5-branch
- GCC 4.5.1 release
- PRs boehm-gc/34544, c++/45112, fortran/31588, fortran/42051,
fortran/43954, fortran/44064, fortran/44660, fortran/44929,
fortran/45151, libstdc++/44963, middle-end/44133, middle-end/45034,
middle-end/45262, target/41089, target/43698, target/44805,
testsuite/43283, tree-optimization/44914, tree-optimization/45052,
tree-optimization/45109
- fix VTA ICE in caller-save.c (#622060, PR debug/45259)
- fix up gdb libstdc++ pretty printing (#621717)
- fix up libgcj.so, libgij.so and libgcj-tools.so symlinks (#619156)
* Fri Jul 30 2010 Jakub Jelinek <jakub@redhat.com> 4.5.0-4
- update from gcc-4_5-branch
- PRs c++/43016, c++/44996, c++/45008, c/45079, debug/45015, fortran/30668,
fortran/31346, fortran/34260, fortran/40011, testsuite/38946,
tree-optimization/44900, tree-optimization/44977
- fix vectorizer ICE (#617492, PR tree-optimization/45047)
- use --enable-linker-build-id in configury instead of patching
--build-id support in
- VTA backports
- PRs debug/45055, rtl-optimization/45137, debug/45003,
debug/45006, bootstrap/45028
* Wed Aug 11 2010 David Malcolm <dmalcolm@redhat.com> - 4.5.0-3.1 * Wed Aug 11 2010 David Malcolm <dmalcolm@redhat.com> - 4.5.0-3.1
- recompiling .py files against Python 2.7 (rhbz#623302) - recompiling .py files against Python 2.7 (rhbz#623302)

View File

@ -1,52 +0,0 @@
2007-07-22 Roland McGrath <roland@redhat.com>
* config/rs6000/sysv4.h (LINK_EH_SPEC): Add --build-id for
non-relocatable link.
* config/linux.h (LINK_EH_SPEC): Likewise.
* config/alpha/elf.h (LINK_EH_SPEC): Likewise.
* config/ia64/linux.h (LINK_EH_SPEC): Likewise.
--- gcc/config/rs6000/sysv4.h.~1~
+++ gcc/config/rs6000/sysv4.h
@@ -906,7 +906,7 @@ extern int fixuplabelno;
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}"
#if defined(HAVE_LD_EH_FRAME_HDR)
-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
#endif
#define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
--- gcc/config/linux.h.~1~
+++ gcc/config/linux.h
@@ -85,7 +85,7 @@ Boston, MA 02110-1301, USA. */
} while (0)
#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
#endif
/* Define this so we can compile MS code for use with WINE. */
--- gcc/config/alpha/elf.h.~1~
+++ gcc/config/alpha/elf.h
@@ -421,7 +421,7 @@ extern int alpha_this_gpdisp_sequence_nu
I imagine that other systems will catch up. In the meantime, it
doesn't harm to make sure that the data exists to be used later. */
#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
#endif
/* A C statement (sans semicolon) to output to the stdio stream STREAM
--- gcc/config/ia64/linux.h.~1~
+++ gcc/config/ia64/linux.h
@@ -56,7 +56,7 @@ do { \
Signalize that because we have fde-glibc, we don't need all C shared libs
linked against -lgcc_s. */
#undef LINK_EH_SPEC
-#define LINK_EH_SPEC ""
+#define LINK_EH_SPEC "%{!r:--build-id} "
#define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h"

View File

@ -12,8 +12,8 @@
I imagine that other systems will catch up. In the meantime, it I imagine that other systems will catch up. In the meantime, it
doesn't harm to make sure that the data exists to be used later. */ doesn't harm to make sure that the data exists to be used later. */
#if defined(HAVE_LD_EH_FRAME_HDR) #if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} " -#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} %{!r:--build-id} " +#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} "
#endif #endif
/* A C statement (sans semicolon) to output to the stdio stream STREAM /* A C statement (sans semicolon) to output to the stdio stream STREAM
@ -23,8 +23,8 @@
Signalize that because we have fde-glibc, we don't need all C shared libs Signalize that because we have fde-glibc, we don't need all C shared libs
linked against -lgcc_s. */ linked against -lgcc_s. */
#undef LINK_EH_SPEC #undef LINK_EH_SPEC
-#define LINK_EH_SPEC "%{!r:--build-id} " -#define LINK_EH_SPEC ""
+#define LINK_EH_SPEC "--no-add-needed %{!r:--build-id} " +#define LINK_EH_SPEC "--no-add-needed "
#define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h" #define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h"
@ -34,8 +34,8 @@
} while (0) } while (0)
#if defined(HAVE_LD_EH_FRAME_HDR) #if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} " -#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} %{!r:--build-id} " +#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} "
#endif #endif
/* Define this so we can compile MS code for use with WINE. */ /* Define this so we can compile MS code for use with WINE. */
@ -45,8 +45,8 @@
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}" %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}"
#if defined(HAVE_LD_EH_FRAME_HDR) #if defined(HAVE_LD_EH_FRAME_HDR)
-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} " -# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+# define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} %{!r:--build-id} " +# define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} "
#endif #endif
#define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \ #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \

View File

@ -1,49 +0,0 @@
2010-06-17 Jakub Jelinek <jakub@redhat.com>
PR target/44542
* cfgexpand.c (expand_one_stack_var_at): Limit align to maximum
of max_used_stack_slot_alignment and PREFERRED_STACK_BOUNDARY
instead of MAX_SUPPORTED_STACK_ALIGNMENT.
(expand_one_var): Don't consider DECL_ALIGN for variables for
which expand_one_stack_var_at has been already called.
--- gcc/cfgexpand.c.jj 2010-06-17 17:01:11.964198458 +0200
+++ gcc/cfgexpand.c 2010-06-17 18:25:18.940335757 +0200
@@ -705,7 +705,7 @@ static void
expand_one_stack_var_at (tree decl, HOST_WIDE_INT offset)
{
/* Alignment is unsigned. */
- unsigned HOST_WIDE_INT align;
+ unsigned HOST_WIDE_INT align, max_align;
rtx x;
/* If this fails, we've overflowed the stack frame. Error nicely? */
@@ -722,10 +722,10 @@ expand_one_stack_var_at (tree decl, HOST
offset -= frame_phase;
align = offset & -offset;
align *= BITS_PER_UNIT;
- if (align == 0)
- align = STACK_BOUNDARY;
- else if (align > MAX_SUPPORTED_STACK_ALIGNMENT)
- align = MAX_SUPPORTED_STACK_ALIGNMENT;
+ max_align = MAX (crtl->max_used_stack_slot_alignment,
+ PREFERRED_STACK_BOUNDARY);
+ if (align == 0 || align > max_align)
+ align = max_align;
DECL_ALIGN (decl) = align;
DECL_USER_ALIGN (decl) = 0;
@@ -930,6 +930,13 @@ expand_one_var (tree var, bool toplevel,
align = MINIMUM_ALIGNMENT (TREE_TYPE (var),
TYPE_MODE (TREE_TYPE (var)),
TYPE_ALIGN (TREE_TYPE (var)));
+ else if (DECL_HAS_VALUE_EXPR_P (var)
+ || (DECL_RTL_SET_P (var) && MEM_P (DECL_RTL (var))))
+ /* Don't consider debug only variables with DECL_HAS_VALUE_EXPR_P set
+ or variables which were assigned a stack slot already by
+ expand_one_stack_var_at - in the latter case DECL_ALIGN has been
+ changed from the offset chosen to it. */
+ align = crtl->stack_alignment_estimated;
else
align = MINIMUM_ALIGNMENT (var, DECL_MODE (var), DECL_ALIGN (var));

View File

@ -1,192 +0,0 @@
2010-07-16 Jakub Jelinek <jakub@redhat.com>
PR target/44942
* config/i386/i386-protos.h (ix86_function_arg_boundary): Change second
argument to const_tree.
* config/i386/i386.c (function_arg_advance): If padding needs to be
inserted before argument, increment cum->words by number of padding
words as well.
(contains_aligned_value_p): Change argument to const_tree.
(ix86_function_arg_boundary): Change second argument to const_tree.
* gcc.c-torture/execute/pr44942.c: New test.
* gcc.target/i386/pr44942.c: New test.
--- gcc/config/i386/i386-protos.h.jj 2010-07-13 15:56:31.000000000 +0200
+++ gcc/config/i386/i386-protos.h 2010-07-15 12:45:01.000000000 +0200
@@ -137,8 +137,8 @@ extern enum machine_mode ix86_fp_compare
extern rtx ix86_libcall_value (enum machine_mode);
extern bool ix86_function_value_regno_p (int);
extern bool ix86_function_arg_regno_p (int);
-extern int ix86_function_arg_boundary (enum machine_mode, tree);
-extern bool ix86_solaris_return_in_memory (const_tree,const_tree);
+extern int ix86_function_arg_boundary (enum machine_mode, const_tree);
+extern bool ix86_solaris_return_in_memory (const_tree, const_tree);
extern rtx ix86_force_to_memory (enum machine_mode, rtx);
extern void ix86_free_from_memory (enum machine_mode);
extern enum calling_abi ix86_cfun_abi (void);
--- gcc/config/i386/i386.c.jj 2010-07-13 15:56:31.000000000 +0200
+++ gcc/config/i386/i386.c 2010-07-15 12:44:31.000000000 +0200
@@ -6157,9 +6157,8 @@ function_arg_advance_64 (CUMULATIVE_ARGS
if (!named && VALID_AVX256_REG_MODE (mode))
return;
- if (!examine_argument (mode, type, 0, &int_nregs, &sse_nregs))
- cum->words += words;
- else if (sse_nregs <= cum->sse_nregs && int_nregs <= cum->nregs)
+ if (examine_argument (mode, type, 0, &int_nregs, &sse_nregs)
+ && sse_nregs <= cum->sse_nregs && int_nregs <= cum->nregs)
{
cum->nregs -= int_nregs;
cum->sse_nregs -= sse_nregs;
@@ -6167,7 +6166,11 @@ function_arg_advance_64 (CUMULATIVE_ARGS
cum->sse_regno += sse_nregs;
}
else
- cum->words += words;
+ {
+ int align = ix86_function_arg_boundary (mode, type) / BITS_PER_WORD;
+ cum->words = (cum->words + align - 1) & ~(align - 1);
+ cum->words += words;
+ }
}
static void
@@ -6508,7 +6511,7 @@ ix86_pass_by_reference (CUMULATIVE_ARGS
/* Return true when TYPE should be 128bit aligned for 32bit argument passing
ABI. */
static bool
-contains_aligned_value_p (tree type)
+contains_aligned_value_p (const_tree type)
{
enum machine_mode mode = TYPE_MODE (type);
if (((TARGET_SSE && SSE_REG_MODE_P (mode))
@@ -6558,7 +6561,7 @@ contains_aligned_value_p (tree type)
specified mode and type. */
int
-ix86_function_arg_boundary (enum machine_mode mode, tree type)
+ix86_function_arg_boundary (enum machine_mode mode, const_tree type)
{
int align;
if (type)
--- gcc/testsuite/gcc.c-torture/execute/pr44942.c.jj 2010-07-15 13:41:28.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/execute/pr44942.c 2010-07-15 13:46:40.000000000 +0200
@@ -0,0 +1,70 @@
+/* PR target/44942 */
+
+#include <stdarg.h>
+
+void
+test1 (int a, int b, int c, int d, int e, int f, int g, long double h, ...)
+{
+ int i;
+ va_list ap;
+
+ va_start (ap, h);
+ i = va_arg (ap, int);
+ if (i != 1234)
+ __builtin_abort ();
+ va_end (ap);
+}
+
+void
+test2 (int a, int b, int c, int d, int e, int f, int g, long double h, int i,
+ long double j, int k, long double l, int m, long double n, ...)
+{
+ int o;
+ va_list ap;
+
+ va_start (ap, n);
+ o = va_arg (ap, int);
+ if (o != 1234)
+ __builtin_abort ();
+ va_end (ap);
+}
+
+void
+test3 (double a, double b, double c, double d, double e, double f,
+ double g, long double h, ...)
+{
+ double i;
+ va_list ap;
+
+ va_start (ap, h);
+ i = va_arg (ap, double);
+ if (i != 1234.0)
+ __builtin_abort ();
+ va_end (ap);
+}
+
+void
+test4 (double a, double b, double c, double d, double e, double f, double g,
+ long double h, double i, long double j, double k, long double l,
+ double m, long double n, ...)
+{
+ double o;
+ va_list ap;
+
+ va_start (ap, n);
+ o = va_arg (ap, double);
+ if (o != 1234.0)
+ __builtin_abort ();
+ va_end (ap);
+}
+
+int
+main ()
+{
+ test1 (0, 0, 0, 0, 0, 0, 0, 0.0L, 1234);
+ test2 (0, 0, 0, 0, 0, 0, 0, 0.0L, 0, 0.0L, 0, 0.0L, 0, 0.0L, 1234);
+ test3 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0L, 1234.0);
+ test4 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0L, 0.0, 0.0L,
+ 0.0, 0.0L, 0.0, 0.0L, 1234.0);
+ return 0;
+}
--- gcc/testsuite/gcc.target/i386/pr44942.c.jj 2010-07-15 13:52:37.000000000 +0200
+++ gcc/testsuite/gcc.target/i386/pr44942.c 2010-07-15 13:53:24.000000000 +0200
@@ -0,0 +1,44 @@
+/* PR target/44942 */
+/* { dg-do run { target lp64 } } */
+
+#include <stdarg.h>
+#include <emmintrin.h>
+
+void
+test1 (double a, double b, double c, double d, double e, double f,
+ double g, __m128d h, ...)
+{
+ double i;
+ va_list ap;
+
+ va_start (ap, h);
+ i = va_arg (ap, double);
+ if (i != 1234.0)
+ __builtin_abort ();
+ va_end (ap);
+}
+
+void
+test2 (double a, double b, double c, double d, double e, double f, double g,
+ __m128d h, double i, __m128d j, double k, __m128d l,
+ double m, __m128d n, ...)
+{
+ double o;
+ va_list ap;
+
+ va_start (ap, n);
+ o = va_arg (ap, double);
+ if (o != 1234.0)
+ __builtin_abort ();
+ va_end (ap);
+}
+
+int
+main ()
+{
+ __m128d m = _mm_set1_pd (7.0);
+ test1 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, m, 1234.0);
+ test2 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, m, 0.0, m,
+ 0.0, m, 0.0, m, 1234.0);
+ return 0;
+}

View File

@ -1,2 +1,2 @@
2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz
dc1cae2fe66fc33f29edae7aca29da65 gcc-4.5.0-20100716.tar.bz2 a52d120a609fdf8638d2fc12d08ad5ef gcc-4.5.1-20100812.tar.bz2