rpms/gcc/devel gcc43-pr35662.patch, NONE, 1.1 gcc43-pr35739.patch, NONE, 1.1 gcc43-pr35899.patch, NONE, 1.1 gcc43-pr35907.patch, NONE, 1.1 .cvsignore, 1.231, 1.232 gcc43.spec, 1.28, 1.29 sources, 1.233, 1.234 gcc43-pr35440.patch, 1.1, NONE gcc43-pr35751.patch, 1.1, NONE
Jakub Jelinek (jakub)
fedora-extras-commits at redhat.com
Wed Apr 16 08:16:03 UTC 2008
Author: jakub
Update of /cvs/pkgs/rpms/gcc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2764
Modified Files:
.cvsignore gcc43.spec sources
Added Files:
gcc43-pr35662.patch gcc43-pr35739.patch gcc43-pr35899.patch
gcc43-pr35907.patch
Removed Files:
gcc43-pr35440.patch gcc43-pr35751.patch
Log Message:
4.3.0-7
gcc43-pr35662.patch:
--- NEW FILE gcc43-pr35662.patch ---
2008-04-15 Jakub Jelinek <jakub at redhat.com>
PR target/35662
* f95-lang.c (gfc_init_builtin_functions): Make sure
BUILT_IN_SINCOS{,F,L} types aren't varargs.
* gfortran.dg/pr35662.f90: New test.
--- gcc/fortran/f95-lang.c.jj 2008-02-29 09:11:54.000000000 +0100
+++ gcc/fortran/f95-lang.c 2008-04-15 13:17:50.000000000 +0200
@@ -1,5 +1,5 @@
/* gfortran backend interface
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Contributed by Paul Brook.
@@ -853,21 +853,21 @@ gfc_init_builtin_functions (void)
ptype = build_pointer_type (float_type_node);
tmp = tree_cons (NULL_TREE, float_type_node,
tree_cons (NULL_TREE, ptype,
- build_tree_list (NULL_TREE, ptype)));
+ tree_cons (NULL_TREE, ptype, void_list_node)));
func_float_floatp_floatp =
build_function_type (void_type_node, tmp);
ptype = build_pointer_type (double_type_node);
tmp = tree_cons (NULL_TREE, double_type_node,
tree_cons (NULL_TREE, ptype,
- build_tree_list (NULL_TREE, ptype)));
+ tree_cons (NULL_TREE, ptype, void_list_node)));
func_double_doublep_doublep =
build_function_type (void_type_node, tmp);
ptype = build_pointer_type (long_double_type_node);
tmp = tree_cons (NULL_TREE, long_double_type_node,
tree_cons (NULL_TREE, ptype,
- build_tree_list (NULL_TREE, ptype)));
+ tree_cons (NULL_TREE, ptype, void_list_node)));
func_longdouble_longdoublep_longdoublep =
build_function_type (void_type_node, tmp);
--- gcc/testsuite/gfortran.dg/pr35662.f90.jj 2008-04-15 13:44:17.000000000 +0200
+++ gcc/testsuite/gfortran.dg/pr35662.f90 2008-04-15 13:44:09.000000000 +0200
@@ -0,0 +1,20 @@
+! PR target/35662
+! { dg-do run }
+! { dg-options "-O1" }
+
+subroutine f(x, y, z)
+ real, intent (in) :: x
+ real, intent (out) :: y, z
+ y = sin (x)
+ z = cos (x)
+end subroutine f
+
+program pr35662
+ real :: x, y, z
+ x = 3.1415926535897932384626433832795029
+ call f (x, y, z)
+ if (abs (y) > 1.0e-5 .or. abs (z + 1.0) > 1.0e-5) call abort
+ x = x / 2.0
+ call f (x, y, z)
+ if (abs (y - 1.0) > 1.0e-5 .or. abs (z) > 1.0e-5) call abort
+end program pr35662
gcc43-pr35739.patch:
--- NEW FILE gcc43-pr35739.patch ---
2008-04-15 Jakub Jelinek <jakub at redhat.com>
PR c/35739
* tree-nrv.c (tree_nrv): Don't optimize if result_type is GIMPLE
reg type.
* gcc.dg/dfp/pr35739.c: New test.
--- gcc/tree-nrv.c.jj 2008-04-04 15:12:00.000000000 +0200
+++ gcc/tree-nrv.c 2008-04-15 20:00:07.000000000 +0200
@@ -1,5 +1,5 @@
/* Language independent return value optimizations
- Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -115,6 +115,11 @@ tree_nrv (void)
if (!aggregate_value_p (result, current_function_decl))
return 0;
+ /* If a GIMPLE type is returned in memory, finalize_nrv_r might create
+ non-GIMPLE. */
+ if (is_gimple_reg_type (result_type))
+ return 0;
+
/* Look through each block for assignments to the RESULT_DECL. */
FOR_EACH_BB (bb)
{
--- gcc/testsuite/gcc.dg/dfp/pr35739.c.jj 2008-04-15 20:02:55.000000000 +0200
+++ gcc/testsuite/gcc.dg/dfp/pr35739.c 2008-04-15 20:18:15.000000000 +0200
@@ -0,0 +1,16 @@
+/* PR c/35739 */
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O -fpreprocessed -fmudflap" } */
+
+_Decimal128
+foo (int n, ...)
+{
+ int i;
+ _Decimal128 j = 0;
+ __builtin_va_list ap;
+ __builtin_va_start (ap, n);
+ for (i = 0; i < n; i++)
+ j += __builtin_va_arg (ap, _Decimal128);
+ __builtin_va_end (ap);
+ return j;
+}
gcc43-pr35899.patch:
--- NEW FILE gcc43-pr35899.patch ---
2008-04-15 Jakub Jelinek <jakub at redhat.com>
PR tree-optimization/35899
* tree-inline.c (expand_call_inline): Use GIMPLE_STMT_OPERAND
rather than TREE_OPERAND.
* gcc.dg/pr35899.c: New test.
--- gcc/tree-inline.c.jj 2008-04-03 09:41:42.000000000 +0200
+++ gcc/tree-inline.c 2008-04-15 18:18:56.000000000 +0200
@@ -2868,15 +2868,15 @@ expand_call_inline (basic_block bb, tree
if (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT
&& TREE_CODE (GIMPLE_STMT_OPERAND (stmt, 0)) == SSA_NAME)
{
- tree name = TREE_OPERAND (stmt, 0);
- tree var = SSA_NAME_VAR (TREE_OPERAND (stmt, 0));
+ tree name = GIMPLE_STMT_OPERAND (stmt, 0);
+ tree var = SSA_NAME_VAR (GIMPLE_STMT_OPERAND (stmt, 0));
tree def = gimple_default_def (cfun, var);
/* If the variable is used undefined, make this name undefined via
move. */
if (def)
{
- TREE_OPERAND (stmt, 1) = def;
+ GIMPLE_STMT_OPERAND (stmt, 1) = def;
update_stmt (stmt);
}
/* Otherwise make this variable undefined. */
--- gcc/testsuite/gcc.dg/pr35899.c.jj 2008-04-15 18:45:24.000000000 +0200
+++ gcc/testsuite/gcc.dg/pr35899.c 2008-04-15 18:43:10.000000000 +0200
@@ -0,0 +1,15 @@
+/* PR tree-optimization/35899 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+foo (void)
+{
+ int a = bar (); /* { dg-warning "previous implicit declaration" } */
+ return a;
+}
+
+void
+bar (void) /* { dg-warning "conflicting types for" } */
+{
+}
gcc43-pr35907.patch:
--- NEW FILE gcc43-pr35907.patch ---
2008-04-14 Alan Modra <amodra at bigpond.net.au>
PR target/35907
* config/rs6000/rs6000.c (rs6000_emit_epilogue): Restore Altivec
registers using saved backchain as base instead of sp. Restore
Altivec registers and VRSAVE before increasing sp if they are saved
below red zone.
* gcc.target/powerpc/pr35907.c: New test.
--- gcc/config/rs6000/rs6000.c.jj 2008-04-16 09:43:10.000000000 +0200
+++ gcc/config/rs6000/rs6000.c 2008-04-16 10:05:34.000000000 +0200
@@ -16380,11 +16380,23 @@ rs6000_emit_epilogue (int sibcall)
if (info->push_p)
sp_offset = info->total_size;
- /* Restore AltiVec registers if needed. */
- if (TARGET_ALTIVEC_ABI && info->altivec_size != 0)
+ /* Restore AltiVec registers if we must do so before adjusting the
+ stack. */
+ if (TARGET_ALTIVEC_ABI
+ && info->altivec_size != 0
+ && DEFAULT_ABI != ABI_V4
+ && info->altivec_save_offset < (TARGET_32BIT ? -220 : -288))
{
int i;
+ if (use_backchain_to_restore_sp)
+ {
+ frame_reg_rtx = gen_rtx_REG (Pmode, 11);
+ emit_move_insn (frame_reg_rtx,
+ gen_rtx_MEM (Pmode, sp_reg_rtx));
+ sp_offset = 0;
+ }
+
for (i = info->first_altivec_reg_save; i <= LAST_ALTIVEC_REGNO; ++i)
if (info->vrsave_mask & ALTIVEC_REG_BIT (i))
{
@@ -16404,19 +16416,54 @@ rs6000_emit_epilogue (int sibcall)
}
}
+ /* Restore VRSAVE if we must do so before adjusting the stack. */
+ if (TARGET_ALTIVEC
+ && TARGET_ALTIVEC_VRSAVE
+ && info->vrsave_mask != 0
+ && DEFAULT_ABI != ABI_V4
+ && info->vrsave_save_offset < (TARGET_32BIT ? -220 : -288))
+ {
+ rtx addr, mem, reg;
+
+ if (use_backchain_to_restore_sp
+ && frame_reg_rtx == sp_reg_rtx)
+ {
+ frame_reg_rtx = gen_rtx_REG (Pmode, 11);
+ emit_move_insn (frame_reg_rtx,
+ gen_rtx_MEM (Pmode, sp_reg_rtx));
+ sp_offset = 0;
+ }
+
+ addr = gen_rtx_PLUS (Pmode, frame_reg_rtx,
+ GEN_INT (info->vrsave_save_offset + sp_offset));
+ mem = gen_frame_mem (SImode, addr);
+ reg = gen_rtx_REG (SImode, 12);
+ emit_move_insn (reg, mem);
+
+ emit_insn (generate_set_vrsave (reg, info, 1));
+ }
+
/* If we have a frame pointer, a call to alloca, or a large stack
frame, restore the old stack pointer using the backchain. Otherwise,
we know what size to update it with. */
if (use_backchain_to_restore_sp)
{
- /* Under V.4, don't reset the stack pointer until after we're done
- loading the saved registers. */
- if (DEFAULT_ABI == ABI_V4)
- frame_reg_rtx = gen_rtx_REG (Pmode, 11);
+ if (frame_reg_rtx != sp_reg_rtx)
+ {
+ emit_move_insn (sp_reg_rtx, frame_reg_rtx);
+ frame_reg_rtx = sp_reg_rtx;
+ }
+ else
+ {
+ /* Under V.4, don't reset the stack pointer until after we're done
+ loading the saved registers. */
+ if (DEFAULT_ABI == ABI_V4)
+ frame_reg_rtx = gen_rtx_REG (Pmode, 11);
- emit_move_insn (frame_reg_rtx,
- gen_rtx_MEM (Pmode, sp_reg_rtx));
- sp_offset = 0;
+ emit_move_insn (frame_reg_rtx,
+ gen_rtx_MEM (Pmode, sp_reg_rtx));
+ sp_offset = 0;
+ }
}
else if (info->push_p
&& DEFAULT_ABI != ABI_V4
@@ -16430,9 +16477,39 @@ rs6000_emit_epilogue (int sibcall)
sp_offset = 0;
}
- /* Restore VRSAVE if needed. */
- if (TARGET_ALTIVEC && TARGET_ALTIVEC_VRSAVE
- && info->vrsave_mask != 0)
+ /* Restore AltiVec registers if we have not done so already. */
+ if (TARGET_ALTIVEC_ABI
+ && info->altivec_size != 0
+ && (DEFAULT_ABI == ABI_V4
+ || info->altivec_save_offset >= (TARGET_32BIT ? -220 : -288)))
+ {
+ int i;
+
+ for (i = info->first_altivec_reg_save; i <= LAST_ALTIVEC_REGNO; ++i)
+ if (info->vrsave_mask & ALTIVEC_REG_BIT (i))
+ {
+ rtx addr, areg, mem;
+
+ areg = gen_rtx_REG (Pmode, 0);
+ emit_move_insn
+ (areg, GEN_INT (info->altivec_save_offset
+ + sp_offset
+ + 16 * (i - info->first_altivec_reg_save)));
+
+ /* AltiVec addressing mode is [reg+reg]. */
+ addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, areg);
+ mem = gen_frame_mem (V4SImode, addr);
+
+ emit_move_insn (gen_rtx_REG (V4SImode, i), mem);
+ }
+ }
+
+ /* Restore VRSAVE if we have not done so already. */
+ if (TARGET_ALTIVEC
+ && TARGET_ALTIVEC_VRSAVE
+ && info->vrsave_mask != 0
+ && (DEFAULT_ABI == ABI_V4
+ || info->vrsave_save_offset >= (TARGET_32BIT ? -220 : -288)))
{
rtx addr, mem, reg;
--- gcc/testsuite/gcc.target/powerpc/pr35907.c.jj 2008-04-16 10:04:23.000000000 +0200
+++ gcc/testsuite/gcc.target/powerpc/pr35907.c 2008-04-16 10:04:58.000000000 +0200
@@ -0,0 +1,60 @@
+/* PR target/35907 */
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-O2 -maltivec" } */
+
+#include "altivec_check.h"
+
+#define vector __attribute__((vector_size (16)))
+union
+{
+ vector int k;
+ int c[16];
+} u, v, w;
+vector int m;
+
+void __attribute__((noinline))
+bar (void *i, vector int j)
+{
+ asm volatile ("" : : "r" (i), "r" (&j) : "memory");
+}
+
+int __attribute__((noinline))
+foo (int i, vector int j)
+{
+ char *p = __builtin_alloca (64 + i);
+ m += u.k;
+ v.k = m;
+ w.k = j;
+ if (__builtin_memcmp (&v.c, &w.c, 16) != 0)
+ __builtin_abort ();
+ j += u.k;
+ bar (p, j);
+ j += u.k;
+ bar (p, j);
+ return 0;
+}
+
+void
+main1 (void)
+{
+ vector int l;
+ int i;
+ for (i = 0; i < 4; i++)
+ u.c[i] = i;
+ l = u.k;
+ if (foo (64, l))
+ __builtin_abort ();
+ l += u.k;
+ if (foo (64, l))
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ altivec_check ();
+ main1 ();
+ exit (0);
+}
+
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.231
retrieving revision 1.232
diff -u -r1.231 -r1.232
--- .cvsignore 4 Apr 2008 12:50:28 -0000 1.231
+++ .cvsignore 16 Apr 2008 08:15:26 -0000 1.232
@@ -1,2 +1,2 @@
-gcc-4.3.0-20080404.tar.bz2
+gcc-4.3.0-20080416.tar.bz2
fastjar-0.95.tar.gz
Index: gcc43.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/gcc43.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- gcc43.spec 4 Apr 2008 12:50:28 -0000 1.28
+++ gcc43.spec 16 Apr 2008 08:15:27 -0000 1.29
@@ -1,6 +1,6 @@
-%define DATE 20080404
+%define DATE 20080416
%define gcc_version 4.3.0
-%define gcc_release 6
+%define gcc_release 7
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%define include_gappletviewer 1
@@ -141,10 +141,12 @@
Patch12: gcc43-cpp-pragma.patch
Patch13: gcc43-java-debug-iface-type.patch
Patch14: gcc43-libgomp-speedup.patch
-Patch15: gcc43-pr35440.patch
+Patch15: gcc43-pr35662.patch
Patch16: gcc43-i386-libgomp.patch
-Patch17: gcc43-pr35751.patch
+Patch17: gcc43-pr35739.patch
Patch18: gcc43-rh251682.patch
+Patch19: gcc43-pr35899.patch
+Patch20: gcc43-pr35907.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -443,10 +445,12 @@
%patch12 -p0 -b .cpp-pragma~
%patch13 -p0 -b .java-debug-iface-type~
%patch14 -p0 -b .libgomp-speedup~
-%patch15 -p0 -b .pr35440~
+%patch15 -p0 -b .pr35662~
%patch16 -p0 -b .i386-libgomp~
-%patch17 -p0 -b .pr35751~
+%patch17 -p0 -b .pr35739~
%patch18 -p0 -b .rh251682~
+%patch19 -p0 -b .pr35899~
+%patch20 -p0 -b .pr35907~
tar xzf %{SOURCE4}
@@ -1662,6 +1666,15 @@
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
+* Wed Apr 16 2008 Jakub Jelinek <jakub at redhat.com> 4.3.0-7
+- update from gcc-4_3-branch
+ - PRs c++/35708, c++/35734, libstdc++/35816, middle-end/35519,
+ rtl-optimization/34916, target/35364, target/35695,
+ tree-optimization/35821, tree-optimization/35833
+ - fix libgfortran buffer overflows
+- fix restoring of Altivec registers when alloca is used (PR target/35907)
+- misc fixes (PRs tree-optimization/35899, target/35662, c/35739)
+
* Fri Apr 4 2008 Jakub Jelinek <jakub at redhat.com> 4.3.0-6
- update from gcc-4_3-branch
- PRs ada/33857, c++/35245, c++/35741, c/35738, fortran/35698,
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/sources,v
retrieving revision 1.233
retrieving revision 1.234
diff -u -r1.233 -r1.234
--- sources 4 Apr 2008 12:50:28 -0000 1.233
+++ sources 16 Apr 2008 08:15:27 -0000 1.234
@@ -1,2 +1,2 @@
-37e8ad834b055b24825a9c1fe383576e gcc-4.3.0-20080404.tar.bz2
+36b379b0224f3db16e47389d6c1f11c6 gcc-4.3.0-20080416.tar.bz2
92a70f9e56223b653bce0f58f90cf950 fastjar-0.95.tar.gz
--- gcc43-pr35440.patch DELETED ---
--- gcc43-pr35751.patch DELETED ---
More information about the fedora-extras-commits
mailing list