public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/51481] New: ice: dead STMT in EH table
@ 2011-12-09 8:46 dcb314 at hotmail dot com
2011-12-09 8:57 ` [Bug tree-optimization/51481] [4.7 Regression] " rguenth at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: dcb314 at hotmail dot com @ 2011-12-09 8:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481
Bug #: 51481
Summary: ice: dead STMT in EH table
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dcb314@hotmail.com
Created attachment 26031
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26031
C source code
I just tried to compile the package abcm2ps-5.9.21-3
on latest trunk dated 20111208 on an AMD x86_64 box.
The compiler said
subs.c: In function 'error.constprop.3':
subs.c:217:6: error: dead STMT in EH table
# .MEM_37 = VDEF <.MEM_31>
__fprintf_chk (stderr.73_17, 1, "Error ");
subs.c:217:6: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Preprocessed source code attached. Flags -O3 -fexceptions required.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table
2011-12-09 8:46 [Bug c/51481] New: ice: dead STMT in EH table dcb314 at hotmail dot com
@ 2011-12-09 8:57 ` rguenth at gcc dot gnu.org
2011-12-09 9:07 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-09 8:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-12-09
Component|c |tree-optimization
Known to work| |4.6.2
Target Milestone|--- |4.7.0
Summary|ice: dead STMT in EH table |[4.7 Regression] ice: dead
| |STMT in EH table
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-09 08:54:30 UTC ---
Catched at IPA inline transform time. Confirmed, regression from 4.6,
reducing.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table
2011-12-09 8:46 [Bug c/51481] New: ice: dead STMT in EH table dcb314 at hotmail dot com
2011-12-09 8:57 ` [Bug tree-optimization/51481] [4.7 Regression] " rguenth at gcc dot gnu.org
@ 2011-12-09 9:07 ` rguenth at gcc dot gnu.org
2011-12-12 9:22 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-09 9:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jamborm at gcc dot gnu.org
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-09 09:01:29 UTC ---
The following fails with -O -fexceptions -fipa-cp -fipa-cp-clone:
typedef __builtin_va_list __gnuc_va_list;
typedef __gnuc_va_list va_list;
extern struct _IO_FILE *stderr;
extern __const unsigned short int **__ctype_b_loc (void)
__attribute__ ((__nothrow__)) __attribute__ ((__const));
struct abcsym {
unsigned short colnum;
int linenum;
};
struct SYMBOL {
struct abcsym as;
};
typedef struct SYMBOL *INFO[26];
extern INFO info;
void error(int sev, struct SYMBOL *s, char *fmt, ...);
void bug(char *msg, int fatal)
{
error(1, 0, "Internal error: %s.", msg);
}
void error(int sev, struct SYMBOL *s, char *fmt, ...)
{
va_list args;
static struct SYMBOL *t;
if (t != info['T' - 'A'])
{
char *p;
t = info['T' - 'A'];
while ((*__ctype_b_loc ())[(int) (((unsigned char) *p))])
p++;
}
__builtin_fprintf(stderr, sev == 0 ? "Warning " : "Error ");
if (s != 0)
__builtin_fprintf(stderr, "in line %d.%d", s->as.linenum, s->as.colnum);
__builtin_va_end(args);
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table
2011-12-09 8:46 [Bug c/51481] New: ice: dead STMT in EH table dcb314 at hotmail dot com
2011-12-09 8:57 ` [Bug tree-optimization/51481] [4.7 Regression] " rguenth at gcc dot gnu.org
2011-12-09 9:07 ` rguenth at gcc dot gnu.org
@ 2011-12-12 9:22 ` jakub at gcc dot gnu.org
2011-12-12 10:27 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-12 9:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-12 09:22:06 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181172
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table
2011-12-09 8:46 [Bug c/51481] New: ice: dead STMT in EH table dcb314 at hotmail dot com
` (2 preceding siblings ...)
2011-12-12 9:22 ` jakub at gcc dot gnu.org
@ 2011-12-12 10:27 ` jakub at gcc dot gnu.org
2011-12-12 10:54 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-12 10:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-12 10:24:49 UTC ---
Created attachment 26053
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26053
gcc47-pr51481.patch
maybe_cleanup_or_replace_eh_stmt wasn't called, the patch fixes that.
Unfortunately, as it is deep inside of fold_stmt called from deep from various
passes, including cfg cleanup, I'm afraid handling eh edge dropping as opposed
to just replacing would be hard. Let's just hope possibly throwing builtins
aren't optimized away.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table
2011-12-09 8:46 [Bug c/51481] New: ice: dead STMT in EH table dcb314 at hotmail dot com
` (3 preceding siblings ...)
2011-12-12 10:27 ` jakub at gcc dot gnu.org
@ 2011-12-12 10:54 ` jakub at gcc dot gnu.org
2011-12-12 21:01 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-12 10:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #26053|0 |1
is obsolete| |
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-12 10:48:22 UTC ---
Created attachment 26054
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26054
gcc47-pr51481.patch
Updated patch that won't fold if gimple_purge_dead_eh_edges would be needed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table
2011-12-09 8:46 [Bug c/51481] New: ice: dead STMT in EH table dcb314 at hotmail dot com
` (4 preceding siblings ...)
2011-12-12 10:54 ` jakub at gcc dot gnu.org
@ 2011-12-12 21:01 ` jakub at gcc dot gnu.org
2011-12-12 21:16 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-12 21:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-12 20:59:31 UTC ---
Author: jakub
Date: Mon Dec 12 20:59:28 2011
New Revision: 182264
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182264
Log:
PR tree-optimization/51481
* gimple-fold.c (gimple_fold_call): Call
maybe_clean_or_replace_eh_stmt. Avoid optimization if stmt has EH
edges, but gimple_fold_builtin result can't throw.
* gcc.dg/pr51481.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr51481.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-fold.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table
2011-12-09 8:46 [Bug c/51481] New: ice: dead STMT in EH table dcb314 at hotmail dot com
` (5 preceding siblings ...)
2011-12-12 21:01 ` jakub at gcc dot gnu.org
@ 2011-12-12 21:16 ` jakub at gcc dot gnu.org
2011-12-13 11:28 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-12 21:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-12 21:02:38 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table
2011-12-09 8:46 [Bug c/51481] New: ice: dead STMT in EH table dcb314 at hotmail dot com
` (6 preceding siblings ...)
2011-12-12 21:16 ` jakub at gcc dot gnu.org
@ 2011-12-13 11:28 ` rguenth at gcc dot gnu.org
2011-12-13 13:27 ` rguenth at gcc dot gnu.org
2011-12-13 14:03 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-13 11:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-13 11:24:44 UTC ---
The following is a real fix I'm going to test.
@@ -1601,6 +1605,7 @@ replace_uses_by (tree name, tree val)
if (gimple_code (stmt) != GIMPLE_PHI)
{
gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
+ gimple orig_stmt = stmt;
size_t i;
fold_stmt (&gsi);
@@ -1619,7 +1624,7 @@ replace_uses_by (tree name, tree val)
recompute_tree_invariant_for_addr_expr (op);
}
- maybe_clean_or_replace_eh_stmt (stmt, stmt);
+ maybe_clean_or_replace_eh_stmt (orig_stmt, stmt);
update_stmt (stmt);
}
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table
2011-12-09 8:46 [Bug c/51481] New: ice: dead STMT in EH table dcb314 at hotmail dot com
` (7 preceding siblings ...)
2011-12-13 11:28 ` rguenth at gcc dot gnu.org
@ 2011-12-13 13:27 ` rguenth at gcc dot gnu.org
2011-12-13 14:03 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-13 13:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481
--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-13 12:56:13 UTC ---
Author: rguenth
Date: Tue Dec 13 12:56:09 2011
New Revision: 182280
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182280
Log:
2011-12-13 Richard Guenther <rguenther@suse.de>
PR middle-end/51481
* tree-cfg.c (replace_uses_by): Pass proper arguments to
maybe_clean_or_replace_eh_stmt.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-cfg.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table
2011-12-09 8:46 [Bug c/51481] New: ice: dead STMT in EH table dcb314 at hotmail dot com
` (8 preceding siblings ...)
2011-12-13 13:27 ` rguenth at gcc dot gnu.org
@ 2011-12-13 14:03 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-13 14:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-13 14:01:04 UTC ---
Author: jakub
Date: Tue Dec 13 14:00:58 2011
New Revision: 182284
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182284
Log:
Revert
2011-12-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51481
* gimple-fold.c (gimple_fold_call): Call
maybe_clean_or_replace_eh_stmt. Avoid optimization if stmt has EH
edges, but gimple_fold_builtin result can't throw.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-fold.c
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-12-13 14:01 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-09 8:46 [Bug c/51481] New: ice: dead STMT in EH table dcb314 at hotmail dot com
2011-12-09 8:57 ` [Bug tree-optimization/51481] [4.7 Regression] " rguenth at gcc dot gnu.org
2011-12-09 9:07 ` rguenth at gcc dot gnu.org
2011-12-12 9:22 ` jakub at gcc dot gnu.org
2011-12-12 10:27 ` jakub at gcc dot gnu.org
2011-12-12 10:54 ` jakub at gcc dot gnu.org
2011-12-12 21:01 ` jakub at gcc dot gnu.org
2011-12-12 21:16 ` jakub at gcc dot gnu.org
2011-12-13 11:28 ` rguenth at gcc dot gnu.org
2011-12-13 13:27 ` rguenth at gcc dot gnu.org
2011-12-13 14:03 ` jakub at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).