4.3.0-8
This commit is contained in:
parent
ae41cd9081
commit
02167d8fc9
@ -1,2 +1,2 @@
|
|||||||
gcc-4.3.0-20080416.tar.bz2
|
gcc-4.3.0-20080428.tar.bz2
|
||||||
fastjar-0.95.tar.gz
|
fastjar-0.95.tar.gz
|
||||||
|
50
gcc43-pr35650.patch
Normal file
50
gcc43-pr35650.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
2008-04-21 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c++/35650
|
||||||
|
* parser.c (cp_parser_lookup_name): Look through single function
|
||||||
|
OVERLOAD.
|
||||||
|
|
||||||
|
* g++.dg/init/ref17.C: New test.
|
||||||
|
|
||||||
|
--- gcc/cp/parser.c.jj 2008-04-18 17:00:44.000000000 +0200
|
||||||
|
+++ gcc/cp/parser.c 2008-04-21 23:58:00.000000000 +0200
|
||||||
|
@@ -16407,6 +16407,13 @@ cp_parser_lookup_name (cp_parser *parser
|
||||||
|
decl = lookup_qualified_name (parser->scope, name,
|
||||||
|
tag_type != none_type,
|
||||||
|
/*complain=*/true);
|
||||||
|
+
|
||||||
|
+ /* If we have a single function from a using decl, pull it out. */
|
||||||
|
+ if (decl
|
||||||
|
+ && TREE_CODE (decl) == OVERLOAD
|
||||||
|
+ && !really_overloaded_fn (decl))
|
||||||
|
+ decl = OVL_FUNCTION (decl);
|
||||||
|
+
|
||||||
|
if (pushed_scope)
|
||||||
|
pop_scope (pushed_scope);
|
||||||
|
}
|
||||||
|
--- gcc/testsuite/g++.dg/init/ref17.C.jj 2008-04-21 22:48:02.000000000 +0200
|
||||||
|
+++ gcc/testsuite/g++.dg/init/ref17.C 2008-04-21 22:47:09.000000000 +0200
|
||||||
|
@@ -0,0 +1,23 @@
|
||||||
|
+// PR c++/35650
|
||||||
|
+// { dg-do compile }
|
||||||
|
+
|
||||||
|
+void f1 ();
|
||||||
|
+
|
||||||
|
+namespace N
|
||||||
|
+{
|
||||||
|
+ using::f1;
|
||||||
|
+ void f2 ();
|
||||||
|
+ void f3 ();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+using N::f3;
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+test ()
|
||||||
|
+{
|
||||||
|
+ void (&a) () = f1;
|
||||||
|
+ void (&b) () = N::f1;
|
||||||
|
+ void (&c) () = N::f2;
|
||||||
|
+ void (&d) () = f3;
|
||||||
|
+ void (&e) () = ::f3;
|
||||||
|
+}
|
@ -1,65 +0,0 @@
|
|||||||
2008-04-15 Jakub Jelinek <jakub@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
|
|
@ -1,48 +0,0 @@
|
|||||||
2008-04-15 Jakub Jelinek <jakub@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;
|
|
||||||
+}
|
|
@ -1,47 +0,0 @@
|
|||||||
2008-04-15 Jakub Jelinek <jakub@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" } */
|
|
||||||
+{
|
|
||||||
+}
|
|
@ -1,206 +0,0 @@
|
|||||||
2008-04-14 Alan Modra <amodra@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);
|
|
||||||
+}
|
|
||||||
+
|
|
41
gcc43-pr35909.patch
Normal file
41
gcc43-pr35909.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
2008-04-24 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
|
PR c++/35909
|
||||||
|
* call.c (convert_like_real): Convert bitfield to desired type
|
||||||
|
before creating temporary.
|
||||||
|
|
||||||
|
* g++.dg/conversion/bitfield9.C: New.
|
||||||
|
|
||||||
|
--- gcc/cp/call.c.orig 2008-04-22 03:26:25.000000000 -0300
|
||||||
|
+++ gcc/cp/call.c 2008-04-22 03:26:27.000000000 -0300
|
||||||
|
@@ -4580,7 +4580,10 @@ convert_like_real (conversion *convs, tr
|
||||||
|
return error_mark_node;
|
||||||
|
}
|
||||||
|
if (lvalue & clk_bitfield)
|
||||||
|
- expr = convert_bitfield_to_declared_type (expr);
|
||||||
|
+ {
|
||||||
|
+ expr = convert_bitfield_to_declared_type (expr);
|
||||||
|
+ expr = fold_convert (type, expr);
|
||||||
|
+ }
|
||||||
|
expr = build_target_expr_with_type (expr, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
--- gcc/testsuite/g++.dg/conversion/bitfield9.C 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gcc/testsuite/g++.dg/conversion/bitfield9.C 2008-04-22 03:26:27.000000000 -0300
|
||||||
|
@@ -0,0 +1,16 @@
|
||||||
|
+// PR c++/35909
|
||||||
|
+// { dg-do compile }
|
||||||
|
+
|
||||||
|
+struct MidiCommand
|
||||||
|
+{
|
||||||
|
+ unsigned data1 : 8;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+void g(const unsigned char &);
|
||||||
|
+void h(const unsigned int &);
|
||||||
|
+
|
||||||
|
+void f(MidiCommand mc)
|
||||||
|
+{
|
||||||
|
+ g(mc.data1);
|
||||||
|
+ h(mc.data1);
|
||||||
|
+}
|
37
gcc43-pr35987.patch
Normal file
37
gcc43-pr35987.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
2008-04-21 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c++/35987
|
||||||
|
* typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
|
||||||
|
COMPOUND_EXPR if the second argument would be error_mark_node.
|
||||||
|
|
||||||
|
* g++.dg/other/error28.C: New test.
|
||||||
|
|
||||||
|
--- gcc/cp/typeck.c.jj 2008-04-18 17:00:44.000000000 +0200
|
||||||
|
+++ gcc/cp/typeck.c 2008-04-21 16:03:45.000000000 +0200
|
||||||
|
@@ -5940,10 +5940,11 @@ cp_build_modify_expr (tree lhs, enum tre
|
||||||
|
lhs = build2 (TREE_CODE (lhs), TREE_TYPE (lhs),
|
||||||
|
stabilize_reference (TREE_OPERAND (lhs, 0)),
|
||||||
|
TREE_OPERAND (lhs, 1));
|
||||||
|
- return build2 (COMPOUND_EXPR, lhstype,
|
||||||
|
- lhs,
|
||||||
|
- cp_build_modify_expr (TREE_OPERAND (lhs, 0),
|
||||||
|
- modifycode, rhs, complain));
|
||||||
|
+ newrhs = cp_build_modify_expr (TREE_OPERAND (lhs, 0),
|
||||||
|
+ modifycode, rhs, complain);
|
||||||
|
+ if (newrhs == error_mark_node)
|
||||||
|
+ return error_mark_node;
|
||||||
|
+ return build2 (COMPOUND_EXPR, lhstype, lhs, newrhs);
|
||||||
|
|
||||||
|
/* Handle (a, b) used as an "lvalue". */
|
||||||
|
case COMPOUND_EXPR:
|
||||||
|
--- gcc/testsuite/g++.dg/other/error28.C.jj 2008-04-21 15:42:09.000000000 +0200
|
||||||
|
+++ gcc/testsuite/g++.dg/other/error28.C 2008-04-21 15:37:00.000000000 +0200
|
||||||
|
@@ -0,0 +1,8 @@
|
||||||
|
+// PR c++/35987
|
||||||
|
+// { dg-do compile }
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+foo (char *p)
|
||||||
|
+{
|
||||||
|
+ if (++p = true); // { dg-error "cannot convert" }
|
||||||
|
+}
|
35
gcc43.spec
35
gcc43.spec
@ -1,6 +1,6 @@
|
|||||||
%define DATE 20080416
|
%define DATE 20080428
|
||||||
%define gcc_version 4.3.0
|
%define gcc_version 4.3.0
|
||||||
%define gcc_release 7
|
%define gcc_release 8
|
||||||
%define _unpackaged_files_terminate_build 0
|
%define _unpackaged_files_terminate_build 0
|
||||||
%define multilib_64_archs sparc64 ppc64 s390x x86_64
|
%define multilib_64_archs sparc64 ppc64 s390x x86_64
|
||||||
%define include_gappletviewer 1
|
%define include_gappletviewer 1
|
||||||
@ -141,12 +141,11 @@ Patch11: gcc43-rh341221.patch
|
|||||||
Patch12: gcc43-cpp-pragma.patch
|
Patch12: gcc43-cpp-pragma.patch
|
||||||
Patch13: gcc43-java-debug-iface-type.patch
|
Patch13: gcc43-java-debug-iface-type.patch
|
||||||
Patch14: gcc43-libgomp-speedup.patch
|
Patch14: gcc43-libgomp-speedup.patch
|
||||||
Patch15: gcc43-pr35662.patch
|
Patch15: gcc43-pr35909.patch
|
||||||
Patch16: gcc43-i386-libgomp.patch
|
Patch16: gcc43-i386-libgomp.patch
|
||||||
Patch17: gcc43-pr35739.patch
|
Patch17: gcc43-pr35987.patch
|
||||||
Patch18: gcc43-rh251682.patch
|
Patch18: gcc43-rh251682.patch
|
||||||
Patch19: gcc43-pr35899.patch
|
Patch19: gcc43-pr35650.patch
|
||||||
Patch20: gcc43-pr35907.patch
|
|
||||||
|
|
||||||
# On ARM EABI systems, we do want -gnueabi to be part of the
|
# On ARM EABI systems, we do want -gnueabi to be part of the
|
||||||
# target triple.
|
# target triple.
|
||||||
@ -445,12 +444,11 @@ which are required to run programs compiled with the GNAT.
|
|||||||
%patch12 -p0 -b .cpp-pragma~
|
%patch12 -p0 -b .cpp-pragma~
|
||||||
%patch13 -p0 -b .java-debug-iface-type~
|
%patch13 -p0 -b .java-debug-iface-type~
|
||||||
%patch14 -p0 -b .libgomp-speedup~
|
%patch14 -p0 -b .libgomp-speedup~
|
||||||
%patch15 -p0 -b .pr35662~
|
%patch15 -p0 -b .pr35909~
|
||||||
%patch16 -p0 -b .i386-libgomp~
|
%patch16 -p0 -b .i386-libgomp~
|
||||||
%patch17 -p0 -b .pr35739~
|
%patch17 -p0 -b .pr35987~
|
||||||
%patch18 -p0 -b .rh251682~
|
%patch18 -p0 -b .rh251682~
|
||||||
%patch19 -p0 -b .pr35899~
|
%patch19 -p0 -b .pr35650~
|
||||||
%patch20 -p0 -b .pr35907~
|
|
||||||
|
|
||||||
tar xzf %{SOURCE4}
|
tar xzf %{SOURCE4}
|
||||||
|
|
||||||
@ -1666,6 +1664,23 @@ fi
|
|||||||
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
|
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 28 2008 Jakub Jelinek <jakub@redhat.com> 4.3.0-8
|
||||||
|
- update from gcc-4_3-branch
|
||||||
|
- decrease compile time stack usage during GC (#443739, PR debug/36060)
|
||||||
|
- fix -mregparm=X with K&R function decls (#443583, PR target/36015)
|
||||||
|
- fix tail called sqrt and math builtins (#435297,
|
||||||
|
PR rtl-optimization/36017)
|
||||||
|
- PRs c++/33486, c++/35316, c++/35325, c++/35678, c++/35747, c++/35758,
|
||||||
|
c++/35773, c/35436, c/35744, fortran/35932, fortran/35944,
|
||||||
|
fortran/35946, fortran/35947, fortran/35959, fortran/35994,
|
||||||
|
libgcj/35950, libstdc++/35597, libstdc++/35887, libstdc++/35954,
|
||||||
|
middle-end/36021, target/35944, testsuite/36056,
|
||||||
|
tree-optimization/35982, tree-optimization/36008,
|
||||||
|
tree-optimization/36034
|
||||||
|
- fix C++ const references to bitfields (PR c++/35909)
|
||||||
|
- fix C++ ++var = val error recovery (PR c++/35987)
|
||||||
|
- fix C++ reference binding to function through using-decl (PR c++/35650)
|
||||||
|
|
||||||
* Wed Apr 16 2008 Jakub Jelinek <jakub@redhat.com> 4.3.0-7
|
* Wed Apr 16 2008 Jakub Jelinek <jakub@redhat.com> 4.3.0-7
|
||||||
- update from gcc-4_3-branch
|
- update from gcc-4_3-branch
|
||||||
- PRs c++/35708, c++/35734, libstdc++/35816, middle-end/35519,
|
- PRs c++/35708, c++/35734, libstdc++/35816, middle-end/35519,
|
||||||
|
Loading…
Reference in New Issue
Block a user