6.0.0-0.12
This commit is contained in:
parent
d9e1ca5983
commit
8a240523f5
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,7 +1 @@
|
|||||||
/gcc-6.0.0-20160127.tar.bz2
|
/gcc-6.0.0-20160219.tar.bz2
|
||||||
/gcc-6.0.0-20160128.tar.bz2
|
|
||||||
/gcc-6.0.0-20160129.tar.bz2
|
|
||||||
/gcc-6.0.0-20160201.tar.bz2
|
|
||||||
/gcc-6.0.0-20160205.tar.bz2
|
|
||||||
/gcc-6.0.0-20160212.tar.bz2
|
|
||||||
/gcc-gnat-6.0.0-0.7.s390x.tar.bz2
|
|
||||||
|
53
gcc.spec
53
gcc.spec
@ -1,15 +1,15 @@
|
|||||||
%global DATE 20160212
|
%global DATE 20160219
|
||||||
%global SVNREV 233372
|
%global SVNREV 233570
|
||||||
%global gcc_version 6.0.0
|
%global gcc_version 6.0.0
|
||||||
# Note, gcc_release must be integer, if you want to add suffixes to
|
# Note, gcc_release must be integer, if you want to add suffixes to
|
||||||
# %{release}, append them after %{gcc_release} on Release: line.
|
# %{release}, append them after %{gcc_release} on Release: line.
|
||||||
%global gcc_release 0.11.1
|
%global gcc_release 0.12
|
||||||
%global _unpackaged_files_terminate_build 0
|
%global _unpackaged_files_terminate_build 0
|
||||||
%global _performance_build 1
|
%global _performance_build 1
|
||||||
# Hardening slows the compiler way too much.
|
# Hardening slows the compiler way too much.
|
||||||
%undefine _hardened_build
|
%undefine _hardened_build
|
||||||
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
|
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
|
||||||
%ifarch %{ix86} x86_64 ia64 ppc ppc64 ppc64p7 alpha %{arm} aarch64 s390x
|
%ifarch %{ix86} x86_64 ia64 ppc ppc64 ppc64p7 alpha s390x %{arm} aarch64
|
||||||
%global build_ada 1
|
%global build_ada 1
|
||||||
%else
|
%else
|
||||||
%global build_ada 0
|
%global build_ada 0
|
||||||
@ -96,7 +96,6 @@ Group: Development/Languages
|
|||||||
# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-6-branch@%{SVNREV} gcc-%{version}-%{DATE}
|
# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-6-branch@%{SVNREV} gcc-%{version}-%{DATE}
|
||||||
# tar cf - gcc-%{version}-%{DATE} | bzip2 -9 > gcc-%{version}-%{DATE}.tar.bz2
|
# tar cf - gcc-%{version}-%{DATE} | bzip2 -9 > gcc-%{version}-%{DATE}.tar.bz2
|
||||||
Source0: gcc-%{version}-%{DATE}.tar.bz2
|
Source0: gcc-%{version}-%{DATE}.tar.bz2
|
||||||
Source1: gcc-gnat-6.0.0-0.7.s390x.tar.bz2
|
|
||||||
%global isl_version 0.14
|
%global isl_version 0.14
|
||||||
URL: http://gcc.gnu.org
|
URL: http://gcc.gnu.org
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
@ -139,11 +138,9 @@ BuildRequires: glibc >= 2.3.90-35
|
|||||||
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
|
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
|
||||||
%endif
|
%endif
|
||||||
%if %{build_ada}
|
%if %{build_ada}
|
||||||
%ifnarch s390x
|
|
||||||
# Ada requires Ada to build
|
# Ada requires Ada to build
|
||||||
BuildRequires: gcc-gnat >= 3.1, libgnat >= 3.1
|
BuildRequires: gcc-gnat >= 3.1, libgnat >= 3.1
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
BuildRequires: libunwind >= 0.98
|
BuildRequires: libunwind >= 0.98
|
||||||
%endif
|
%endif
|
||||||
@ -209,11 +206,6 @@ Patch10: gcc6-no-add-needed.patch
|
|||||||
Patch11: gcc6-libgo-p224.patch
|
Patch11: gcc6-libgo-p224.patch
|
||||||
Patch12: gcc6-aarch64-async-unw-tables.patch
|
Patch12: gcc6-aarch64-async-unw-tables.patch
|
||||||
Patch13: gcc6-libsanitize-aarch64-va42.patch
|
Patch13: gcc6-libsanitize-aarch64-va42.patch
|
||||||
Patch14: gcc6-pr65932-cse-revert.patch
|
|
||||||
Patch15: gcc6-pr69241.patch
|
|
||||||
Patch16: gcc6-pr69658.patch
|
|
||||||
Patch17: gcc6-pr10200-revert.patch
|
|
||||||
Patch18: gcc6-pr68672.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.
|
||||||
@ -780,11 +772,6 @@ package or when debugging this package.
|
|||||||
rm -f libgo/go/crypto/elliptic/p224{,_test}.go
|
rm -f libgo/go/crypto/elliptic/p224{,_test}.go
|
||||||
%patch12 -p0 -b .aarch64-async-unw-tables~
|
%patch12 -p0 -b .aarch64-async-unw-tables~
|
||||||
%patch13 -p0 -b .libsanitize-aarch64-va42~
|
%patch13 -p0 -b .libsanitize-aarch64-va42~
|
||||||
%patch14 -p0 -b .pr65932-cse-revert~
|
|
||||||
%patch15 -p0 -b .pr69241~
|
|
||||||
%patch16 -p0 -b .pr69658~
|
|
||||||
%patch17 -p0 -b .pr10200~
|
|
||||||
%patch18 -p0 -b .pr68672~
|
|
||||||
|
|
||||||
%if 0%{?_enable_debug_packages}
|
%if 0%{?_enable_debug_packages}
|
||||||
mkdir dwz-wrapper
|
mkdir dwz-wrapper
|
||||||
@ -917,12 +904,6 @@ fi
|
|||||||
# This test causes fork failures, because it spawns way too many threads
|
# This test causes fork failures, because it spawns way too many threads
|
||||||
rm -f gcc/testsuite/go.test/test/chan/goroutines.go
|
rm -f gcc/testsuite/go.test/test/chan/goroutines.go
|
||||||
|
|
||||||
%ifarch s390x
|
|
||||||
tar xjf %SOURCE1
|
|
||||||
ln -sf /usr/lib/gcc/*/*/* usr/lib/gcc/*/*/
|
|
||||||
ln -sf /usr/libexec/gcc/*/*/* usr/libexec/gcc/*/*/
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
# Undo the broken autoconf change in recent Fedora versions
|
# Undo the broken autoconf change in recent Fedora versions
|
||||||
@ -934,12 +915,6 @@ cd obj-%{gcc_target_platform}
|
|||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CXX=g++
|
CXX=g++
|
||||||
%ifarch s390x
|
|
||||||
CC=`pwd`/../usr/bin/gcc
|
|
||||||
export PATH=`pwd`/../usr/bin:$PATH
|
|
||||||
export LD_LIBRARY_PATH=`pwd`/../usr/lib64
|
|
||||||
%endif
|
|
||||||
|
|
||||||
OPT_FLAGS=`echo %{optflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
|
OPT_FLAGS=`echo %{optflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
|
||||||
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
|
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
|
||||||
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mfpmath=sse/-mfpmath=sse -msse2/g'`
|
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mfpmath=sse/-mfpmath=sse -msse2/g'`
|
||||||
@ -3089,6 +3064,26 @@ fi
|
|||||||
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 19 2016 Jakub Jelinek <jakub@redhat.com> 6.0.0-0.12
|
||||||
|
- update from the trunk
|
||||||
|
- PRs bootstrap/69816, c++/65985, c++/67767, c++/68585, c++/68679,
|
||||||
|
c++/68890, c++/69753, c++/69797, c++/69842, c++/69850, c++/69851,
|
||||||
|
c/64748, c/69835, driver/69265, driver/69453, driver/69779,
|
||||||
|
fortran/60526, fortran/68746, fortran/69742, libgfortran/69651,
|
||||||
|
libgfortran/69668, libstdc++/69794, lto/67709, lto/69655,
|
||||||
|
middle-end/69553, middle-end/69801, middle-end/69838,
|
||||||
|
middle-end/69854, other/69554, rtl-optimization/69609,
|
||||||
|
rtl-optimization/69648, rtl-optimization/69752,
|
||||||
|
rtl-optimization/69764, rtl-optimization/69771, sanitizer/69863,
|
||||||
|
target/48344, target/62254, target/64345, target/67260, target/67636,
|
||||||
|
target/68973, target/69161, target/69532, target/69610, target/69671,
|
||||||
|
target/69729, target/69820, testsuite/68580, testsuite/68886,
|
||||||
|
testsuite/69573, testsuite/69586, tree-optimization/69586,
|
||||||
|
tree-optimization/69714, tree-optimization/69776,
|
||||||
|
tree-optimization/69783, tree-optimization/69802,
|
||||||
|
tree-optimization/69820
|
||||||
|
- enable Ada on s390x
|
||||||
|
|
||||||
* Fri Feb 12 2016 Jakub Jelinek <jakub@redhat.com> 6.0.0-0.11
|
* Fri Feb 12 2016 Jakub Jelinek <jakub@redhat.com> 6.0.0-0.11
|
||||||
- update from the trunk
|
- update from the trunk
|
||||||
- PRs c++/10200, c++/59627, c++/67835, c++/68726, c++/68926, c++/69098,
|
- PRs c++/10200, c++/59627, c++/67835, c++/68726, c++/68926, c++/69098,
|
||||||
|
@ -1,104 +0,0 @@
|
|||||||
Revert due to PR69753:
|
|
||||||
2016-02-10 Jason Merrill <jason@redhat.com>
|
|
||||||
|
|
||||||
PR c++/10200
|
|
||||||
* parser.c (cp_parser_lookup_name): When looking for a template
|
|
||||||
after . or ->, only consider class templates.
|
|
||||||
(cp_parser_postfix_dot_deref_expression): Handle the current
|
|
||||||
instantiation. Remember a dependent object expression.
|
|
||||||
* typeck2.c (build_x_arrow): Handle the current instantiation.
|
|
||||||
|
|
||||||
--- gcc/cp/typeck2.c (revision 233277)
|
|
||||||
+++ gcc/cp/typeck2.c (revision 233276)
|
|
||||||
@@ -1694,10 +1694,7 @@ build_x_arrow (location_t loc, tree expr
|
|
||||||
|
|
||||||
if (processing_template_decl)
|
|
||||||
{
|
|
||||||
- if (type && TREE_CODE (type) == POINTER_TYPE
|
|
||||||
- && !dependent_scope_p (TREE_TYPE (type)))
|
|
||||||
- /* Pointer to current instantiation, don't treat as dependent. */;
|
|
||||||
- else if (type_dependent_expression_p (expr))
|
|
||||||
+ if (type_dependent_expression_p (expr))
|
|
||||||
return build_min_nt_loc (loc, ARROW_EXPR, expr);
|
|
||||||
expr = build_non_dependent_expr (expr);
|
|
||||||
}
|
|
||||||
--- gcc/cp/parser.c (revision 233277)
|
|
||||||
+++ gcc/cp/parser.c (revision 233276)
|
|
||||||
@@ -7184,16 +7184,8 @@ cp_parser_postfix_dot_deref_expression (
|
|
||||||
if (token_type == CPP_DEREF)
|
|
||||||
postfix_expression = build_x_arrow (location, postfix_expression,
|
|
||||||
tf_warning_or_error);
|
|
||||||
- /* According to the standard, no expression should ever have
|
|
||||||
- reference type. Unfortunately, we do not currently match
|
|
||||||
- the standard in this respect in that our internal representation
|
|
||||||
- of an expression may have reference type even when the standard
|
|
||||||
- says it does not. Therefore, we have to manually obtain the
|
|
||||||
- underlying type here. */
|
|
||||||
- scope = non_reference (TREE_TYPE (postfix_expression));
|
|
||||||
- /* Check to see whether or not the expression is type-dependent and
|
|
||||||
- not the current instantiation. */
|
|
||||||
- dependent_p = !scope || dependent_scope_p (scope);
|
|
||||||
+ /* Check to see whether or not the expression is type-dependent. */
|
|
||||||
+ dependent_p = type_dependent_expression_p (postfix_expression);
|
|
||||||
/* The identifier following the `->' or `.' is not qualified. */
|
|
||||||
parser->scope = NULL_TREE;
|
|
||||||
parser->qualifying_scope = NULL_TREE;
|
|
||||||
@@ -7202,8 +7194,16 @@ cp_parser_postfix_dot_deref_expression (
|
|
||||||
|
|
||||||
/* Enter the scope corresponding to the type of the object
|
|
||||||
given by the POSTFIX_EXPRESSION. */
|
|
||||||
- if (!dependent_p)
|
|
||||||
+ if (!dependent_p && TREE_TYPE (postfix_expression) != NULL_TREE)
|
|
||||||
{
|
|
||||||
+ scope = TREE_TYPE (postfix_expression);
|
|
||||||
+ /* According to the standard, no expression should ever have
|
|
||||||
+ reference type. Unfortunately, we do not currently match
|
|
||||||
+ the standard in this respect in that our internal representation
|
|
||||||
+ of an expression may have reference type even when the standard
|
|
||||||
+ says it does not. Therefore, we have to manually obtain the
|
|
||||||
+ underlying type here. */
|
|
||||||
+ scope = non_reference (scope);
|
|
||||||
/* The type of the POSTFIX_EXPRESSION must be complete. */
|
|
||||||
if (scope == unknown_type_node)
|
|
||||||
{
|
|
||||||
@@ -7215,10 +7215,7 @@ cp_parser_postfix_dot_deref_expression (
|
|
||||||
required to be of complete type for purposes of class member
|
|
||||||
access (5.2.5) outside the member function body. */
|
|
||||||
else if (postfix_expression != current_class_ref
|
|
||||||
- && !(processing_template_decl
|
|
||||||
- && current_class_type
|
|
||||||
- && (same_type_ignoring_top_level_qualifiers_p
|
|
||||||
- (scope, current_class_type))))
|
|
||||||
+ && !(processing_template_decl && scope == current_class_type))
|
|
||||||
scope = complete_type_or_else (scope, NULL_TREE);
|
|
||||||
/* Let the name lookup machinery know that we are processing a
|
|
||||||
class member access expression. */
|
|
||||||
@@ -7234,10 +7231,6 @@ cp_parser_postfix_dot_deref_expression (
|
|
||||||
if (scope == error_mark_node)
|
|
||||||
postfix_expression = error_mark_node;
|
|
||||||
}
|
|
||||||
- else
|
|
||||||
- /* Tell cp_parser_lookup_name that there was an object, even though it's
|
|
||||||
- type-dependent. */
|
|
||||||
- parser->context->object_type = unknown_type_node;
|
|
||||||
|
|
||||||
/* Assume this expression is not a pseudo-destructor access. */
|
|
||||||
pseudo_destructor_p = false;
|
|
||||||
@@ -24727,15 +24720,10 @@ cp_parser_lookup_name (cp_parser *parser
|
|
||||||
decl = NULL_TREE;
|
|
||||||
|
|
||||||
if (!decl)
|
|
||||||
- /* Look it up in the enclosing context. DR 141: When looking for a
|
|
||||||
- template-name after -> or ., only consider class templates. */
|
|
||||||
- decl = lookup_name_real (name, tag_type != none_type || is_template,
|
|
||||||
+ /* Look it up in the enclosing context. */
|
|
||||||
+ decl = lookup_name_real (name, tag_type != none_type,
|
|
||||||
/*nonclass=*/0,
|
|
||||||
/*block_p=*/true, is_namespace, 0);
|
|
||||||
- if (object_type == unknown_type_node)
|
|
||||||
- /* The object is type-dependent, so we can't look anything up; we used
|
|
||||||
- this to get the DR 141 behavior. */
|
|
||||||
- object_type = NULL_TREE;
|
|
||||||
parser->object_scope = object_type;
|
|
||||||
parser->qualifying_scope = NULL_TREE;
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
Revert:
|
|
||||||
2016-02-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
|
||||||
|
|
||||||
PR target/65932
|
|
||||||
PR target/67714
|
|
||||||
* cse.c (cse_insn): Pass NULL to fold_rtx when initially
|
|
||||||
folding the source of a SET.
|
|
||||||
|
|
||||||
--- gcc/cse.c (revision 233133)
|
|
||||||
+++ gcc/cse.c (revision 233132)
|
|
||||||
@@ -4636,7 +4636,7 @@ cse_insn (rtx_insn *insn)
|
|
||||||
|
|
||||||
/* Simplify and foldable subexpressions in SRC. Then get the fully-
|
|
||||||
simplified result, which may not necessarily be valid. */
|
|
||||||
- src_folded = fold_rtx (src, NULL);
|
|
||||||
+ src_folded = fold_rtx (src, insn);
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* ??? This caused bad code to be generated for the m68k port with -O2.
|
|
@ -1,299 +0,0 @@
|
|||||||
2016-02-11 Jakub Jelinek <jakub@redhat.com>
|
|
||||||
|
|
||||||
PR ipa/68672
|
|
||||||
* ipa-split.c (split_function): Don't compute/use main_part_return_p.
|
|
||||||
Compute retval and retbnd early in all cases if split_part_return_p
|
|
||||||
and return_bb is not EXIT. Remove all clobber stmts and reset
|
|
||||||
all debug stmts that refer to SSA_NAMEs defined in split part,
|
|
||||||
except if it is retval, in that case replace the old retval with the
|
|
||||||
lhs of the call to the split part.
|
|
||||||
|
|
||||||
* g++.dg/ipa/pr68672-1.C: New test.
|
|
||||||
* g++.dg/ipa/pr68672-2.C: New test.
|
|
||||||
* g++.dg/ipa/pr68672-3.C: New test.
|
|
||||||
|
|
||||||
--- gcc/ipa-split.c.jj 2016-02-11 10:50:52.888220581 +0100
|
|
||||||
+++ gcc/ipa-split.c 2016-02-11 12:46:15.975777652 +0100
|
|
||||||
@@ -1244,28 +1244,13 @@ split_function (basic_block return_bb, s
|
|
||||||
args_to_pass.safe_push (arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* See if the split function or the main part will return. */
|
|
||||||
- bool main_part_return_p = false;
|
|
||||||
+ /* See if the split function will return. */
|
|
||||||
bool split_part_return_p = false;
|
|
||||||
FOR_EACH_EDGE (e, ei, return_bb->preds)
|
|
||||||
{
|
|
||||||
if (bitmap_bit_p (split_point->split_bbs, e->src->index))
|
|
||||||
split_part_return_p = true;
|
|
||||||
- else
|
|
||||||
- main_part_return_p = true;
|
|
||||||
}
|
|
||||||
- /* The main part also returns if we split on a fallthru edge
|
|
||||||
- and the split part returns. */
|
|
||||||
- if (split_part_return_p)
|
|
||||||
- FOR_EACH_EDGE (e, ei, split_point->entry_bb->preds)
|
|
||||||
- {
|
|
||||||
- if (! bitmap_bit_p (split_point->split_bbs, e->src->index)
|
|
||||||
- && single_succ_p (e->src))
|
|
||||||
- {
|
|
||||||
- main_part_return_p = true;
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
|
|
||||||
/* Add return block to what will become the split function.
|
|
||||||
We do not return; no return block is needed. */
|
|
||||||
@@ -1279,8 +1264,8 @@ split_function (basic_block return_bb, s
|
|
||||||
FIXME: Once we are able to change return type, we should change function
|
|
||||||
to return void instead of just outputting function with undefined return
|
|
||||||
value. For structures this affects quality of codegen. */
|
|
||||||
- else if (!split_point->split_part_set_retval
|
|
||||||
- && (retval = find_retval (return_bb)))
|
|
||||||
+ else if ((retval = find_retval (return_bb))
|
|
||||||
+ && !split_point->split_part_set_retval)
|
|
||||||
{
|
|
||||||
bool redirected = true;
|
|
||||||
basic_block new_return_bb = create_basic_block (NULL, 0, return_bb);
|
|
||||||
@@ -1308,12 +1293,10 @@ split_function (basic_block return_bb, s
|
|
||||||
}
|
|
||||||
/* When we pass around the value, use existing return block. */
|
|
||||||
else
|
|
||||||
- bitmap_set_bit (split_point->split_bbs, return_bb->index);
|
|
||||||
-
|
|
||||||
- /* If the main part doesn't return pretend the return block wasn't
|
|
||||||
- found for all of the following. */
|
|
||||||
- if (! main_part_return_p)
|
|
||||||
- return_bb = EXIT_BLOCK_PTR_FOR_FN (cfun);
|
|
||||||
+ {
|
|
||||||
+ bitmap_set_bit (split_point->split_bbs, return_bb->index);
|
|
||||||
+ retbnd = find_retbnd (return_bb);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
/* If RETURN_BB has virtual operand PHIs, they must be removed and the
|
|
||||||
virtual operand marked for renaming as we change the CFG in a way that
|
|
||||||
@@ -1382,6 +1365,44 @@ split_function (basic_block return_bb, s
|
|
||||||
DECL_FUNCTION_CODE (node->decl) = (enum built_in_function) 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* If return_bb contains any clobbers that refer to SSA_NAMEs
|
|
||||||
+ set in the split part, remove them. Also reset debug stmts that
|
|
||||||
+ refer to SSA_NAMEs set in the split part. */
|
|
||||||
+ if (return_bb != EXIT_BLOCK_PTR_FOR_FN (cfun))
|
|
||||||
+ {
|
|
||||||
+ gimple_stmt_iterator gsi = gsi_start_bb (return_bb);
|
|
||||||
+ while (!gsi_end_p (gsi))
|
|
||||||
+ {
|
|
||||||
+ tree op;
|
|
||||||
+ ssa_op_iter iter;
|
|
||||||
+ gimple *stmt = gsi_stmt (gsi);
|
|
||||||
+ bool remove = false;
|
|
||||||
+ if (gimple_clobber_p (stmt) || is_gimple_debug (stmt))
|
|
||||||
+ FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE)
|
|
||||||
+ {
|
|
||||||
+ basic_block bb = gimple_bb (SSA_NAME_DEF_STMT (op));
|
|
||||||
+ if (op != retval
|
|
||||||
+ && bb
|
|
||||||
+ && bb != return_bb
|
|
||||||
+ && bitmap_bit_p (split_point->split_bbs, bb->index))
|
|
||||||
+ {
|
|
||||||
+ if (is_gimple_debug (stmt))
|
|
||||||
+ {
|
|
||||||
+ gimple_debug_bind_reset_value (stmt);
|
|
||||||
+ update_stmt (stmt);
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ remove = true;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ if (remove)
|
|
||||||
+ gsi_remove (&gsi, true);
|
|
||||||
+ else
|
|
||||||
+ gsi_next (&gsi);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* If the original function is instrumented then it's
|
|
||||||
part is also instrumented. */
|
|
||||||
if (with_bounds)
|
|
||||||
@@ -1499,9 +1520,7 @@ split_function (basic_block return_bb, s
|
|
||||||
return value into and put call just before it. */
|
|
||||||
if (return_bb != EXIT_BLOCK_PTR_FOR_FN (cfun))
|
|
||||||
{
|
|
||||||
- real_retval = retval = find_retval (return_bb);
|
|
||||||
- retbnd = find_retbnd (return_bb);
|
|
||||||
-
|
|
||||||
+ real_retval = retval;
|
|
||||||
if (real_retval && split_point->split_part_set_retval)
|
|
||||||
{
|
|
||||||
gphi_iterator psi;
|
|
||||||
@@ -1545,6 +1564,28 @@ split_function (basic_block return_bb, s
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
update_stmt (gsi_stmt (bsi));
|
|
||||||
+ /* Also adjust clobbers and debug stmts in return_bb. */
|
|
||||||
+ for (bsi = gsi_start_bb (return_bb); !gsi_end_p (bsi);
|
|
||||||
+ gsi_next (&bsi))
|
|
||||||
+ {
|
|
||||||
+ gimple *stmt = gsi_stmt (bsi);
|
|
||||||
+ if (gimple_clobber_p (stmt)
|
|
||||||
+ || is_gimple_debug (stmt))
|
|
||||||
+ {
|
|
||||||
+ ssa_op_iter iter;
|
|
||||||
+ use_operand_p use_p;
|
|
||||||
+ bool update = false;
|
|
||||||
+ FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter,
|
|
||||||
+ SSA_OP_USE)
|
|
||||||
+ if (USE_FROM_PTR (use_p) == real_retval)
|
|
||||||
+ {
|
|
||||||
+ SET_USE (use_p, retval);
|
|
||||||
+ update = true;
|
|
||||||
+ }
|
|
||||||
+ if (update)
|
|
||||||
+ update_stmt (stmt);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Replace retbnd with new one. */
|
|
||||||
--- gcc/testsuite/g++.dg/ipa/pr68672-1.C.jj 2016-02-11 12:31:27.344497187 +0100
|
|
||||||
+++ gcc/testsuite/g++.dg/ipa/pr68672-1.C 2016-02-11 12:31:01.000000000 +0100
|
|
||||||
@@ -0,0 +1,20 @@
|
|
||||||
+// PR ipa/68672
|
|
||||||
+// { dg-do compile }
|
|
||||||
+// { dg-options "-O -finline-small-functions -fpartial-inlining --param=partial-inlining-entry-probability=100" }
|
|
||||||
+
|
|
||||||
+void f2 (void *);
|
|
||||||
+void *a;
|
|
||||||
+struct C { virtual void m1 (); };
|
|
||||||
+struct D { C *m2 () { if (a) __builtin_abort (); } };
|
|
||||||
+D f1 ();
|
|
||||||
+struct E { int e; ~E () { if (e) f2 (&e); } };
|
|
||||||
+E *b;
|
|
||||||
+struct I { virtual void m3 (); };
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+I::m3 ()
|
|
||||||
+{
|
|
||||||
+ if (a)
|
|
||||||
+ f1 ().m2 ()->m1 ();
|
|
||||||
+ b->~E ();
|
|
||||||
+}
|
|
||||||
--- gcc/testsuite/g++.dg/ipa/pr68672-2.C.jj 2016-02-11 12:33:50.744438948 +0100
|
|
||||||
+++ gcc/testsuite/g++.dg/ipa/pr68672-2.C 2016-02-11 12:32:50.000000000 +0100
|
|
||||||
@@ -0,0 +1,54 @@
|
|
||||||
+// PR ipa/68672
|
|
||||||
+// { dg-do compile }
|
|
||||||
+// { dg-options "-O3 --param=partial-inlining-entry-probability=100 -g" }
|
|
||||||
+
|
|
||||||
+struct S { ~S () {} };
|
|
||||||
+S *a;
|
|
||||||
+int *b;
|
|
||||||
+void bar ();
|
|
||||||
+void baz ();
|
|
||||||
+void fn (int *);
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+foo ()
|
|
||||||
+{
|
|
||||||
+ S *c = a;
|
|
||||||
+ if (c)
|
|
||||||
+ {
|
|
||||||
+ bar ();
|
|
||||||
+ if (a)
|
|
||||||
+ __builtin_abort ();
|
|
||||||
+ baz ();
|
|
||||||
+ }
|
|
||||||
+ int p = *b;
|
|
||||||
+ if (p)
|
|
||||||
+ {
|
|
||||||
+ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b);
|
|
||||||
+ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b);
|
|
||||||
+ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b);
|
|
||||||
+ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b);
|
|
||||||
+ }
|
|
||||||
+ c->~S ();
|
|
||||||
+ int q = 2 * p;
|
|
||||||
+ int r = 3 * q;
|
|
||||||
+ S *d = c;
|
|
||||||
+ return p;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+use1 ()
|
|
||||||
+{
|
|
||||||
+ foo ();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+use2 ()
|
|
||||||
+{
|
|
||||||
+ foo ();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+use3 ()
|
|
||||||
+{
|
|
||||||
+ foo ();
|
|
||||||
+}
|
|
||||||
--- gcc/testsuite/g++.dg/ipa/pr68672-3.C.jj 2016-02-11 12:34:02.374272024 +0100
|
|
||||||
+++ gcc/testsuite/g++.dg/ipa/pr68672-3.C 2016-02-11 12:34:22.337985482 +0100
|
|
||||||
@@ -0,0 +1,57 @@
|
|
||||||
+// PR ipa/68672
|
|
||||||
+// { dg-do compile }
|
|
||||||
+// { dg-options "-O3 --param=partial-inlining-entry-probability=100 -g" }
|
|
||||||
+
|
|
||||||
+struct S { ~S () {} };
|
|
||||||
+S *a, *e;
|
|
||||||
+int *b;
|
|
||||||
+void bar ();
|
|
||||||
+void baz ();
|
|
||||||
+void fn (int *);
|
|
||||||
+void fn2 (S *);
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+foo ()
|
|
||||||
+{
|
|
||||||
+ S *c = a;
|
|
||||||
+ if (c)
|
|
||||||
+ {
|
|
||||||
+ bar ();
|
|
||||||
+ if (a)
|
|
||||||
+ __builtin_abort ();
|
|
||||||
+ baz ();
|
|
||||||
+ }
|
|
||||||
+ int p = *b;
|
|
||||||
+ S *f = e;
|
|
||||||
+ if (p)
|
|
||||||
+ {
|
|
||||||
+ fn2 (f);
|
|
||||||
+ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b);
|
|
||||||
+ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b);
|
|
||||||
+ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b);
|
|
||||||
+ fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b);
|
|
||||||
+ }
|
|
||||||
+ f->~S ();
|
|
||||||
+ int q = 2 * p;
|
|
||||||
+ int r = 3 * q;
|
|
||||||
+ S *d = c;
|
|
||||||
+ return p;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+use1 ()
|
|
||||||
+{
|
|
||||||
+ foo ();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+use2 ()
|
|
||||||
+{
|
|
||||||
+ foo ();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+use3 ()
|
|
||||||
+{
|
|
||||||
+ foo ();
|
|
||||||
+}
|
|
@ -1,88 +0,0 @@
|
|||||||
2016-02-10 Jakub Jelinek <jakub@redhat.com>
|
|
||||||
|
|
||||||
PR ipa/69241
|
|
||||||
* ipa-split.c (split_function): If split part returns TREE_ADDRESSABLE
|
|
||||||
type by reference, force lhs on the call.
|
|
||||||
|
|
||||||
* g++.dg/ipa/pr69241-4.C: New test.
|
|
||||||
|
|
||||||
--- gcc/ipa-split.c.jj 2016-02-11 12:46:15.975777652 +0100
|
|
||||||
+++ gcc/ipa-split.c 2016-02-11 13:06:57.715241871 +0100
|
|
||||||
@@ -629,7 +629,18 @@ consider_split (struct split_point *curr
|
|
||||||
4) For non-SSA we need to look where the var is computed. */
|
|
||||||
retval = find_retval (return_bb);
|
|
||||||
if (!retval)
|
|
||||||
- current->split_part_set_retval = true;
|
|
||||||
+ {
|
|
||||||
+ /* If there is a return_bb with no return value in function returning
|
|
||||||
+ value by reference, also make the split part return void, otherwise
|
|
||||||
+ we expansion would try to create a non-POD temporary, which is
|
|
||||||
+ invalid. */
|
|
||||||
+ if (return_bb != EXIT_BLOCK_PTR_FOR_FN (cfun)
|
|
||||||
+ && DECL_RESULT (current_function_decl)
|
|
||||||
+ && DECL_BY_REFERENCE (DECL_RESULT (current_function_decl)))
|
|
||||||
+ current->split_part_set_retval = false;
|
|
||||||
+ else
|
|
||||||
+ current->split_part_set_retval = true;
|
|
||||||
+ }
|
|
||||||
else if (is_gimple_min_invariant (retval))
|
|
||||||
current->split_part_set_retval = false;
|
|
||||||
/* Special case is value returned by reference we record as if it was non-ssa
|
|
||||||
--- gcc/testsuite/g++.dg/ipa/pr69241-4.C.jj 2016-02-11 13:00:04.160075417 +0100
|
|
||||||
+++ gcc/testsuite/g++.dg/ipa/pr69241-4.C 2016-02-11 13:00:04.160075417 +0100
|
|
||||||
@@ -0,0 +1,55 @@
|
|
||||||
+// PR ipa/69241
|
|
||||||
+// { dg-do compile { target c++11 } }
|
|
||||||
+// { dg-options "-O2 -Wno-return-type" }
|
|
||||||
+
|
|
||||||
+template <typename> class A;
|
|
||||||
+struct B {
|
|
||||||
+ using pointer = int *;
|
|
||||||
+};
|
|
||||||
+template <typename _CharT, typename = A<_CharT>> class basic_string {
|
|
||||||
+ long _M_string_length;
|
|
||||||
+ enum { _S_local_capacity = 15 } _M_local_buf[_S_local_capacity];
|
|
||||||
+ B::pointer _M_local_data;
|
|
||||||
+
|
|
||||||
+public:
|
|
||||||
+ ~basic_string();
|
|
||||||
+};
|
|
||||||
+template <typename _CharT, typename _Traits, typename _Alloc>
|
|
||||||
+int operator<<(_Traits, basic_string<_CharT, _Alloc>);
|
|
||||||
+class C {
|
|
||||||
+ basic_string<A<char>> _M_string;
|
|
||||||
+};
|
|
||||||
+class D {
|
|
||||||
+ C _M_stringbuf;
|
|
||||||
+};
|
|
||||||
+class F {
|
|
||||||
+ int stream;
|
|
||||||
+ D stream_;
|
|
||||||
+};
|
|
||||||
+class G {
|
|
||||||
+public:
|
|
||||||
+ void operator&(int);
|
|
||||||
+};
|
|
||||||
+class H {
|
|
||||||
+public:
|
|
||||||
+ H(unsigned);
|
|
||||||
+ H(H &&);
|
|
||||||
+ bool m_fn1();
|
|
||||||
+};
|
|
||||||
+class I {
|
|
||||||
+ void m_fn2(const int &&);
|
|
||||||
+ static H m_fn3(const int &);
|
|
||||||
+};
|
|
||||||
+template <typename Functor> void Bind(Functor);
|
|
||||||
+class J {
|
|
||||||
+public:
|
|
||||||
+ static basic_string<char> m_fn4();
|
|
||||||
+};
|
|
||||||
+int a;
|
|
||||||
+void I::m_fn2(const int &&) { Bind(m_fn3); }
|
|
||||||
+H I::m_fn3(const int &) {
|
|
||||||
+ !false ? (void)0 : G() & F() << J::m_fn4();
|
|
||||||
+ H b(a);
|
|
||||||
+ if (b.m_fn1())
|
|
||||||
+ F();
|
|
||||||
+}
|
|
@ -1,41 +0,0 @@
|
|||||||
2016-02-04 Jakub Jelinek <jakub@redhat.com>
|
|
||||||
|
|
||||||
PR c++/69658
|
|
||||||
* init.c (expand_default_init): Only call reshape_init
|
|
||||||
in the direct-initialization from an initializer list case.
|
|
||||||
|
|
||||||
* g++.dg/init/pr69658.C: New test.
|
|
||||||
|
|
||||||
--- gcc/cp/init.c.jj 2016-01-29 12:12:46.000000000 +0100
|
|
||||||
+++ gcc/cp/init.c 2016-02-04 18:53:26.865318337 +0100
|
|
||||||
@@ -1636,16 +1636,17 @@ expand_default_init (tree binfo, tree tr
|
|
||||||
gcc_checking_assert ((flags & LOOKUP_ONLYCONVERTING) == 0
|
|
||||||
&& TREE_CHAIN (init) == NULL_TREE);
|
|
||||||
init = TREE_VALUE (init);
|
|
||||||
+ /* Only call reshape_init if it has not been called earlier
|
|
||||||
+ by the callers. */
|
|
||||||
+ if (BRACE_ENCLOSED_INITIALIZER_P (init) && CP_AGGREGATE_TYPE_P (type))
|
|
||||||
+ init = reshape_init (type, init, complain);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (init && BRACE_ENCLOSED_INITIALIZER_P (init)
|
|
||||||
&& CP_AGGREGATE_TYPE_P (type))
|
|
||||||
/* A brace-enclosed initializer for an aggregate. In C++0x this can
|
|
||||||
happen for direct-initialization, too. */
|
|
||||||
- {
|
|
||||||
- init = reshape_init (type, init, complain);
|
|
||||||
- init = digest_init (type, init, complain);
|
|
||||||
- }
|
|
||||||
+ init = digest_init (type, init, complain);
|
|
||||||
|
|
||||||
/* A CONSTRUCTOR of the target's type is a previously digested
|
|
||||||
initializer, whether that happened just above or in
|
|
||||||
--- gcc/testsuite/g++.dg/init/pr69658.C.jj 2016-02-04 18:55:46.862390961 +0100
|
|
||||||
+++ gcc/testsuite/g++.dg/init/pr69658.C 2016-02-04 18:54:58.000000000 +0100
|
|
||||||
@@ -0,0 +1,6 @@
|
|
||||||
+// PR c++/69658
|
|
||||||
+// { dg-do compile }
|
|
||||||
+
|
|
||||||
+struct S { S (int); };
|
|
||||||
+struct T { char n[6]; S s; };
|
|
||||||
+T t[1] = { { "foo", 1 } }; // { dg-bogus "C99 designator" }
|
|
Loading…
Reference in New Issue
Block a user