rpms/gcc/devel gcc41-pr26026.patch, NONE, 1.1 gcc41-pr28659.patch, NONE, 1.1 .cvsignore, 1.167, 1.168 gcc41.spec, 1.98, 1.99 sources, 1.169, 1.170 gcc41-pr21581.patch, 1.1, NONE gcc41-pr21764.patch, 1.1, NONE gcc41-pr28370.patch, 1.1, NONE gcc41-pr28407.patch, 1.1, NONE gcc41-visibility.patch, 1.1, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Aug 28 19:57:10 UTC 2006
- Previous message (by thread): rpms/glibc/devel .cvsignore, 1.168, 1.169 glibc-fedora.patch, 1.176, 1.177 glibc.spec, 1.261, 1.262 sources, 1.192, 1.193
- Next message (by thread): rpms/kudzu/devel .cvsignore, 1.129, 1.130 kudzu.spec, 1.147, 1.148 sources, 1.146, 1.147
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jakub
Update of /cvs/dist/rpms/gcc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv31309
Modified Files:
.cvsignore gcc41.spec sources
Added Files:
gcc41-pr26026.patch gcc41-pr28659.patch
Removed Files:
gcc41-pr21581.patch gcc41-pr21764.patch gcc41-pr28370.patch
gcc41-pr28407.patch gcc41-visibility.patch
Log Message:
4.1.1-20
gcc41-pr26026.patch:
0 files changed
--- NEW FILE gcc41-pr26026.patch ---
2006-04-19 Alan Modra <amodra at bigpond.net.au>
PR rtl-optimization/26026
* fold-const.c (fold_binary): Optimize div and mod where the divisor
is a known power of two shifted left a variable amount.
--- gcc/fold-const.c (revision 113059)
+++ gcc/fold-const.c (revision 113060)
@@ -9600,8 +9600,27 @@ fold_binary (enum tree_code code, tree t
return NULL_TREE;
case TRUNC_DIV_EXPR:
- case ROUND_DIV_EXPR:
case FLOOR_DIV_EXPR:
+ /* Simplify A / (B << N) where A and B are positive and B is
+ a power of 2, to A >> (N + log2(B)). */
+ if (TREE_CODE (arg1) == LSHIFT_EXPR
+ && (TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (arg0)))
+ {
+ tree sval = TREE_OPERAND (arg1, 0);
+ if (integer_pow2p (sval) && tree_int_cst_sgn (sval) > 0)
+ {
+ tree sh_cnt = TREE_OPERAND (arg1, 1);
+ unsigned long pow2 = exact_log2 (TREE_INT_CST_LOW (sval));
+
+ sh_cnt = fold_build2 (PLUS_EXPR, TREE_TYPE (sh_cnt),
+ sh_cnt, build_int_cst (NULL_TREE, pow2));
+ return fold_build2 (RSHIFT_EXPR, type,
+ fold_convert (type, arg0), sh_cnt);
+ }
+ }
+ /* Fall thru */
+
+ case ROUND_DIV_EXPR:
case CEIL_DIV_EXPR:
case EXACT_DIV_EXPR:
if (integer_onep (arg1))
@@ -9671,31 +9690,24 @@ fold_binary (enum tree_code code, tree t
return omit_one_operand (type, integer_zero_node, arg0);
/* Optimize TRUNC_MOD_EXPR by a power of two into a BIT_AND_EXPR,
- i.e. "X % C" into "X & C2", if X and C are positive. */
+ i.e. "X % C" into "X & (C - 1)", if X and C are positive. */
if ((code == TRUNC_MOD_EXPR || code == FLOOR_MOD_EXPR)
- && (TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (arg0))
- && integer_pow2p (arg1) && tree_int_cst_sgn (arg1) >= 0)
+ && (TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (arg0)))
{
- unsigned HOST_WIDE_INT high, low;
- tree mask;
- int l;
+ tree c = arg1;
+ /* Also optimize A % (C << N) where C is a power of 2,
+ to A & ((C << N) - 1). */
+ if (TREE_CODE (arg1) == LSHIFT_EXPR)
+ c = TREE_OPERAND (arg1, 0);
- l = tree_log2 (arg1);
- if (l >= HOST_BITS_PER_WIDE_INT)
- {
- high = ((unsigned HOST_WIDE_INT) 1
- << (l - HOST_BITS_PER_WIDE_INT)) - 1;
- low = -1;
- }
- else
+ if (integer_pow2p (c) && tree_int_cst_sgn (c) > 0)
{
- high = 0;
- low = ((unsigned HOST_WIDE_INT) 1 << l) - 1;
+ tree mask = fold_build2 (MINUS_EXPR, TREE_TYPE (arg1),
+ arg1, integer_one_node);
+ return fold_build2 (BIT_AND_EXPR, type,
+ fold_convert (type, arg0),
+ fold_convert (type, mask));
}
-
- mask = build_int_cst_wide (type, low, high);
- return fold_build2 (BIT_AND_EXPR, type,
- fold_convert (type, arg0), mask);
}
/* X % -C is the same as X % C. */
gcc41-pr28659.patch:
0 files changed
--- NEW FILE gcc41-pr28659.patch ---
2006-08-22 Jason Merrill <jason at redhat.com>
PR c++/28659
* typeck.c (merge_types): If either of the types have the right
attributes, return that one.
* tree.c (cp_build_type_attribute_variant): Make sure we aren't
doing this to class types.
* typeck.c (original_type): Deal with type quals properly.
--- gcc/cp/typeck.c (revision 116328)
+++ gcc/cp/typeck.c (revision 116329)
@@ -228,6 +228,7 @@ commonparms (tree p1, tree p2)
static tree
original_type (tree t)
{
+ int quals = cp_type_quals (t);
while (t != error_mark_node
&& TYPE_NAME (t) != NULL_TREE)
{
@@ -239,7 +240,7 @@ original_type (tree t)
break;
t = x;
}
- return t;
+ return cp_build_qualified_type (t, quals);
}
/* T1 and T2 are arithmetic or enumeration types. Return the type
@@ -730,7 +731,13 @@ merge_types (tree t1, tree t2)
default:;
}
- return cp_build_type_attribute_variant (t1, attributes);
+
+ if (attribute_list_equal (TYPE_ATTRIBUTES (t1), attributes))
+ return t1;
+ else if (attribute_list_equal (TYPE_ATTRIBUTES (t2), attributes))
+ return t2;
+ else
+ return cp_build_type_attribute_variant (t1, attributes);
}
/* Return the common type of two types.
--- gcc/cp/tree.c (revision 116328)
+++ gcc/cp/tree.c (revision 116329)
@@ -1936,6 +1936,10 @@ cp_build_type_attribute_variant (tree ty
!= TYPE_RAISES_EXCEPTIONS (type)))
new_type = build_exception_variant (new_type,
TYPE_RAISES_EXCEPTIONS (type));
+
+ /* Making a new main variant of a class type is broken. */
+ gcc_assert (!CLASS_TYPE_P (type) || new_type == type);
+
return new_type;
}
--- gcc/testsuite/g++.dg/ext/attrib26.C (revision 0)
+++ gcc/testsuite/g++.dg/ext/attrib26.C (revision 116329)
@@ -0,0 +1,14 @@
+// PR c++/28659
+// The attribute was causing us to get confused in merge_types when
+// combining the template type with an uninstantiated version.
+
+template<class T>
+struct __attribute__((aligned(1))) A
+{
+ A& operator=(const A &t);
+};
+
+template<class T>
+A<T>& A<T>::operator=(const A<T> &t)
+{
+}
Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -r1.167 -r1.168
--- .cvsignore 25 Aug 2006 14:29:29 -0000 1.167
+++ .cvsignore 28 Aug 2006 19:57:07 -0000 1.168
@@ -1 +1 @@
-gcc-4.1.1-20060825.tar.bz2
+gcc-4.1.1-20060828.tar.bz2
Index: gcc41.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41.spec,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- gcc41.spec 25 Aug 2006 18:46:56 -0000 1.98
+++ gcc41.spec 28 Aug 2006 19:57:07 -0000 1.99
@@ -1,6 +1,6 @@
-%define DATE 20060825
+%define DATE 20060828
%define gcc_version 4.1.1
-%define gcc_release 19
+%define gcc_release 20
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%ifarch %{ix86} x86_64 ia64
@@ -118,34 +118,31 @@
Patch11: gcc41-mni.patch
Patch12: gcc41-dsohandle.patch
Patch13: gcc41-rh184446.patch
-Patch14: gcc41-pr21764.patch
-Patch15: gcc41-pr21581.patch
-Patch16: gcc41-pr20297-test.patch
-Patch17: gcc41-pr28683.patch
-Patch18: gcc41-objc-rh185398.patch
-Patch19: gcc41-tests.patch
-Patch20: gcc41-ppc64-ldouble-stdarg.patch
-Patch21: gcc41-pr25874.patch
-Patch22: gcc41-pr26881.patch
-Patch23: gcc41-i386-tune-geode.patch
-Patch24: gcc41-pr26885.patch
-Patch25: gcc41-hash-style-gnu.patch
-Patch26: gcc41-visibility.patch
-Patch27: gcc41-pr28370.patch
-Patch28: gcc41-pr28407.patch
-Patch29: gcc41-power6.patch
-Patch30: gcc41-power6-2.patch
-Patch31: gcc41-java-libdotdotlib.patch
-Patch32: gcc41-pr28600.patch
-Patch33: gcc41-rh200887.patch
-Patch34: gcc41-pr25795.patch
-Patch35: gcc41-pr28706.patch
-Patch36: gcc41-pr28725.patch
-Patch37: gcc41-pr28709.patch
-Patch38: gcc41-pr28744.patch
-Patch39: gcc41-x86_64-kernel-ssp.patch
-Patch40: gcc41-pr28755.patch
-Patch41: gcc41-pr27898.patch
+Patch14: gcc41-pr20297-test.patch
+Patch15: gcc41-pr28683.patch
+Patch16: gcc41-objc-rh185398.patch
+Patch17: gcc41-tests.patch
+Patch18: gcc41-ppc64-ldouble-stdarg.patch
+Patch19: gcc41-pr25874.patch
+Patch20: gcc41-pr26881.patch
+Patch21: gcc41-i386-tune-geode.patch
+Patch22: gcc41-pr26885.patch
+Patch23: gcc41-hash-style-gnu.patch
+Patch24: gcc41-power6.patch
+Patch25: gcc41-power6-2.patch
+Patch26: gcc41-java-libdotdotlib.patch
+Patch27: gcc41-pr28600.patch
+Patch28: gcc41-rh200887.patch
+Patch29: gcc41-pr25795.patch
+Patch30: gcc41-pr28706.patch
+Patch31: gcc41-pr28725.patch
+Patch32: gcc41-pr28709.patch
+Patch33: gcc41-pr28744.patch
+Patch34: gcc41-x86_64-kernel-ssp.patch
+Patch35: gcc41-pr28755.patch
+Patch36: gcc41-pr27898.patch
+Patch37: gcc41-pr26026.patch
+Patch38: gcc41-pr28659.patch
%define _gnu %{nil}
%ifarch sparc
@@ -440,34 +437,31 @@
%patch11 -p0 -b .mni~
%patch12 -p0 -b .dsohandle~
%patch13 -p0 -b .rh184446~
-%patch14 -p0 -b .pr21764~
-#%patch15 -p0 -b .pr21581~
-%patch16 -p0 -E -b .pr20297-test~
-%patch17 -p0 -b .pr28683~
-%patch18 -p0 -b .objc-rh185398~
-%patch19 -p0 -b .tests~
-%patch20 -p0 -b .ppc64-ldouble-stdarg~
-%patch21 -p0 -b .pr25874~
-%patch22 -p0 -b .pr26881~
-%patch23 -p0 -b .i386-tune-geode~
-%patch24 -p0 -b .pr26885~
-%patch25 -p0 -b .hash-style-gnu~
-%patch26 -p0 -b .visibility~
-%patch27 -p0 -b .pr28370~
-%patch28 -p0 -b .pr28407~
-%patch29 -p0 -b .power6~
-%patch30 -p0 -b .power6-2~
-%patch31 -p0 -b .java-libdotdotlib~
-%patch32 -p0 -b .pr28600~
-%patch33 -p0 -b .rh200887~
-%patch34 -p0 -b .pr25795~
-%patch35 -p0 -b .pr28706~
-%patch36 -p0 -b .pr28725~
-%patch37 -p0 -b .pr28709~
-%patch38 -p0 -b .pr28744~
-%patch39 -p0 -b .x86_64-kernel-ssp~
-%patch40 -p0 -b .pr28755~
-%patch41 -p0 -b .pr27898~
+%patch14 -p0 -b .pr20297-test~
+%patch15 -p0 -b .pr28683~
+%patch16 -p0 -b .objc-rh185398~
+%patch17 -p0 -b .tests~
+%patch18 -p0 -b .ppc64-ldouble-stdarg~
+%patch19 -p0 -b .pr25874~
+%patch20 -p0 -b .pr26881~
+%patch21 -p0 -b .i386-tune-geode~
+%patch22 -p0 -b .pr26885~
+%patch23 -p0 -b .hash-style-gnu~
+%patch24 -p0 -b .power6~
+%patch25 -p0 -b .power6-2~
+%patch26 -p0 -b .java-libdotdotlib~
+%patch27 -p0 -b .pr28600~
+%patch28 -p0 -b .rh200887~
+%patch29 -p0 -b .pr25795~
+%patch30 -p0 -b .pr28706~
+%patch31 -p0 -b .pr28725~
+%patch32 -p0 -b .pr28709~
+%patch33 -p0 -b .pr28744~
+%patch34 -p0 -b .x86_64-kernel-ssp~
+%patch35 -p0 -b .pr28755~
+%patch36 -p0 -b .pr27898~
+%patch37 -p0 -b .pr26026~
+%patch38 -p0 -b .pr28659~
sed -i -e 's/4\.1\.2/4.1.1/' gcc/BASE-VER gcc/version.c
sed -i -e 's/" (Red Hat[^)]*)"/" (Red Hat %{version}-%{gcc_release})"/' gcc/version.c
@@ -1527,6 +1521,16 @@
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
+* Fri Aug 25 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-20
+- update from gcc-4_1-branch (-r116389:116498)
+ - PRs c++/28056, c++/28058, c++/28595, c++/28853, c/27558,
+ c/27893, c/28299, c/28418, driver/27622, libfortran/28452,
+ libfortran/28542, target/27075
+- optimize A / (B << N) where A and B is positive and B is a power of two
+ (Alan Modra, #195924, PR rtl-optimization/26026)
+- fix attribute handling in C++ (Jason Merrill, #204277, #204035,
+ PRs c++/28659, c++/28863)
+
* Fri Aug 25 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-19
- update from gcc-4_1-branch (-r116223:116389)
- PRs c++/23372, c++/27714, c++/28346, c++/28385, fortran/18111,
Index: sources
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/sources,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -r1.169 -r1.170
--- sources 25 Aug 2006 14:29:29 -0000 1.169
+++ sources 28 Aug 2006 19:57:07 -0000 1.170
@@ -1 +1 @@
-f269c8fb24478179193fe3421da65c62 gcc-4.1.1-20060825.tar.bz2
+4c896430e49a06d34569c9bfa531f013 gcc-4.1.1-20060828.tar.bz2
--- gcc41-pr21581.patch DELETED ---
--- gcc41-pr21764.patch DELETED ---
--- gcc41-pr28370.patch DELETED ---
--- gcc41-pr28407.patch DELETED ---
--- gcc41-visibility.patch DELETED ---
- Previous message (by thread): rpms/glibc/devel .cvsignore, 1.168, 1.169 glibc-fedora.patch, 1.176, 1.177 glibc.spec, 1.261, 1.262 sources, 1.192, 1.193
- Next message (by thread): rpms/kudzu/devel .cvsignore, 1.129, 1.130 kudzu.spec, 1.147, 1.148 sources, 1.146, 1.147
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list