public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed
@ 2004-09-27 17:01 micis at gmx dot de
  2004-09-27 17:03 ` [Bug tree-optimization/17697] " micis at gmx dot de
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: micis at gmx dot de @ 2004-09-27 17:01 UTC (permalink / raw)
  To: gcc-bugs

ICE with -O1 an above:

/usr/local/gcc40/bin/g++40 -O2 -c -o Naming_Context.o Naming_Context.ii -v
Reading specs from /usr/local/gcc40/lib/gcc/powerpc-unknown-linux-
gnu/4.0.0/specs
Configured with: ../gcc40/configure --prefix=/usr/local/gcc40 --program-
suffix=40 --with-cpu=G5 --enable-altivec --enable-languages=c,c++ --enable-
checking
Thread model: posix
gcc version 4.0.0 20040926 (experimental)
 /usr/local/gcc40/libexec/gcc/powerpc-unknown-linux-gnu/4.0.0/cc1plus -
fpreprocessed Naming_Context.ii -quiet -dumpbase Naming_Context.ii -mcpu=G5 -
auxbase-strip Naming_Context.o -O2 -version -o /tmp/ccTa7K2I.s
GNU C++ version 4.0.0 20040926 (experimental) (powerpc-unknown-linux-gnu)
        compiled by GNU C version 4.0.0 20040919 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Naming_Context.ii: In member function `int ACE_Local_Name_Space<_ACE_MEM_POOL, 
ACE_LOCK>::list_types_i(ACE_WSTRING_SET&, const ACE_NS_WString&) [with 
_ACE_MEM_POOL = ACE_Lite_MMAP_Memory_Pool, ACE_LOCK = ACE_RW_Process_Mutex]':
Naming_Context.ii:453: error: Statement marked for throw, but doesn't.
D.3212_14 = D.3238_23;

Naming_Context.ii:453: internal compiler error: verify_stmts failed.
Please submit a full bug report, with preprocessed source if appropriate.

Michael Cieslinski

-- 
           Summary: ICE: Statement marked for throw, but doesn't -
                    verify_stmts failed
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: micis at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-linux-gnu
  GCC host triplet: powerpc-linux-gnu
