* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
@ 2011-11-15 10:50 ` izamyatin at gmail dot com
2011-11-15 16:27 ` matz at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: izamyatin at gmail dot com @ 2011-11-15 10:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
Igor Zamyatin <izamyatin at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |izamyatin at gmail dot com
--- Comment #1 from Igor Zamyatin <izamyatin at gmail dot com> 2011-11-15 10:32:30 UTC ---
I see the same problem. Anybody else met this issue?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
2011-11-15 10:50 ` [Bug tree-optimization/51117] " izamyatin at gmail dot com
@ 2011-11-15 16:27 ` matz at gcc dot gnu.org
2011-11-29 19:03 ` rth at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: matz at gcc dot gnu.org @ 2011-11-15 16:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
Michael Matz <matz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |MOVED
--- Comment #2 from Michael Matz <matz at gcc dot gnu.org> 2011-11-15 15:50:21 UTC ---
See http://sourceware.org/bugzilla/show_bug.cgi?id=13411 for analysis and
possible patch. The newly emitted calls to _Unwind_Resume suck in new object
files that weren't included before leading to these multiple defined symbols.
glibc needs to deal with this in one or the other way.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
2011-11-15 10:50 ` [Bug tree-optimization/51117] " izamyatin at gmail dot com
2011-11-15 16:27 ` matz at gcc dot gnu.org
@ 2011-11-29 19:03 ` rth at gcc dot gnu.org
2011-12-05 14:11 ` rguenth at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rth at gcc dot gnu.org @ 2011-11-29 19:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
Richard Henderson <rth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Last reconfirmed| |2011-11-29
CC| |rth at gcc dot gnu.org
Resolution|MOVED |
Ever Confirmed|0 |1
--- Comment #3 from Richard Henderson <rth at gcc dot gnu.org> 2011-11-29 18:06:55 UTC ---
I think this is a gcc bug. In particular, one of two things ought to happen:
(1) Use the form of try_finally that ignores EH. This would lose clobber
information on EH paths; dunno if this really turns out to be important.
(2) Remove EH cleanup handlers that only involve clobbers which lead to
function exit via REX. This would wait until pass_lower_eh_dispatch,
as that's the first point at which we know whether we actually exit
the function, post-inlining.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
` (2 preceding siblings ...)
2011-11-29 19:03 ` rth at gcc dot gnu.org
@ 2011-12-05 14:11 ` rguenth at gcc dot gnu.org
2011-12-05 14:57 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-05 14:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.7.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
` (3 preceding siblings ...)
2011-12-05 14:11 ` rguenth at gcc dot gnu.org
@ 2011-12-05 14:57 ` jakub at gcc dot gnu.org
2011-12-06 1:06 ` jsm28 at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-05 14:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-05 14:57:39 UTC ---
I agree it is a gcc bug, please see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51275
for more information.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
` (4 preceding siblings ...)
2011-12-05 14:57 ` jakub at gcc dot gnu.org
@ 2011-12-06 1:06 ` jsm28 at gcc dot gnu.org
2011-12-08 17:40 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2011-12-06 1:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
Joseph S. Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
` (5 preceding siblings ...)
2011-12-06 1:06 ` jsm28 at gcc dot gnu.org
@ 2011-12-08 17:40 ` jakub at gcc dot gnu.org
2011-12-09 11:54 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-08 17:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-08 17:24:27 UTC ---
Created attachment 26025
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26025
gcc47-pr51117.patch
Untested fix. This improves e.g.:
struct A { char buf[64]; };
void bar (A *);
void
foo ()
{
{
A a;
bar (&a);
if (a.buf[13])
throw 1;
}
{
A b;
bar (&b);
if (b.buf[13])
throw 2;
}
}
back to 4.6 generated code quality, but it doesn't already e.g.:
struct A
{
char buf[64];
};
void bar (A *);
void
foo ()
{
A c;
bar (&c);
try
{
{
A a;
bar (&a);
if (a.buf[13])
throw 1;
else if (a.buf[52])
throw 3;
}
{
A b;
bar (&b);
if (b.buf[13])
throw 2;
}
}
catch ( ...)
{
throw;
}
}
I think it should be safe to move the clobbers to the EH destination of the
!stmt_can_throw_external (stmt) GIMPLE_RESX for that, but am not 100% sure
about that yet and would prefer to do it incrementally anyway.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
` (6 preceding siblings ...)
2011-12-08 17:40 ` jakub at gcc dot gnu.org
@ 2011-12-09 11:54 ` jakub at gcc dot gnu.org
2011-12-09 16:18 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-09 11:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-09 11:48:33 UTC ---
Author: jakub
Date: Fri Dec 9 11:48:30 2011
New Revision: 182158
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182158
Log:
PR tree-optimization/51117
* tree-eh.c (optimize_clobbers): New function.
(execute_lower_eh_dispatch): Call it.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-eh.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
` (7 preceding siblings ...)
2011-12-09 11:54 ` jakub at gcc dot gnu.org
@ 2011-12-09 16:18 ` jakub at gcc dot gnu.org
2011-12-09 20:52 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-09 16:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-09 16:09:48 UTC ---
Created attachment 26034
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26034
gcc47-pr51117-sink.patch
So far untested attempt to sink clobbers if a BB with all EH pred edges and a
single EH succ edge, ending with internal throwing RESX contains other than
that just CLOBBER stmts (and optionally debug stmts).
Such BBs force us to immediately rethrow with no actual code in between, when
the clobber stmts are sunk into the successor, we can actually ehcleanup those.
Had to tweak a little bit the conflict detection in the expander for that
though, without that it would think the vars still conflict on the incoming
edge (even when no actual insns that might touch memory appear before the
clobber).
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
` (8 preceding siblings ...)
2011-12-09 16:18 ` jakub at gcc dot gnu.org
@ 2011-12-09 20:52 ` jakub at gcc dot gnu.org
2011-12-13 14:01 ` matz at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-09 20:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-09 20:50:50 UTC ---
Author: jakub
Date: Fri Dec 9 20:50:40 2011
New Revision: 182177
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182177
Log:
PR tree-optimization/51117
* tree-eh.c (optimize_clobbers): Don't remove just one
clobber, but all consecutive clobbers before RESX.
Use gimple_clobber_p predicate.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-eh.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
` (9 preceding siblings ...)
2011-12-09 20:52 ` jakub at gcc dot gnu.org
@ 2011-12-13 14:01 ` matz at gcc dot gnu.org
2011-12-13 14:08 ` jakub at gcc dot gnu.org
2011-12-15 17:31 ` jakub at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: matz at gcc dot gnu.org @ 2011-12-13 14:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
--- Comment #9 from Michael Matz <matz at gcc dot gnu.org> 2011-12-13 13:59:42 UTC ---
Author: matz
Date: Tue Dec 13 13:59:35 2011
New Revision: 182283
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182283
Log:
PR tree-optimization/51117
* tree-eh.c (sink_clobbers): New function.
(execute_lower_eh_dispatch): Call it for BBs ending with
internally throwing RESX.
* cfgexpand.c (add_scope_conflicts_1): Add all conflicts only
at the first real instruction.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgexpand.c
trunk/gcc/tree-eh.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
` (10 preceding siblings ...)
2011-12-13 14:01 ` matz at gcc dot gnu.org
@ 2011-12-13 14:08 ` jakub at gcc dot gnu.org
2011-12-15 17:31 ` jakub at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-13 14:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-13 14:04:52 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure
2011-11-13 12:42 [Bug tree-optimization/51117] New: [4.7 regression] rev.181172 causes glibc build failure markus at trippelsdorf dot de
` (11 preceding siblings ...)
2011-12-13 14:08 ` jakub at gcc dot gnu.org
@ 2011-12-15 17:31 ` jakub at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-15 17:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-15 17:27:11 UTC ---
Author: jakub
Date: Thu Dec 15 17:27:08 2011
New Revision: 182379
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182379
Log:
PR tree-optimization/51117
* g++.dg/opt/pr51117.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/opt/pr51117.C
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 14+ messages in thread