This commit is contained in:
Jakub Jelinek 2013-07-16 00:31:20 +02:00
parent f9bd6769eb
commit 3abd19c007
4 changed files with 99 additions and 5 deletions

1
.gitignore vendored
View File

@ -78,3 +78,4 @@
/gcc-4.8.1-20130603.tar.bz2
/gcc-4.8.1-20130612.tar.bz2
/gcc-4.8.1-20130628.tar.bz2
/gcc-4.8.1-20130715.tar.bz2

View File

@ -1,9 +1,9 @@
%global DATE 20130628
%global SVNREV 200518
%global DATE 20130715
%global SVNREV 200961
%global gcc_version 4.8.1
# Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line.
%global gcc_release 3
%global gcc_release 4
%global _unpackaged_files_terminate_build 0
%global multilib_64_archs sparc64 ppc64 s390x x86_64
%ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha
@ -194,6 +194,7 @@ Patch10: gcc48-pr38757.patch
Patch11: gcc48-libstdc++-docs.patch
Patch12: gcc48-no-add-needed.patch
Patch13: gcc48-pr56564.patch
Patch14: gcc48-pr56493.patch
Patch1000: fastjar-0.97-segfault.patch
Patch1001: fastjar-0.97-len1.patch
@ -748,6 +749,7 @@ package or when debugging this package.
%endif
%patch12 -p0 -b .no-add-needed~
%patch13 -p0 -b .pr56564~
%patch14 -p0 -b .pr56493~
%if 0%{?_enable_debug_packages}
cat > split-debuginfo.sh <<\EOF
@ -1045,8 +1047,11 @@ CC="$CC" CFLAGS="$OPT_FLAGS" \
%ifarch sparc sparcv9
--host=%{gcc_target_platform} --build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=v7
%endif
%if 0%{?rhel} >= 6
%ifarch ppc ppc64
%if 0%{?rhel} >= 7
--with-cpu-32=power4 --with-tune-32=power7 --with-cpu-64=power4 --with-tune-64=power7 \
%endif
%if 0%{?rhel} == 6
--with-cpu-32=power4 --with-tune-32=power6 --with-cpu-64=power4 --with-tune-64=power6 \
%endif
%endif
@ -2986,6 +2991,18 @@ fi
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%changelog
* Mon Jul 15 2013 Jakub Jelinek <jakub@redhat.com> 4.8.1-4
- update from the 4.8 branch
- PRs c++/57437, c++/57526, c++/57532, c++/57545, c++/57550, c++/57551,
c++/57645, c++/57771, c++/57831, fortran/57785,
rtl-optimization/57829, target/56102, target/56892, target/56987,
target/57506, target/57631, target/57736, target/57744,
target/57777, target/57792, target/57844
- backport some raw-string literal handling fixes (#981029,
PRs preprocessor/57757, preprocessor/57824)
- improve convert_to_* (PR c++/56493)
- tune for power7 on RHEL7
* Fri Jun 28 2013 Jakub Jelinek <jakub@redhat.com> 4.8.1-3
- update from the 4.8 branch
- PRs c++/53211, c++/56544, driver/57652, libstdc++/57619, libstdc++/57666,

76
gcc48-pr56493.patch Normal file
View File

@ -0,0 +1,76 @@
2013-06-17 Jakub Jelinek <jakub@redhat.com>
PR c++/56493
* convert.c (convert_to_real, convert_to_expr, convert_to_complex):
Handle COMPOUND_EXPR.
* c-c++-common/pr56493.c: New test.
--- gcc/convert.c.jj 2013-05-13 09:44:53.000000000 +0200
+++ gcc/convert.c 2013-06-16 12:16:13.754108523 +0200
@@ -95,6 +95,15 @@ convert_to_real (tree type, tree expr)
enum built_in_function fcode = builtin_mathfn_code (expr);
tree itype = TREE_TYPE (expr);
+ if (TREE_CODE (expr) == COMPOUND_EXPR)
+ {
+ tree t = convert_to_real (type, TREE_OPERAND (expr, 1));
+ if (t == TREE_OPERAND (expr, 1))
+ return expr;
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
+ TREE_OPERAND (expr, 0), t);
+ }
+
/* Disable until we figure out how to decide whether the functions are
present in runtime. */
/* Convert (float)sqrt((double)x) where x is float into sqrtf(x) */
@@ -366,6 +375,15 @@ convert_to_integer (tree type, tree expr
return error_mark_node;
}
+ if (ex_form == COMPOUND_EXPR)
+ {
+ tree t = convert_to_integer (type, TREE_OPERAND (expr, 1));
+ if (t == TREE_OPERAND (expr, 1))
+ return expr;
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
+ TREE_OPERAND (expr, 0), t);
+ }
+
/* Convert e.g. (long)round(d) -> lround(d). */
/* If we're converting to char, we may encounter differing behavior
between converting from double->char vs double->long->char.
@@ -854,6 +872,14 @@ convert_to_complex (tree type, tree expr
if (TYPE_MAIN_VARIANT (elt_type) == TYPE_MAIN_VARIANT (subtype))
return expr;
+ else if (TREE_CODE (expr) == COMPOUND_EXPR)
+ {
+ tree t = convert_to_complex (type, TREE_OPERAND (expr, 1));
+ if (t == TREE_OPERAND (expr, 1))
+ return expr;
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR,
+ TREE_TYPE (t), TREE_OPERAND (expr, 0), t);
+ }
else if (TREE_CODE (expr) == COMPLEX_EXPR)
return fold_build2 (COMPLEX_EXPR, type,
convert (subtype, TREE_OPERAND (expr, 0)),
--- gcc/testsuite/c-c++-common/pr56493.c.jj 2013-06-17 10:24:36.891659600 +0200
+++ gcc/testsuite/c-c++-common/pr56493.c 2013-06-17 10:24:33.164720149 +0200
@@ -0,0 +1,16 @@
+/* PR c++/56493 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-gimple" } */
+
+unsigned long long bar (void);
+int x;
+
+void
+foo (void)
+{
+ x += bar ();
+}
+
+/* Verify we narrow the addition from unsigned long long to unsigned int type. */
+/* { dg-final { scan-tree-dump " (\[a-zA-Z._0-9]*) = \\(unsigned int\\) \[^;\n\r]*;.* (\[a-zA-Z._0-9]*) = \\(unsigned int\\) \[^;\n\r]*;.* = \\1 \\+ \\2;" "gimple" { target { ilp32 || lp64 } } } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */

View File

@ -1,4 +1,4 @@
be78a47bd82523250eb3e91646db5b3d cloog-0.18.0.tar.gz
2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz
ea21942f46b74d4c3dfa5a92b266d6d9 gcc-4.8.1-20130628.tar.bz2
d4670d5b0b06cf7a95a11444df476e6c gcc-4.8.1-20130715.tar.bz2
bce1586384d8635a76d2f017fb067cd2 isl-0.11.1.tar.bz2