* [Bug c/61779] gcc -Og fails with impossible constraint on legal C code
2014-07-11 16:23 [Bug c/61779] New: gcc -Og fails with impossible constraint on legal C code zeccav at gmail dot com
@ 2014-07-14 11:40 ` rguenth at gcc dot gnu.org
2014-07-14 13:53 ` rguenth at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-07-14 11:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61779
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-07-14
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
f ()
{
int iftmp.0_1;
<bb 2>:
<bb 3>:
<bb 4>:
# iftmp.0_1 = PHI <1(3)>
__asm__ __volatile__(".pushsection .note.stapsdt,"?","note"
.4byte 992f-991f,994f-993f,3
.asciz "%n0@%1"
" : : "_SDT_S1" "n" iftmp.0_1, "_SDT_A1" "nor" 0);
goto <bb 3>;
Huh. At -O0 we have the constant 1 propagated. From folding builtins
we get
_7 = 0;
if (_7 == 0)
goto <bb 5>;
else
goto <bb 4>;
<bb 4>:
<bb 5>:
# iftmp.0_1 = PHI <1(3), -1(4)>
and copyprop then produces
<bb 4>:
# iftmp.0_1 = PHI <1(3)>
because copyprop does
Visiting statement:
if (_7 == 0)
No interesting values produced.
Adding Destination of edge (3 -> 5) to worklist
Adding Destination of edge (3 -> 4) to worklist
err. Since copyprop also copy-propagates constants copy_prop_visit_cond_stmt
should try harder.
Mine.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/61779] gcc -Og fails with impossible constraint on legal C code
2014-07-11 16:23 [Bug c/61779] New: gcc -Og fails with impossible constraint on legal C code zeccav at gmail dot com
2014-07-14 11:40 ` [Bug c/61779] " rguenth at gcc dot gnu.org
@ 2014-07-14 13:53 ` rguenth at gcc dot gnu.org
2014-07-15 7:51 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-07-14 13:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61779
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Mon Jul 14 13:52:38 2014
New Revision: 212521
URL: https://gcc.gnu.org/viewcvs?rev=212521&root=gcc&view=rev
Log:
2014-07-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/61779
* tree-ssa-copy.c (copy_prop_visit_cond_stmt): Always try
simplifying a condition.
* gcc.dg/tree-ssa/ssa-copyprop-2.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-copyprop-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-copy.c
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/61779] gcc -Og fails with impossible constraint on legal C code
2014-07-11 16:23 [Bug c/61779] New: gcc -Og fails with impossible constraint on legal C code zeccav at gmail dot com
2014-07-14 11:40 ` [Bug c/61779] " rguenth at gcc dot gnu.org
2014-07-14 13:53 ` rguenth at gcc dot gnu.org
@ 2014-07-15 7:51 ` rguenth at gcc dot gnu.org
2014-07-15 10:03 ` zeccav at gmail dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-07-15 7:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61779
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.10.0
Known to fail| |4.8.3, 4.9.1
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for 4.10 sofar.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/61779] gcc -Og fails with impossible constraint on legal C code
2014-07-11 16:23 [Bug c/61779] New: gcc -Og fails with impossible constraint on legal C code zeccav at gmail dot com
` (2 preceding siblings ...)
2014-07-15 7:51 ` rguenth at gcc dot gnu.org
@ 2014-07-15 10:03 ` zeccav at gmail dot com
2014-07-15 10:13 ` rguenther at suse dot de
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: zeccav at gmail dot com @ 2014-07-15 10:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61779
--- Comment #5 from Vittorio Zecca <zeccav at gmail dot com> ---
I just applied your fix and now gcc compiles succesfully with -Og.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/61779] gcc -Og fails with impossible constraint on legal C code
2014-07-11 16:23 [Bug c/61779] New: gcc -Og fails with impossible constraint on legal C code zeccav at gmail dot com
` (3 preceding siblings ...)
2014-07-15 10:03 ` zeccav at gmail dot com
@ 2014-07-15 10:13 ` rguenther at suse dot de
2014-07-15 15:05 ` zeccav at gmail dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenther at suse dot de @ 2014-07-15 10:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61779
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 15 Jul 2014, zeccav at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61779
>
> --- Comment #5 from Vittorio Zecca <zeccav at gmail dot com> ---
> I just applied your fix and now gcc compiles succesfully with -Og.
Thanks for the feedback on -Og btw - it hasn't seen very much
testing coverage yet. Probably because the advertised fast
compile-time is still much slower than with -O0.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/61779] gcc -Og fails with impossible constraint on legal C code
2014-07-11 16:23 [Bug c/61779] New: gcc -Og fails with impossible constraint on legal C code zeccav at gmail dot com
` (4 preceding siblings ...)
2014-07-15 10:13 ` rguenther at suse dot de
@ 2014-07-15 15:05 ` zeccav at gmail dot com
2014-07-17 7:53 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: zeccav at gmail dot com @ 2014-07-15 15:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61779
--- Comment #7 from Vittorio Zecca <zeccav at gmail dot com> ---
I forgot to mention that my code fragment comes from
#include <sys/sdt.h>
void
f(void)
{
for (;;)
_SDT_PROBE(0, 0, 1,(0));
}
Maybe you can find intelligent ways to exercise this code and find
more -Og bugs?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/61779] gcc -Og fails with impossible constraint on legal C code
2014-07-11 16:23 [Bug c/61779] New: gcc -Og fails with impossible constraint on legal C code zeccav at gmail dot com
` (5 preceding siblings ...)
2014-07-15 15:05 ` zeccav at gmail dot com
@ 2014-07-17 7:53 ` rguenth at gcc dot gnu.org
2014-07-17 7:53 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-07-17 7:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61779
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work| |4.9.2
Resolution|--- |FIXED
Target Milestone|--- |4.9.2
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for 4.9.2.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/61779] gcc -Og fails with impossible constraint on legal C code
2014-07-11 16:23 [Bug c/61779] New: gcc -Og fails with impossible constraint on legal C code zeccav at gmail dot com
` (6 preceding siblings ...)
2014-07-17 7:53 ` rguenth at gcc dot gnu.org
@ 2014-07-17 7:53 ` rguenth at gcc dot gnu.org
2014-07-24 14:38 ` zeccav at gmail dot com
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-07-17 7:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61779
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Jul 17 07:53:16 2014
New Revision: 212741
URL: https://gcc.gnu.org/viewcvs?rev=212741&root=gcc&view=rev
Log:
2014-07-17 Richard Biener <rguenther@suse.de>
Backport from mainline
2014-07-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/61779
* tree-ssa-copy.c (copy_prop_visit_cond_stmt): Always try
simplifying a condition.
* gcc.dg/tree-ssa/ssa-copyprop-2.c: New testcase.
Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/tree-ssa/ssa-copyprop-2.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
branches/gcc-4_9-branch/gcc/tree-ssa-copy.c
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/61779] gcc -Og fails with impossible constraint on legal C code
2014-07-11 16:23 [Bug c/61779] New: gcc -Og fails with impossible constraint on legal C code zeccav at gmail dot com
` (7 preceding siblings ...)
2014-07-17 7:53 ` rguenth at gcc dot gnu.org
@ 2014-07-24 14:38 ` zeccav at gmail dot com
2014-07-25 9:38 ` rguenth at gcc dot gnu.org
2014-07-25 11:48 ` zeccav at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: zeccav at gmail dot com @ 2014-07-24 14:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61779
--- Comment #10 from Vittorio Zecca <zeccav at gmail dot com> ---
I just installed gcc-4.9.1 and it still has this bug.
It does not even compile itself (divtf3.c) with -Og.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/61779] gcc -Og fails with impossible constraint on legal C code
2014-07-11 16:23 [Bug c/61779] New: gcc -Og fails with impossible constraint on legal C code zeccav at gmail dot com
` (8 preceding siblings ...)
2014-07-24 14:38 ` zeccav at gmail dot com
@ 2014-07-25 9:38 ` rguenth at gcc dot gnu.org
2014-07-25 11:48 ` zeccav at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-07-25 9:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61779
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Vittorio Zecca from comment #10)
> I just installed gcc-4.9.1 and it still has this bug.
> It does not even compile itself (divtf3.c) with -Og.
As said it will be fixed in 4.9.2. I've double-checked that -Og bootstrap
works on the 4.9 branch head - how did you configure/make?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/61779] gcc -Og fails with impossible constraint on legal C code
2014-07-11 16:23 [Bug c/61779] New: gcc -Og fails with impossible constraint on legal C code zeccav at gmail dot com
` (9 preceding siblings ...)
2014-07-25 9:38 ` rguenth at gcc dot gnu.org
@ 2014-07-25 11:48 ` zeccav at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: zeccav at gmail dot com @ 2014-07-25 11:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61779
--- Comment #12 from Vittorio Zecca <zeccav at gmail dot com> ---
Yes, you did say it will be fixed in 4.9.2. Sorry.
I did:
export CFLAGS="-ggdb -Og"
export CXXFLAGS=$CFLAGS
../gcc-4.9.1/configure --prefix=/home/vitti/local/gcc-4.9.1
--disable-lto --with-tune=k8 --enable-languages=c,c++,fortran
I compiled manually divtf3.c without -Og.
^ permalink raw reply [flat|nested] 12+ messages in thread