GCC target triplet: powerpc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17697


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/17697] ICE: Statement marked for throw, but doesn't - verify_stmts failed
  2004-09-27 17:01 [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed micis at gmx dot de
@ 2004-09-27 17:03 ` micis at gmx dot de
  2004-09-27 17:09 ` [Bug tree-optimization/17697] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: micis at gmx dot de @ 2004-09-27 17:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From micis at gmx dot de  2004-09-27 17:03 -------
Created an attachment (id=7227)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7227&action=view)
preprocessed source (partially reduced)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17697


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/17697] [4.0 Regression] ICE: Statement marked for throw, but doesn't - verify_stmts failed
  2004-09-27 17:01 [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed micis at gmx dot de
  2004-09-27 17:03 ` [Bug tree-optimization/17697] " micis at gmx dot de
@ 2004-09-27 17:09 ` pinskia at gcc dot gnu dot org
  2004-09-27 17:23 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-27 17:09 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|ICE: Statement marked for   |[4.0 Regression] ICE:
                   |throw, but doesn't -        |Statement marked for throw,
                   |verify_stmts failed         |but doesn't - verify_stmts
                   |                            |failed
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17697


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/17697] [4.0 Regression] ICE: Statement marked for throw, but doesn't - verify_stmts failed
  2004-09-27 17:01 [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed micis at gmx dot de
  2004-09-27 17:03 ` [Bug tree-optimization/17697] " micis at gmx dot de
  2004-09-27 17:09 ` [Bug tree-optimization/17697] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-09-27 17:23 ` pinskia at gcc dot gnu dot org
  2004-09-28  2:06 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-27 17:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-27 17:23 -------
: Search converges between 2004-09-23-161002-trunk (#557) and 2004-09-24-014001-trunk 
(#558).

Reduced testcase:
extern "C"
{
extern int strcmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__));
}
namespace aa
{
  extern int strcmp (const char *s, const char *t);
}
inline int aa::strcmp (const char *s, const char *t)
{ return ::strcmp (s, t); }
int temp(char *a) throw()
{
  return aa::strcmp ("", a);
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-27 17:23:09
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17697


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/17697] [4.0 Regression] ICE: Statement marked for throw, but doesn't - verify_stmts failed
  2004-09-27 17:01 [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed micis at gmx dot de
                   ` (2 preceding siblings ...)
  2004-09-27 17:23 ` pinskia at gcc dot gnu dot org
@ 2004-09-28  2:06 ` pinskia at gcc dot gnu dot org
  2004-09-28 10:31 ` jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-28  2:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-28 02:06 -------
I think this was caused by:
2004-09-21  Diego Novillo  <dnovillo@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	* tree-flow.h (find_new_referenced_vars): Add prototype.
	* tree-sra.c (find_new_referenced_vars_1, find_new_referenced_vars):
	Move to...
	* tree-dfa.c (find_new_referenced_vars_1, find_new_referenced_vars):
	... here.
	(mark_new_vars_to_rename): Walk through all operands.
	* tree-ssa-ccp.c (convert_to_gimple_builtin): New function.
	(execute_fold_all_builtins): Use it.
	(pass_fold_builtins): Add TODO_rename_vars to todo_flags_finish.

	* gcc.c-torture/execute/builtins/strcpy-2.c: New test.
	* gcc.c-torture/execute/builtins/strcpy-2-lib.c: New.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dnovillo at redhat dot com,
                   |                            |jakub at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17697


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/17697] [4.0 Regression] ICE: Statement marked for throw, but doesn't - verify_stmts failed
  2004-09-27 17:01 [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed micis at gmx dot de
                   ` (3 preceding siblings ...)
  2004-09-28  2:06 ` pinskia at gcc dot gnu dot org
@ 2004-09-28 10:31 ` jakub at gcc dot gnu dot org
  2004-09-28 18:33 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-09-28 10:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jakub at gcc dot gnu dot org  2004-09-28 10:31 -------
There seems to be multiple bugs here.

The first one I see is in cp/decl.c (duplicate_decls).
extern "C" { extern int strcmp (const char *s, const char *t) throw ()
__attribute__ ((pure)); }
duplicate_decls is called here on the new strcmp decl and olddecl being the
builtin strcmp decl.
      /* Whether or not the builtin can throw exceptions has no
         bearing on this declarator.  */
      TREE_NOTHROW (olddecl) = 0;
clears NOTHROW flag on olddecl (although it has TYPE_NOTHROW_P (TREE_TYPE
(olddecl))), supposedly so that newdecl's TREE_NOTHROW flag is not influenced
by that.  Later on in that routine, the non-tree_common bits of newdecl are
copied over the olddecl bits, but TREE_NOTHROW flag is not copied from newdecl
(where it is set to 1) to olddecl.  But the function returns olddecl and that's
the decl that is being used.
So we have a TYPE_NOTHROW_P (TREE_TYPE (fn)) function with !TREE_NOTHROW (fn).

Second bug is that execute_fold_all_builtins doesn't call maybe_clean_eh_stmt
and tree_purge_dead_eh_edges.  Will attach the patch for that.

Unfortunately, with that I get
pr17697-2.C: In function `int foo(char*)':
pr17697-2.C:23: error: dominator of 2 status unknown
pr17697-2.C:23: internal compiler error: in verify_dominators, at dominance.c:857




-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at redhat dot com,
                   |                            |mark at codesourcery dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17697


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/17697] [4.0 Regression] ICE: Statement marked for throw, but doesn't - verify_stmts failed
  2004-09-27 17:01 [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed micis at gmx dot de
                   ` (4 preceding siblings ...)
  2004-09-28 10:31 ` jakub at gcc dot gnu dot org
@ 2004-09-28 18:33 ` pinskia at gcc dot gnu dot org
  2004-09-28 19:58 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-28 18:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-28 18:33 -------
I think the verify_dominators bug is that block 2 is really being not referenced anymore. someone 
needs to look into that more to make sure that is true.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17697


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/17697] [4.0 Regression] ICE: Statement marked for throw, but doesn't - verify_stmts failed
  2004-09-27 17:01 [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed micis at gmx dot de
                   ` (5 preceding siblings ...)
  2004-09-28 18:33 ` pinskia at gcc dot gnu dot org
@ 2004-09-28 19:58 ` pinskia at gcc dot gnu dot org
  2004-09-29  9:04 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-28 19:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-28 19:58 -------
Patch: <http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02892.html>.
So the my guess was correct (cool).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17697


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/17697] [4.0 Regression] ICE: Statement marked for throw, but doesn't - verify_stmts failed
  2004-09-27 17:01 [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed micis at gmx dot de
                   ` (6 preceding siblings ...)
  2004-09-28 19:58 ` pinskia at gcc dot gnu dot org
@ 2004-09-29  9:04 ` cvs-commit at gcc dot gnu dot org
  2004-09-29 13:40 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-29  9:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-29 09:04 -------
Subject: Bug 17697

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jakub@gcc.gnu.org	2004-09-29 09:04:21

Modified files:
	gcc            : ChangeLog tree-ssa-ccp.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/opt: pr17697-2.C pr17697-3.C pr17697-1.C 

Log message:
	PR tree-optimization/17697
	* tree-ssa-ccp.c (execute_fold_all_builtins): Update eh and cleanup
	cfg if needed.
	
	* g++.dg/opt/pr17697-1.C: New test.
	* g++.dg/opt/pr17697-2.C: New test.
	* g++.dg/opt/pr17697-3.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5676&r2=2.5677
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-ccp.c.diff?cvsroot=gcc&r1=2.46&r2=2.47
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4361&r2=1.4362
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/pr17697-2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/pr17697-3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/pr17697-1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17697


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/17697] [4.0 Regression] ICE: Statement marked for throw, but doesn't - verify_stmts failed
  2004-09-27 17:01 [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed micis at gmx dot de
                   ` (7 preceding siblings ...)
  2004-09-29  9:04 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-29 13:40 ` pinskia at gcc dot gnu dot org
  2004-09-29 18:17 ` cvs-commit at gcc dot gnu dot org
  2004-09-29 18:52 ` micis at gmx dot de
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-29 13:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-29 13:40 -------
The orginal problem was fixed, I submitted 17724 for the new bug, next time please open a new one 
for each of the bugs.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17697


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/17697] [4.0 Regression] ICE: Statement marked for throw, but doesn't - verify_stmts failed
  2004-09-27 17:01 [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed micis at gmx dot de
                   ` (8 preceding siblings ...)
  2004-09-29 13:40 ` pinskia at gcc dot gnu dot org
@ 2004-09-29 18:17 ` cvs-commit at gcc dot gnu dot org
  2004-09-29 18:52 ` micis at gmx dot de
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-29 18:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-29 18:16 -------
Subject: Bug 17697

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jason@gcc.gnu.org	2004-09-29 18:16:38

Modified files:
	gcc/cp         : ChangeLog decl.c 

Log message:
	PR tree-optimization/17697
	* decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4395&r2=1.4396
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1306&r2=1.1307



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17697


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/17697] [4.0 Regression] ICE: Statement marked for throw, but doesn't - verify_stmts failed
  2004-09-27 17:01 [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed micis at gmx dot de
                   ` (9 preceding siblings ...)
  2004-09-29 18:17 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-29 18:52 ` micis at gmx dot de
  10 siblings, 0 replies; 12+ messages in thread
From: micis at gmx dot de @ 2004-09-29 18:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From micis at gmx dot de  2004-09-29 18:52 -------
I did not open a new bug report because I didn't see these type of bug 
(dominator of xx should be yy, not zz) before I applied the patches given above 
to my gcc.
Maybe these new ICE is caused by something else or it had escaped my view 
before.
But now this new ICE does occure quite often.

Michael Cieslinski

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17697


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-09-29 18:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-27 17:01 [Bug tree-optimization/17697] New: ICE: Statement marked for throw, but doesn't - verify_stmts failed micis at gmx dot de
2004-09-27 17:03 ` [Bug tree-optimization/17697] " micis at gmx dot de
2004-09-27 17:09 ` [Bug tree-optimization/17697] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-09-27 17:23 ` pinskia at gcc dot gnu dot org
2004-09-28  2:06 ` pinskia at gcc dot gnu dot org
2004-09-28 10:31 ` jakub at gcc dot gnu dot org
2004-09-28 18:33 ` pinskia at gcc dot gnu dot org
2004-09-28 19:58 ` pinskia at gcc dot gnu dot org
2004-09-29  9:04 ` cvs-commit at gcc dot gnu dot org
2004-09-29 13:40 ` pinskia at gcc dot gnu dot org
2004-09-29 18:17 ` cvs-commit at gcc dot gnu dot org
2004-09-29 18:52 ` micis at gmx dot de

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).