Bug 37337 - [4.4 Regression] ICE: verify_flow_info failed
Summary: [4.4 Regression] ICE: verify_flow_info failed
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: 4.4.0
Assignee: Jakub Jelinek
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2008-09-02 18:24 UTC by David Binderman
Modified: 2008-09-08 19:51 UTC (History)
1 user (show)

See Also:
Host: suse-linux-x86_64
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-09-08 15:08:50


Attachments
C++ source code (60.76 KB, text/plain)
2008-09-02 18:25 UTC, David Binderman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2008-09-02 18:24:12 UTC
I just tried to compile the Suse Linux package bochs-2.2.1-202
with the GNU C++ compiler version 4.4 snapshot 20080829.

The compiler said

In constructor 'bx_null_pktmover_c::bx_null_pktmover_c(const char*, const char*, void (*)(void*, const void*, unsigned int), void*, char*)':
eth_null.cc:88: error: BB 18 can not throw but has EH edges
eth_null.cc:88: internal compiler error: verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Pre-processed source code attached. Flags -O2 -fpermissive required.
Comment 1 David Binderman 2008-09-02 18:25:33 UTC
Created attachment 16197 [details]
C++ source code
Comment 2 Andrew Pinski 2008-09-06 01:23:35 UTC
Reducing.
Comment 3 Andrew Pinski 2008-09-06 02:13:46 UTC
Reduced testcase:
extern "C" {
  typedef struct _IO_FILE FILE;
  extern int __fprintf_chk (FILE *__restrict __stream, int __flag,      __const char *__restrict __format, ...);
  extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...)
  {
    return __fprintf_chk (__stream, 2 - 1, __fmt,    __builtin_va_arg_pack ());
  }
}
extern int bx_pc_system;
struct eth_pktmover_c {
  virtual ~eth_pktmover_c (void) {   }
};
struct bx_null_pktmover_c : public eth_pktmover_c
{
  bx_null_pktmover_c();
  FILE *txlog_txt;
};
void f(int*);
bx_null_pktmover_c::bx_null_pktmover_c()
{
  f(&bx_pc_system);
  for (int i=0; i<6; i++)
    fprintf (txlog_txt, "%02x", 0xff);
  fprintf (txlog_txt, "\n--\n");
}

Comment 4 Jakub Jelinek 2008-09-08 15:08:50 UTC
Testing a patch.
Comment 5 Jakub Jelinek 2008-09-08 19:32:41 UTC
Subject: Bug 37337

Author: jakub
Date: Mon Sep  8 19:31:18 2008
New Revision: 140117

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140117
Log:
	PR middle-end/37337
	* tree-ssa-dom.c (optimize_stmt): Call maybe_clean_or_replace_eh_stmt
	even when a stmt has been gimple_modified_p, but after fold_stmt is
	not any longer.  Remove unneeded may_have_exposed_new_symbols
	initializations.

	* g++.dg/tree-ssa/pr37337.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/tree-ssa/pr37337.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-dom.c

Comment 6 Jakub Jelinek 2008-09-08 19:51:24 UTC
Fixed.