* [Bug ipa/60026] [4.8/4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
@ 2014-02-03 9:41 ` rguenth at gcc dot gnu.org
2014-02-03 9:42 ` [Bug ipa/60026] [4.9 " rguenth at gcc dot gnu.org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-02-03 9:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Keywords| |ice-checking
Last reconfirmed| |2014-02-03
Component|tree-optimization |ipa
CC| |jamborm at gcc dot gnu.org
Ever confirmed|0 |1
Summary|ICE at -O3 on valid code |[4.8/4.9 Regression] ICE at
|(with the optimize pragma) |-O3 on valid code (with the
|on x86_64-linux-gnu |optimize pragma) on
| |x86_64-linux-gnu
Target Milestone|--- |4.8.3
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
2014-02-03 9:41 ` [Bug ipa/60026] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
@ 2014-02-03 9:42 ` rguenth at gcc dot gnu.org
2014-02-03 16:57 ` [Bug ipa/60026] [4.8/4.9 " jakub at gcc dot gnu.org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-02-03 9:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
Target Milestone|4.8.3 |4.9.0
Summary|[4.8/4.9 Regression] ICE at |[4.9 Regression] ICE at -O3
|-O3 on valid code (with the |on valid code (with the
|optimize pragma) on |optimize pragma) on
|x86_64-linux-gnu |x86_64-linux-gnu
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can't reproduce it on the 4.8 branch though.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8/4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
2014-02-03 9:41 ` [Bug ipa/60026] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2014-02-03 9:42 ` [Bug ipa/60026] [4.9 " rguenth at gcc dot gnu.org
@ 2014-02-03 16:57 ` jakub at gcc dot gnu.org
2014-02-03 17:23 ` jakub at gcc dot gnu.org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-03 16:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Summary|[4.9 Regression] ICE at -O3 |[4.8/4.9 Regression] ICE at
|on valid code (with the |-O3 on valid code (with the
|optimize pragma) on |optimize pragma) on
|x86_64-linux-gnu |x86_64-linux-gnu
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r193298.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8/4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
` (2 preceding siblings ...)
2014-02-03 16:57 ` [Bug ipa/60026] [4.8/4.9 " jakub at gcc dot gnu.org
@ 2014-02-03 17:23 ` jakub at gcc dot gnu.org
2014-02-03 18:05 ` jamborm at gcc dot gnu.org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-03 17:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 32030
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32030&action=edit
gcc49-pr60026.patch
The problem is that for -O0 we don't create vdef/vuse at all, but I'd say we
shouldn't be cloning -O0 functions either, even when they don't have noclone
argument. Thus perhaps something like attached patch?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8/4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
` (3 preceding siblings ...)
2014-02-03 17:23 ` jakub at gcc dot gnu.org
@ 2014-02-03 18:05 ` jamborm at gcc dot gnu.org
2014-02-03 18:10 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-02-03 18:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> Created attachment 32030 [details]
> gcc49-pr60026.patch
>
> The problem is that for -O0 we don't create vdef/vuse at all, but I'd say we
> shouldn't be cloning -O0 functions either, even when they don't have noclone
> argument. Thus perhaps something like attached patch?
While the idea of the patch is of course good, it seems that we only
set cannot_be_copied.* in copy_forbidden in tree-inline.c, so perhaps
it would be better to put the optimized test there as well so that we
never have any ordering issues?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8/4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
` (4 preceding siblings ...)
2014-02-03 18:05 ` jamborm at gcc dot gnu.org
@ 2014-02-03 18:10 ` jakub at gcc dot gnu.org
2014-02-03 18:25 ` jamborm at gcc dot gnu.org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-03 18:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Jambor from comment #5)
> (In reply to Jakub Jelinek from comment #4)
> > Created attachment 32030 [details]
> > gcc49-pr60026.patch
> >
> > The problem is that for -O0 we don't create vdef/vuse at all, but I'd say we
> > shouldn't be cloning -O0 functions either, even when they don't have noclone
> > argument. Thus perhaps something like attached patch?
>
> While the idea of the patch is of course good, it seems that we only
> set cannot_be_copied.* in copy_forbidden in tree-inline.c, so perhaps
> it would be better to put the optimized test there as well so that we
> never have any ordering issues?
Not so easily, the problem is that copy_forbidden is called without fun being
actually cfun, and set_cfun is very expensive. Do we ever call copy_forbidden
on functions that haven't been rewritten into SSA form yet? If yes, it could
be even set e.g. during gimplification (if (!optimize)).
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8/4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
` (5 preceding siblings ...)
2014-02-03 18:10 ` jakub at gcc dot gnu.org
@ 2014-02-03 18:25 ` jamborm at gcc dot gnu.org
2014-02-03 18:37 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-02-03 18:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
--- Comment #7 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #6)
> Not so easily, the problem is that copy_forbidden is called without fun
> being actually cfun, and set_cfun is very expensive.
I think we can do the test without setting cfun by something similar
to ipa_func_spec_opts_forbid_analysis_p in ipa-prop.c.
> Do we ever call
> copy_forbidden on functions that haven't been rewritten into SSA form yet?
> If yes, it could be even set e.g. during gimplification (if (!optimize)).
No, I don't think so. It's really a matter of cleanness and a fairly
minor point at that.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8/4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
` (6 preceding siblings ...)
2014-02-03 18:25 ` jamborm at gcc dot gnu.org
@ 2014-02-03 18:37 ` jakub at gcc dot gnu.org
2014-02-03 18:47 ` jamborm at gcc dot gnu.org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-03 18:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 32032
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32032&action=edit
gcc49-pr60026.patch
If you prefer say this, sure, it can be done instead (and fixes the testcase
too).
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8/4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
` (7 preceding siblings ...)
2014-02-03 18:37 ` jakub at gcc dot gnu.org
@ 2014-02-03 18:47 ` jamborm at gcc dot gnu.org
2014-02-04 9:53 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-02-03 18:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
--- Comment #9 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #8)
> Created attachment 32032 [details]
> gcc49-pr60026.patch
>
> If you prefer say this, sure, it can be done instead (and fixes the testcase
> too).
Yes, I do. Thanks!
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8/4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
` (8 preceding siblings ...)
2014-02-03 18:47 ` jamborm at gcc dot gnu.org
@ 2014-02-04 9:53 ` rguenth at gcc dot gnu.org
2014-02-04 13:05 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-02-04 9:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
You could also check gimple_vop (fn) == NULL_TREE (not in virtual SSA form,
we probably should have a better way to query that). But indeed guarding
this for -O0 is better.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8/4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
` (9 preceding siblings ...)
2014-02-04 9:53 ` rguenth at gcc dot gnu.org
@ 2014-02-04 13:05 ` jakub at gcc dot gnu.org
2014-02-04 13:06 ` [Bug ipa/60026] [4.8 " jakub at gcc dot gnu.org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-04 13:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Feb 4 13:04:37 2014
New Revision: 207463
URL: http://gcc.gnu.org/viewcvs?rev=207463&root=gcc&view=rev
Log:
PR ipa/60026
* tree-inline.c (copy_forbidden): Fail for
__attribute__((optimize (0))) functions.
* c-c++-common/torture/pr60026.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/torture/pr60026.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-inline.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
` (10 preceding siblings ...)
2014-02-04 13:05 ` jakub at gcc dot gnu.org
@ 2014-02-04 13:06 ` jakub at gcc dot gnu.org
2014-02-07 23:54 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-04 13:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P1 |P2
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Target Milestone|4.9.0 |4.8.3
Summary|[4.8/4.9 Regression] ICE at |[4.8 Regression] ICE at -O3
|-O3 on valid code (with the |on valid code (with the
|optimize pragma) on |optimize pragma) on
|x86_64-linux-gnu |x86_64-linux-gnu
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
` (11 preceding siblings ...)
2014-02-04 13:06 ` [Bug ipa/60026] [4.8 " jakub at gcc dot gnu.org
@ 2014-02-07 23:54 ` jakub at gcc dot gnu.org
2014-03-06 7:57 ` jakub at gcc dot gnu.org
2014-03-06 8:26 ` jakub at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-07 23:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Feb 7 23:54:17 2014
New Revision: 207621
URL: http://gcc.gnu.org/viewcvs?rev=207621&root=gcc&view=rev
Log:
PR ipa/60026
* ipa-cp.c (determine_versionability): Fail at -O0
or __attribute__((optimize (0))) or -fno-ipa-cp functions.
* tree-sra.c (ipa_sra_preliminary_function_checks): Similarly.
Revert:
2014-02-04 Jakub Jelinek <jakub@redhat.com>
PR ipa/60026
* tree-inline.c (copy_forbidden): Fail for
__attribute__((optimize (0))) functions.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-cp.c
trunk/gcc/tree-inline.c
trunk/gcc/tree-sra.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
` (12 preceding siblings ...)
2014-02-07 23:54 ` jakub at gcc dot gnu.org
@ 2014-03-06 7:57 ` jakub at gcc dot gnu.org
2014-03-06 8:26 ` jakub at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-06 7:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Mar 6 07:57:12 2014
New Revision: 208364
URL: http://gcc.gnu.org/viewcvs?rev=208364&root=gcc&view=rev
Log:
Backport from mainline
2014-02-08 Jakub Jelinek <jakub@redhat.com>
PR ipa/60026
* ipa-cp.c (determine_versionability): Fail at -O0
or __attribute__((optimize (0))) or -fno-ipa-cp functions.
* tree-sra.c (ipa_sra_preliminary_function_checks): Similarly.
2014-02-06 Jakub Jelinek <jakub@redhat.com>
PR target/60062
* tree.h (opts_for_fn): New inline function.
(opt_for_fn): Define.
* config/i386/i386.c (ix86_function_regparm): Use
opt_for_fn (decl, optimize) instead of optimize.
* gcc.c-torture/execute/pr60062.c: New test.
* gcc.c-torture/execute/pr60072.c: New test.
2014-02-04 Jakub Jelinek <jakub@redhat.com>
PR ipa/60026
* c-c++-common/torture/pr60026.c: New test.
Added:
branches/gcc-4_8-branch/gcc/testsuite/c-c++-common/torture/pr60026.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr60062.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr60072.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/i386/i386.c
branches/gcc-4_8-branch/gcc/ipa-cp.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/tree-sra.c
branches/gcc-4_8-branch/gcc/tree.h
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug ipa/60026] [4.8 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu
2014-02-02 1:28 [Bug tree-optimization/60026] New: ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu su at cs dot ucdavis.edu
` (13 preceding siblings ...)
2014-03-06 7:57 ` jakub at gcc dot gnu.org
@ 2014-03-06 8:26 ` jakub at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-06 8:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Hopefully fixed now.
^ permalink raw reply [flat|nested] 16+ messages in thread