This commit is contained in:
Jakub Jelinek 2014-12-17 12:11:31 +01:00
parent 4ac68e8f20
commit 79c442fecf
6 changed files with 131 additions and 48 deletions

1
.gitignore vendored
View File

@ -28,3 +28,4 @@
/gcc-4.9.1-20141024.tar.bz2
/gcc-4.9.2-20141101.tar.bz2
/gcc-4.9.2-20141212.tar.bz2
/gcc-4.9.2-20141217.tar.bz2

View File

@ -1,9 +1,9 @@
%global DATE 20141212
%global SVNREV 218667
%global DATE 20141217
%global SVNREV 218815
%global gcc_version 4.9.2
# 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 2
%global gcc_release 3
%global _unpackaged_files_terminate_build 0
%global _performance_build 1
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
@ -199,7 +199,8 @@ Patch13: gcc49-color-auto.patch
Patch14: gcc49-libgo-p224.patch
Patch15: gcc49-aarch64-async-unw-tables.patch
Patch16: gcc49-aarch64-unwind-opt.patch
Patch17: gcc49-pr64269.patch
Patch17: gcc49-pr61669.patch
Patch18: gcc49-pr64336.patch
Patch1100: cloog-%{cloog_version}-ppc64le-config.patch
@ -727,7 +728,8 @@ package or when debugging this package.
rm -f libgo/go/crypto/elliptic/p224{,_test}.go
%patch15 -p0 -b .aarch64-async-unw-tables~
%patch16 -p0 -b .aarch64-unwind-opt~
%patch17 -p0 -b .pr64269~
%patch17 -p0 -b .pr61669~
%patch18 -p0 -b .pr64336~
%if 0%{?_enable_debug_packages}
cat > split-debuginfo.sh <<\EOF
@ -2803,6 +2805,17 @@ fi
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%changelog
* Wed Dec 17 2014 Jakub Jelinek <jakub@redhat.com> 4.9.2-3
- update from the 4.9 branch
- PRs libstdc++/64239, sanitizer/64265, target/64200,
tree-optimization/63551, tree-optimization/64269
- fix up SANITIZE_* enum values, so that -fsanitize=bool is independent
from -fsanitize=float-divide-by-zero and -fsanitize=enum is independent
from -fsanitize=float-cast-overflow (#1173185)
- fix -fsanitize=float-cast-overflow in C (#1173185, PR sanitizer/64289)
- fix -fsanitize=thread (PR sanitizer/64336)
- fix up Fortran DATA error recovery (#1115207, PR fortran/61669)
* Fri Dec 12 2014 Jakub Jelinek <jakub@redhat.com> 4.9.2-2
- update from the 4.9 branch
- PRs ada/42978, ada/47500, bootstrap/63703, bootstrap/64213, c++/56493,

94
gcc49-pr61669.patch Normal file
View File

@ -0,0 +1,94 @@
2014-12-15 Steven Bosscher <steven@gcc.gnu.org>
PR fortran/61669
* gfortran.h (struct gfc_namespace): Add OLD_DATA field.
* decl.c (gfc_reject_data): New function.
* parse.c *use_modules): Record roll-back point.
(next_statement): Likewise.
(reject_statement): Roll back to last accepted DATA.
2014-12-15 Steven Bosscher <steven@gcc.gnu.org>
Jakub Jelinek <jakub@redhat.com>
PR fortran/61669
* gfortran.dg/pr61669.f90: New test.
--- gcc/fortran/decl.c (revision 218756)
+++ gcc/fortran/decl.c (revision 218757)
@@ -178,6 +178,20 @@ gfc_free_data_all (gfc_namespace *ns)
}
}
+/* Reject data parsed since the last restore point was marked. */
+
+void
+gfc_reject_data (gfc_namespace *ns)
+{
+ gfc_data *d;
+
+ while (ns->data && ns->data != ns->old_data)
+ {
+ d = ns->data->next;
+ free (ns->data);
+ ns->data = d;
+ }
+}
static match var_element (gfc_data_variable *);
--- gcc/fortran/gfortran.h (revision 218756)
+++ gcc/fortran/gfortran.h (revision 218757)
@@ -1627,7 +1627,7 @@ typedef struct gfc_namespace
gfc_st_label *st_labels;
/* This list holds information about all the data initializers in
this namespace. */
- struct gfc_data *data;
+ struct gfc_data *data, *old_data;
gfc_charlen *cl_list, *old_cl_list;
@@ -2929,6 +2929,7 @@ void gfc_free_omp_namelist (gfc_omp_name
void gfc_free_equiv (gfc_equiv *);
void gfc_free_equiv_until (gfc_equiv *, gfc_equiv *);
void gfc_free_data (gfc_data *);
+void gfc_reject_data (gfc_namespace *);
void gfc_free_case_list (gfc_case *);
/* matchexp.c -- FIXME too? */
--- gcc/fortran/parse.c (revision 218756)
+++ gcc/fortran/parse.c (revision 218757)
@@ -119,6 +119,7 @@ use_modules (void)
gfc_warning_check ();
gfc_current_ns->old_cl_list = gfc_current_ns->cl_list;
gfc_current_ns->old_equiv = gfc_current_ns->equiv;
+ gfc_current_ns->old_data = gfc_current_ns->data;
last_was_use_stmt = false;
}
@@ -1098,6 +1099,7 @@ next_statement (void)
gfc_current_ns->old_cl_list = gfc_current_ns->cl_list;
gfc_current_ns->old_equiv = gfc_current_ns->equiv;
+ gfc_current_ns->old_data = gfc_current_ns->data;
for (;;)
{
gfc_statement_label = NULL;
@@ -2043,6 +2045,8 @@ reject_statement (void)
gfc_free_equiv_until (gfc_current_ns->equiv, gfc_current_ns->old_equiv);
gfc_current_ns->equiv = gfc_current_ns->old_equiv;
+ gfc_reject_data (gfc_current_ns);
+
gfc_new_block = NULL;
gfc_undo_symbols ();
gfc_clear_warning ();
--- gcc/testsuite/gfortran.dg/pr61669.f90 (revision 0)
+++ gcc/testsuite/gfortran.dg/pr61669.f90 (revision 218757)
@@ -0,0 +1,7 @@
+! { dg-do compile }
+ write (*,"(a)") char(12)
+ CHARACTER*80 A /"A"/ ! { dg-error "Unexpected data declaration statement" }
+ REAL*4 B ! { dg-error "Unexpected data declaration statement" }
+ write (*,"(a)") char(12)
+ DATA B / 0.02 / ! { dg-warning "Obsolescent feature: DATA statement" }
+ END

View File

@ -1,42 +0,0 @@
2014-12-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/64269
* tree-ssa-forwprop.c (simplify_builtin_call): Bail out if
len2 or diff are too large.
* gcc.c-torture/compile/pr64269.c: New test.
--- gcc/tree-ssa-forwprop.c.jj 2014-12-01 14:57:30.000000000 +0100
+++ gcc/tree-ssa-forwprop.c 2014-12-12 09:46:05.790053928 +0100
@@ -1288,7 +1288,8 @@ simplify_builtin_call (gimple_stmt_itera
use_operand_p use_p;
if (!tree_fits_shwi_p (val2)
- || !tree_fits_uhwi_p (len2))
+ || !tree_fits_uhwi_p (len2)
+ || compare_tree_int (len2, 1024) == 1)
break;
if (is_gimple_call (stmt1))
{
@@ -1354,7 +1355,8 @@ simplify_builtin_call (gimple_stmt_itera
is not constant, or is bigger than memcpy length, bail out. */
if (diff == NULL
|| !tree_fits_uhwi_p (diff)
- || tree_int_cst_lt (len1, diff))
+ || tree_int_cst_lt (len1, diff)
+ || compare_tree_int (diff, 1024) == 1)
break;
/* Use maximum of difference plus memset length and memcpy length
--- gcc/testsuite/gcc.c-torture/compile/pr64269.c.jj 2014-12-12 09:47:04.795015479 +0100
+++ gcc/testsuite/gcc.c-torture/compile/pr64269.c 2014-12-12 09:46:51.000000000 +0100
@@ -0,0 +1,9 @@
+/* PR tree-optimization/64269 */
+
+void
+foo (char *p)
+{
+ __SIZE_TYPE__ s = ~(__SIZE_TYPE__)0;
+ *p = 0;
+ __builtin_memset (p + 1, 0, s);
+}

17
gcc49-pr64336.patch Normal file
View File

@ -0,0 +1,17 @@
2014-12-17 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/64336
* tsan.c (instrument_expr): Ignore TREE_READONLY bit
on MEM_REFs.
--- gcc/tsan.c.jj 2014-12-17 10:53:30.000000000 +0100
+++ gcc/tsan.c 2014-12-17 11:55:12.793058159 +0100
@@ -138,7 +138,7 @@ instrument_expr (gimple_stmt_iterator gs
return false;
}
- if (TREE_READONLY (base)
+ if ((TREE_READONLY (base) && TREE_CODE (base) != MEM_REF)
|| (TREE_CODE (base) == VAR_DECL
&& DECL_HARD_REGISTER (base)))
return false;

View File

@ -1,3 +1,3 @@
e34fca0540d840e5d0f6427e98c92252 cloog-0.18.1.tar.gz
ccd8cac944582f8d2ddf5274a15df176 gcc-4.9.2-20141212.tar.bz2
d01e629438a639ebad16d0331cea2575 gcc-4.9.2-20141217.tar.bz2
e039bfcfb6c2ab039b8ee69bf883e824 isl-0.12.2.tar.bz2